A new process is created by an existing process by forking. The fork operation clones the process executing it. The original and cloned processes (including address spaces) are identical except for some small things, the most important of which is that the child has a return value of 0 from the fork operation; the parent has a return value of the child's pid. fork_example shows basic forking. We use sleep() to mimic doing some work that takes some time. When the child wakes up, it terminates. Because the parent has not yet join'ed to the child (and the child hasn't been detached), the child becomes a "zombie" -- a terminated process that hasn't been eliminated from the system, pending a join by the parent. forklatency measures how long fork takes on your system.