OPERATIONS ON PROCESSES
ü A process may create several new processes, during the course of execution.
ü The creating process is called a parent process, whereas the new processes are called the children of that process.
ü When a process creates a new process, two possibilities exist in terms of execution:
· The parent continues to execute concurrently with its children.
· The parent waits until some or all of its children have terminated.
ü There are also two possibilities in terms of the address space of the new process:
· The child process is a duplicate of the parent process.
ü The child process has a program loaded into it.
ü In UNIX, each process is identified by its process identifier, which is a unique integer. A new process is created by the fork system call.
ü A process terminates when it finishes executing itsfinal statement and asks the operating system to delete it by using the exit system call.
ü At that point, the process may return data (output) to its parent process (via the wait system call).
ü A process can cause the termination of another process via an appropriate system call.
ü A parent may terminate the execution of one of its children for a variety of reasons, such as these:
ü The child has exceeded its usage of some of the resources that it has been allocated.
The task assigned to the child is no longer required.
The parent is exiting, and the operating system does not allow a child to continue if its parent terminates. On such systems, if a process
terminates (either normally or abnormally), then all its children must also be terminated. This phenomenon, referred to as cascading termination, is normally initiated by the operating system.
Copyright © 2018-2021 BrainKart.com; All Rights Reserved. (BS) Developed by Therithal info, Chennai.