A process can create several new processes through creating process system calls during the process execution. Creating a process we call it the parent process and the new process is a child process.
Every new process creates another process forming a tree-like structure. It can be identified with a unique process identifier that usually represents it as pid which is typically an integer number. Every process needs some resources like CPU time, memory, file, I/O devices to accomplish.
Whenever a process creates a sub process, and may be each sub process is able to obtain its resources directly from the operating system or from the resources of the parent process. The parent process needs to partition its resources among all its children or it may be able to share some resources to several children.
Restricting a child process to a subset of the parent’s resources prevents any process from overloading the system by creating too many sub-processes. A process is going to obtain its resources whenever it is created.
Let us consider a tree of process on a typical Solaris system as follows −
Whenever a process creates a new process, there are two possibilities in terms of execution, which are as follows −
The parent continues to execute concurrently with its children.
The parent waits till some or all its children have terminated.
There are two more possibilities in terms of address space of the new process, which are as follows −
The child process is a duplicate of the parent process.
The child process has a new program loaded into it.