Previous question for reference: Question 3 - Two-Level Page Table Now, consider
ID: 3901893 • Letter: P
Question
Previous question for reference:
Question 3 - Two-Level Page Table Now, consider (4KB). We would lik directory which ref space. For simplicity assume than 1G a computer with 1 GB of physical memory, where the page size is 4096 bytes e to index memory pages using a two level page table consisting of a page ers to page tables which are created on demand to index the entire memory B-1000MB, 1MB-1000KB, 1KB-1000 bytes (a) If we divide the VPN in half from the previous question, how many bits are required for the page directory index in a two-level scheme? (b) How many bits are required for the page table index? (c) How many bits are required for an offset to address any byte in the 1 KB page? (d) Assuming each page table entry (PTE) requires 4 bytes of memory, how many extra bits are available for status bits? (e) To index one variable on a page requires both a page directory and a page table. Assuming both the page directory and page table consist of 4 byte elements, how much memory does each require individually? (f) How much memory is required then to index one variable using a page directory and a page table with the two level scheme. Hint: it will be twice the value of e.Explanation / Answer
If we divide VPN of last question in half then it become = 10 bits.
Total bits required as offset = log(size of page) = log(4 KB) = log(2 ^ 12) = 12 bits
Total memory is 1 GB = 2^30
Number of bits required for memory is log(2^30) = 30 bits
Question 1:
Bits required for Page Directory index in two way paging scheme = 18 bits
VPN = 10bit (half of previous question) for 1st level page directory index
Bits required for page directory index = 10
Question 2:
Out of 30 bits we need 12 bits for offset. So remaining bits are 18 bits
Bits required for 1st level page directory index = 10 bits
Each page entry points to 2nd level page table, So bits required for 2nd level page table index is = 8 bits
Question 3:
Each page size = 2^10 .
Each page required 10 bits to address as an offset.
Question 4:
Page table entry requires 4 byte = 32 bit.
Total memory is 1 GB = 2^30 so it requires 30 bit to address memory
So status bit = 32 - 30 = 2 bits.
Question 5:
To address one variable we need 4 bytes including page directory and page table.
So for one variable page directory requires = 10 bits and page table requies 10 bits
So total 20 bits.
Question 6:
To index one variable. Normally it requires 30 bit ~ 4 bytes.
But in two level page table scheme it requres 4 * 2 = 8 bytes.
VPN Page Number Offset 10 8 12Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.