Preemption (computing)

[1]: 153  This preemptive scheduler usually runs in the most privileged protection ring, meaning that interruption and then resumption are considered highly secure actions.

This usually applies to kernel functions and service interrupts which, if not permitted to run to completion, would tend to produce race conditions resulting in deadlock.

In preemptive multitasking, the operating system kernel can also initiate a context switch to satisfy the scheduling policy's priority constraint, thus preempting the active task.

Preemptive multitasking allows the computer system to more reliably guarantee each process a regular "slice" of operating time.

It also allows the system to rapidly deal with important external events like incoming data, which might require the immediate attention of one or another process.

As the arrival of the requested data would generate an interrupt, blocked processes could be guaranteed a timely return to execution.

An interrupt is scheduled to allow the operating system kernel to switch between processes when their time slices expire, effectively allowing the processor's time to be shared among a number of tasks, giving the illusion that it is dealing with these tasks in parallel (simultaneously).

[5] Sinclair QDOS[6]: 18  and AmigaOS on the Amiga were also microcomputer operating systems offering preemptive multitasking as a core feature.

[7] In Windows 3.1x (protected mode), the kernel and virtual device drivers ran preemptively, but all 16-bit applications were non-preemptive and shared the same address space.