从虚拟内存页表确定物理地址
假设虚拟内存分页系统的页面长度为 4k,我得到了下表
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)*
并询问 0x003A78
的真实地址是什么。
我在这里有点迷失,我想这个想法是将 0x003A78
分解为 2?那将是 0x003 A78,所以它会是 (2 * 4k) + 0x078
?
这是它还是我正在完成这个?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一列是“物理页数”。您只需使用虚拟页数(
0x3A78 / 0x1000
,即 3)作为该表的索引。该页存在,因此物理页号是正确的,这意味着物理地址将为
0xA1 * 0x1000 + 0xA78
或0x0A1A78
。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
, or0x0A1A78
.