CS FundamentalsVery hardGATE CS

Reference string (times 1–12): 1, 2, 3, 1, 2, 4, 1, 2, 5, 6, 5, 6. With working-set window Δ = 3 (the current and previous two references), what is the AVERAGE working-set size over all 12 time steps?

  1. A. 2.75
  2. B. 2.58
  3. C. 3
  4. D. 2.33

Correct answer: B. 2.58

Working-set sizes at times 1–12: 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2. Their sum is 31, so the average is 2.58. The first two steps are small because the window is not full yet.

More Operating Systems questions

Exams that ask this topic