This preview shows page 1. Sign up to view the full content.
Unformatted text preview: (a) (b) Figure 10.31: A shared object. (a) After process 1 maps the shared object. (b) After process 2 maps the same shared object. (Note that the physical pages are not necessarily contiguous.) Process 1 virtual memory Physical memory Process 2 virtual memory Process 1 virtual memory Physical memory Process 2 virtual memory copy-on-write write to private copy-on-write page Private copy-on-write object Private copy-on-write object (a) (b) Figure 10.32: A private copy-on-write object. (a) After both processes have mapped the private copy-onwrite object. (b) After process 2 writes to a page in the private area. 10.8. MEMORY MAPPING
a protection fault. 519 When the fault handler notices that the protection exception was caused by the process trying to write to a page in a private copy-on-write area, it creates a new copy of the page in physical memory, updates the page table entry to point to the new copy, and then restores write permissions to the page, as shown in Figure 10.32(b). When the fault...
View Full Document