13 views

In a two level paging environment a page table is divided into $2^{12}$ pages each of size $4 KW$. The memory is word addressable, The physical address space is $128 MW$. Memory is divided into $2^{14}$ frames. The size of inner page table is __________

My solution is, since outer page table has $2^{12}$ pages and each page of size $4KW$ i.e. $2^{12}W$ so inner page table size is $2^{12} *2^{12}W=2^{24}W$

Is this correct?

And what if it was asked What is the size of the logical address space?

My approach is since the outer page table contains $2^{12}$ entries so we have to do $2^{12} * number$ $of$ $pages$ in the each inner page table $* Page size$

But how to find number of pages in the inner page table ?

ago | 13 views
0
Also, I went through that link with the question and saw this statement from someone who posted the answer :
Page table 2: Number of bits required to represent page size of page table or  word number of page of page table . which is 4KW = 2^12 Words. = 12 bits

This is a very scary concept to pick up. Please be careful.
0
Why?

We can represent each word with the help of $12bits$ right?

Why scary then?
+1
Because number of bits required to ADDRESS a page table in the LAS depends on the number of entries it has - not it's size in words or bytes.

Else to address into a page table with 20MB size and just 16 entries (say) - you'll need $2^{21}$ bits instead of just 4 bits.
0
Okay

Got it.. so it is the $entries$ in the page table that is our main concern rather than the $words/bytes$
+1
Exactly. If you have a page table of 100B (or words) size - you won't need log(100) bits to address into it, would you ?  You would need log(100)-x bits to address into the page table, and x bits to address into the byte (or word), where is x is the frame offset.