- I think that if we use a single page table for all processes, then a process can access the address apace of other processes so we need a separate page table for each process. This means the pages which actually belong to a particular process will be valid and all other pages which belong to some other's address space will be marked invalid. Am I correct?
- If yes, then why didn't we add one more field as "process ID" to the page table to distinguish the address space of every process?
- If not, why does every process (or any address space) have its own page table?
- Because we added some more page tables (in multilevel paging) as overhead, and the actual page table is also in main memory
- All??? Then the 3rd level page table which contains the actual frames should be of the same size as the original page table (without multilevel) because it must have entries for all frames which are used by physical memory too.
发布于 2016-01-13 09:08:43
是的,您正确地说,单独的页表背后的原因之一是安全问题。分页接口通过硬件向操作系统公开。硬件不明白什么是进程?进程语义是OS design.For的一部分,这是我们不能将进程ID添加到页面表中的原因。您可以查看硬件手册来了解分页工作原理。是的,您是对的,多级页面无助于缩小页表的大小。在我看来,硬件需求是顶级的,页面表必须始终映射到内存中。如果只有一个级别,则始终需要映射所有页表页,即使它们未被使用。这可能是硬件公开多层页表的原因之一。
https://stackoverflow.com/questions/34706311
复制相似问题