Operating System - First Come First Served (FCFS)

<<Previous

Next >>




  • It is the simplest CPU Scheduling algorithm.

  • When the process request the CPU first, then the CPU will be allocated first.

  • This algorithm use the FIFO queue for ready queue management.

  • Its code is simple to write and easy to read.

  • This algorithm follows the nonpreemptive scheduling.

  • The average waiting time for this algorithm is quite long.

  • The performance of this algorithm is very low so that it is rarely used in the modern operating system.


For example consider the set of processes that arrive at time 0 and CPU-burst time given in millisecond:


ProcessCPU-Burst Time
p120
p24
p33

If the processes arrive in the order P1,P2,P3, then the processes will be processed in FCFS order.

Following shows the Gantt Chart:


Suppose, the processes arrive in the different arrival time, then these processes will be served in FCFS order.


ProcessArrival TimeCPU-Burst Time
p1020
p214
p333

Gantt Chart:




<<Previous

Next >>