I started with the basic process picture notation:
I talked about the fork(2) and execve(2) system calls. These system calls are the method by which new processes are created and new programs run. The model is that fork clones the process making the request, so that the system ends up with two processes that are virtually identical -- both have the same memory (copies of the original), same registers, etc, and both are in the process of returning from the fork syscall. The only difference is that in one, named the parent, the process ID remains the same, and the return value of fork is the process ID of the other, new process. This process is called the parent process. The newly created process is called the child process and is distinguished from the parent by the return value of the fork, which will be zero.
I also covered the idea of inheritance: the state that is carried over from the parent process to the child. This state information include the current working directory, the signal status for ignored signals, the I/O descriptors (which are shared between the parent and child), the environment, etc.
The ideas of process creation and inheritance go together. In particular, when we look at I/O redirection, where the descriptors refer to files instead of a terminal, understanding how this works is important.
bsy@cse.ucsd.edu, last updated