Total memory requirements of 48 MB of program = 48 MB (program's usage in physical memory) + Page table entries corresponding to pages for 48 MB
Considering 1 level paging-
p | d = 34 | 14
#Pages required for 48 MB in logical space=48 MB/16K =3145.728 =~3146
Page table entries corresponding to 3KB pages=3146*4=12.28KB
Total=48MB +12.28KB=48.01MB
On the other side, there is a catch in question-- "all necessary page tables are in memory"
This means we should consider multilevel paging here -
Logical address' bits will be paged as- p1 | p2 | p3 | d = 10 | 12 | 12 | 14 [considering outermost page table fits in single page size]
A page table is stored in a page i.e 2^14, but since each entry requires 4 bytes, so effectively #pages in one table=2^14/4=2^12
We have 3146 pages, so total page tables needed in the third level=3146/2^12=0.76 =~1 page table
To point 1 page table of third level, #page table needed in the second level=1 page table
To point 1 page table of second level, #page table needed in the first or outermost level=1 page table
Total page tables needed=3
Total memory acquired by 3 page tables=3*2^14=48KB
Total memory needed by program=48MB+48KB=48.046MB