GATE Computer ScienceVery hardGATE CSE

A 64-byte direct-mapped cache with 16-byte lines is write-back and write-allocate (line = block mod 4). Accesses (type, byte address) in order: W0, R64, R0, W16, W80, R16, R32, W96, R0, W48, R112, R48. Counting 16 bytes for every line fill and 16 bytes for every write-back of a dirty evicted line (no final flush), how many bytes are exchanged with memory?

  1. A. 224
  2. B. 256
  3. C. 240
  4. D. 272

Correct answer: C. 240

Simulating line states (valid/dirty) over the 12 accesses gives 15 line transfers = 240 bytes.

More Computer Organization and Architecture questions

Exams that ask this topic