GATE Computer ScienceVery hardGATE CS

A cache has 4 lines of one word each. The word-address trace 0, 4, 0, 4, 1, 5, 1, 5, 2, 6, 3, 7, 0, 4, 1, 5, 8, 0, 8, 4, 2, 6 is applied. Misses are classified in the usual way: compulsory if the address is referenced for the first time; capacity if it also misses in a fully associative LRU cache of the same size (4 lines); conflict otherwise. For a DIRECT-MAPPED cache (line = address mod 4), how many of the misses are conflict misses?

  1. A. 3
  2. B. 9
  3. C. 5
  4. D. 8

Correct answer: C. 5

Simulating the direct-mapped cache gives 22 misses: 9 are compulsory (the 9 distinct addresses 0 to 8), 8 are also misses in the 4-line fully associative LRU cache and so are capacity misses, and the remaining 5 are conflict misses that associativity would remove.

More Computer Organization and Architecture questions

Exams that ask this topic