CS FundamentalsVery hardGATE CS (PYQ pattern)

A 128 KB physically-tagged, virtually-indexed L1 cache has 64-byte lines and is 16-way set-associative. The system uses 4 KB pages. How many distinct 'page colours' (classes of physical frames that can map to different sets for the same virtual-index bits) must the OS distinguish to avoid synonym problems?

  1. A. 1
  2. B. 4
  3. C. 8
  4. D. 2

Correct answer: D. 2

Sets = 128K / (64 x 16) = 128, so index bits are address bits 6 to 12. The page offset covers only bits 0 to 11, so bit 12 comes from the page number: 1 translated bit gives 2 colours.

More Operating Systems questions

Exams that ask this topic