The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+1 vote

In the question, 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? 

asked in Operating System by (321 points) | 442 views
Because page tables are to be stored in physical memory. That formula is just from this logic.
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.
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..
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?
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?

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,071 questions
53,206 answers
70,425 users