CPU Scheduling Simulator illustration

CPU Scheduling Simulator

The operating-systems scheduling exercise, solved and animated. Enter processes with arrival time, burst time and priority, or paste them straight from a textbook problem, and pick an algorithm: first-come first-served, shortest job first, shortest remaining time first, round robin with any time quantum, priority scheduling (preemptive or not), highest response ratio next or a multilevel feedback queue. Step through time to watch the ready queue and the Gantt chart build, then read the completion, turnaround, waiting and response time of every process with the averages, CPU utilization and throughput. Add a context-switch cost, and compare every algorithm on the same workload side by side to see the trade-offs between fairness, response time and throughput.

Runs 100% in your browser — simulations are computed locally on your device.

Notes

  • Turnaround time = completion − arrival, waiting time = turnaround − burst, and response time = first run − arrival; idle gaps when no process has arrived count against CPU utilization.
  • Ties are broken by arrival time and then by process name, the convention most textbooks use, so the Gantt chart matches worked solutions.
  • Shortest job first minimises the average waiting time when burst times are known, but can starve long jobs; round robin trades a little throughput for fast, fair response, and a quantum that is too small drowns in context switches.
  • Runs 100% in your browser — simulations are computed locally on your device.