First-Come-First-Served (FCFS) Scheduling

College Depth 68 in the knowledge graph I know this Set as goal
Unlocks 5 downstream topics
scheduling-algorithms non-preemptive fairness

Core Idea

First-Come-First-Served is the simplest scheduling algorithm: processes run in the order they arrive until completion. It is non-preemptive, fair, and easy to implement. However, short jobs can suffer long waits if a long job arrives first, causing the convoy effect and poor average waiting time.

Common Misconceptions

FCFS is optimal (it is not; convoy effect harms responsiveness). All non-preemptive algorithms are equally bad (FCFS often outperforms preemptive scheduling for CPU-bound workloads).

Explainer

From your study of CPU scheduling basics, you understand that the scheduler decides which ready process gets the CPU next, and that different algorithms optimize for different metrics (throughput, waiting time, response time). First-Come-First-Served is the most intuitive algorithm: processes are served in the exact order they enter the ready queue, and once a process starts running, it runs to completion without interruption. It is the scheduling equivalent of a single checkout line at a grocery store — whoever arrives first gets served first, regardless of how many items they have.

FCFS is implemented with a simple FIFO queue. When a process enters the ready state, it joins the back of the queue. The scheduler always picks the process at the front. Because FCFS is non-preemptive, a running process keeps the CPU until it either finishes or voluntarily blocks (for I/O, for example). There is no timer interrupt pulling the CPU away. This makes FCFS trivially simple to implement — no priority comparisons, no preemption logic, no time quantum to tune — and it is perfectly fair in the sense that no process can cut in line.

The critical weakness of FCFS is the convoy effect. Imagine a long CPU-bound process (say, a 100ms computation) arrives first, followed by ten short I/O-bound processes (each needing 1ms of CPU time). All ten short processes must wait behind the long one, even though they could each finish almost instantly. The average waiting time balloons. If the short processes arrived first, the average waiting time would be tiny. This order-dependence makes FCFS highly sensitive to arrival patterns and produces poor average waiting time compared to algorithms like Shortest Job First. The convoy effect also hurts I/O utilization: while short I/O-bound processes wait behind a long CPU-bound process, I/O devices sit idle.

Despite its weaknesses, FCFS is not useless. It serves as a baseline for evaluating other algorithms — if a more complex algorithm does not beat FCFS on your workload, the complexity is not justified. FCFS also works well for batch processing systems where all jobs are similar in length and fairness (no starvation) is more important than minimizing average wait. It is also commonly used as a tiebreaker within other algorithms: when two processes have the same priority or burst time, FCFS order resolves the tie. Understanding FCFS thoroughly prepares you for round-robin scheduling (which adds preemption via time slices) and priority scheduling (which replaces arrival order with priority values).

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsOperators and ExpressionsArithmetic Operators and Operator PrecedenceComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticFixed-Point Number RepresentationTwo's Complement RepresentationOverflow and Underflow DetectionBinary Adders: Half-Adders and Full-AddersFull Adder and Carry PropagationCarry Lookahead Adder DesignHalf Adder Circuit DesignMultiplication Circuit DesignSequential Circuit DesignRegisters and Register FilesInstruction Set Architecture (ISA)Kernel Architecture and OS StructureSystem Calls and User/Kernel ModeProcesses and the Process Control BlockProcess Creation: fork() and exec()Process Termination and Resource CleanupProcess States and State TransitionsCPU Scheduling FundamentalsRound-Robin (RR) SchedulingFirst-Come-First-Served (FCFS) Scheduling

Longest path: 69 steps · 244 total prerequisite topics

Prerequisites (2)

Leads To (2)