《Linux Kernel Development》 Note 3
Processes provide two virtualizations: a virtualized processor and virtual memory. The virtual processor gives the process the illusion that it alone monopolizes the system, despite possibly sharing the processor amongst dozens of other processes. Virtual memory lets the process allocate and manage memory as if it alone owned all the memory in the system.
Note that a program itself is not a process; a process is an active program and related resources. Indeed, two or more processes can exist that are executing the same program. In fact, two or more processes can exist that share various resources, such as open files or an addressspace. A process beins its life when, not surprisingly, it is created. In Linux,this occurs by means of the fork() system call, which creates a new process by duplicating an existing one. The process that calls fork() is the parent, whereas the new process is the child. The parent resumes execution, and the child starts execution, at the same place, where the call returns. Often, following a fork it is desirable to execute a new, different, program. The exec() – family of funcation calls is used to create a new address space and load a new program into it.
Finally, a program exits via the exit() system call. This function termiates the process and frees all its resources. A parent process can inquire about the status of a terminated child, via the wait4() system call that enables a process to wait for the termination of a specific process. When a process exits, it is placed into a special zombie state that is used to represent terminated processes until the parent calls wait() or waitpid().