内核如何跟踪映射到其他进程的帧?

How does the kernel keep track of frames being mapped to other processes?

关于 minor page faults,维基百科说:

The page fault handler in the operating system merely needs to make the entry for that page in the memory management unit point to the page in memory and indicate that the page is loaded in memory; it does not need to read the page into memory. This could happen if the memory is shared by different programs and the page is already brought into memory for other programs.

内核如何知道一个页面已经被另一个进程调入内存?根据我的理解,对于任何给定的执行进程,内核只关心该进程的页面 table,因此如果某个帧已经被另一个进程映射,内核如何确定这一点?

如果你也能指出执行此操作的相关代码,那也太棒了,因为我正在浏览 here (linked from this 文章) 并且找不到实现的相关部分。

在虚拟内存系统中,操作系统必须在辅助存储中维护进程地址的表示 space。那就是虚拟内存的"virtual"部分。

虚拟表示通常分为几个部分。每个部分包含具有相同属性 (r/w/rw/rx) 的页面,并且连续存储。

通常,如果一个进程共享内存,它们会共享整个部分。

操作系统必须在某处存储描述该部分的 header。 header 将指示该部分是否以及在何处加载到物理内存中。每个进程都必须有一个数据结构,指示该部分映射到逻辑地址的位置 space.

请记住,此机制可用于操作系统的所有进程共享的可分页区域。

发生页面错误时,页面错误处理程序必须确定哪个部分包含导致错误的页面。然后它可以从该部分的 header 中识别它是否驻留在物理内存中。

你说的文章是指VMS操作系统,这种软故障比较容易发生。在 VMS 中,库由操作系统安装,因此所有进程都被迫共享相同的代码。