 # Virtual memory system problem

#1

Consider a virtual memory system with 32-bit virtual addresses and 1 Kb pages. Each page table entry requires 32- bits. It is desired to limit the page table size to one page:
Find the size memory required to store total page tables ?

#2

Page Table will be too big so we need multi level paging to store the page table.
page table size(level-1) : 2^22 x 2^2 = 2^24 (8Mb)
pagel table size (level-2) : (2^24 / 2^10 )x 2^2 = 64Kb
page table size(level-3)= 256 Kb
total memory required for page table = 8M + 64K + 256K =8.064M
(plz check for any error)

#3

The 32 bits virtual address is divided as follows
[ 6 | 8 | 8 | 10]

Size of the one outer level page table = 2^6 * 4-bytes = 256 bytes
Size of one 1st level PT = 2^8 * 4 bytes = 1024 bytes
Size of one inner most PT = 2^8 * 4 bytes = 1024 bytes

At any point of time we would just need to store only 3 page tables (1 from outer level, 1 from 1st level, 1 from innermost level)
So,
Ans is 256 + 1024 + 1024 = 2304 Bytes.

#4

page table size(level 1) is 2^24=16Mb.
page table size in level 2 : 64Kb
page table size in level3 : (2^162^2)/210 = 2^8B = 256B

virtual address divided : [ 6 | 8 | 8 | 10 ]

minimum memory required is : we need atleat one page in main memory from every level so
in level 1 : one page 2^10Bytes
in level 2 : one page 2^10Bytes
in level 3 : one page 2^8Bytes. here page table took less than a page size.
so total memory required is 1024+1024+256 = 2304 Byte.

#5

how did you divide virtual space address as 6,8,8,10?