Virtual Memory You are given the following page table mappings. Valid Virtual Pa
ID: 3895924 • Letter: V
Question
Virtual Memory You are given the following page table mappings. Valid Virtual Page (20 bits)Physical Page (24 bits) 0xBBAA5 0xBBAA6 0xBBAA7 0xBBAA8 0xBBAA9 All other entries invalid 0x123456 0xA75B23 0xBABABA 0xBADDAD OxEEEDAD (a) Your processor receives the instruction lw St1, 0(Sal). List the complete physical memory address being accessed given the following values of Sal (32 bits), or indicate if the access causes a page fault. Assume 32 bit virtual addresses. (b) How many bytes does a single page in this system hold?Explanation / Answer
Solution:
a)
i) 0xBBAA9EAD
Virtual address(32 bit) = 0xBBAA9EAD
Among 32 bit virtual address first 20 bit is the page number and the next 12 bit is offset.
Page number = 0xBBAA9
Offset =EAD
In the page table entry BBAA9 exist.
So there is no page fault.
The physical page for corresponding virtual page is 0xEEEDAD
Therefore the physical address = physical page number | offset =0xEEEDADEAD
ii) 0xBBAA7523
Virtual address(32 bit) = 0xBBAA7523
Among 32 bit virtual address first 20 bit is the page number and the next 12 bit is offset.
Page number = 0xBBAA7
Offset =523
In the page table entry BBAA7 exist.
So there is no page fault.
The physical page for corresponding virtual page is 0xBABABA
Therefore the physical address = physical page number | offset =0BABABAEAD
iii) i 0xBABABA33
Virtual address(32 bit) = 0xBABABA33
Among 32 bit virtual address first 20 bit is the page number and the next 12 bit is offset.
Page number = 0xBABAB
Offset =A33
In the page table entry BABAB does not exist.
So page fault occurs.
b)
Here the offset is 12 bits. The page size =212 =4096 bytes
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.