Given the following processes with their burst times and priorities (lower number indicates higher priority), all arriving at time 0, what is the average waiting time using the (non-preemptive) priority scheduling algorithm?
| Process | Burst Time | Priority |
|---|---|---|
| P1 | 10 | 3 |
| P2 | 1 | 1 |
| P3 | 2 | 4 |
| P4 | 1 | 5 |
| P5 | 5 | 2 |
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. 8.2
Explanation
Order by priority: P2 (0–1), P5 (1–6), P1 (6–16), P3 (16–18), P4 (18–19). Waiting times: P2 = 0, P5 = 1, P1 = 6, P3 = 16, P4 = 18. Average = 41/5 = 8.2.More System Software and Operating System questions
- Calculate the average response time for these processes with the non-preemptive priority scheduling algorithm. Priorities are as follows; c…
- Find the average weighted turnaround time for these processes using the Highest Response Ratio Next (HRN) algorithm.
- 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…