Practice mode Operating Systems

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

Explanation

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.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.