About this simulator
The CPU scheduler decides which ready process runs next, and the policy it uses changes waiting time, turnaround time and fairness. This simulator runs the real algorithms on your own process table: add processes, set arrival and burst times (and priorities), pick an algorithm and step through each decision while the ready queue, the CPU and the metrics update.
How it works
- Each process has an arrival time, a CPU burst and (for Priority) a priority number — a smaller number means higher priority.
- At every scheduling decision the algorithm picks one process from the ready queue by its own rule.
- Afterwards: turnaround = completion − arrival, waiting = turnaround − burst, response = first run − arrival.
Formulas used
Worked example
Three processes arrive at time 0 with bursts 24, 3 and 3. FCFS runs them in that order: waiting times , and , average . SJF runs 3, 3, 24: waiting times , and , average . Round Robin with quantum 4 gives waiting times 6, 4 and 7, an average of 5.67 — much better than FCFS because the short jobs no longer wait behind the long one (the convoy effect).
Enter these numbers in the simulator above to see every step.
When to use it
- Checking homework on average waiting time and turnaround time.
- Learning how preemption changes SJF into SRTF and how the quantum shapes Round Robin.
- Preparing for operating-systems exams and GATE-style numerical problems.
Frequently asked questions
How do you calculate waiting time and turnaround time?
. . .
Which scheduling algorithm has the lowest average waiting time?
Shortest Job First (and its preemptive version SRTF) gives the minimum average waiting time, but it needs to know burst times and can starve long processes.
How does the time quantum affect Round Robin?
A very large quantum makes Round Robin behave like FCFS; a very small one causes many context switches. A quantum slightly longer than a typical burst works well.
What is the convoy effect?
Short processes waiting behind one long CPU-bound process under FCFS, which raises the average waiting time.