Copy-on-Write

Modern implementations of fork() use copy-on-write (COW). What does this mean?

A

Only the stack is copied; the heap and code segments are always shared between parent and child

B

The child process gets a completely independent copy of the parent's memory immediately at fork time

C

The parent and child initially share the same physical memory pages marked read-only; a private copy of a page is made only when either process tries to write to it

D

The child process has no memory until it calls exec(), which loads the new program