Consider a system implements 4 KB pages and 24 bits physical address space. Each page table entry contains a valid bits, a dirty bits, 2 permission bits and translation. If the maximum page table size of process is 30 KB. Then the size of virtual memory supported by the system is ________ (MB).
My approach:
We have $2^{12}$ B page size. So, page offset is of 12 bits. Physical Address space is 24 bits, so page frame requires 12 bits.
Now in each page table entry we will have = 1(valid) + 1(dirty) + 2(permission) + 12(translation) = 16 bits = 2 bytes.
Suppose we have x bits in virtual memory for indexing page table. Our virtual address is divided like this:
So our page table size would be = number of page table entries * size of each entry
= $2^x * 2$ bytes.
Given that max size can be 30 KB. So,
$2^x * 2 \leq 30 * 2^{10}$
Largest value of x that satisfies this inequality is x = 13.
So, we have virtual address of 13 + 12 = 25 bits.
Total virtual space = $2^{25}$ bytes = 32 MB
Anything wrong in this ????