Computing (FOLDOC) dictionary
Jump to user comments
is the responsibility of the currently running task to give up
the processor to allow other tasks to run. This contrasts
periodically suspends the running task and restarts another.
Cooperative multitasking requires the programmer to place
calls at suitable points in his code to allow his task to be
descheduled which is not always easy if there is no obvious
top-level
main loop or some routines run for a long time.
If a task does not allow itself to be descheduled all other
tasks on the system will appear to "freeze" and will not
respond to user action.
The advantage of cooperative multitasking is that the
programmer knows where the program will be descheduled and can
make sure that this will not cause unwanted interaction with
scheduler must ensure that sufficient state for each process
is saved and restored that they will not interfere. Thus
cooperative multitasking can have lower
overheads than
pre-emptive multitasking because of the greater control it
offers over when a task may be descheduled.
(1995-03-20)