next up previous
Next: File Descriptors Up: ExOS Process Management Previous: exec

fork

Fork uses copy-on-write to speed forking. It creates a new environment, duplicates the page tables of the parent, and marks every non-shared entry in both environments as copy-on-write and read-only. Then, the page-fault handler in each process handles allocating new pages and duplicating them when a write occurs.[*]

Fork must also run through all the ExOS subsystems and notify them that a fork has occurred so that they can update their reference counts and other data.


Thomas Pinckney
3/17/1998