Assignement 5 Question 6

27 views
Skip to first unread message

Chaitanya Chevvakula

unread,
Feb 27, 2021, 6:24:40 AM2/27/21
to Discussion forum for Operating System
Which of the following are true (for a 32-bit machine with 4KB pages)?
 The no. of possible page tables that a page directory entry can point to is 2^20
 The no. of possible page tables that a page directory entry can point to is 2^10
 The no. of entries in a page table is 2^10
 The no. of entries in a page table is 2^12


Can any one explain me this?

Regards
Chaitanya

Dhinesh

unread,
Feb 27, 2021, 8:27:26 AM2/27/21
to Discussion forum for Operating System, Chaitanya Chevvakula

4kb address space can be addressed using the last 12 bits of a 32 virtual address(2^12 = 4kb). So, there are remaining 20 bits in 32 bit va. If we are using 2 level page hierarchy , then first 10 bit can be used for page directory and the next 10 for page table. Therefore 2^10 entries can be mapped in both page directory and page table. 
So , the answer should be  
The no. of possible page tables that a page directory entry can point to is 2^10
 The no. of entries in a page table is 2^10

But idk why it says , since a page directory  can only identify 2^10 entries.

Accepted Answers:
The no. of possible page tables that a page directory entry can point to is 2^20
The no. of entries in a page table is 2^10.

Arsh Gautam

unread,
Mar 24, 2021, 4:18:39 AM3/24/21
to Discussion forum for Operating System, Dhinesh, Chaitanya Chevvakula
Virtual address, va is 32 bits. The first 10 bits of va index into the page table directory. The entry of page table directory is 32 bits, of which 20 bits is used to address the page table entry and next 10 bits from va are used to index the page table page. Now 20 bits of page table entry point to actual pages (and thus 2^20 pages) while the next 12 bits of virtual address byte address in the page.
Reply all
Reply to author
Forward
0 new messages