Can you help me on a memory question? Suppose there\'s a virtual memory system w
ID: 3568441 • Letter: C
Question
Can you help me on a memory question?
Suppose there's a virtual memory system with 32 bit physical and virtual addresses and a 4KB page size. Here's a few questions, and what I've gathered to be the answers.
- How many bits are needed for the offset part of the virtual address? I got 12 bits.
- how many bits are needed for the page number part of the virtual address? I got 20 bits.
- how many different page numbers does this system support? I got 2 ^ 20.
- if a page table entry takes up 4 bytes, how much space would a page table take up if it was stored in virtual memory? I got 2097152.
Are my answers right? Where did I go wrong, if I did?
Explanation / Answer
If the size of
Logical-address space is 2m, and
A page size is 2n addressing units (bytes or words),
then the high-order m - n bits of a logical address designate the page number,
and the n low-order bits designate the page offset.
In Your Question:
Logical Address : 232 i.e. (m=32)
Page Size: 4KB i.e. 212bytes (n=12)
Hence:
QUES: How many bits are needed for the offset part of the virtual address?
ANS: Page offset =
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.