cooperative multitasking


Also found in: Wikipedia.

cooperative multitasking

[kō‚äp·rəd·iv ′məl·tə‚task·iŋ]
(computer science)
A method of running more than one program on a computer at a time in which the program currently in control of the processor retains the control until it yields the control to another program voluntarily, which it can do only at certain points in the program. Also known as nonpreemptive multitasking.

cooperative multitasking

(parallel, operating system)
A form of multitasking where it is the responsibility of the currently running task to give up the processor to allow other tasks to run. This contrasts with pre-emptive multitasking where the task scheduler 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 other processes. Under pre-emptive multitasking, the 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.

Cooperative multitasking is used in RISC OS, Microsoft Windows and Macintosh System 7.

non-preemptive multitasking

A multitasking environment in which an application gives up control of the CPU to another application only at certain points, such as when it is ready to accept keyboard input. Under this method, one program performing a large number of calculations can dominate the machine and cause other programs to have limited access to the CPU. For example, if a communications program is running in the background and another application has usurped the CPU, the comm program cannot keep up with the incoming data.

Cooperation Is Necessary
Also called "cooperative multitasking," programs must be designed to yield to each other regularly in order to work effectively in this environment. Windows, prior to Windows 95, and the Mac, prior to Mac OS X, were non-preemptive multitasking operating systems. Contrast with preemptive multitasking. See multitasking.
References in periodicals archive ?
Multitasking operating systems come in two flavors: cooperative multitasking and preemptive multitasking.
Microsoft Windows is an extension of DOS that addresses some of these limitations, particularly by providing cooperative multitasking, access to more memory, and a very successful graphical user interface.

Full browser ?