• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
July 18, 2022 |70.9K Views
Round Robin (RR) CPU Scheduling Algorithm with Example
  Share  1 Like
Description
Discussion

Round Robin (RR) Algorithm is a part of CPU Scheduling algorithm.

How does a Round Robin (RR) Algorithm works?

Round Robin (RR) algorithm schedules processes in a cyclic way. In RR scheduling, each process is assigned a fixed amount of time (time quantum) for using the CPU. If the execution of the process is completed during the time quantum, then the process will end. Otherwise, the process will go back to the ready queue and wait for its turn to again get the time quantum for completing its execution. 

Features of Round Robin (RR) Algorithm:
1) It is a preemptive scheduling algorithm that allows time sharing.
2) Ensures fairness by allocating the same amount of time to all the processes. 
3) Allows system resources to be used in a time-sharing manner. Improves user interactiveness among processes. 
4) Quick first response time for processes.

In RR scheduling, time quantum needs to be carefully selected. This algorithm lead to large waiting time and it requires large number of context switches that increases overhead.

Round robin algorithm:
https://www.geeksforgeeks.org/program-round-robin-scheduling-set-1/