Consider a set of 5 processes whose arrival time. CPU time needed and the priority are given below
Process Priority | Arrival Time (in ms) | CPU Time Needed (in ms) | Priority |
P1 | 0 | 10 | 5 |
P2 | 0 | 5 | 2 |
P3 | 2 | 3 | 1 |
P4 | 5 | 20 | 4 |
P5 | 10 | 2 | 3 |
smaller the number, higher the priority.
If the CPU scheduling policy is priority scheduling without pre-emption, the average waiting time will be
A. | 12.8 ms |
B. | 11.8 ms |
C. | 10.8 ms |
D. | none of these |
Answer : C Explanation : 30 + 0 + 3 + 3 + 18 divided by 5, i.e. 10.8 ms. Rnns said: (1:03am on Monday 30th October 2017)
Its 11.8 sec because it is non preemptive... So once process is started then it will complete before starting another process... Waiting time of p1 to p5 it is 37, 0, 3, 2, 17.. Total= 59, average= 59/5 = 11.8
|
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |