Directions (Q96–100): Consider the following set of processes with arrival time and CPU burst time given in milliseconds (ms):
| Process | Arrival Time | Burst Time |
|---|---|---|
| P1 | 0 | 5 |
| P2 | 2 | 3 |
| P3 | 2 | 2 |
| P4 | 5 | 3 |
| P5 | 6 | 1 |
Find the average weighted turnaround time for these processes using the Highest Response Ratio Next (HRN) algorithm.
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. 2.834 ms
Explanation
P1 runs 0–5. At t = 5: RR(P2) = (3+3)/3 = 2, RR(P3) = (3+2)/2 = 2.5, RR(P4) = 1 → P3 runs 5–7. At t = 7: RR(P2) = (5+3)/3 = 2.67, RR(P4) = (2+3)/3 = 1.67, RR(P5) = (1+1)/1 = 2 → P2 runs 7–10. At t = 10: RR(P4) = 8/3 = 2.67, RR(P5) = 5 → P5 runs 10–11, then P4 11–14. Weighted TAT (TAT/burst): P1 5/5 = 1, P2 8/3 = 2.667, P3 5/2 = 2.5, P4 9/3 = 3, P5 5/1 = 5. Average = 14.167/5 ≈ 2.834.More System Software and Operating System questions
- What is the average turnaround time for these processes with the First Come First Serve (FCFS) scheduling algorithm?
- What is the average waiting time for these processes with non-preemptive Shortest Job First (SJF) scheduling?
- When we apply the Shortest Job First (SJF) scheduling algorithm, process P2 faces partial starvation and waits a longer time to execute. Wh…
- Which of the following statements are TRUE about mutual exclusion in concurrent programming? (A) Mutual exclusion ensures that only one pro…
- Which of the following statements are TRUE about privileged instructions? (A) They can only be executed by the operating system kernel and…
- Match List I (Algorithms) with List II (Characteristics)List I List II (A) First Come First Served (FCFS) (I) Each process is assigned a pr…