Problem 1 Consider a 64-bit, byte-addressable system that uses virtual memory. T
ID: 3905687 • Letter: P
Question
Problem 1
Consider a 64-bit, byte-addressable system that uses virtual memory. The system has 32GB of
physical memory installed with a page size of 4KB.
a) How many bits are used for the page offset? How many bits are used to index into the
page table(s)?
Page Offset: _________ Virtual Page Number Bits: _________
b) How many virtual ?pages exist in the system?
c) How many physica?l pages exist in the system?
d) If the system has a single-level page table with 4B entries, how large must the page
table be to map all the system’s virtual memory?
e) If we switch to a hierarchical page table such that each page table level must fit in a
single page, how many page table levels would we need to map all of the system’s
virtual memory? Assume page table entries are still 4B each.
f) If we make the following changes, fill out the table below. Assume all changes are
independent of each other unless otherwise stated.
Modification Field: Change
Swap to more physical memory & smaller disk # Physical Pages Increase / Stay Same / Decrease
Switch to a system with more page table levels # Virtual Page Num. Bits Increase / Stay Same / Decrease
Increase page size from 4KB to 1GB # Virtual Pages Increase / Stay Same / Decrease
Reduce page size from 4KB to 512B # Page Table Levels Increase / Stay Same / Decrease
g) Name one advantage and one disadvantage of using a hierarchical page table design
over a single page table design. Please limit your answers to 1-2 sentences max?.
Explanation / Answer
a) Page offset - 12 bits
Number of Pages = 2^64/2^12 = 2^52
Virtual page number bits = 52 bits
b) Number of virtual pages = 2^52
c) Number of physical pages = 2^35/2^12 = 2^23
d) Single page table size = 2^52 * 4 = 2^54 bytes
e) Number of page entries in 4KB page = 4KB/4 = 1024 entries
1024 entries means 10 bits of address space required. i.e 52/10 ceiled is 6. ie 6 levels of page table can bring down the page table size to just 4KB.
f) a) increase
b) decrease
c) decrease
d) increase
g) If we go for a single page table
one entry per page table , total enetries 2^52
Number of physical pages = 2^23
23 bits are required - approx- 4 bytes
Total page size = 4 * 2^52 = 2^54 bytes
per process page table size is 16 petabytes (it is huge)
as shown above we can bring this requirement to 4kb with multi page table
We only need to store part of the multipage table relevant to the process, other
part can be loaded as per demand.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.