Solution
The correct answer is option 2.
CONCEPT:
Highest Response Ratio Next (HRN):
HRN is a non-preemptive scheduling algorithm where the process with the highest response ratio is selected next. The response ratio is calculated as:
Response Ratio = (Waiting Time + Burst Time) / Burst Time
Formula:
Turnaround Time (TAT) = Completion Time (CT) - Arrival Time (AT)
Weighted TAT = Turnaround Time / Burst Time
Steps:
- Select the process with the highest response ratio among all arrived processes.
- Compute completion time, TAT, and weighted TAT.
- Repeat until all processes are scheduled.
Calculated weighted turnaround times:
| Process |
AT |
BT |
CT |
TAT |
WTAT |
| P1 |
0 |
5 |
5 |
5 |
1.00 |
| P3 |
2 |
2 |
7 |
5 |
2.5 |
| P2 |
2 |
3 |
10 |
8 |
2.67 |
| P4 |
5 |
3 |
13 |
8 |
2.67 |
| P5 |
6 |
1 |
14 |
8 |
8.0 |
Average Weighted Turnaround Time = \({{1+ 2.5+2.67+2.67+8} \over 5 } = 2.834\)
∴ Hence, the correct answer is 2.834 ms