/    /  OS – Round Robin Scheduling

Round Robin Scheduling

 

Round Robin is a CPU scheduling algorithm where each process is assigned a fixed time slot in a cyclic way. 

It is similar to FCFS scheduling but preemption is added, allowing the system to switch between processes.

Characteristics of Round Robin Scheduling:

  1. Round Robin or RR algorithm is one of the oldest and easiest algorithms.
  2. It is mostly used in traditional operating systems.
  3. It is clock-driven.
  4. RR algorithm is a real-time algorithm.
  5. RR method comes under the category of preemptive algorithms.

Advantages of Round Robin Scheduling Algorithm:

The advantages of the RR scheduling algorithm is as follows:

  1. It helps all jobs get a fair allocation of the CPU.
  2. Each process can be rescheduled after a particular time slot.
  3. In RR scheduling ready processes are added to the end of the queue.
  4. It is cyclic.
  5. RR scheduling algorithm gives the best performance in average response time.

 

Disadvantages of Round Robin Scheduling Algorithm:

The disadvantages of the RR scheduling algorithm is as follows:

  1. RR scheduling algorithm gives context switches more time.
  2. It is a time-consuming scheduling algorithm for smaller quantum.
  3. It has a low throughput.
  4. When the time quantum for scheduling is less, the Gantt chart seems too big.
  5. This algorithm offers a larger waiting time. 

Example of RR scheduling algorithm:

 

ProcessDurationOrderArrival time
P1310
P2420
P3530

 

Let time quantum be 1 unit.

 

P1P2P3P1P2P3P1P2P3P2

0                                                                                                                              10

Therefore, Waiting time of:

P1=4

P2=6

P3=6

Average waiting time= (4+6+6)/3 = 5.33

 

Reference:

Round Robin Schedule of Operating System.