Redirected
1,176 views
3 votes
3 votes
46 bit Virtual addressing system uses 3 level paging. The page table entry is 32 bits. Size of Page Table is equal to 1 page. The processor uses 1 MB, 16 way set associative cache with 64 block. What is the size of Page Table?

a) 2KB

b) 4KB

c) 8KB

d) 16KB

4 Answers

Best answer
8 votes
8 votes

Let Page size $= 2^x$B

Number of pages in innermost page table $ = \frac{2^{46}}{2^x} = 2^{46-x}$

Size of innermost page table $ = 2^{46-x}*4 = 2^{48-x}$ (PTE = 32bit)

No. of pages in second level page table $ = \frac{2^{48-x}}{2^x} = 2^{48-2x}$

Size of $2^{nd}$ level page table $ = 2^{48-2x}*4 = 2^{50-2x}$

No. of pages in outermost page table $ = \frac{2^{50-2x}}{2^x} = 2^{50-3x}$

Size of outermost page table $= 2^{50-3x}*4 = 2^{52-3x}$

Question says Size of Page Table is equal to 1 page.

$\Rightarrow 2^{52-3x} = 2^x$

$\Rightarrow x = 13$

So, Page size $ = 2^{13} = 8KB$

selected by
6 votes
6 votes

Required Information to Evaluate Page table size in question : Virtual Address = 46-bits, 3-level paging Architecture, Page table entry size= 32-bits i.e.(4 Bytes), page size = First level page table size.

Solution :

Let the size of the page is x bytes.

Page table size = (Number of entries in Page table) ∗ (Page table entry size)

First Time paging :

$\frac{2^{46}}{x}\times 4 = \frac{2^{48}}{x}$ 

This is the 3rd level page table size.

Second Time paging :

$\frac{2^{48}/x}{x}\times 4 = \frac{2^{50}}{x^{2}}$

This is the 2nd level page table size.

Third Time paging :

$\frac{2^{50}/x^{2}}{x}\times 4 = \frac{2^{52}}{x^{3}}$

This is the First level page table size.

Since, First level page table size = page size

Therefore, 

$\frac{2^{52}}{x^{3}}=x$

$x^{4}=2^{52}$

$x^{4}=\left (2 ^{13} \right )^{4}$

$x=2^{13}$ bytes

x = 8 KB

Page table size = 8 KB

edited by
5 votes
5 votes

Let page size = PS = 2x

VA = 46 bit

No of pages = size of va / size of page = 246/2x = 246-x;

Page Table Size = PTS1 = No of pages × Page Table Entry (PTE)= 246-x × 32 bit = 246-x × 4 Bytes = 248-x;

PTS1 cannot fit in 1 page; so we divide PTS1 into pages;

PTS2 = (PTS1 / PS) × PTE = (248-x / 2x ) × 4 = 250-2x;

PTS2 cannot fit in 1 page; so we divide PTS2 into pages;

PTS3 = (PTS2 / PS) × PTE = (250-2x / 2x ) × 4 = 252-3x;

PTS3 = PS  (it is given is question)

=>  252-3x = 2x => x=13

So, PS = 213 = 8 KB

0 votes
0 votes
Let us assume its byte addressable memory..
Let Page size = 2^p Bytes.

As entry size = 32 bits= 4B.

So No of entries in a page = 2^p/4 = 2^(p-2)

So Each page table level index bits = p-2

As no of level = 3, so total no of bits for 3 levels = 3(p-2).

and p bits for page offset.

so, 3(p-2)+p = 46 ===>p = 13

So page table size = 2^13 = 8KB

Related questions

0 votes
0 votes
2 answers
1
ykrishnay asked May 14, 2022
756 views
Is "operating system three easy pieces" Book is enough for gate exam? Or I read another book especially for GATE exam Please tell I am confused
0 votes
0 votes
1 answer
2
aditi19 asked May 26, 2019
508 views
Which part of the process image forms the logical address space that is used in paging?
0 votes
0 votes
0 answers
3
0 votes
0 votes
0 answers
4
nateshmbhat asked Dec 19, 2018
179 views
https://gateoverflow.in/?qa=blob&qa_blobid=6986688216805811880Please explain this solution. I don't get how minimum is 4.