417 views
A system that uses a two-level page table has $2^{12}$ – byte pages and $32$ – bit virtual addresses. The first $8$ – bits of the address serve as the index into the first level page table. The number of  bits specify the second level index is ________

The Question was displayed as :

A system that uses a two-level page table has 212 – byte pages and 32 – bit virtual addresses.

which is nowhere similar to 2^12 please fix this
edited by
I am facing an issue with the tests, for me instead of 2$^{12}$, 212 was displayed. Similar thing happened with TOC test. Exponents are not shown. I use Ubuntu 19.04, tried Firefox and Chrome.

as it is given that page size is 212  Bytes , so 12 bits are needed to specify that offset

The number of  bits specify the second level index is :

32 - ( 12 + 8 )

= 32 - 20

= 12

by

page size bits =15 Is this correct ?

No, 12 bits are used for page size bits, as it is given 212 is page size.

as it is given that page size is 212  Bytes , so 12 bits are needed to specify that offset

The number of  bits specify the second level index is :

32 - ( 12 + 8 )

= 32 - 20

= 12

PAGE SIZE BIT WHICH WE ALSO CALL PAGE OFFSET IS ( LOG(BASE 2) PAGE SIZE)

SO HERE PAGE SIZE IS 2^12 SO TAKING LOG PAGE BITS ARE  12 BITS .

the size of entry in page table is 4 bits?.Not related to question,just confirming

Multilevel paging works by dividing the virtual address in a number of index pits and a page offset.

For a 2-level paging system, we partition the virtual address (logical address) as follows:

 $p_1$ $p_2$ offset

It is given that page size is $2^{12}$ bytes. So, the offset should be of 12 bits.

The virtual address is given of 32 bits, and first 8 bits serve as the index into the first level page table.

so, offset = 12 bits, $p_1$ = 8 bits and total address is 32 bits. Asked $p_2$ = ?

 8 ? 12

32 = 8 + ? + 12

=> ? = 12

So, answer should be 12 bits.