in Operating System
1,436 views
1 vote
1 vote
Consider a system using 2 level paging applicable page table is devided into 2k pages each size 4kB. If PAS is 64 MB  which is devided into 16K frames . PTE size is 2B in both the levels calculate the length of PA, LA and # of entry at second level?
in Operating System
by
1.4k views

4 Comments

@Magma here it is given that system uses 2 level paging, so even if the page table can completely fit in 1 page does not matter, the second level will surely have atleast one entry.

And I have  corrected the mistake in my answer. @Aks9639
0
0
Ohhh...

Yes i got it . Its a silly mistake.

Thank you @magma to correct me.
0
0
can u explain how LAS  = 2^11*2^12 = 2^23 B i didn’t understand the logic behind it
0
0

2 Answers

1 vote
1 vote
PA = bits to address 64 MB = 26 bits

LA = bits to index into outer table + bits to index into 1 inner page table + bits to index page size

     = bits to select one of $2^{11}$ entries + bits to select one of $2^{11}$ entries + bits to index 4 KB

     = 11 + 11 + 12 = 34 bits

# of entries in 1 page table at second level = ${pagesize}\div{entry size}$

                                                                      = 4KB $\div$ 2B = $2^{11}$ entries
edited by

1 comment

reshown by
-_- totally wrong
0
0
0 votes
0 votes

page size is 4KB therefore page offset bits= 12

let remaining bits in LA is then total bits in LA = x + 12

as we know page table size = 2^x * 2 (entery size is 2 B is given)

page table is divided into 2K pages of size 4KB,hence page table size = 2^11*2^12

from above 2 relation x = 22 

then total bits in LA = 22 + 12 => 34

 

Related questions