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?
- A. 1
- B. 4
- C. 8
- 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
- A machine has 2 GB of RAM; the OS occupies 512 MB and every user process needs 192 MB, so as many whole processes as fit are kept in…
- Highest Response Ratio Next (non-preemptive; ratio = (waiting time + burst) / burst, evaluated whenever the CPU becomes free) schedules…
- Four processes with CPU bursts 10, 4, 2 and 1 ms arrive together at time 0 in that order and are scheduled by Round Robin with quantum 3…
- Round Robin, quantum 4 ms, four processes arriving together at time 0 in the order P1..P4 with bursts 9, 5, 2 and 6 ms. Every switch to a…
- A system has 48-bit virtual addresses, 8 KB pages and 2^40 bytes of physical memory. Each page-table entry holds a frame number plus 5…
- A 7200 RPM disk has 500 sectors of 512 bytes per track and an average seek of 8 ms. A 1,048,576-byte file is stored in consecutive sectors…