Preemption
Preemption is when the OS reeclaims of a resource from a process before the process has finished using it.
Fundamental Concept
Preemption is a FUNDAMENTAL principle behind how every modern OS functions.
In this case, the resource is the processor itself. The process is executing and could continue to execute, but is preempted so another process can be executed.
This is talked about in the Running → Ready transition for the Process State.
The most common reason for this transition is that the running process has reached the maximum allowable time for uninterrupted execution; virtually all multiprogramming operating systems impose this type of time discipline. There are several other alternative causes for this transition, which are not implemented in all operating systems.
Of particular importance is the case in which the OS assigns different levels of priority to different processes.
Suppose, for example, process A is running at a given priority level, and process B, at a higher priority level, is blocked. If the OS learns that the event upon which process B has been waiting has occurred, thus moving B to a ready state, then it can interrupt process A and dispatch process B. We say that the OS has preempted process
Finally, a process may voluntarily release control of the processor. An example is a background process that periodically performs some accounting or maintenance function.