wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the set of processes with arrival time (in milliseconds), CPU burst time (in milliseconds), and priority (0 is the highest priority) shown below. None of the processes have I/O burst time.
Process Arrival Time Burst Time Priority
P1 0 11 2
P2 5 28 0
P3 12 2 3
P4 9 10 1
P5 9 16 4

The average waiting time (in milliseconds) of all the processes using preemptive priority sccheduling algorithm is _____.

Open in App
Solution

Process Arrival Time Burst Time Priority C.T. T.A.T. W.T.
P1 0 11 2 49 49 38
P2 5 28 0(high) 33 28 0
P3 12 2 3 51 39 37
P4 2 10 1 40 38 28
P5 9 16 4 67 58 42
Total 145
P1 P4 P2 P4 P1 P3 P5
0 2 5 33 40 49 51 67

Average waiting time =1459=29

flag
Suggest Corrections
thumbs-up
3
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Introduction to Cash Flow Statement
ACCOUNTANCY
Watch in App
Join BYJU'S Learning Program
CrossIcon