How does the time quantum affect Round Robin performance?
A very large quantum makes Round Robin behave like FCFS. A very small one wastes time on context switches. A good quantum is longer than most CPU bursts, often cited as 80% of bursts finishing within one quantum.
Explain it simply
A quantum is how long each person gets on the shared computer before the next one's turn. If each turn is a full hour, anyone waiting behind a long user feels ignored (that is FCFS). If each turn is one second, you spend most of the session handing the keyboard back and forth.
- Quantum too large: poor response time for short jobs, FCFS-like behaviour.
- Quantum too small: the CPU spends a large share of time on context switches rather than useful work.
Example
Suppose one context switch costs 1 ms. The fraction of CPU time doing useful work is quantum / (quantum + switch cost).
| Quantum | Useful fraction |
|---|---|
| 1 ms | 1 / 2 = 50% |
| 4 ms | 4 / 5 = 80% |
| 20 ms | 20 / 21, about 95.2% |
Real switches cost microseconds, not a full millisecond, so typical quanta run from about 10 to 100 ms.
Another effect: average turnaround time does not always improve with a smaller quantum. If most processes finish just after a quantum ends, they must wait for another full round just to finish. A rule of thumb is to pick a quantum so that most CPU bursts end within one slice.
What to say in the interview
"Too big a quantum turns Round Robin into FCFS, too small wastes time on context switches. With a 1 ms switch cost, a 4 ms quantum keeps 80% of the CPU useful and a 1 ms quantum only 50%. I'd pick a quantum longer than most CPU bursts."
Common mistakes
- Believing a smaller quantum always gives better turnaround time.