Scientific Converters Precise unit conversions for science & engineering.

    Loading…

    CPU Scheduling Calculator

    Shortest remaining time first always runs the job closest to finishing: these four processes give an average waiting time of 6.5.

    Lower priority number = higher priority. Processes are named P1, P2, … in this order.

    Average waiting time =

    6.5

    Average turnaround time
    13
    Average response time
    4.25
    Throughput (processes per unit time)
    0.1538461538
    CPU utilisation
    100 %
    Gantt chart
    P1 [0–1] → P2 [1–5] → P4 [5–10] → P1 [10–17] → P3 [17–26]
    Per-process times
    ProcessArrivalBurstCompletionTurnaroundWaitingResponse
    P108171790
    P2145400
    P32926241515
    P43510722
    Step-by-step solution
    1. Turnaround = completion − arrival; waiting = turnaround − burst; response = first run − arrival
    2. Gantt: P1 [0–1] → P2 [1–5] → P4 [5–10] → P1 [10–17] → P3 [17–26]
    3. Average waiting = 9 + 0 + 15 + 2 ÷ 4 = 6.5

    CPU Scheduling Formula

    TAT = completion − arrival, WT = TAT − burst

    response = first run − arrival

    Worked Example

    Four processes arriving at 0, 1, 2 and 3 with bursts 8, 4, 9 and 5 under SRTF:

    1. Turnaround = completion − arrival; waiting = turnaround − burst; response = first run − arrival
    2. Gantt: P1 [0–1] → P2 [1–5] → P4 [5–10] → P1 [10–17] → P3 [17–26]
    3. Average waiting = 9 + 0 + 15 + 2 ÷ 4 = 6.5

    Average response time: 4.25 · Throughput (processes per unit time): 0.1538461538 · CPU utilisation: 100 % · Gantt chart: P1 [0–1] → P2 [1–5] → P4 [5–10] → P1 [10–17] → P3 [17–26]

    Per-process times
    ProcessArrivalBurstCompletionTurnaroundWaitingResponse
    P108171790
    P2145400
    P32926241515
    P43510722

    GATE tip

    Draw the Gantt chart first, then fill the table: completion times come straight from the chart. Switch the algorithm here to compare answers to the same question.

    More Operating Systems Calculators

    Frequently asked questions

    Which algorithm gives the minimum average waiting time?

    SJF (and SRTF when preemption is allowed) is optimal for average waiting time, but needs burst times in advance and can starve long jobs.

    How are ties handled in Round Robin?

    This calculator follows the usual textbook convention: a process arriving during a time slice joins the queue before the preempted process.

    Sources

    Last reviewed: . Factors are stored exactly and computed with 50-digit decimal arithmetic. See how we verify conversion factors.

    Cite this page

    APA

    Scientific Converters. (2026, October 15). CPU Scheduling Calculator. Retrieved October 25, 2026, from https://scientificconverters.com/calculators/cpu-scheduling-calculator/

    IEEE

    Scientific Converters, "CPU Scheduling Calculator," scientificconverters.com. Accessed: Oct. 25, 2026. [Online]. Available: https://scientificconverters.com/calculators/cpu-scheduling-calculator/

    Send feedback

    Found a wrong value, a missing unit or an idea? Tell us. We read every message.

    What is it about?

    We store your message, the page you were on and your email if given. See the privacy policy.