Mail Archives: djgpp/1994/07/18/15:20:05
A better way to classify multitasking systems is to distinguish them as
cooperative and preemptive. A cooperative system (like Windows) requires each
task to release the CPU in order for the other tasks to run. A preemptive
system works with a timer. Each task has the CPU for a certain number of timer
ticks, and the CPU is switched between tasks by a supervisory procedure.
Control can be voluntarily released before the alloted time expires.
A preemptive system requires a great deal more support for the programmer.
Semiphores must be used to protect access to non-reentrant sections of code.
If a task is preempted in a device driver (for example), another task may not
enter the device driver since the device will not be in the same state when the
preempted task resumes.
A more detailed description of the requirements for preemptive multitasking can
be found in most college level operating systems textbooks.
-Jim.
_______________________________________________________________________________
What do you mean by 'real-time multitasking'? I always supposed
real-time to be the contrary to multitasking... either a process owns the
cpu (real-time) or shares it (multitasking)???
Martin haltmayer AT uni-augsburg DOT de
- Raw text -