← Back to the playground
WORKED EXAMPLE / 03

Not every job is ready at zero.

A finite FCFS workload with two idle intervals makes arrival times and waiting-time calculations easy to inspect.

SINGLE CPU / V1.0

Your workload

3 PROCESSES
Simulation model

PROCESSTICKETSARRIVEBURST
◈ Saved on this device
Ready when you are0 / 64 decisions
TIME ELAPSED0 units
CPU BUSY0 units
DECISIONS0

Execution timeline

ONE BLOCK = ONE DISPATCH
⌁A schedule starts with a decision.Press Run or take it one step at a time.

Expected vs. observed

More rounds tell a clearer story.

Expected Observed

Every ticket is a chance at the next slice. Your observed share will take shape as the simulation runs.

Decision trace 0 dispatches+
Abstract time units · no context-switch overhead

The workload

A arrives at 2 and needs 3 units. B arrives at 3 and needs 2. C arrives at 10 and needs 1. FCFS waits from 0–2, runs A from 2–5, runs B from 5–7, waits from 7–10, then runs C from 10–11.

Calculate each metric

Turnaround = completion − arrival. Waiting = turnaround − burst. Response = first start − arrival. A has turnaround 3, waiting 0, response 0. B has turnaround 4, waiting 2, response 2. C has turnaround 1, waiting 0, response 0.

The average waiting time is (0 + 2 + 0) / 3 = 0.67 time units. Busy CPU time is 6, while elapsed time is 11. Idle intervals contribute to elapsed time but not to any process's used CPU.

Change the policy

Keep the same arrivals and bursts, then select round robin or lottery. Compare completion and response rather than expecting the requested work itself to change. Each process must still receive its entire burst before completion.

KEEP EXPLORINGUnderstand lottery scheduling ↗Lottery vs. round robin ↗Work through arrival times ↗