Operating Systems
First Come First Served (FCFS) scheduling, explained
8 November 2026 · 1 min read
- Operating Systems
- CPU scheduling
First Come First Served is the simplest CPU scheduling rule: the process that arrives first gets the CPU first, and it keeps the CPU until it has finished.
It is like a single queue at a counter. Nobody skips ahead, but one person with a very long request makes everyone behind them wait.
How it works
- Put processes in order of arrival. If two arrive together, the one entered first goes first.
- Give the CPU to the first process and let it run until it finishes.
- Then move on to the next process in the queue.
- If nobody has arrived yet, the CPU stays idle until the next arrival.
A small example
Four processes, A to D:
Arrival times: 0 2 4 5
Burst times: 7 4 1 4With FCFS the order is A, B, C, D, and the average waiting time is:
4.75 time unitsProcess C needs only 1 time unit, but it has to wait for A and B to finish first.
What to know about its cost
- It is non-preemptive: once a process starts, nothing interrupts it.
- The average waiting time can be high when a long process arrives early.
- It cannot cause starvation, because every process eventually reaches the front.
Where it works well
- Very easy to implement and to explain.
- Predictable and fair in order of arrival.
Where it struggles
- The convoy effect: short processes get stuck behind a long one.
- Poor for interactive work, where quick responses matter.
Try it yourself
Open the CPU Scheduling experiment, enter the processes from this post, choose First Come First Served and step through the Gantt chart. Then try the other algorithms on the same processes and compare the averages.