← Back to the playground
ALGORITHM / 03

First here. First served.

First come, first served runs ready processes in arrival order. Once a process starts, it keeps the CPU until its burst finishes.

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

A queue with no interruptions

FCFS chooses the earliest arriving ready process, using input order to break simultaneous-arrival ties. It is non-preemptive: a new arrival does not interrupt the running job. When nothing is ready, the CPU is idle until the next arrival.

A worked calculation

Suppose A arrives at 0 with a burst of 5 and B arrives at 1 with a burst of 2. A runs from 0–5; B runs from 5–7. A waits 0 units. B waits 4 units: completion 7 minus arrival 1 minus burst 2. Their turnaround times are 5 and 6 respectively.

The convoy effect

A short job can wait behind a much longer job. This is one reason FCFS is useful as a baseline rather than a universal choice. Shortest job first instead chooses the shortest ready job. Round robin shares turns across the queue.

This calculator uses finite, single-CPU workloads, known burst lengths, and zero context-switch overhead. Completion metrics describe this simplified model, not the performance of a production operating system.

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