Question 1 : 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, and Priority (take Quantum Time = 2).
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 4 |
P2 | 1 | 3 |
P3 | 2 | 2 |
P4 | 3 | 1 |
Solution :
Formula:
- Turnaround Time = Completion Time - Arrival Time
- Waiting Time = Turnaround Time - Burst Time
- Average Turnaround Time = Sum of Turnaround Times / Number of Processes
- Average Waiting Time = Sum of Waiting Times / Number of Processes
Gantt Chart
Process | Arrival Time | Burst Time | Completion Time | Turnaround Time | Waiting Time |
---|---|---|---|---|---|
P1 | 0 | 4 | 8 | 8 | 4 |
P2 | 1 | 3 | 10 | 9 | 6 |
P3 | 2 | 2 | 6 | 4 | 2 |
P4 | 3 | 1 | 9 | 6 | 5 |
Average Turnaround Time = (8 + 9 + 4 + 6) / 4 = 6.75
Average Waiting Time = (4 + 6 + 2 + 5) / 4 = 4.25
Question 2: 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, and Priority (take Quantum Time = 2).
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 6 |
P2 | 1 | 4 |
P3 | 2 | 3 |
P4 | 3 | 5 |
P5 | 4 | 2 |
Solution :
Formula:
- Turnaround Time = Completion Time - Arrival Time
- Waiting Time = Turnaround Time - Burst Time
- Average Turnaround Time = Sum of Turnaround Times / Number of Processes
- Average Waiting Time = Sum of Waiting Times / Number of Processes
Gantt Chart
Process | Arrival Time | Burst Time | Completion Time | Turnaround Time | Waiting Time |
---|---|---|---|---|---|
P1 | 0 | 6 | 17 | 17 | 11 |
P2 | 1 | 4 | 14 | 13 | 9 |
P3 | 2 | 3 | 15 | 13 | 10 |
P4 | 3 | 5 | 20 | 17 | 12 |
P5 | 4 | 2 | 12 | 8 | 16 |
Average Turnaround Time = (17 + 13 + 13 + 17 + 8) / 5 = 13.6
Average Waiting Time = (11 + 9 + 10 + 12 + 6) / 5 = 9.6
Question 3: 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, and Priority (take Quantum Time = 2).
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 5 |
P2 | 1 | 3 |
P3 | 2 | 4 |
P4 | 3 | 2 |
Solution :
Formula:
- Turnaround Time = Completion Time - Arrival Time
- Waiting Time = Turnaround Time - Burst Time
- Average Turnaround Time = Sum of Turnaround Times / Number of Processes
- Average Waiting Time = Sum of Waiting Times / Number of Processes
Gantt Chart
Calculation
Process | Arrival Time | Burst Time | Completion Time | Turnaround Time | Waiting Time |
---|---|---|---|---|---|
P1 | 0 | 5 | 14 | 14 | 9 |
P2 | 1 | 3 | 11 | 10 | 17 |
P3 | 2 | 4 | 13 | 11 | 7 |
P4 | 3 | 2 | 10 | 7 | 5 |
Average Turnaround Time = (14 + 10 + 11 + 7) / 4 = 10.5
Average Waiting Time = (9 + 7 + 7 + 5) / 4 = 7
Question 4 : 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, and Priority (take Quantum Time = 1).
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 5 | 4 |
P2 | 1 | 5 |
P3 | 0 | 6 |
P4 | 3 | 2 |
P5 | 4 | 3 |
P6 | 2 | 7 |
Formula:
Turnaround Time (TAT) = Completion Time - Arrival Time
Waiting Time (WT) = Turnaround Time - Burst Time
Solution:
Gantt Chart
Calculations:
Process | Completion Time | Turnaround Time (TAT) | Waiting Time (WT) |
---|---|---|---|
P1 | 25 | 20 | 16 |
P2 | 22 | 21 | 16 |
P3 | 23 | 23 | 17 |
P4 | 12 | 9 | 7 |
P5 | 19 | 15 | 12 |
P6 | 27 | 25 | 18 |
Average Turnaround Time:
(20+21+23+9+15+25) / 6 = 18.83
Average Waiting Time:
(16+16+17+7+12+18) / 6 = 14.33
Question 5 : 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, and Priority (take Quantum Time = 2)
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 2 |
P2 | 1 | 3 |
P3 | 2 | 1 |
P4 | 3 | 2 |
P5 | 4 | 3 |
Solution :
Formula:
- Turnaround Time = Completion Time - Arrival Time
- Waiting Time = Turnaround Time - Burst Time
- Average Turnaround Time = Sum of Turnaround Times / Number of Processes
- Average Waiting Time = Sum of Waiting Times / Number of Processes
Gantt Chart
Process | Completion Time | Turnaround Time | Waiting Time |
---|---|---|---|
P1 | 2 | 2 - 0 = 2 | 2 - 2 = 0 |
P2 | 10 | 10 - 1 = 9 | 9 - 3 = 6 |
P3 | 5 | 5 - 2 = 3 | 3 - 1 = 2 |
P4 | 7 | 7 - 3 = 4 | 4 - 2 = 2 |
P5 | 11 | 11 - 4 = 7 | 7 - 3 = 4 |
Average Turnaround Time:
(2 + 9 + 3 + 4 + 7) / 5 = 5
Average Waiting Time:
(0 + 6 + 2 + 2 + 4) / 5 = 2.8
Question 6: 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, and Priority (take Quantum Time = 2).
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 3 |
P2 | 1 | 2 |
P3 | 2 | 1 |
P4 | 3 | 2 |
P5 | 4 | 3 |
Solution :
Formula:
- Turnaround Time = Completion Time - Arrival Time
- Waiting Time = Turnaround Time - Burst Time
- Average Turnaround Time = Sum of Turnaround Times / Number of Processes
- Average Waiting Time = Sum of Waiting Times / Number of Processes
Gantt Chart
Process | Completion Time | Turnaround Time | Waiting Time |
---|---|---|---|
P1 | 6 | 6 - 0 = 6 | 6 - 3 = 3 |
P2 | 4 | 4 - 1 = 3 | 3 - 2 = 1 |
P3 | 5 | 5 - 2 = 3 | 3 - 1 = 2 |
P4 | 8 | 8- 3 = 5 | 5 - 2 = 3 |
P5 | 11 | 11 - 4 = 7 | 7 - 3 = 4 |
Average Turnaround Time = (6 + 3 + 3 + 5 + 7) / 5 = 4.8
Average Waiting Time = (3 + 1 + 2 + 3 + 4) / 5 = 2.6
Question 7: 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, and Priority (take Quantum Time = 2)
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 2 |
P2 | 1 | 3 |
P3 | 2 | 2 |
P4 | 3 | 1 |
P5 | 4 | 2 |
Solution :
Formula:
- Turnaround Time = Completion Time - Arrival Time
- Waiting Time = Turnaround Time - Burst Time
- Average Turnaround Time = Sum of Turnaround Times / Number of Processes
- Average Waiting Time = Sum of Waiting Times / Number of Processes
Gantt Chart
Process | Completion Time | Turnaround Time | Waiting Time |
---|---|---|---|
P1 | 2 | 2 - 0 = 2 | 2 - 2 = 0 |
P2 | 10 | 10 - 1 = 9 | 9 - 3 = 6 |
P3 | 6 | 6 - 2 = 4 | 4 - 2 = 2 |
P4 | 7 | 7 - 3 = 4 | 4 - 1 = 3 |
P5 | 9 | 9 - 4 = 5 | 5 - 2 = 3 |
Average Turnaround Time = (2 + 9 + 4 + 4 + 5) / 5 = 4.8
Average Waiting Time (0 + 6 + 2 + 3 + 3) / 5 = 2.8
Question 8: 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, and Priority (take Quantum Time = 3)
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 6 |
P2 | 1 | 3 |
P3 | 2 | 7 |
P4 | 3 | 5 |
P5 | 4 | 4 |
Solution:
Given Time Quantum: 3
Formulas:
- Turnaround Time (TAT) = Completion Time - Arrival Time
- Waiting Time (WT) = Turnaround Time - Burst Time
Gantt Chart
Calculation:
Process | Arrival Time | Burst Time | Completion Time | Turnaround Time | Waiting Time |
---|---|---|---|---|---|
P1 | 0 | 6 | 15 | 15 - 0 = 15 | 15 - 6 = 9 |
P2 | 1 | 3 | 6 | 6 - 1 = 5 | 5 - 3 = 2 |
P3 | 2 | 7 | 25 | 25 - 2 = 23 | 23 - 7 = 16 |
P4 | 3 | 5 | 23 | 23 - 3 = 20 | 20 - 5 = 15 |
P5 | 4 | 4 | 24 | 14 - 4 = 20 | 20 - 4 = 16 |
Average Turnaround Time = (15 + 5 + 23 + 20 + 20) / 5 = 16.6
Average Waiting Time = (9 + 2 + 16 + 15 + 16) / 5 = 11.6