FCFS stands for First Come First Serve. In the FCFS scheduling algorithm, the job that arrived first in the ready queue is allocated to the CPU and then the job that came second and so on. We can say that the ready queue acts as a FIFO (First In First Out) queue thus the arriving jobs/processes are placed at the end of the queue.
FCFS is a non-preemptive scheduling algorithm as a process holds the CPU until it either terminates or performs I/O. Thus, if a longer job has been assigned to the CPU then many shorter jobs after it will have to wait. This algorithm is used in most of the batch operating systems.
- It follows the non-preemptive approach i.e. once a process has control over the CPU it will not preempt until it terminates.
- The criteria for selection of processes is arrival time. The dispatcher selects the first job in the ready queue and this job runs to completion of its CPU burst.
- The average waiting time is very high so not optimal and thus gives poor performance.
- FCFS algorithm is simple, easy to implement and understand.
- Better for processes with large burst time as there is no context switch involved between processes.
- It is a fair algorithm as priority is not invloved, processes that arrive first get served first.
- Convoy effect occurs i.e. all small processes have to wait for one large process to get off the CPU.
- It is non-preemptive, the process will not release the CPU until it finishes its task and terminates.
- It is not appropriate for interactive systems as it cannot guarantee short response time.
- Average waiting time is high and the turnaround time is unpredictable which leads to poor performance.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- LRTF Scheduling Full Form
- HRRN Scheduling Full Form
- Program for FCFS CPU Scheduling | Set 1
- Difference between FCFS and SJF CPU scheduling algorithms
- Difference between FCFS and Priority CPU scheduling
- FCFS Disk Scheduling Algorithms
- Difference between FCFS and C-LOOK disk scheduling algorithm
- Difference between First Come First Served (FCFS) and Longest Job First (LJF) CPU scheduling algorithms
- Program for FCFS CPU Scheduling | Set 2 (Processes with different arrival times)
- Difference between FCFS and SCAN disk scheduling algorithms
- Difference between FCFS and SSTF Disk Scheduling Algorithm
- Difference between Multi Level Queue Scheduling (MLQ) and First Come First Served (FCFS)
- Difference between First Come First Served (FCFS) and Round Robin (RR) Scheduling Algorithm
- CD-R Full Form
- PPP Full Form
- XGA Full Form
- OSI Full Form
- PCB Full Form
- MAN Full Form
- WP Full Form
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.