GATE Computer ScienceVery hardGATE CSE · UGC NET

A 2-way set-associative cache with 4 sets uses LRU replacement and set = block mod 4. Blocks accessed in order: 1, 5, 9, 2, 6, 1, 5, 3, 7, 2, 10, 1, 9, 5, 6, 2, 14, 1, 5. How many misses occur?

  1. A. 16
  2. B. 14
  3. C. 18
  4. D. 13

Correct answer: A. 16

Blocks 1, 5, 9 compete in set 1 (blocks 2, 6, 10, 14 in set 2, blocks 3, 7 in set 3); simulating each 2-entry LRU stack gives 16 misses.

More Computer Organization and Architecture questions

Exams that ask this topic