Productivity and Utilities

CPU Scheduling Simulator

List processes with arrival and burst times to compare six scheduling policies side by side.

Your numbers

Processes
Process 1

Time units after the start.

Time units of work.

A lower number runs first.

Process 2

Time units after the start.

Time units of work.

A lower number runs first.

Process 3

Time units after the start.

Time units of work.

A lower number runs first.

Result

Average waiting time

17.00

First come, first served

Average turnaround time
27.00
Average response time
17.00
Finished at time
30
CPU busy
100.0%

Gantt chart as a table

FromToRunning
024P1
2427P2
2730P3

Each process

ProcessArrivalBurstDone atTurnaroundWaitingResponse
P1024242400
P20327272424
P30330302727

All policies on the same processes

PolicyAverage waitingAverage turnaround
First come, first served17.0027.00
Shortest job first3.0013.00
Shortest remaining time3.0013.00
Priority3.0013.00
Priority (preemptive)3.0013.00
Round robin5.6715.67
How this was calculated
  1. Turnaround time is the finish time minus the arrival time. Waiting time is the turnaround time minus the burst, the time spent ready but not running. Response time is the first start minus the arrival.
  2. Ties go to the earlier arrival and then to the process listed first. Preemptive policies keep the running process on a tie. In round robin a process that arrives at the same moment a quantum ends joins the queue before the process that was preempted.
  3. The simulation moves one time unit at a time. Gaps with no ready process are shown as Idle.

Calculated using SumPanda.com · https://sumpanda.com/cpu-scheduling-simulator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the cpu scheduling simulator

  1. List each process with a name, its arrival time and its burst (the time units of work it needs). Add a priority for the priority policies; a lower number runs first.
  2. Choose a policy. For round robin, set the time quantum, which is how long a process runs before the next gets a turn.
  3. Read the Gantt chart table, then the per-process table with completion, turnaround, waiting and response times.
  4. Compare the last table, which runs every policy on the same processes.

Formula

turnaround = completion time - arrival time

waiting = turnaround - burst

response = first time on the CPU - arrival time

Ties go to the earlier arrival, then to the process listed first. Preemptive policies keep the running process on a tie. In round robin a process that arrives when a quantum ends joins the queue before the process that was preempted.

Three jobs arriving together

Processes P1, P2 and P3 arrive at time 0 with bursts of 24, 3 and 3. First come, first served runs P1 from 0 to 24, P2 to 27 and P3 to 30. The waits are 0, 24 and 27, an average of 17.00, and the turnarounds are 24, 27 and 30, an average of 27.00.

Shortest job first runs P2, P3 and then P1 for waits of 0, 3 and 6, an average of 3.00 (turnaround 13.00). Round robin with a quantum of 4 runs P1 for 0 to 4, P2 to 7, P3 to 10 and P1 to 30, giving waits of 6, 4 and 7, an average of 5.67.

What the policies trade off

First come, first served is simple but a long job at the front delays everyone behind it, called the convoy effect. Shortest job first gives the lowest average waiting time when all jobs are known, but long jobs can starve. Shortest remaining time is the preemptive form of it. Priority policies let important work go first and can starve low priority work. Round robin gives every process regular turns, so response is quick, at the cost of more switching.

Pick a quantum that is long compared with the cost of switching but short compared with the bursts of your processes. To chart tasks with dates, see the Gantt Chart Maker, and for queues see Little's Law.

Limits of the model

Time moves in whole units, switching costs nothing, and each process uses only the CPU: no input or output waits, no threads and no more than one CPU. Real schedulers are far more complicated, but these textbook models are the base for learning them.

Assumptions and limits

  • Arrival times and bursts are whole numbers; bursts are at least 1 and no larger than 1000.
  • There is one CPU and a context switch takes no time.
  • Idle gaps, when no process has arrived yet, are shown as Idle.
  • In the priority policies a lower number means a higher priority.
  • Names must be different from each other, and up to 20 processes are accepted.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What is the difference between waiting time and response time?

Waiting time counts all the time a process is ready but not running. Response time counts only the wait until the first time it runs.

Why do SJF, SRTF and priority give the same answer in the first example?

All three jobs arrive together and the shortest jobs also have the highest priorities, so every rule picks the same order. Change the priorities or arrival times to see them differ.

Does a smaller quantum always help round robin?

No. A tiny quantum means constant switching. The page ignores that cost, so results with very small quanta are better than a real system would see.

What does Idle mean in the chart?

No process was ready at that time, so the CPU did nothing until the next arrival.