问题描述
我刚刚了解了内存管理,目前正在尝试弄清楚页表是什么.根据我的理解,页表是一种类似于哈希表的数据结构,用于映射和连接操作系统中的逻辑和物理内存地址.
I just learned about memory management and I am currently trying to figure out what Page Table is. Per my understanding, Page Table is a data structure that works just like hash tables, used to map and connect both logical and physical memory address in an Operating System.
我们需要一个寄存器来确定进程页表的位置.但是我们需要多少个寄存器来确定一个多级页表的位置,例如一个二级和三级页表?你是如何确定的?
We will need one register to determine the location of a page table of a process. But how many registers do we need to determine the location of a multilevel page table, for example a two and three level page table? How do you determine it?
此外,处理器中的缓存(L1-L3)将如何影响对页表的内存引用访问?大多数人会错过还是命中?为什么会这样?
Also, how will cache (L1-L3) in the processor affect memory reference access to page table? Will the majorities miss or hit? Why does it happen?
我试图为此找到参考资料,但它使我找到了 TLB,但我还没有了解它.可能会说我真的是操作系统的初学者.帮助:)
I tried to find references for this, but it leads me to TLB and I haven't learned about it yet. Might say that I am really beginner in OS. Help :)
推荐答案
根据 Nate 的回答,我们只需要在表的顶层一个寄存器,并且表中的条目是指向下一层的指针,所以赢了'在任何级别的页表中都不需要一个以上的寄存器.
Based on Nate's answer, we only need one register at the top level of the table, and the entries in the table are pointers to the next levels so there won't be any needs of more than one register in any level of page table.
这篇关于页表寄存器和缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!