Non-preemptive priority scheduling, explained
8 November 2026 · 1 min read
- Operating Systems
- CPU scheduling
In priority scheduling, each process is given a priority number. In this experiment a lower number means a higher priority, so a process with priority 1 goes before one with priority 4.
In the non-preemptive version, a process that has started always finishes. Priorities are only checked when the CPU becomes free.
How it works
- When the CPU is free, collect the processes that have arrived and are not finished.
- Pick the one with the lowest priority number. Ties go to the earlier arrival.
- Run it until it finishes.
- Repeat until all processes are done.
A small example
Four processes, A to D:
Arrival times: 0 2 4 5
Burst times: 7 4 1 4
Priorities: 3 1 4 2 (a lower number means a higher priority)A runs first because it is alone at time 0. After it, B (priority 1) goes first, then D (priority 2), then C (priority 4). The average waiting time is:
5.5 time unitsProcess C needs only 1 time unit, but its low priority makes it wait the longest.
What to know about its cost
- Priorities can come from the system, such as importance, or from the user.
- It is non-preemptive.
- It ignores burst times, so short jobs get no special treatment.
Where it works well
- Important work goes first.
- Simple to understand.
Where it struggles
- Starvation: low-priority processes may never run if high-priority ones keep arriving.
- A common fix is aging, which slowly raises the priority of processes that have waited long.
Try it yourself
Open the CPU Scheduling experiment, enter the processes from this post, choose Non-preemptive Priority and step through the Gantt chart. Then try the other algorithms on the same processes and compare the averages.