recategorized by
736 views
1 votes
1 votes

How much memory is used for page tables, when there are $10$ process running in the system with the below details?

  • Virtual Address space: $1GB$
  • Page size: $1KB$

Each page table entry contains a valid bit, dirty bit and the resulting frame number. And the system has a maximum of $2^{14}$ physical pages.

  1. $10$ MB
  2. $20$ MB
  3. $30$ MB
  4. None of these
recategorized by

2 Answers

1 votes
1 votes
Given information: Virtual address space is $1GB$ so we need $30$ bits required Virtual Address:
$\begin{array}{|c|c|} \hline \text{VPN 20 bits} & \text{Offset 10 bits} \\ \hline \end{array}$
Page table entry $\Rightarrow$
$\begin{array}{|c|c|c|} \hline \\ \text{Valid bit (1 bit)} & \text{Dirty bit(1 bit)} & \text{Page frame numbers(14 bits)} \\ \hline \end{array}$
$\text{i.e., } 2$ bytes are required for page table entry.
Total memory is used for page table of $10$ process is =
$2^{20} \times 2 \text{ bytes /page table} \times 10 \text{ process } = 20 \text{ MB}$
1 votes
1 votes

Virtual address space is 1GB so we need 30 bits for Virtual Address. We will need 20 bits (i.e. 30-10) for Virtual Page Number.

Size of Page Table Entry (PTE) = 2B (14b for frame number, 2b for valid and dirt bit)

Number of page table entries in one page =  1 KB/ 2B = 512

On each page we will have 512 entries and we need 9 bits to address their page table entries.

For Page Table lvl 3 (2 bits)  For Page Table lvl 2 (9 bits) For Page Table lvl 3 (9 bits) Page Number (10 bits)

So number of pages required for page table = 1 + $2^{2}$ + $2^{2}$ * $2^{9}$ = 2053

Memory required for page tables = 2053 * 10 * 1 KB = 20.05 MB

Answer:

Related questions

1 votes
1 votes
1 answer
4