Scheduling Algorithms

Example of a preemptive SJF: Suppose that 4 processes, P1, P2, P3, and P4 arrive at the ready queue:

Process Arrival Time (in milliseconds) Burst Time (in milliseconds)
P1
0
8
P2
1
4
P3
2
9
P4
3
5

The processes will run in the following order:

The schedule of the 4 processes under Preemptive SJF.

The schedule of the 4 processes under Preemptive SJF. Taken from Bell, John T. "CPU Scheduling." University of Illinois, Chicago.