FCFS Algorithm

First Come First Serve (FCFS) is an operating system scheduling algorithm that automatically executes queued requests and processes in order of their arrival. It is the easiest and simplest CPU scheduling algorithm. In this type of algorithm, processes which requests the CPU first get the CPU allocation first. This is managed with a FIFO queue. The full form of FCFS is First Come First Serve. As the process enters the ready queue, its PCB (Process Control Block) is linked with the tail of the queue and, when the CPU becomes free, it should be assigned to the process at the beginning of the queue.

Characteristics

Example

process Arrival Time Burst Time
P1 2 6
P2 5 3
P3 1 8
P4 0 3
P5 4 4

Working

Gantt Chart

P4 P3 P1 P5 P2
0-3 3-11 11-17 17-21 21-23

Final Table

process Arrival Time Burst Time Complition Time Turn Around Time Waiting Tme Response Time
P1 2 6 17 15 9 9
P2 5 3 23 18 15 15
P3 1 8 11 10 2 2
P4 0 3 3 3 0 0
P5 4 4 21 17 13 13

Advantages

Disadvantages