Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
What are parent/child processes in OS?
can someone explain in simple terms what they are with an easy example
1 Answer
- 7 years agoFavorite Answer
A parent process can create multiple child processes. If a process does not have a parent, it is assumed to be created directly by the kernel.
In systems such as Unix and Linux, the first process, "init", is created by the kernel at boot time and never terminated as long as the system is running. Other parentless processes may be launched to perform different daemon tasks.
In some situations, a child process is orphaned when its parent dies. The orphaned child process is then shortly adopted by the init process.
However in Unix, a child process created using the fork system call is generally a clone of the original parent process. After forking a child process, both the parent and the child continue to run their own way. In Windows, when a new process is created by one of the CreateProcess family of functions, a new process handle is returned. This handle is then created with full access rights and is subject to security access checking. The process handle can be inherited by a child process based on the inheritance flag specified during creation.
When a child process is created, it is associated with a unique process ID number. The lifetime of a process ends when a termination signal is reported to the parent process, resulting in the release of the process ID and resources.