In this article, we’ll try to establish the relation between Round Robin and Preemptive Priority Scheduling Algorithm. Let’s discuss the algorithms one by one first and then establish how Round Robin is a special kind of Preemptive Priority Scheduling Algorithm.
As higher priority processes keep on adding, prior processes get preempted and get the CPU later on.
The Round Robin scheduling algorithm is a preemptive scheduling algorithm. It uses a concept of time slice or time quantum. The process at the beginning of the ready queue gets the chance to be executed first but only for the span of one-time quantum.
As new and more processes get added to the ready queue, the ongoing process gets preempted and gets added to the end of the ready queue. The next process gets the chance, again for the span of one-time quantum. This algorithm is designed for time-sharing systems.
In Round Robin Scheduling Algorithm, when a process is already in the CPU being executed it has a limited time quantum which it gets to execute within but if it cannot complete itself then it gets preempted. So as the time quantum progresses the chances of the process being preempted increases.
Its priority decreases. Whereas, the process which is waiting in the ready queue is getting its chances increased in terms of getting the CPU next. So, its priority increases. So, we can say that Round Robin is a special kind of Preemptive Priority Scheduling Algorithm where a process in the ready queue gets its priority increased and a process in the CPU gets its priority decreased.
On the other hand, the preemptive priority scheduling algorithm does not behave like the RR algorithm under any condition.