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.
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.
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:
The execution timeline follows arrival order:
----------------------------------------------------------------
| P0 | P1 | P2 | P3 | P4 |
----------------------------------------------------------------
0 2 8 12 21 33
Execution Details: