CS FundamentalsModerateGATE CS

References at times 1 to 12 are 1, 3, 2, 3, 4, 4, 1, 5, 2, 5, 5, 3. With working-set window Δ = 5 (the last 5 references, including the current one), what is the working-set size at time 8 and at time 12?

  1. A. 5 and 3
  2. B. 4 and 4
  3. C. 4 and 3
  4. D. 3 and 3

Correct answer: C. 4 and 3

At time 8 the window is times 4-8: 3, 4, 4, 1, 5, giving {1, 3, 4, 5}, size 4. At time 12 it is times 8-12: 5, 2, 5, 5, 3, giving {2, 3, 5}, size 3.

More Operating Systems questions

Exams that ask this topic