GATE Computer ScienceVery hardGATE CSE

A direct-mapped cache has 8 lines and block-number mapping line = block mod 8. The following block numbers are accessed in order: 0, 1, 0, 8, 1, 9, 0, 8, 2, 10, 2, 0, 8, 1, 9, 2. How many accesses are misses?

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

Correct answer: D. 13

Blocks 0, 8 share line 0, blocks 1, 9 share line 1, and blocks 2, 10 share line 2; tracking the resident block in each line gives 13 misses.

More Computer Organization and Architecture questions

Exams that ask this topic