When a process forks off a child process, it needs to replicate its address
space. This operation may take a while to complete. One technique
to speed this up is to create an address space mapping to the same set of pages
without copying data and mark all pages read-only. On a write, the kernel
will catches the access fault, allocates a page frame, copies the page from its
parent process, marks the page to be read-write, and returns to the faulting
instruction. This technique is called "copy-on-write." How would you
implement copy-on-write?