edited by
1,768 views
6 votes
6 votes
Suppose you have a computer system with a 48-bit logical address, page size of 16KB and 4 bytes per page table entry. If we have a 48MB program such that the entire program and all necessary page tables are in memory. Assume that each page table at diff level fits in a single page.How much memory is used by program, including its page tables?

why do we go for more levels of paging when one level of paging is enough for this 48Mb process the solution splits the logical  address space of 48 bits into parts ??

how do we decide that split ???
edited by

1 Answer

0 votes
0 votes
Number of pages for 48 MB program = $\frac{48 MB}{16 KB}$= 3K

Now if we have single level paging then split will be of 34|14

so we have $2^{32}$ entries in Page table, size of page is 16 KB here page table  will not fit in one single page so we have to break it

Now for two level paging

Number of entries in single page = $\frac{16KB}{4B}$ = 4 K so in single page we can have maximum 4 K entries

and Number of entries require for 48 MB is 3 K entries so all the entries of process will be single page table .

So outer level we will have single page table having 4 K entries and corresponding to it we wll have single inner level page table having 1 entry.

Thus for 2 level paging we will split it as 22|12|14

But again this is not possible as inner level page table does not into 1 single page.

So we divide it into 3 level paging

outer most level we will have single page table having 4 K entries

middle level will also have single page table having 4 K entry

inner level will have single level page table 1K entry

Breaking will be 10|12|12|14

Here all the page table fits in one single page hence further breaking is not required
edited by

Related questions

1 votes
1 votes
2 answers
2
ajayraho asked Oct 29, 2022
634 views
Is the page table entry size same for each entry in page tables of all levels in multilevel paging?