Cooperative vs. Preemptive Multitasking

Essay by elitesyn82 May 2005

download word file, 1 pages 3.0

In my search to discover the similarities and differences between the cooperative and preemptive multitasking methods, I have been hard-pressed to find an abundance of material. From what I can discern, there are no true similarities between the two, other than the obvious: both are multitasking methods, both require use of an operating system, etc. Differences, however, abound.

Cooperative multitasking is, for the most part, obsolete. In this method, each process periodically checks with the operating system to determine whether or not another program or process is in need of the CPU. Should this be the case, the currently running program will relinquish control to the operating system, which in turn assigns priority to the next program or process. The major downside to this type of processing is that each program may have a subjective view of the aforementioned "periodically". Thus, if another program is in immediate need of the CPU and the current program has not yet checked with the operating system to determine if it should halt, system resources are monopolized by whatever program is currently active.

In this manner, should an error occur in the current program before it "checks in" with the OS, it may terminate as well as failing to relinquish control of the CPU, resulting in total OS failure. This was the case with older operating systems, most notably Windows 3.x.

In the preemptive method, the OS maintains total control over prioritizing system processes. The OS maintains a static priority list of currently running programs and processes; adding programs to the list as they are loaded into resident memory, removing them as they complete or are closed, and modifying the pre-assigned priority level of any program already on the list. In this way, programs are essentially "unaware" of one another, never having to...