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.
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.
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.
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.
Please Login to comment...