If the child tries to write, it gets a new copy of the page (which is no longer write protected), does the grandchild point to that new page or the old one (which the parent holds)?
1 Answer
The process that writes to the page gets a new copy. If there are multiple processes that shared the old copy, they keep sharing the same page. It doesn't matter if the processes happen to be related.
-
So if there is just a parent and child, if child writes, it gets a new copy and is the old copy still write protected?– SwairCommented Nov 9, 2014 at 0:35
-
1@swair Yes, that's how it works. What happens in the process that writes doesn't affect the other processes. It doesn't matter if one happens to be the child of the other. Commented Nov 9, 2014 at 0:58