GATE Computer ScienceHardGATE CS (PYQ pattern)

A fully associative cache of 3 lines (block = one word) sees the block reference string [2, 4, 4, 0, 4, 5, 5, 2, 0, 2, 2, 2, 3, 5, 2, 1]. Let h_LRU, h_FIFO and h_OPT be the numbers of hits under LRU, FIFO and the optimal (Belady) policy. Which triple (h_LRU, h_FIFO, h_OPT) is correct?

  1. A. (7, 9, 11)
  2. B. (7, 9, 10)
  3. C. (9, 7, 10)
  4. D. (8, 9, 10)

Correct answer: B. (7, 9, 10)

Simulate LRU (evict least recently used), FIFO (evict oldest inserted) and OPT (evict the block used furthest in future); OPT is always ≥ both and LRU and FIFO differ on this trace.

More Computer Organization and Architecture questions

Exams that ask this topic