GATE Computer ScienceModerateGATE CS (PYQ pattern)

A 16 KB, 4-way set-associative cache with 16-byte blocks uses 32-bit addresses. Its block size is doubled to 32 bytes and, at the same time, its associativity is doubled to 8-way, keeping the capacity. How do the (offset, index, tag) widths change, and how many tag comparators work in parallel afterwards?

  1. A. offset +1, index −2, tag +1; 8 comparators
  2. B. offset +1, index −1, tag unchanged; 8 comparators
  3. C. offset +1, index −2, tag +1; 4 comparators
  4. D. offset unchanged, index −1, tag +1; 8 comparators

Correct answer: A. offset +1, index −2, tag +1; 8 comparators

Before: offset 4, sets = 16 KB/(4 × 16) = 256 → index 8, tag 20. After: offset 5, sets = 16 KB/(8 × 32) = 64 → index 6, tag 21. So offset +1, index −2, tag +1, and all 8 ways of a set are compared at once. Doubling only the block size would leave the tag unchanged.

More Computer Organization and Architecture questions

Exams that ask this topic