An operating system's CPU scheduler decides which of several waiting processes gets the CPU next. The policy it uses changes how long each process waits, without changing how much total work the CPU actually does. This scene simulates a fixed batch of processes — each with an arrival time and a CPU burst length — and replays exactly the same workload under four classic scheduling policies so you can see the trade-offs directly.
Real operating systems rarely use a single pure policy — Linux's Completely Fair Scheduler and Windows' multilevel feedback queues blend ideas from all four approaches, adjusting time slices and priorities dynamically based on process behavior.
A fixed batch of processes with random arrival times and CPU burst lengths is replayed on a live 3D timeline, letting you swap between FCFS, SJF, Priority and Round Robin scheduling and watch queue order, wait time and turnaround time change for the exact same workload.
Each policy chooses a different next process from the ready queue. The Gantt timeline reveals the resulting execution order live, and the stat panel shows how average wait and turnaround time shift, even though total CPU busy time stays the same.
Pick an algorithm to instantly rebuild the timeline for the current workload. Adjust the Round Robin quantum, change how many processes are in the batch, or generate a brand-new random workload with 🎲.
Shortest Job First provably minimizes average waiting time for a fixed batch of jobs, but real schedulers rarely use it directly since a process's future burst length usually isn't known in advance — it has to be estimated.