GATE Computer ScienceHardGATE CS

A direct-mapped write-back cache of 8 KB has 64-byte blocks and each block is divided into 4 sub-blocks of 16 bytes with their own valid bit and their own dirty bit (one tag per block). With 32-bit byte addresses, how many bits of tag, valid and dirty storage does the cache need in total?

  1. A. 2688
  2. B. 2944
  3. C. 3328
  4. D. 3456

Correct answer: D. 3456

There are 8192 / 64 = 128 blocks (7 index bits, 6 offset bits), so the tag has 32 − 13 = 19 bits. Each block stores 19 + 4 + 4 = 27 bits, and 128 × 27 = 3456. Ignoring sub-blocks gives 128 × 21 = 2688.

More Computer Organization and Architecture questions

Exams that ask this topic