FCFS is the simplest and the easiest CPU scheduling algorithm. In FCFS, the processes is managed with a FIFO queue. The processes which requests the CPU first get the CPU allocation first. Non-preemptive scheduling algorithms is supported by FCFS method. Let us understand this with the help of an example.
In this example we have three processes P1, P2, and P3 having CPU time as 24, 3, and 4 respectively.
Here, we have assumed arrivial time as 0, so turn around and completion times are same.
Here,
Completion Time for P1, P2 andd P3 are 24, 27 and 31 respectively.
In FCFS, Turn Around Time = Completion Time - Arrivial time
Waiting Time = Turn Around Time - Burst Time