2,413 views
0 votes
0 votes
Consider a set of 5 processes:
 
IO Arrival CPU time (in Msec) Priority
P1 0 10 5
P2 0 7 2
P3 4 5 1
P4 10 15 4
P5 20 3 3
 

Smaller the number, higher and priority. If the CPU scheduling used is SIF, the average waiting time (without preemption) is?

Your Answer:

8.4

Correct Answer: 6.4    Status: incorrect

2 Answers

Best answer
2 votes
2 votes

Since it's non-preemptive, the priorities are not important for the calculation.

IO Arrival CPU time (in Msec) Priority(Not Used) Completion Time TAT(CT-AT) WT=TAT-BT
P1 0 10 5 22 22 12
P2 0 7 2 7 7 0
P3 4 5 1 12 8 3
P4 10 15 4 40 30 15
P5 20 3 3 25 5 2

 

Avg WT = (32/5) = 6.4ms

Gantt Chart
Process No P2 P3 P1 P5 P4
CPU Time 0-7 7-12 12-22 22-25 25-40
selected by

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
1 answer
4