A computer uses virtual address, physical address, and a three–level paged page table organization. The page table base register stores the base address of the first-level table which occupies exactly one page. Each entry of stores the base address of a page of the second-level table Each entry of stores the base address of a page of the third-level table Each entry of stores a page table entry The is in size. The processor used in the computer has a way set associative virtually indexed physically tagged cache. The cache block size is bytes.
What is the minimum number of page colours needed to guarantee that no two synonyms map to different sets in the processor cache of this computer?
View worked solution
Answer: C
To find the minimum number of page colors, we first need to determine the page size and then analyze the cache indexing structure.
Step 1: Determine the Page Size
Let the page size be bytes, so the page offset is bits. Since the physical address is bits, a page table entry (PTE) of bits ( bytes) is sufficient to store a physical page frame address.
- The number of entries per page of a page table is .
- Thus, each level of the page table index () requires bits.
The virtual address is split as follows:
So, the page offset is bits, and the page size is .
Step 2: Determine Cache Parameters
- Cache Size = bytes
- Block Size = bytes
- Associativity =
- Number of Sets = sets
To index the cache, we need:
- Block offset = bits
- Set index = bits
- Total bits for cache indexing = bits
Step 3: Calculate Page Colors
In a virtually indexed, physically tagged (VIPT) cache, synonyms (different virtual addresses mapping to the same physical address) can map to different cache sets if the virtual address bits used for cache indexing overlap with the virtual page number (VPN) bits.
- Bits used for cache indexing = bits
- Bits in page offset = bits
- Overlapping bits = bits
The minimum number of page colors required to prevent synonym conflicts is:
Free practice · Your answers on this page are not saved.
