Algorithm Overview

FCFS is the simplest scheduling algorithm where the process that arrives first is scheduled first. It follows a straightforward principle: processes are executed in the order of their arrival times.

Example Problem Setup

Consider five processes with the following specifications:

Process Arrival Time Burst Time
P0 0 2
P1 1 6
P2 2 4
P3 3 9
P4 4 12

Note: Burst time represents the total CPU time required by each process.

Key Characteristics

Non-preemptive Nature

FCFS is non-preemptive, meaning once CPU is assigned to a process, it cannot be taken back until the process completes or voluntarily gives up the CPU.

Important Clarification: Even though FCFS is non-preemptive, it's not the same as batch processing because:

Gantt Chart Construction

The execution timeline follows arrival order:

----------------------------------------------------------------
|  P0  |     P1     |   P2   |      P3      |        P4        |
----------------------------------------------------------------
0      2            8        12             21                 33

Execution Details: