← Operating Systems Interactive execution lab CPU Scheduling Arena
Replay every clock tick and compare five schedulers fairly on the same workload.
Deterministic simulation · ⚡ 0 XP
1 · Build a workload Process editor
One process per line. A lower priority number means higher priority.
2 · Choose the policy
Scheduling algorithm
Preemptive Round Robin Rotate a FIFO ready queue after each process uses one time quantum.
Deterministic tie-break FIFO queue; simultaneous arrivals keep input order, and boundary arrivals enqueue before the expired process.
3 · Replay execution
Gantt timeline
Clockt=0
P1ready
Remaining5 / 5
Arrival 0Priority 2
P2not-arrived
Remaining3 / 3
Arrival 1Priority 1
P3not-arrived
Remaining1 / 1
Arrival 2Priority 0
P4not-arrived
Remaining2 / 2
Arrival 4Priority 3
1 / 13
4 · Inspect the outcome
Per-process metrics
11 makespan 6 switches 100% CPU use
| Process | Arrival | Burst | Priority | First run | Completion | Waiting | Turnaround | Response |
|---|
| P1 | 0 | 5 | 2 | 0 | 11 | 6 | 11 | 0 |
|---|
| P2 | 1 | 3 | 1 | 2 | 10 | 6 | 9 | 1 |
|---|
| P3 | 2 | 1 | 0 | 4 | 5 | 2 | 3 | 2 |
|---|
| P4 | 4 | 2 | 3 | 7 | 9 | 3 | 5 | 3 |
|---|
| Average | 4.25 | 7 | 1.50 |
|---|
Same workload · all policies
Side-by-side comparison
Round Robin uses q=2. Lower averages are highlighted—not universally
“better.”
- Avg waiting
- 3.75
- Avg turnaround
- 6.50
- Avg response
- 3.75
- Context switches
- 3
- Makespan
- 11
- Avg waiting
- 3
- Avg turnaround
- 5.75
- Avg response
- 3
- Context switches
- 3
- Makespan
- 11
- Avg waiting
- 2
- Avg turnaround
- 4.75
- Avg response
- 0.25
- Context switches
- 5
- Makespan
- 11
- Avg waiting
- 3.25
- Avg turnaround
- 6
- Avg response
- 3.25
- Context switches
- 3
- Makespan
- 11
Preemptive
Round Robin
Viewing - Avg waiting
- 4.25
- Avg turnaround
- 7
- Avg response
- 1.50
- Context switches
- 6
- Makespan
- 11