GATE Computer ScienceHardGATE CSE

A direct-mapped cache has 8 one-word lines (line = address mod 8) and starts empty. The word addresses 0, 1, 2, 3, 0, 8, 1, 9, 0, 8, 2, 16, 1, 8 are accessed in order. How many accesses are hits?

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

Correct answer: A. 3

Addresses 0, 8, 16 conflict on line 0 and 1, 9 on line 1, so most re-references miss; simulating gives 3 hits.

More Computer Organization and Architecture questions

Exams that ask this topic