Convert the virtual address into a physical address.

Question

Consider a computer with 37 bit virtual addresses, Pages of size 1 MB, and 2^6 GB of byte addressable main memory. Given the Partial page table below(Values for the page and frame numbers are i hexadecimal). Convert the virtual address 0x001D0E34BDA2 into a physical address.

Virtual offset Physical Offset Valid Bit
001DoE30 4582A 1
001DoE31 C93C7 0
001DoE32 D3C9D 1
001DoE33 E71BD 0
001DoE34 4874C 0
001DoE35 4A280 0

Summary

Here in the given question, we have to Convert the virtual address 0x001D0E34BDA2 into a physical address. Where a page table is also given with the page numbers. And also with the frame number entries.

Explanation

In the below diagram we can see that there is a paging mechanism. And there is also a mapping between both the memory i.e. logical as well as physical memory. And this mapping is happen through a page table where it can map both the memories. The virtual address we have has a total of 12 digits. And are of a hexadecimal type. So in this eight digits represent the page number and the remaining four hexadecimal numbers represent the offset of the page.

Where we have a page number as “001D0E32”. And The offset on the page is “BDA2”. And thus we have the same page offset as an offset of the frame. The reason is it has the size of the frame and page are the same. So in the physical address “D3C9D”, is the frame number and “BDA2” is the offset in the frame. Thus we have a physical address that is “0xD3C9DBDA2”.

 

 

Also read, a program for information for historical baseball players

 

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *