GATE Computer ScienceHardGATE CS (PYQ pattern)

A direct-mapped cache has 8 lines (block = 1 word). A program issues block references [0, 8, 0, 8, 1, 9, 1, 9, 2, 10, 2, 10, 0, 8, 1, 9]. Define conflict misses as misses of this cache minus misses of a fully-associative LRU cache of the same capacity. How many conflict misses are there?

  1. A. 16
  2. B. 10
  3. C. 6
  4. D. 12

Correct answer: B. 10

Blocks b and b+8 collide in the direct-mapped cache, so it misses on every reference (16); the fully associative cache of 8 lines keeps all six distinct blocks and misses only the first 6 times. 16 − 6 = 10.

More Computer Organization and Architecture questions

Exams that ask this topic