Reputation: 105037
Assuming a virtual memory paging system with pages 4k long, I was given the following table
P A M
0x003 1 1 0
0x04A 0 0 0
0xA78 1 1 1
0x0A1 1 0 0
0x000 1 0 0
*(P = presence digit, A = access digit, ; M = modified digit)*
and asked what is the real address of 0x003A78
.
I am a bit lost here, I guess the idea is to decompose 0x003A78
in 2? That'd be 0x003 A78, so it'd be (2 * 4k) + 0x078
?
Is this it or am I completing off on this?
Upvotes: 1
Views: 824
Reputation: 14870
The first colomn would be "number of physical page". You just have to use the number of virtual page (0x3A78 / 0x1000
, that is 3) as index to that table.
The page is present, so the physical page number is correct, that means that the physical address would be 0xA1 * 0x1000 + 0xA78
, or 0x0A1A78
.
Upvotes: 2