Title: Round Robin
Course: CPS 120: Introduction to Computer Science ~ Master (Aug/2015) OLD > Section: Learning Units

The scheduler assigns a fixed time unit per process, and cycles through them.

- RR scheduling involves extensive overhead, especially with a small time unit.
- Balanced throughput between FCFS and SJF, shorter jobs are completed faster than in FCFS and longer processes are completed faster than in SJF.
- Poor average response time, waiting time is dependent on a number of processes, and not average process length.
- Because of high waiting times, deadlines are rarely met in a pure RR system.
- Starvation can never occur, since no priority is given. Order of time unit allocation is based upon process arrival time, similar to FCFS

Round Robin:

Process | Duration | Order | Arrival time
P1 | 24 | 1 | 0
P2 | 3 | 2 | 0
P3 | 4 | 3 | 0

- We need quantum, say 2 units.
- P1 starts and stops at 2, P2 starts at 2 and stops at 4, and P3 starts at 4 and stops at 6, P1 starts at 6 and stops at 8, ...etc.
- Average wait time is (9 + 4 + 7) / 3 = 6.66

Activity:

- Read Round-robin Scheduling for more detail.
- Experiment with this Round Robin Animation.