虚拟化页表如何工作 [英] How virtualized page table works

查看:89
本文介绍了虚拟化页表如何工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

了解虚拟化页表概念,其中部分页表被放置在虚拟内存中。 Wikipedia 以及Patterson& Hennessy(页面错误部分中的5.7阐述)说,您没有将整个页面表放入虚拟内存的原因是,它可能导致循环页面错误。但是在我看来,这似乎还有一个更基本的问题-您将如何首先找到页表?看来您必须需要一些[em> 记录,以便找到页表来开始翻译过程。

Reading about the virtualized page table concept, where part of the page table is put in virtual memory. Wikipedia as well as Patterson & Hennessy (5.7 elaboration in the Page Faults section) say that the reason you don't put the entire page table into virtual memory is that it can lead to circular page faults. But it seems to me like there's an even more basic issue - how you would find the page table in the first place? It seems like you necessarily need some record of where in physical memory to begin the translation process by locating the page table.

澄清我的问题还有一点,我的困惑不是为什么不能将所有页表都存储在内存中。而是给出的合理价是为了防止出现圆形页面错误。看起来,从根本上讲,基本原理应该是处理器必须以某个物理地址作为起点,无论您说什么,它都是一个物理页表。这与圆形页面错误有什么关系?似乎更基本。

To clarify my question a bit more, my confusion is not "why can't all the page tables be in memory". Rather, it's that the rationale given is to "prevent against circular page faults". It seems like the rationale should be more fundamentally that "the processor must have some physical address as a starting point", and whatever you call that, it's a physical page table. What does this have to do with "circular page faults"? Seems much more fundamental.

推荐答案

关于:您的更新:这是两种表达同一要求的不同方法。 / strong>

re: your update: those are two different ways of stating the same requirement.

这是一个 reducio ad absurdum 参数:考虑一个CPU,其中页表指针都是虚拟地址:TLB缺失否则页面错误处理程序将需要进行另一个页面错误或TLB丢失,因为它没有可以直接使用的物理地址。

It's a reductio ad absurdum argument: consider a CPU where the page-table pointers were all virtual addresses: the TLB-miss or page-fault handler would need to take another page fault or TLB miss because it doesn't have a physical address it can use directly.

这是圆形您会遇到的问题,以及为什么必须在某处有一个物理地址,否则这是一个陷阱22 / 将折磨的情况一直弄糟

This is the "circular" problem you'd run into, and why there has to be a physical address somewhere or else it's a catch-22 / turtles all the way down type of situation.

这篇关于虚拟化页表如何工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆