0

Let us say there are two processes A and B. B needs to insert a new frame in its page table. as there are no frames free, we have to swap out one frame and bring in B's frame from disk. Suppose the operating system follows global page replacement scheme and picks up a frame in which we have A's data. Now, to swap this frame out we need to change in A's page table that corresponding frame is invalid. To do that in general.we need to know which process's data is there in a particular frame in the memory so that we can go to it's page table and alter the bit to invalid. How is this acchieved? Does each frame in the memory also store process id of the corresponding process whose data it is having?

4

1 回答 1

1

页表只是处理器硬件所需的工具。最重要的是,操作系统在内存中维护自己的数据库,跟踪每个物理页框。例如,在 Windows 中,有一个页框数据库 (PFN),列出了每个物理页面的状态,如有效、待机、修改、空闲等。为了描述驻留在物理内存中的虚拟页面的子集,有一个工作集列表。

对于 Windows,如果您需要了解更多关于内存管理的细节,我建议您阅读这本书http://www.amazon.com/Windows-Internals-Part-Developer-Reference/dp/0735665877/ref=sr_1_3?ie= UTF8&qid=1463848711&sr=8-3&keywords=windows+internals

于 2016-05-21T16:40:51.880 回答