GATE Computer ScienceHardGATE CS (PYQ pattern)

A physically indexed L2 cache is 2 MB, 8-way set-associative with 64-byte blocks. How many page colours (classes of frames that map to the same group of cache sets) are there with 4 KB pages, and with 16 KB pages?

  1. A. 512 and 128
  2. B. 64 and 4
  3. C. 8 and 2
  4. D. 64 and 16

Correct answer: D. 64 and 16

One way spans 2 MB / 8 = 256 KB of addresses, i.e. 2¹² sets of 64 B. Colours = way size / page size: 256 KB / 4 KB = 64 and 256 KB / 16 KB = 16. Ignoring associativity gives 512 and 128.

More Computer Organization and Architecture questions

Exams that ask this topic