How a process is created and terminated?

Creating a process:  A process can be created by:

1) Initialization of system: When operating system boots many background and foreground processes are created. Background processes are the one which are used for background purposes of the operating system and they do not interact with the users. A foreground process is the one which interacts with users.

2) Creation of a new process by a running process: System calls are issued by the running process to create new processes. New processes are created to help the existing process to do its job efficiently and swiftly.

3) Process created by a user: A new process is created by the user. For Example, when a user starts a new browser window, a new process is created.

4) Process in batch systems: These are the processes which are created in mainframes. When a user submits a batch job, then a new process is created.

Terminating a process: A process can be terminated by:

1) Exit: When a process has finished its task then it is terminated by using an exit call.

2) Error: A process is terminated when there is any error in the program.

3) Killed by another process: A process can be terminated when another process kills it by calling kill. A process should have authorization to kill another process.

Leave a Reply