Round Robin Scheduling Questions | Solved Examples & Answers

Here are 9 questions on RR(Round Robin) process scheduling algorithms . Each question is presented in a table format, followed by the solution with Gantt charts, average turnaround time (TAT), and average waiting time (WT).

Question 12: find the average Turn Around Time and Waiting Time of following processes using RR(Round Robin) process scheduling algorithm? Consider the following processes with their Arrival Time, Burst Time (take Quantum Time = 1.0)

Process Arrival Time Burst Time
P1 0 4.5
P2 2 0.5
P3 3 6
P4 4 2
P5 4 1
P6 6 3.5
P7 10 1
P8 11 3

Solution:

Given Time Quantum: 1.0

Formulas:

  • Turnaround Time (TAT) = Completion Time - Arrival Time
  • Waiting Time (WT) = Turnaround Time - Burst Time

Gantt Chart

Round Robin SCHEDULING | Question 1 Solution | Gantt Chart Round Robin SCHEDULING | Question 1 Solution | Gantt Chart Round Robin SCHEDULING | Question 1 Solution | Gantt Chart Round Robin SCHEDULING | Question 1 Solution | Gantt Chart

Calculation:

Process Completion Time Turnaround Time Waiting Time
P1 9 9 - 0 = 9 9 - 4.5 = 5.5
P2 2.5 2.5 - 2 = 0.5 0.5 - 0.5 = 0
P3 21.5 21.5 - 3 = 18.5 18.5 - 6 = 12.5
P4 11 11 - 4 = 7 7 - 2 = 5
P5 7.5 7.5 - 4 = 3.5 3.5 - 1 = 2.5
P6 19.5 19.5 - 6 = 13.5 13.5 - 3.5 = 10
P7 13 13 - 10 = 3 3 - 1 = 2
P8 20.5 20.5 - 11 = 9.5 9.5 - 3 = 6.5

Average Turnaround Time = (9 + 0.5 + 18.5 + 7 + 3.5 + 13.5 + 3 + 9.5) / 8 = 8.0625

Average Waiting Time = (5.5 + 0 + 12.5 + 5 + 2.5 + 10 + 2 + 6.5) / 8 = 5.5

Question 13: consider the following set of processes, with the length of the cpu burst time given in millisecond. Draw Gantt charts illustrating the execution of these processes using Round Robin (quantum = 1) scheduling. what is turn around time and waiting time of each of the processes.

Process Arrival Time Burst Time
P1 0 8
P2 2 4
P3 4 2
P4 5 3
P5 6 5
P6 8 1
P7 10 2

Solution:

Given Time Quantum: 1.0

Formulas:

  • Turnaround Time (TAT) = Completion Time - Arrival Time
  • Waiting Time (WT) = Turnaround Time - Burst Time

Gantt Chart

Round Robin SCHEDULING | Question 13 Solution | Gantt Chart Round Robin SCHEDULING | Question 13 Solution | Gantt Chart Round Robin SCHEDULING | Question 13 Solution | Gantt Chart Round Robin SCHEDULING | Question 13 Solution | Gantt Chart

Calculation:

Process Completion Time Turnaround Time Waiting Time
P1 24 24 - 0 = 24 24 - 8 = 16
P2 15 15 - 2 = 13 13 - 4 = 9
P3 11 11 - 4 = 7 7 - 2 = 5
P4 19 19 - 5 = 14 14 - 3 = 11
P5 25 25 - 6 = 19 19 - 5 = 14
P6 13 13 - 8 = 5 5 - 1 = 4
P7 20 20 - 10 = 10 10 - 2 = 8

Average Turnaround Time = (24 + 13 + 7 + 14 + 19 + 5 + 10 ) / 7 = 13.14

Average Waiting Time = (16 + 9 + 5 + 11 + 14 + 4 + 8 ) / 7 = 8.42

List of books that help you learn the Round Robin scheduling algorithm

List of books that help you learn the Round Robin scheduling algorithm