How can I use a page table to convert a virtual address into a physical one?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Lets say I have a normal page table: Page Table (Page size = 4k) Page #: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Page Frame #: 3 x 1 x 0 x 2 x 5 x 7 4 6 x x x How can I convert an arbitrary logical address like 51996 into a physical memory address? If I take log base 2 (4096), I get 12. I think this is how many bits I'm suppose to use for the offset of my address. I'm just not sure. 51996 / 4096 = 12.69. So does this mean it lay on page#12 with a certain offset? How do I then turn that into the physical address of "51996"? 回答1: To