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 |
Calculate the average response time for these processes with the non-preemptive priority scheduling algorithm. Priorities are as follows; consider that all the processes arrive at time 0 (low numbers represent high priority).
| Process | Burst Time | Priority |
|---|---|---|
| P1 | 5 | 3 |
| P2 | 3 | 1 |
| P3 | 2 | 5 |
| P4 | 3 | 4 |
| P5 | 1 | 2 |
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. 5.6 ms
Explanation
Order by priority: P2 (0–3), P5 (3–4), P1 (4–9), P4 (9–12), P3 (12–14). Response time = start time − arrival (0): 0, 3, 4, 9, 12. Average = 28/5 = 5.6 ms.More System Software and Operating System questions
- 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…
- Which of the following statements are TRUE about privileged instructions? (A) They can only be executed by the operating system kernel and…