How does the kernel know about physical pages shared by two different processes?

We know that page tables are used to get the physical memory page address from the virtual memory page address. However, the kernel knows whether a page of physical memory is shared by different processes (for example, in the case of a forked process and its parent process). Where is such a list stored?

+3
source share
1 answer

A kernel is an object that creates all virtual mappings. Thus, he knows exactly what is common and what is not. User space processes cannot create shared mappings without the help of the kernel.

, fork. .

, , struct page, . .

, Linux-MM. , Mel Gorman " Linux" ( ), ( PDF) "".

+4

All Articles