user2032090
user2032090

Reputation: 97

How to translate this logical address into physical address?

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!

Upvotes: 3

Views: 15793

Answers (1)

Deepthought
Deepthought

Reputation: 2931

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 ...

Upvotes: 4

Related Questions