pre-emptive multitasking

pre-emptive multitasking

(operating system, parallel)A type of multitasking wherethe scheduler can interrupt and suspend ("swap out") thecurrently running task in order to start or continue running("swap in") another task. The tasks under pre-emptivemultitasking can be written as though they were the only taskand the scheduler decides when to swap them. The schedulermust ensure that when swapping tasks, sufficient state issaved and restored that tasks do not interfere.

The length of time for which a process runs is known as its"time slice" and may depend on the task's priority or itsuse of resources such as memory and I/O.

OS/2, Unix and the Amiga use pre-emptive multitasking.

This contrasts with cooperative multitasking where each taskmust include calls to allow it to be descheduledperiodically.