Linked answer questions

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.

Shared with question 53.

Question

What is the size of a page in KB in this computer?

Choose one option
Official answer and solution
Official answer
C
From
Official GATE 2013 answer key

Solution

Set up the equation for the virtual address breakdown in a 3-level paged page table where each level occupies a page.

Let the page size be 2p2^p bytes, so the page offset is pp bits.

  1. Virtual address format:

    • Total virtual address size = 46 bits.
    • Page offset = pp bits.
    • Virtual page number = 46−p46 - p bits.
  2. Page table entry size and index size:

    • Each page table entry (PTE) is 32 bits =4= 4 bytes =22= 2^2 bytes.
    • Since each table at each level (T1,T2,T3T_1, T_2, T_3) occupies exactly one page of size 2p2^p bytes, the number of entries per page table is:
      2p22=2p−2 entries\dfrac{2^p}{2^2} = 2^{p - 2}\text{ entries}
    • Therefore, each indexing level requires p−2p - 2 bits.
  3. Relating virtual address bits:
    The 3 levels of page tables consume (p−2)+(p−2)+(p−2)=3(p−2)(p - 2) + (p - 2) + (p - 2) = 3(p - 2) bits for the virtual page number:

    3(p−2)+p=463(p - 2) + p = 46
    3p−6+p=463p - 6 + p = 46
    4p=52  ⟹  p=134p = 52 \implies p = 13
  4. Calculate page size:

    Page size=213 bytes=8192 bytes=8 KB\text{Page size} = 2^{13}\text{ bytes} = 8192\text{ bytes} = 8\text{ KB}

Thus, the page size is 8 KB, which matches option (C).

Final answer

C

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2013 Computer Science and Information Technology (CS)
Question
52 of 65, printed as CS Q.52
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.