Round robin

What Is Round Robin?

Round robin is a scheduling algorithm that allocates resources to competing processes or tasks in a fixed, cyclic order, giving each an equal turn before cycling back to the first. Named after a diplomatic practice of signing grievances in a circle to obscure order of precedent, the algorithm assigns a time quantum to each process and moves to the next when that quantum expires or the current process completes. It is one of the most widely studied scheduling approaches in operating systems, network packet switching, and distributed computing, prized for its simplicity, fairness, and bounded worst-case waiting times.

Round robin belongs to the family of preemptive scheduling algorithms. Unlike priority-based schemes, it imposes no ordering among competing entities, which eliminates starvation: every process in the queue is guaranteed service within at most (n - 1) time quanta, where n is the number of active processes. This property makes it attractive wherever workloads are unpredictable or latency fairness is a design requirement.

Process and Thread Scheduling

In operating system process scheduling, round robin assigns each process a fixed time slice, commonly called a time quantum or time slice, typically ranging from 10 to 100 milliseconds in general-purpose systems. When a process's quantum expires, the scheduler preempts it, moves it to the tail of the ready queue, and dispatches the next process in line. The algorithm was central to early time-sharing systems, including CTSS and Multics in the 1960s, and remains the default policy in many modern kernels for interactive workloads. The choice of quantum length directly governs the tradeoff between responsiveness and throughput: a short quantum reduces latency but increases context-switching overhead, while a long quantum approaches the behavior of first-come, first-served scheduling.

Network Packet Scheduling

Round robin translates naturally to packet-switched networks, where multiple flows compete for a shared link. A network scheduler using round robin serves one packet from each active flow in sequence, then repeats. This approach, described in research on urgency-based round robin scheduling for packet switching, provides a simple mechanism for sharing link capacity without requiring per-flow state beyond the queue position. A significant extension is Weighted Round Robin (WRR), which assigns each flow a weight corresponding to its allocated bandwidth share, serving proportionally more packets from higher-weight flows per cycle. Deficit Round Robin (DRR), introduced by Shreedhar and Varghese in 1995, further improves on WRR by handling variable-length packets through a credit-based mechanism that removes the requirement that all packets be the same size.

Variants and Adaptive Extensions

The basic round robin scheme has produced a family of variants tailored to specific constraints. Airtime Deficit Round Robin, developed for IEEE 802.11-based wireless mesh networks, accounts for the variable airtime cost of transmitting frames at different wireless data rates by tracking per-flow deficits in airtime rather than packet count. Mini Round Robin targets multimedia networks where some flows carry low-rate but latency-sensitive traffic, providing tighter delay bounds by organizing schedules into frames. Research surveyed in a review of round robin scheduling in CPU and cloud computing has produced numerous improved variants that dynamically adjust the time quantum based on burst size, remaining service time, or current queue length to reduce average turnaround time without sacrificing fairness.

Applications

Round robin has applications in a wide range of systems, including:

  • Operating system process scheduling for interactive and time-sharing workloads
  • Network packet schedulers in routers and switches for bandwidth fairness
  • DNS load balancing, distributing client requests across multiple server addresses in rotation
  • Cloud computing resource allocation, dividing virtual machine CPU time across tenants
  • Token ring and polling-based protocols in industrial and embedded networks
Loading…