Skip to content
Related Articles
Open in App
Not now

Related Articles

Relation between Preemptive Priority and Round Robin Scheduling Algorithm

Improve Article
Save Article
  • Last Updated : 01 Oct, 2020
Improve Article
Save Article

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.

Prerequisite – CPU Scheduling | Difference between Priority and Round Robin (RR) Scheduling.

Preemptive Priority Scheduling Algorithm :

Preemptive Priority Scheduling Algorithm at time = 0

As higher priority processes keep on adding, prior processes get preempted and get the CPU later on.

Round Robin Scheduling Algorithm :

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.

Round Robin Scheduling Algorithm with time slice = 4 at time = 0

Round Robin Scheduling Algorithm is a special kind of Preemptive Priority Scheduling Algorithm :

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.

Note –
On the other hand, the preemptive priority scheduling algorithm does not behave like the RR algorithm under any condition.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!