Round Robin Scheduling
Define a small fixed unit of time called a quantum (or time-slice), typically 10-100 milliseconds. Then:
• Process at head of the ready queue is allocated the CPU for (up to) one quantum.
• When the time has elapsed, the process is preempted and added to the tail of the ready queue.
Round robin has some nice properties:
• Fair: if there are n processes in the ready queue and the time quantum is q, then each process gets 1/nth of the CPU.
• Live: no process waits more than ( n − 1) q time units before receiving a CPU allocation.
• Typically get higher average turnaround time than SRTF, but better average response time. But tricky choosing correct size quantum:
• q too large
• q too small
⇒ context switch overhead too high.