Consider a 32-bit system (so that all physical memory addresses are of 32 bits),
ID: 3546065 • Letter: C
Question
Consider a 32-bit system (so that all physical memory addresses are of 32 bits), where the page (and frame) size is 4 KB. Total amount of physical memory available on the system is 4 GB. But the maximum virtual memory that may be allowed to any process is 2 GB.
a) How many total number of frames can this system have in its physical memory?
b) How many maximum number of pages can a process have? In other words, what is the maximum number of entries that the page table of a process may have?
c) How many bits are needed to represent the offset within a page (or a frame) so each byte within the page (or frame) is uniquely addressable?
d) How many bits are needed to represent the page number so each page number in the page table can be uniquely addressed?
e) What is the minimum number of bits that is needed for each entry in a page table to store the physical memory address of the corresponding frame where this page is mapped to?
f) What is the maximum size of a page table (using your answer to the preceding part)?
Explanation / Answer
Physical memory 4GB = 2^32 -- 32 bits
Virtual Memory (one process) 2GB --- 2^31 = 31 bits
Page and frame size = 4KB = 2^12 = 12 bits
a) How many total number of frames can this system have in its physical memory?
no of frames = 2^32 / 2^12 = 2 ^20 Frames.
b) How many maximum number of pages can a process have? In other words, what is the maximum number of entries that the page table of a process may have?
No of pages a process can have = 2^31 / 2^12 = 2^19 Pages
c) How many bits are needed to represent the offset within a page (or a frame) so each byte within the page (or frame) is uniquely addressable?
bit for offset within the page = 12 bits since page size = 2^12
d) How many bits are needed to represent the page number so each page number in the page table can be uniquely addressed?
No of pages= 2^19 so we need 19 bits
e) What is the minimum number of bits that is needed for each entry in a page table to store the physical memory address of the corresponding frame where this page is mapped to?
no bits needed to represent to a frame = 20bits since no of frame is 2^20
f) What is the maximum size of a page table (using your answer to the preceding part)?
size of table = no of entries in page table (no of pages in VM) X one entry size
size of table = 2^19 X 20 = 2^20 X 10 = 10MB
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.