in Operating System edited by
417 views
0 votes
0 votes
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 ________
in Operating System edited by
by
417 views

4 Comments

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
1
1
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.
0
0

2 Answers

1 vote
1 vote
Best answer

12 bits is the answer

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

4 Comments

page size bits =15 Is this correct ?
–1
–1

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

0
0

@kavita_joshi

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 .

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

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.

Answer:

Related questions