+1 vote
442 views

In the question https://gateoverflow.in/490/gate2008-67, why is the formula

Number of third level page tables possible= Physical memory size / Size of a third level page table

being used to calculate the number of third level page tables?

+1
Because page tables are to be stored in physical memory. That formula is just from this logic.
0
I understand the pages are to be stored in main memory, I also understand that in the third level PTE size will be 24 bits as per the paging concept. Each PTE entry in the 3rd level would point to a page isn't it? I'm stuck after this part.
0
yes. Now think recursively.

You told about "page" which is called "page frame" when it is physically present in main memory. In a similar way at each level "page tables" must also be present on physical memory. At first level there is always just one page table. But at inner levels there can be more than 1 page table. Not saying more, I guess now if you see the given answer you should get it..
+1
The first two bits 30-31 are used as an index into the first level page table. If two bits are used 4 combinations are possible so doesn't that imply 4 entries in the first level page table?

If there are 4 entries in the first level page table, and each entry would point to a page table in the second level page table as per the concept of hierarchical paging, and we are given bits 21-29, that is 9 bits are used as an index shouldn't the total number of PTEs be 4 * 2^9 * 2^9 going by this logic?
0
I too didn't get this question and the answer. When we are given 2 bits for first level page table, how can 25 bits be used to address next page table? Also, isn't $25+25+24>32$? And Why are we doing $2^{36}/{2^9\times \textbf{PTE}}$? Why are we dividing number of pages with size of entry?

1