#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
⚡ FREE · OS PRACTICE

CPU Scheduling Calculator: Gantt Chart, Waiting and Turnaround Time

Enter processes, pick an algorithm and get the full solved table with a Gantt chart.

  • ⚙️ 6 algorithms
  • 📊 Gantt chart
  • 🧮 CT, TAT, WT, RT

How to use the CPU Scheduling Calculator

  1. 1. Enter the processesOne per line: name, arrival time, burst time, and priority if needed.
  2. 2. Choose the algorithmPick FCFS, SJF, SRTF, Priority or Round Robin with a time quantum.
  3. 3. Check your answerSee the Gantt chart, the per-process table and the averages.

Formulas used

  • Completion time (CT): when the process finishes.
  • Turnaround time (TAT) = CT − arrival time.
  • Waiting time (WT) = TAT − burst time.
  • Response time (RT) = first time on the CPU − arrival time.

Worked example (FCFS): P1 (0, 5), P2 (1, 3), P3 (2, 8), P4 (3, 6). They run in arrival order: P1 0–5, P2 5–8, P3 8–16, P4 16–22. Turnaround times are 5, 7, 14 and 19, so the average TAT is 45 ÷ 4 = 11.25. Waiting times are 0, 4, 6 and 13, so the average WT is 23 ÷ 4 = 5.75. The calculator shows exactly these numbers for the sample input.

How each algorithm picks the next process

  • FCFS: whoever arrived first. Simple, but one long job makes everyone wait (the convoy effect).
  • SJF: the shortest burst among the processes that have arrived, and it runs to the end.
  • SRTF: the preemptive version of SJF. A new arrival with less remaining time takes over the CPU.
  • Priority: the lowest priority number goes first. The preemptive version switches as soon as a more important process arrives.
  • Round Robin: each process gets a fixed time quantum in turn.

With Round Robin and quantum 2 on the same four processes, the averages become WT 9.75 and TAT 15.25: fairer response, but more waiting overall. When a new process arrives at the same moment a quantum ends, this tool puts the new arrival in the queue before the process that was just preempted, which is the convention most textbooks use. Ties are broken by arrival time, then by input order.

Frequently asked questions

Does a lower priority number mean higher priority?

Yes, in this calculator 1 is more important than 2. If your question uses the opposite rule, reverse your numbers before entering them.

Why do my Round Robin answers differ from my book?

Usually because of the tie rule when a process arrives exactly as a quantum ends. This tool adds the new arrival to the queue first.

Can I enter decimal times?

No, times must be whole numbers, which is how almost all exam questions are set.

Is the calculator free?

Yes, free to use. Enter your processes freely; we ask for a name and WhatsApp number once when you see your first schedule, and never again on any Uncodemy tool.

More free tools

See all free tools