CPU scheduling: Round Robin, priority and multilevel queues
45 min · Intermediate
Round Robin (RR) gives every ready process a fixed slice of CPU time in turn, like friends sharing one phone charger for ten minutes each. It is the basis of time-sharing systems, and with priority scheduling and multilevel queues it covers most scheduling questions asked in placements.
Topics in this lesson
- Round Robin with a time quantum: worked example
- Choosing the quantum: too small vs too large
- Priority scheduling, starvation and aging
- Multilevel and multilevel feedback queues
- Interview questions with model answers
Interview questions this lesson answers
- What is Round Robin scheduling?
- What is a time quantum?
- Is Round Robin preemptive?
- Why is Round Robin good for time-sharing systems?
- What happens if the quantum is very large?
- What happens if the quantum is very small?
- How would you choose a good quantum?
- What is the maximum waiting time between turns in Round Robin?
- Can Round Robin cause starvation?
- In Round Robin, if a new process arrives exactly when a quantum ends, who goes first in the queue?
Sign in free to continue this lesson
Create a free account to read every lesson, practise with the exercises and keep track of your progress.