edited by
3,203 views
2 votes
2 votes

For a computer architecture with multi level paging, a page size of $4 \hspace{0.1cm}KB$, and $64 \hspace{0.1cm} bit$ Physical and Virtual address:

  1. What is the smallest possible size for a page table entry, rounded up to a power of $2$?
  2. using your result above, and assuming a requirement that each page table fits into a single page, How many levels of Page tables would be required to completely map the $64 \hspace{0.1cm} bit$ virtual space?
edited by

2 Answers

1 votes
1 votes
(a) Physical memory size = $2^{64}$ bytes

Page size = $4$ Kbytes

So, number of pages = $2^{64}$$/2^{12}$ = $2^{52}$

So, a page table entry should have atleast $52$ bits.

Rounding to the nearest power of two, the answer is $64$.

 

(b) According to our above result, a page table entry needs $64$ bits = $8$ bytes.

So, number of entries in one level of page table is $4$ KB$/$ $8$B $= 2^9$

So the first level can address $2^9$ x $2^{12}$ $=$ $2^{21}$ bytes

Remaining addresses $=$ $2^{64}$$/$$2^{21}$ $=$ $2^{43}$

For this, we need $43$$/$$9$ $=$ $5$ more levels.

Therefore, the required levels of page tables is 5 + 1  $=$ $6$.
0 votes
0 votes

Let size of a page table entry be  x bytes 
Page Table Size  = 4 KByte = 212B - requires 12 bits for addressing. 
Logical Address Space = 264 B

Now, we know

Size of page table=(Logical Address Space/Page Size)*Page Table Entry Size

Size of 1st level page table = (264/2​​12)*x

Size of 2nd level page table = (264/(2​​12)2)*x2

........................................................................

........................................................................

like that

Now, last level of page table fits into single page

So,  (264/(2​​12)y)*xy  = 212

Using trial and error method and y=6

we get x6=224

then x=24B=16 B

Size of PTE=16B

and  6 level of page table are required

edited by

Related questions

0 votes
0 votes
1 answer
1
Mrityudoot asked Mar 20
102 views
If Page size = Frame size is always true and offset in Logical address = offset in physical address holdsThen how/why Logical address size can come different than physica...
0 votes
0 votes
1 answer
2
0 votes
0 votes
2 answers
3
Unique_999 asked Aug 17, 2023
293 views
Can Any explain the relationship between The “ Word Size “ and “ Logical Address Space “