CS FundamentalsHardGATE CS
SJF predicts the next CPU burst by exponential averaging: τ(n+1) = α·t(n) + (1 − α)·τ(n), with α = 0.75 and initial guess τ(1) = 10 ms. The measured bursts are 8, 4, 6, 2 ms (in that order). What is the predicted length of the 5th burst (to 3 decimal places)?
- A. 5.000 ms
- B. 2.945 ms
- C. 6.195 ms
- D. 5.781 ms
Correct answer: B. 2.945 ms
τ2 = 0.75·8 + 0.25·10 = 8.5; τ3 = 0.75·4 + 0.25·8.5 = 5.125; τ4 = 0.75·6 + 0.25·5.125 = 5.78125; τ5 = 0.75·2 + 0.25·5.78125 = 2.945 ms. Swapping the weights gives 6.195, and the plain mean is 5.
More Operating Systems questions
- Four processes arrive at time 0 in the order A (6), B (3), C (1), D (7) (bursts in ms) and are scheduled Round Robin with no switching…
- Reference string: 1, 3, 5, 4, 2, 4, 3, 2, 1, 0, 5, 3, 5, 0, 4, 3. With 3 frames (initially empty), how many page faults does LRU produce?
- Reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. With 4 frames (initially empty), how many page faults does…
- Reference string: 3, 2, 1, 0, 3, 2, 4, 3, 2, 1, 0, 4. How many page faults does FIFO produce with 3 frames and with 4 frames (both…
- Reference string: 4, 5, 2, 3, 4, 2, 3, 2, 1, 3, 5, 4, 1, 0, 3 frames, initially empty. Using the clock (second-chance) algorithm, where a…
- Reference string: 6, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 3 frames, initially empty. After all references are processed under LRU…