Question 9: 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 = 3)
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 7 |
P2 | 2 | 5 |
P3 | 3 | 4 |
P4 | 5 | 6 |
P5 | 6 | 3 |
P6 | 7 | 2 |
Formula:
Turnaround Time (TAT) = Completion Time - Arrival Time
Waiting Time (WT) = Turnaround Time - Burst Time
Solution:
Gantt Chart
| P1 (0-3) | P2 (3-6) | P3 (6-9) | P1 (9-12) | P4 (12-15) | P5 (15-18) | P2 (18-20) | P6 (20-22) | P3 (22-23) | P1(23-24) | P4(24-27)
Calculations:
Process | Completion Time | Turnaround Time (TAT) | Waiting Time (WT) |
---|---|---|---|
P1 | 24 | 24 | 17 |
P2 | 20 | 20 - 2 = 18 | 18 - 5 = 13 |
P3 | 23 | 23 - 3 = 20 | 20 - 4 = 16 |
P4 | 27 | 27 - 5 = 22 | 22 - 6 = 16 |
P5 | 18 | 18 - 6 = 12 | 12 - 3 = 9 |
P6 | 22 | 22 - 7 = 15 | 15 - 2 = 13 |
Average Turnaround Time:
(24 + 18 + 20 + 22 + 12 + 15) / 6 = 18.5
Average Waiting Time:
(17 + 13 + 16 + 16 + 9 + 13) / 6 = 14
Question 10: 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 = 3)
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 5 |
P2 | 2 | 4 |
P3 | 4 | 3 |
P4 | 5 | 6 |
P5 | 7 | 7 |
P6 | 8 | 2 |
Solution:
Formula:
Turnaround Time (TAT) = Completion Time - Arrival Time
Waiting Time (WT) = Turnaround Time - Burst Time
Solution:
Gantt Chart
| P1 (0-3) | P2 (3-6) | P1 (6-8) | P3 (8-11) | P4 (11-14) | P2 (14-15) | P5 (15-18) | P6 (18-20) | P4 (20-23) | P5 (23-27) |
Calculations:
Process | Completion Time | Turnaround Time (TAT) | Waiting Time (WT) |
---|---|---|---|
P1 | 8 | 8 - 0 = 8 | 8 - 5 = 3 |
P2 | 15 | 15 - 2 = 13 | 13 - 4 = 9 |
P3 | 11 | 11 - 4 = 7 | 7 - 3 = 4 |
P4 | 23 | 23 - 5 = 18 | 18 - 6 = 12 |
P5 | 27 | 27 - 7 = 20 | 20 - 7 = 13 |
P6 | 20 | 20 - 8 = 12 | 12 - 2 = 10 |
Average Turnaround Time:
(8 + 13 + 7 + 18 + 20 + 12) / 6 = 13
Average Waiting Time:
(3 + 9 + 4 + 12 + 13 + 10) / 6 = 8.5
Question 11: 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 = 2)
Process | Arrival Time | Burst Time |
---|---|---|
P1 | 0 | 6 |
P2 | 1 | 3 |
P3 | 2 | 7 |
P4 | 3 | 5 |
P5 | 4 | 4 |
Solution:
Given Time Quantum: 2
Formulas:
- Turnaround Time (TAT) = Completion Time - Arrival Time
- Waiting Time (WT) = Turnaround Time - Burst Time
Gantt Chart
| P1(0-2)| P2(2-4) | P3(4-6) | P1(6-8) | P4(8-10) | P5(10-12) | P2(12-13) | P3(13-15) | P1(15-17) | P4(17-19) | P5(19-21) | P3(21-23) | P4(23-24) | P3(24-25)
Calculation:
Process | Arrival Time | Burst Time | Completion Time | Turnaround Time | Waiting Time |
---|---|---|---|---|---|
P1 | 0 | 6 | 17 | 17 - 0 = 17 | 17 - 6 = 11 |
P2 | 1 | 3 | 13 | 13 - 1 = 12 | 12 - 3 = 9 |
P3 | 2 | 7 | 25 | 25 - 2 = 23 | 23 - 7 = 16 |
P4 | 3 | 5 | 24 | 24 - 3 = 21 | 21 - 5 = 16 |
P5 | 4 | 4 | 21 | 21 - 4 = 17 | 17 - 4 = 13 |
Average Turnaround Time = (17 + 12 + 23 + 21 + 17) / 5 = 18.4
Average Waiting Time = (11 + 9 + 16 + 16 + 13) / 5 = 13.4