edited by
2,516 views
3 votes
3 votes

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:

                                         x                                 12

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 ????

edited by

1 Answer

1 votes
1 votes

I think in your solution inequality is major problem . because page table size given is fixed and should be considered exact and therefore need to evaluate accordingly.


here is my work:
$2B$ page table entry size.
Page table size = No of pages $\times $ Page table entry size
$30$ KB $= X \times 2$ B 

$X=15K$ pages

size of virtual memory supported $=$ no of pages $\times $ size of page
size of virtual memory supported$=15K  \ \times  4KB=\color{darkblue}{60MB.}$

Related questions

0 votes
0 votes
2 answers
4