# FCFS (First Come First Served) Scheduling

> First Come First Served (FCFS) scheduling is the simplest CPU scheduling algorithm: processes run in the exact order they arrive in the ready queue, each keeping the CPU until it finishes. It is non-preemptive and ignores how long each process needs, so short jobs can get stuck waiting behind a long one, which is called the convoy effect.

Canonical: https://devsunite.com/resources/core-subjects/operating-systems/fcfs-scheduling
Last updated: 2026-11-22

Subject: Operating Systems · Category: Process Scheduling · 3 min read

First Come First Served (FCFS) is the simplest possible CPU scheduling algorithm: whichever process arrives first in the ready queue gets the CPU first, and it keeps the CPU until it finishes (FCFS is inherently non-preemptive). No consideration is given to how long a process needs, or its priority, purely arrival order.

## How it works

Processes are held in a simple queue, first in, first out. When the CPU becomes free, whichever process is at the front of the queue runs next, to completion.

## A worked example

Four processes, all arriving at time 0, with these burst times:

| Process | Burst Time |
|---------|-------------|
| P1 | 8 |
| P2 | 2 |
| P3 | 1 |
| P4 | 4 |

Since they all arrive at once, FCFS runs them in whatever order they're listed/queued, say P1, P2, P3, P4.

Execution: P1 runs 0-8, P2 runs 8-10, P3 runs 10-11, P4 runs 11-15.

Waiting time (start time minus arrival time, since all arrived at 0): P1 waits 0, P2 waits 8, P3 waits 10, P4 waits 11.

Average waiting time = (0 + 8 + 10 + 11) / 4 = 7.25.

## The convoy effect

Notice P3, which only needs 1 unit of CPU time, has to wait 10 units before it even starts, purely because it happened to be queued behind two longer processes. This is called the convoy effect: a bunch of short processes end up stuck waiting behind one long process, the same way a line of fast cars gets stuck behind one slow truck on a single-lane road. FCFS has no mechanism to prevent this, since it completely ignores burst time when deciding order.

Compare this to SJF's own worked example on the exact same kind of process set, SJF would run P3 first (since it's shortest), dramatically reducing its own waiting time and the overall average, precisely because it accounts for burst time where FCFS doesn't.

## Where FCFS is actually still used

Pure FCFS is rarely used as the primary CPU scheduler in modern general-purpose operating systems, because the convoy effect is a real, common problem for interactive workloads. But the exact same "first in, first out, no reordering" idea is genuinely everywhere else in computing: it's the default behavior of most message queues, print job queues, and basic task queues, anywhere that fairness-by-arrival-order and implementation simplicity matter more than optimizing for job length.

## What interviewers actually ask about FCFS

- **"What is FCFS scheduling?"** Processes run strictly in arrival order, each to completion, with no preemption.
- **"What is the convoy effect, and how does FCFS cause it?"** Short processes getting stuck waiting behind long ones purely due to queue order, since FCFS never accounts for how long a process actually needs.
- **"Is FCFS preemptive or non-preemptive?"** Non-preemptive; once a process starts, it runs to completion.
- **"What's the main practical weakness of FCFS compared to something like SJF?"** It ignores burst time entirely, so average waiting time can be much worse than an algorithm (like SJF) that accounts for how long each process actually needs.

## Key takeaways

- FCFS runs processes strictly in arrival order, to completion, with no preemption.
- It's the simplest scheduling algorithm to implement, but ignores burst time entirely.
- The convoy effect (short processes stuck behind long ones) is FCFS's classic real weakness.
- The same "first in, first out" idea still shows up widely in simple queues elsewhere in computing, even where it's not the primary CPU scheduler.

## Related

- [Previous: Scheduling Criteria](https://devsunite.com/resources/core-subjects/operating-systems/scheduling-criterias)
- [Next: Shortest Job First (SJF) Scheduling](https://devsunite.com/resources/core-subjects/operating-systems/sjf-scheduling)
- [More in Process Scheduling: Process Scheduling](https://devsunite.com/resources/core-subjects/operating-systems/process-scheduling)
- [More in Process Scheduling: Scheduling Queues](https://devsunite.com/resources/core-subjects/operating-systems/scheduling-queues)
- [More in Process Scheduling: Preemptive vs Non-Preemptive Scheduling](https://devsunite.com/resources/core-subjects/operating-systems/preemptive-vs-non-preemptive-scheduling)
- [More in Process Scheduling: Scheduler vs Dispatcher](https://devsunite.com/resources/core-subjects/operating-systems/scheduler-vs-dispatcher)
- [More in Process Scheduling: SRTF (Shortest Remaining Time First) Scheduling](https://devsunite.com/resources/core-subjects/operating-systems/srtf-scheduling)
- [More in Process Scheduling: Priority Scheduling](https://devsunite.com/resources/core-subjects/operating-systems/priority-scheduling)
- [More in Process Scheduling: Round Robin Scheduling](https://devsunite.com/resources/core-subjects/operating-systems/round-robin-scheduling)
- [More in Process Scheduling: Multilevel Queue Scheduling](https://devsunite.com/resources/core-subjects/operating-systems/multilevel-queue-scheduling)
- [More in Process Scheduling: Multilevel Feedback Queue Scheduling](https://devsunite.com/resources/core-subjects/operating-systems/multilevel-feedback-queue-scheduling)
- [More in Process Scheduling: Starvation and Aging in Scheduling](https://devsunite.com/resources/core-subjects/operating-systems/starvation-and-aging)
- [All 205 OS interview questions](https://devsunite.com/resources/core-subjects/operating-systems)
