Process Scheduling
Algorithms
learnlearn.uk
Round Robin Scheduling
P1
P2
P3
P4
1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 |
First Come First Served
Jobs are executed in the order they arrive. All processes are guaranteed to be processed, but results in high average waiting times.
1 | 2 | 3 | 4 |
Shortest Job First
The processes with the shortest total burst time are processed first. As new processes arrive they are compared against existing jobs to see it they have shorter total burst time.
2 | 2 | 4 | 4 | 1 | 1 | 1 | 3 | 3 | 3 | 3 | 3 |
Shortest Remaining Time First
The processes with the shortest burst time remaining are processed first. As new processes arrive they are compared against existing jobs to see which job has the least amount of time remaining.
Process Scheduling Calculations
Turnaround time = Completion Time - Arrival Time
Waiting time = Turnaround time - burst time
Average Waiting Time = Waiting time for all processes / No of processes