2,680 views
0 votes
0 votes

If the cpu scheduling  policy is SJF  with preemption , the avg waiting time will be a)8ms  b)14ms  c)5.6 ms  d)none

1 Answer

2 votes
2 votes

Answer is option C

  AT BT CT TAT WT
p1 0 10 20 20 10
p2 0 5 8 8 3
p3 2 3 5 3 0
p4 5 20 40 35 15
p5 10 2 12 2 0
p2 p3 p2 p1 p5 p1 p4

0          2            5             8           10          12         20           40

Avg waiting time = 28/5 = 5.6

edited by

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
1 answer
3
Nam14 asked Apr 5, 2023
514 views
Please read below passage from 10th edition Operating System Concepts, pg. 202:5.1.3 Preemptive and Nonpreemptive SchedulingCPU-scheduling decisions may take place under ...
0 votes
0 votes
3 answers
4
Chaitanya Kale asked Sep 22, 2022
633 views
If we are using non-preemptive CPU scheduling then can there be process state transition from running to ready state?