Round-Robin Scheduler

Computer Science

How It Works

Round-Robin (RR) is a classic preemptive task scheduling algorithm engineered for fair time-sharing operating environments. Runnable threads inhabit a circular first-in, first-out execution queue, receiving bounded CPU allocations termed time quanta q. Upon quantum expiration, a hardware timer triggers an interrupt to preempt the active process, preserve its register state context, and append it to the queue tail while dispatching the next pending task.

Governing Equation
$$ T_{\text{quantum}} = q \quad\vert\quad T_{\text{turnaround}} = T_{\text{completion}} - T_{\text{arrival}} $$