GATE Computer ScienceHardGATE CS (PYQ pattern)

A physically tagged L1 data cache is 32 KB, 8-way set-associative with 64-byte blocks. Physical addresses are 40 bits and pages are 4 KB. How many tag bits does each line store, and can the cache be indexed with virtual-address bits without alias problems?

  1. A. 28 tag bits; no (index + offset = 15 bits)
  2. B. 22 tag bits; no (index + offset = 12 bits)
  3. C. 34 tag bits; yes (index + offset = 12 bits)
  4. D. 28 tag bits; yes (index + offset = 12 bits)

Correct answer: D. 28 tag bits; yes (index + offset = 12 bits)

Sets = 32 KB/(8 × 64) = 64 → 6 index bits, 6 offset bits, so tag = 40 − 12 = 28. Index + offset = 12 bits equals the page offset, so all index bits are untranslated and aliasing cannot occur.

More Computer Organization and Architecture questions

Exams that ask this topic