Round Robin Scheduling algorithm
CPU scheduling algorithm
The Round Robin Scheduling algorithm has time quantum. Time quantum is fixed for the execution of each process. this name includes the equal share of something into their turns.
Characteristics of Round Robin Scheduling Algorithm
- It is a pre-emptive algorithm in nature that is added to the end of the queue.
- It is a hybrid model that is clock-driven.
- It is used more in traditional OS (Operating system).
- It is the very easiest and oldest algorithm.
- It is the real time-based algorithm that responds to the event in a specific time limit.
- The slice is varying from OS to OS and it should be minimum, which is assigned to a specific time.
Round Robin Criteria
- Time Quantum
- Arrival Time
Round Robin Decision Mode
- Preemptive: each process is allowed to run for a specified time duration, called its quantum. The process is allowed to run only for this time interval.
- Non-Preemptive: for that, maintain the ready queue. First, come process executes till the time quantum value and likewise, processes are executes
Round Robin Implementation
- This strategy can be implemented by using a circular FIFO queue in the Round Robin Scheduling algorithm.
In this, it has time quantum is 4, and context switch overhead is 1.
|Process||Arrival Time (A.T.)||Burst Time (B.T.)|
|Process||Arrival Time||Burst Time||Completion Time||Turnaround Time||Waiting Time|
Average Turnaround Time:(28+24+9+17)/4 = 19.5
Average Waiting Time: (18+18+7+13)/4 = 14
- One of the oldest, simplest, fairest, and most widely used algorithms.
- It deals with all processes without any priority and worry.
- That’s performance is very good than another algorithm in terms of average responding time.
- It does not face any difficulty in the convoy effect.
- CPU allocation is distributed by the algorithm fairly.
- If one process is specified in the set of the time period, the process is preempted, and another process will start within that time period.
- this scheduling algorithm does not depend on the burst time, which is helpful to easily implement to any operating system.
- Context switch overhead is there.
- The time spends by context switching is more.
- It decreases comprehension.
- When higher context switching is implemented we get lower quantum results.
- The priorities can’t be set for the processes.
- Difficult to find the correct timing of quantum in the algorithm.
- The performance heavily depends on the quantum.
- It doesn’t give special priority to the important task.
Worst Case Latency
This term is used for the maximum time taken for the execution of all task mentions.
- dt –> It denotes the detection time in which task is brought to the list.
- st –>Switching task from one task to another one task.
- et –> It denotes the task execution time.
Determination of time quantum is too critical. If it is too long it causes poor response for sort interactive processes.
Implementation of RR in C language
printf("Enter Total Process: ");
printf("Enter Arrival Time and Burst Time for Process Process Number %d :",count+1);
printf("Enter Time Quantum:\t");
printf("\n\nProcess\t|Turnaround Time|Waiting Time\n\n");
if(rt[count]<=time_quantum && rt[count]>0)
if(rt[count]==0 && flag==1)
printf("\nAverage Waiting Time= %f\n",wait_time*1.0/n);
printf("Avg Turnaround Time = %f",turnaround_time*1.0/n);
In conclusion, Any query in RR Comment below in the comment box.
To learn more concept about RR go to
- The Robin Scheduling Algorithm is a pre-emptive algorithm and it is used mostly in old OS
- It is very easy to understand and we can easily execute.
For Android projects goto the ANDROID
Stay Connect with our app
For Assignment Questions and Explanation of a theory topic visit