A process holds the environment in which threads can run: it holds the memory mappings, the file descriptors, the user and group IDs, and more. The first process is the init process, which is created by the kernel during boot and has a PID of one. Thereafter, processes are created by duplication in an operation known as forking.
Processes
Creating a new process
The POSIX function to create a process is fork(2). It is an odd function because for each successful call, there are two returns: one in the process that made the call, known as the Parent, and one in the newly created process, known as the Child , as shown in the following diagram:
Immediately after the call, the child is an exact copy of the parent: it has the same...