in Operating System retagged by
152 views
1 vote
1 vote

Ans:  3KB

in Operating System retagged by
152 views

1 Answer

5 votes
5 votes
Best answer

Virtual address =$28$ bits

Physical address =$24$ bits

Page size = $2^{10}$ bytes

Size of page table entry = $2$ bytes

So ,No of entries one page table can contain =$\frac{2^{10}}{2}=2^{9}$ 

We have use $2$ level page table so ,

The entries in level $1$ page table are pointer to level $2$ page table and the entries in level 2 page table contains the actual frame number which we need to execute the process .

Now, the question is size of the page table for a process $P$ of size $1$ MB .

So , number of pages $P$ have = $\large \frac{2^{20}}{2^{10}}=2^{10}$.

Now one level $2$ page table  can point to  $\large 2^{9}$ page, So to point $\large 2^{10}$ pages we need $\large \frac{2^{10}}{2^{9}}=2$ page tables .

So at level $2$ we need $2$ page table .

Now level $1$ page table are pointer to level $2$ page tables ,  as one level $1$ page tables can points to $\large 2^{9}$ level $2$ page tables, so only $1$ page table is enough to point only $2$ level $2$ page table .

So we need total $1$ level-$1$ page table and $2$ level-2 page tables .so tatal 3 page tables are requied .

Now size of 1 page table is = $1$ KB

So , size of $3$ page table = $3$ KB .

So, for a process of $1$ MB in this system we need $3$ KB size for page tables .

The schematic diagram looks like ,

 

Similar question :- https://gateoverflow.in/357489/gate-cse-2021-set-2-question-48

 

selected by