Skip to article
ContentsFCFS
Learn/Chapter 01 of 08

FCFS Scheduling: First Come, First Served

First Come, First Served (FCFS), also called FIFO, gives the CPU to the process that arrived earliest among the ready work. Once a process starts, it keeps the CPU until its burst finishes.

The rule

A new arrival joins the waiting order. Its burst length does not let it move ahead of an earlier arrival. When arrivals are equal, this simulator uses input order to break the tie.

Worked example

Example inputs
ProcessArrivalBurst
P107
P213
P321
Scroll horizontally for all columns

One CPU · One burst per process · No I/O · Dispatch cost 0. Times are abstract units.

P1 starts at 0. P2 arrives at 1 and P3 at 2; these arrivals do not interrupt the selected job. At 7, P2 runs before P3 because its arrival is earlier.

The full CPU trace is P1 [0, 7), P2 [7, 10), P3 [10, 11). P3 needs 1 CPU unit but first runs at 10.

Worked trace FCFS / FIFO

Arrival order decides. P3 arrives at 2, then waits behind earlier work until 10. Its burst is 1.

CPU execution: FCFSP1 runs [0, 7); P2 runs [7, 10); P3 runs [10, 11). Segment widths show elapsed time. Diamond markers show arrivals. P3 waits 8 units before its first startARRIVALSP1P2P3P1P2P3071011P3 waits 8 units before its first startCPU execution: FCFSA compact proportional timeline. Diamond markers show arrivals; the complete exact interval sequence follows in text.ARRIVALSP1P2P3P1P2P3071011P3 waits 8 units
Scroll horizontally for all intervals
Complete CPU trace · [start, end)
  1. P1: [0, 7)
  2. P2: [7, 10)
  3. P3: [10, 11)
Shorter work still waits behind earlier arrivals.
Open this example in the simulator

Calculate the result

Per-process results
ProcessCompletionWaitingTurnaroundResponse
P17070
P210696
P311898
Scroll horizontally for all columns

P3: turnaround = 11 − 2 = 9. Waiting = 9 − 1 = 8. First response = 10 − 2 = 8.

Waiting and first response coincide for a nonpreempted process; interrupted work can wait again after its first turn.

Mean waiting = (0 + 6 + 8) / 3 ≈ 4.667 units. Mean response ≈ 4.667 units.

Why the convoy effect matters

FCFS gives a simple, predictable order and does not need burst length to choose who runs next. Its tradeoff appears when a long job is near the front: later short jobs wait behind it even though they would finish quickly. This is the convoy effect shown here.

Waiting and response happen to be equal in this nonpreemptive example because every process waits once before starting, then runs to completion. That equality does not hold for every scheduling policy.