SJF predicts the next CPU burst with an exponential average. If the weight is 0.5, the previous prediction was 10 ms and the actual last burst was 6 ms, what is the next prediction?
Correct answer C. 8 ms
The formula is next = a x actual + (1 - a) x previous prediction = 0.5 x 6 + 0.5 x 10 = 8 ms. With a weight of 0.5 recent and past history count equally. A weight of 1 would use only the last burst (6 ms) and a weight of 0 would ignore it (10 ms). SJF needs such an estimate because the true length of the next burst cannot be known in advance.
Answer checked How we write and check questions
Discussion