GateAI
Cache Memory and Hierarchy

GATE CSE 2013 · Q53

MCQ2 marksHard

Time

Statement for Linked Answer Questions 52 and 53

A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table (T1T_1), which occupies exactly one page. Each entry of T1T_1 stores the base address of a page of the second-level table (T2T_2). Each entry of T2T_2 stores the base address of a page of the third-level table (T3T_3). Each entry of T3T_3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16-way set associative virtually indexed physically tagged cache. The cache block size is 64 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?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) 8

Cache Memory and Hierarchy

To prevent cache aliasing (synonyms mapping to different sets) in a virtually indexed cache, page coloring is used.

  1. Cache Parameters:

    • Cache size =1 MB=220 bytes= 1\text{ MB} = 2^{20}\text{ bytes}

    • Block/Line size =64 bytes=26 bytes= 64\text{ bytes} = 2^6\text{ bytes}

    • Associativity =16=24= 16 = 2^4

    • Total number of lines =22026=214= \frac{2^{20}}{2^6} = 2^{14}

    • Number of sets =21424=210=1024 sets= \frac{2^{14}}{2^4} = 2^{10} = 1024\text{ sets}

  2. Virtual Indexing Bits:

    • Cache set index requires log⁡2(1024)=10 bits\log_2(1024) = 10\text{ bits}.

    • Block offset requires log⁡2(64)=6 bits\log_2(64) = 6\text{ bits}.

    • Total virtual address bits used for cache set index and block offset =10+6=16 bits= 10 + 6 = 16\text{ bits}.

  3. Page Offset Bits:

    • From Q.52, page size is 8 KB=213 bytes8\text{ KB} = 2^{13}\text{ bytes}, which gives 1313 page offset bits.

  4. Overlapping Bits & Page Coloring:

    • The cache index uses 16−13=316 - 13 = 3 bits from the virtual page number (VPN).

    • These 33 overlapping bits can differ for two virtual addresses mapping to the same physical page (synonyms).

    • The minimum number of colors required to ensure synonyms share the same cache set is 23=82^3 = 8.

Hence, the correct option is (C).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Cache Memory and Hierarchy previous year question is Q53 of the GATE CSE 2013 paper. Find more GATE CSE PYQs on Cache Memory and Hierarchy in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Cache Memory and Hierarchy PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Cache Memory and Hierarchy in GATE CSE

Cache Memory and Hierarchy has 47 GATE CSE PYQs across 23 papers from 2011 to 2026. 16 of them are 2-mark MCQs like this one, and GATE CSE 2013 has 3.

How GATE tests Cache Memory and Hierarchy

More from GATE CSE 2013

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2013 · Q53 · MCQ

Statement for Linked Answer Questions 52 and 53: A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second-level table (T2). Each entry of T2 stores the base address of a page of the third-level table (T3). Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16-way set associative virtually indexed physically tagged cache. The cache block size is 64 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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.