EN
My tools

CPU Scheduling Calculator (FCFS, SJF, SRTF, Round Robin, Priority)

Simulate FCFS, SJF, SRTF, Round Robin and priority scheduling: Gantt chart, completion, turnaround, waiting and response times, averages and CPU use.

Average waiting time
6.5
Average turnaround time
13
Average response time
4.25
Throughput
0.1538 processes per time unit
CPU utilization
100%
Gantt chart
SRTF

Turnaround = completion − arrival · waiting = turnaround − burst · response = first time on the CPU − arrival.

Ties go to the earlier arrival, then to the process listed first.

Per process (SRTF)
ProcessArrivalBurstPriorityCompletionTurnaroundWaitingResponse
P1083171790
P21415400
P329426241515
P435210722
All algorithms on the same processes
AlgorithmAvg waitingAvg turnaroundAvg response
FCFS8.7515.258.75
SJF7.7514.257.75
SRTF6.5134.25
Round Robin (q = 2)12.7519.252
Priority (non-preemptive)7.7514.257.75
Priority (preemptive)6.5134.25
My tools →
Advertisement

Operating-systems courses and exams ask you to schedule a set of processes by hand and work out each one's waiting and turnaround time. This calculator simulates the classic CPU scheduling algorithms — FCFS, SJF, SRTF (preemptive SJF), Round Robin and priority scheduling with or without preemption — and shows the Gantt chart, a per-process table, the averages, throughput and CPU utilization, plus a comparison of all algorithms on the same input.

How to use this tool

  1. Enter one process per line: name, arrival time, burst time and (for priority scheduling) a priority.
  2. Choose the algorithm; for Round Robin set the time quantum.
  3. Say whether a lower or a higher number means higher priority.
  4. Read the Gantt chart, the table and the averages; compare algorithms in the second table.

Formula

turnaround = completion − arrival · waiting = turnaround − burst · response = first run − arrival · utilization = busy time ÷ (last completion − first arrival)

Non-preemptive algorithms let a process finish once it starts; SRTF and preemptive priority re-decide whenever a process arrives. Round Robin runs each process for at most one quantum and sends it to the back of the ready queue; by default a process that arrives at the moment a quantum ends is queued before the preempted one, as in most textbooks (change it with the option). Ties go to the earlier arrival, then to the process listed first. Context-switch time is taken as zero.

Example

The sample is the SRTF example from Silberschatz's Operating System Concepts: P1 (arrives 0, burst 8), P2 (1, 4), P3 (2, 9), P4 (3, 5). The schedule is P1 0–1, P2 1–5, P4 5–10, P1 10–17, P3 17–26, so the waiting times are 9, 0, 15 and 2 and the average waiting time is 6.5. With plain FCFS the same processes wait 8.75 on average.

Frequently asked questions

Which algorithm gives the lowest average waiting time?

SRTF (preemptive shortest job first) is optimal for average waiting time when burst times are known. Real systems do not know them in advance, which is why Round Robin and priority schemes are used.

What is response time?

The time from arrival until the process first gets the CPU. Round Robin keeps it short, which matters for interactive programs.

Why does my textbook give a slightly different Round Robin answer?

Books differ on whether a process arriving exactly when a quantum ends goes before or after the preempted process. Switch the option to match your course.

Sources

Last updated:

Cite or embed this tool
APA

kakaoCalc. (2026, November 8). CPU Scheduling Calculator (FCFS, SJF, SRTF, Round Robin, Priority). https://kakao.mobile/tools/cpu-scheduling-simulator/

MLA

“CPU Scheduling Calculator (FCFS, SJF, SRTF, Round Robin, Priority).” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/cpu-scheduling-simulator/.

Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms

Advertisement