1 flag 320 views
6 6 votes

Consider a system with a $48$-bit virtual address and a page size of $8$ KB . The system uses a $3$-level paging scheme where the first $10$ bits index the outer page table, the next $10$ bits index the middle page table, and the remaining bits (before the offset) index the inner page table. Assume each Page Table Entry (PTE) is $8$ bytes and the TLB has $512$ entries.

If a process is currently using $20$ MB of contiguous virtual memory, what is the minimum total memory (in KB) required to store its page tables?

  1. $24$ KB
     
  2. $32$ KB
     
  3. $40$ KB
     
  4. $48$ KB
  • 🚩 Low quality | 👮 Prashant-G | 💬 “No option is matching and solution is also not right”

2 Answers

3 3 votes

Virtual Address$: 48$ bits.

Page Size: $8 \mathrm{~KB}\left(2^{13}\right.$ bytes $) \rightarrow$ Offset $=13$ bits.

VPN (Virtual Page Number): $48-13=35$ bits.

Outer $($Level $1): 10$ bits

Middle $($Level $2): 10$ bits

Inner $($Level $3): 15$ bits $(35-10-10=15)$


Total Pages needed for $\mathbf{20}$ MB:
$$
\frac{20 \times 1024 \mathrm{~KB}}{8 \mathrm{~KB}}=2560 \text { pages }
$$
Level $\mathbf{3}$ (Inner): One Level $3$ table entry points to one $8$ KB page. One Level $3$ table has $2^{15}$ entries. Since $2560<2^{15}$, we only need $\mathbf{1}$ Inner Page Table.

Level
$\mathbf{2}$ (Middle): One Level $2$ table entry points to one Level $3$ table. Since we only have $1$ Inner Table, we only need $\mathbf{1}$ Middle Page Table.

Level
 $\mathbf{1}$ (Outer): One Level $1$ table entry points to one Level $2$ table. We only need $\mathbf{1}$ Outer Page Table.

$$
\text { Total Memory }=(1 \text { Outer }+1 \text { Middle }+1 \text { Inner }) \times 8 \mathrm{~KB}=\mathbf{2 4} \mathrm{KB}
$$

Answer:
Position:
Show:

Related questions

4 4 votes
2 2 answers
395
395 views
GO Classes asked Feb 7
395 views
A system uses Variable Partitioning for memory management. The total physical memory is $\mathbf{1 0 0 0 ~ K B}$, out of which $\mathbf{2 0 0~ K B}$ is occupied by the Re...
2 2 votes
2 2 answers
260
260 views
GO Classes asked Feb 7
260 views
A system has $4$ processes $(P_0$ through $P_3)$ and $3$ resource types $(R_1, R_2, R_3)$. The current state is as follows:\[\begin{array}{|l|l|l|}\hline\text{Process} & ...
1 1 vote
1 1 answer
204
204 views
GO Classes asked Feb 7
204 views
Consider a disk with $200$ tracks $(0-199)$. The disk head is currently at track $50$ and was previously at track $\mathbf{40}.$ The queue of pending requests in FIFO ord...
3 3 votes
1 1 answer
230
230 views
GO Classes asked Feb 7
230 views
Three processes ( $P_1, P_2, P_3$ ) share a single resource and coordinate using two binary semaphores, $S_1$ and $S_2$, both initialized to $0$. The processes execute th...