Relation in FCFS and Round Robin Scheduling Algorithm

In this article, we’ll see how FCFS is special kind of Round Robin Algorithm and Round Robin is special kind of FCFS Algorithm. Also, we will cover the relation with each other. Let’s discuss one by one.

First Come First Serve (FCFS) Scheduling Algorithm :

FCFS is simplest of CPU Scheduling Algorithm which executes process that comes first. It is non-preemptive algorithm. Process that comes in ready queue first gets to be executed by the CPU first, then second one, then third one, and so on. The arrival time of processes is deciding factor here. Ready queue acts like FIFO (First In First Out) queue.

FCFS Scheduling Algorithm with Gantt Chart

Round Robin (RR) Algorithm:

The Round Robin scheduling algorithm is preemptive scheduling algorithm. It uses concept of time slice or time quantum. Process at the beginning of ready queue gets chance to be executed first but only for span of one-time quantum. As new and more processes get added to ready queue, ongoing process gets preempted and gets added to end of ready queue. Next process gets the chance, again for span of one-time quantum. This algorithm is designed for time-sharing systems.
 



Round robin algorithm with time slice = 4

FCFS is a special kind of RR Algorithm :

FCFS with large time quantum acts like an RR algorithm. Imagine an RR algorithm with time slice so large that it is equal or larger than burst time of longest process, then each process will be executed in manner they arrive into the ready queue. There will be no preemption. It will act just like FCFS Algorithm. So, we say that FCFS is special kind of RR algorithm when FCFS has large time quantum.

Note –

Here, we do not say that RR is not special kind of FCFS because FCFS does not support concept of time quantum. RR can be special type of FCFS but it has separate condition that is mentioned below.

RR is special kind of FCFS Algorithm :

In RR, when process is not completely executed within the one-time quantum, it gets preempted and is added again to ready queue with new arrival time. To the ready queue, it is new process being entered. So, RR is executing them one by one as they enter ready queue. No other type of priority is being used here. So, we say that RR is a special kind of FCFS algorithm when job is preempted and rejoins the ready queue with new arrival time.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

An Information Technology undergraduate student

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. 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.



Improved By : srishtiganguly1999