It is a scheduling algorithm of an operating system
FCFS First Come First Served
- The process that requests first is served first. It means that processes are served in the exact order as they come.
- Non-preemptive: Once a process is selected, it runs until it blocks for an I/O or some event, or it terminates.
- This strategy can be easily implemented by using FIFO. FIFO means First In First Out.
- When the first process enters in the system, it starts execution.
- and the other processes are appended in a queue. When CPU becomes free, a process from the first position in the queue is selected to run.
- For finding Completion time, looking in Gantt chart from the back and complete of each process is completion time.
- Turn Around Time = Completion Time – Arrival Time.
- Waiting Time = Turn Around Time – Burst Time.
Now, see one example for a better understanding of it.
|Process||Arrival Time (A.T.)||Burst Time (B.T.)|
In this example,
- we can see that process P0 arrives first so we have to give execution first to process P0.
- process P0 has 10 burst time so it is executed till the 0 to 10 because of Non-preemptive.
- After the execution of P0, all processes arrive but P1 has arrived first and after that P2 and after that P3 is arrived.
- so we have to give execution to P1 after that P2 and P3.
|Process||Arrival Time||Burst Time||Completion Time||Turnaround Time||Waiting Time|
Average Turnaround Time:(10+15+15+17)/4 = 14.25
Average Waiting Time: (0+9+13+13)/4 = 8.75
- Simple, no starvation
- Easy to understand and implement.
- Not efficient, average waiting time is too high.
- suffer from convoy effect.
- The utilization is low.
Implementation of FCFS in C language:
printf("Enter No. of Process : ");
printf("\nEnter the arrival time :\n");
printf("\nEnter the Burst time :\n");
printf("\nAvg. Turn Around time= %.2f",atat);
printf("\nAvg. Waiting time= %.2f",awt);
printf("\nThrough put= %.4f",tp);
Comment for any query.
To learn more concept about FCFS go to
For Android projects goto the ANDROID
Stay Connect with our app: –
For Assignment Questions and Explanation of a theory topic visit: