Definition
An operating system resource management technique that selects which process in the ready queue gets the CPU, to use CPU resources efficiently
Visual IT Encyclopedia › Operating Systems › Process Management
Definition
An operating system resource management technique that selects which process in the ready queue gets the CPU, to use CPU resources efficiently
Setup: one CPU. P1 and P2 are two programs to run (processes). P1 arrives at 0ms and has a run time of 5ms. P2 arrives at 1ms, has a run time of 2ms and is more urgent. Run time is how many ms it must run on the CPU to finish. (ms: a thousandth of a second)
0 / 4
Non-preemptive scheduling
The CPU is the part that actually carries out a program's instructions. It can run only one program (process) at a time, so the others wait their turn in the ready queue (the line waiting for the CPU).
Preemption means the OS takes the CPU away from a running process. If it can do so, the scheduling is preemptive; if it cannot, it is non-preemptive.
In non-preemptive scheduling, a process that has started running does not stop until its work is done. Even if a more urgent process arrives, it has to wait in line.
Like a bank: the customer at the counter (CPU) stays until their business is done. Even if an urgent customer arrives in the waiting area (ready queue), they wait.