edited by
2,299 views
6 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 ???

1 Answer

0 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
Position:
Show:

Related questions

3 3 votes
2 2 answers
223
223 views
GO Classes asked Aug 14
223 views
A virtual-memory system has:$48$-bit virtual addresses $32$ KB pages $32$ TB physical memory Two-level page tables Both levels stored in physical memory Every second-leve...
3 3 votes
1 1 answer
163
163 views
GO Classes asked Aug 10
163 views
Consider a system with:$6$-level page tables$1$ KB page tables at each level$4$-byte page-table entriesHow much page-table space, in KB, is required to allow a process to...
2 2 votes
1 1 answer
126
126 views
GO Classes asked Aug 10
126 views
Consider a virtual-memory system that uses multi-level paging.Virtual address size $=64$ bitsPhysical address size $=64$ bitsPage size $=1$ MB $=2^{20}$ bytesPage-table e...
0 0 votes
1 answers 1 answer
1.0k
1.0k views
tarunmundriya asked Jan 2
1,024 views
A three-level hierarchical page table is used for a system with a 44-bit virtual address divided as follows:Field Bits1st-level index VA[43:33] (11 bits...