Operating Systems | Memory Management | Question 9
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 size of a page in KB in this computer?
(A)
2
(B)
4
(C)
8
(D)
16
Answer: (C)
Explanation:
Let the page size is of \'x\' bits Size of T1 = 2 ^ x bytes (This is because T1 occupies exactly one page) Now, number of entries in T1 = (2^x) / 4 (This is because each page table entry is 32 bits or 4 bytes in size) Number of entries in T1 = Number of second level page tables (Because each I-level page table entry stores the base address of page of II-level page table) Total size of second level page tables = ((2^x) / 4) * (2^x) Similarly, number of entries in II-level page tables = Number of III level page tables = ((2^x) / 4) * ((2^x) / 4) Total size of third level page tables = ((2^x) / 4) * ((2^x) / 4) * (2^x) Similarly, total number of entries (pages) in all III-level page tables = ((2^x) / 4) * ((2^x) / 4) * ((2^x) / 4) = 2^(3x - 6) Size of virtual memory = 2^46 Number of pages in virtual memory = (2^46) / (2^x) = 2^(46 - x) Total number the pages in the III-level page tables = Number of pages in virtual memory 2^(3x - 6) = 2^(46 - x) 3x - 6 = 46 - x 4x = 52 x = 13 That means, page size is of 13 bits or Page size = 2^13 bytes = 8 KB
Quiz of this Question
Please comment below if you find anything wrong in the above post
Please Login to comment...