Five jobs A, B, C, D and E are waiting in Ready Queue. Their expected runtimes are 9, 6, 3, 5 and x respectively. All jobs entered in Ready queue at time zero. They must run in _____ order to minimize average response time if 3 < x < 5.
(A) B, A, D, E, C
(B) C, E, D, B, A
(C) E, D, C, B, A
(D) C, B, A, E, D
Answer: (B)
Explanation: We will solve it by minimizing the avg Waiting Time and Take x = 4
BT = Burst or Execution time
CT = completion time
P = Process
AWT = Average Waiting Time
AT = Arrival time
WT = Waiting time
We get minimum average waiting time from the sequence given in option (B)
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.