Roger Racine wrote:

> At 04:24 PM 8/9/1999 , Harbaugh, John S wrote:
> >I'm always curious why someone would choose time-slicing as a dispatching
> or scheduling mechanism.  It is a poor-man's  attempt to simulate
> parallelism on a single CPU computer.  Most authors (Ben-Ari, Burns &
> Wellings, to mention a few) recommend that programs be designed around the
> idea of concurrency, the _potential_ for simultaneous execution of multiple
> instructions, rather than parallelism, the required use of multiple
> processors.  A correct, concurrent Ada program using either preemption or
> rendezvous can execute on one or many processors.  Contrast this with a
> parallel program that must rely on time slicing to run correctly on a
> monoprocessor machine.  Would it not be preferable to use basic language
> features rather than rely on non-portable implementation policies?
> >
> Time slicing is typically used on general-purpose operating systems to
> provide some equality among processes on the use of CPU.

A general-purpose operating system is usually in effect a time sharing system.
In such a system issues such as fairness and minimizing _average_ response time
are of concern.  You typically have a lot of processes and you don't know much
about them.  A real-time system is usually quite different.  The major issues
are  such things as predictability and schedulability.  You have (relatively)
few tasks and you know a lot about them.  Instead of fairness, you want the
highest priority task to have first call on all system resources it needs to
get the job done.

If you compare a typical host (development) environment with a typical target
(execute only) environment such as a workstation and an imbedded computer
controlling an oil refinery, I think it can be seen that time slicing is
appropriate for the first but in most cases not for the second.

                               Robert L. Spooner
                         Registered Professional Engineer
                               Research Assistant
                         Intelligent Control Systems Group

            Applied Research Laboratory        Phone: (814) 863-4120
            The Pennsylvania State University  FAX:   (814) 863-7841
            P. O. Box 30
            State College, PA 16804-0030       [log in to unmask]