Computer Science EngineeringVery hardISRO SC

A direct-mapped cache has 4 lines of one word each. Word addresses 24, 28, 14, 5, 14, 20, 24, 15, 7, 9, 13, 23, 17, 8 are accessed in order on an initially empty cache. The number of hits is

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

Correct answer: D. 1

Line = address mod 4; a hit occurs only when the same address is still resident in its line. Simulation gives 1 hits.

More OS, DBMS, Networks & Computer Architecture (ISRO CS) questions

Exams that ask this topic