GATE Computer ScienceHardGATE CS (PYQ pattern)

A 256 KB, 8-way set-associative write-back cache has 64-byte blocks and 36-bit physical addresses. Each line stores its data, tag, a valid bit and a dirty bit; each set also stores tree pseudo-LRU replacement bits (the minimum for a binary tree over 8 ways). What is the total number of storage bits?

  1. A. 2,199,552
  2. B. 2,191,360
  3. C. 2,194,944
  4. D. 2,220,032

Correct answer: C. 2,194,944

4096 lines, 512 sets → 9 index bits, 6 offset bits, tag = 36 − 15 = 21. Per line 512 + 21 + 2 = 535 bits → 2,191,360. Tree PLRU over 8 ways needs 7 bits per set: 512 × 7 = 3584. Total 2,194,944. Exact LRU (⌈log₂ 8!⌉ = 16 bits per set) gives 2,199,552; storing 7 bits per line gives 2,220,032.

More Computer Organization and Architecture questions

Exams that ask this topic