How to translate this logical address into physical address?

memory-management, operating-system

Solution

address `1027` maps to `p 0` because `1027 % 2048(2K)=1027 floor(1027/2048)=0`. So 1027 maps to `1027th byte of page 0` in virtual address.

Page 0 Virtual Address is mapped to frame number 9 according to page table.

frame 9 has a base address of `9 * 2048 = 18432` . Frame 9 has a base address of 18342 in the physical memory.

Now `1027th byte of frame 9 is at 18342 + 1027 = 19369` address of the physical memory.

change the numbers to binary and you have your answer. See this answer and follow the link given there to understand the concept.

Cheers ...

Problem

Given that: ``` Logical addresss space=16 bits Physical address space=16 bits Page size=2K ``` How the logical address 1027 will be mapped to physical address for the following page table? ``` p f 0 9 1 7 2 3 ``` Thank You!

Original source