Minimize and maximize two-level page-table storage
Virtual Memory & Paging

Answer & solution
Official answer: 1028
Approach: Compute how many data-page mappings each inner table can hold and how many inner tables the directory can address.
1. Derivation. A4KB table page holds 4096/4=1024 entries. The32-bit address divides into 10 outer-index bits, 10 inner-index bits and 12 offset bits, allowing 1024 inner table pages. Minimum table storage for 2000 mapped pages packs them into ceil(2000/1024)=2 inner pages plus the allocated outer page: X=3. Maximum spreads mappings across all 1024 distinct outer entries, possible with 2000 pages, giving Y=1024+1=1025. Thus X+Y=1028. Data pages themselves are not counted.
2. Explanation and checks. To achieve the minimum, map 1024 data pages through one outer entry and the remaining 976 through a second. To achieve the maximum, use at least one data page in each of the 1024 outer regions; the remaining 976 accesses can fall in regions already used. This construction shows the upper bound is attainable, not just theoretical. An outer entry does not itself map one data page: it selects an entire inner table, so counting 2000 table pages would be incorrect.


