The process model: Here's what we do: in a loop (that executes a total of 60,000 times!), create and destroy a process by calling fork(2) and subsequently exiting. (We take care of details such as clearing any possible zombie by waiting in the parent for the child to die before proceeding in the loop.) The relevant code is as follows (ch14/speed_multiprcs_vs_multithrd_simple/create_destroy/fork_test.c):
...#define NFORKS 60000void do_nothing(){ unsigned long f = 0xb00da; ...