- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Process Creation vs Process Termination in Operating System
Process Creation and Process termination are used to create and terminate processes respectively. Details about these are given as follows −
A process may be created in the system for different operations. Some of the events that lead to process creation are as follows −
- User request for process creation
- System Initialization
- Batch job initialization
- Execution of a process creation system call by a running process
A process may be created by another process using fork(). The creating process is called the parent process and the created process is the child process. A child process can have only one parent but a parent process may have many children. Both the parent and child processes have the same memory image, open files and environment strings. However, they have distinct address spaces.
A diagram that demonstrates process creation using fork() is as follows −
Process termination occurs when the process is terminated The exit() system call is used by most operating systems for process termination.
Some of the causes of process termination are as follows −
- A process may be terminated after its execution is naturally completed. This process leaves the processor and releases all its resources.
- A child process may be terminated if its parent process requests for its termination.
- A process can be terminated if it tries to use a resource that it is not allowed to. For example - A process can be terminated for trying to write into a read only file.
- If an I/O failure occurs for a process, it can be terminated. For example - If a process requires the printer and it is not working, then the process will be terminated.
- In most cases, if a parent process is terminated then its child processes are also terminated. This is done because the child process cannot exist without the parent process.
- If a process requires more memory than is currently available in the system, then it is terminated because of memory scarcity.
- Related Articles
- What is process creation in Operating Systems?
- Process Deadlocks in Operating System
- Process Communication in Operating System
- Booting Process in DOS Operating System
- What is a process in Operating System?
- What is process termination?
- Process vs Parent Process vs Child Process
- Major Activities of an Operating System with Regard to Process Management
- User View vs System View in Operating System
- Running vs Waiting vs Terminated Process
- Process Representation in Linux System
- Differentiate between 32-Bit vs. 64-Bit Operating System.
- Cable Modem Termination System (CMTS)
- Message Passing vs Shared Memory Process communication Models
- What are the Process Management System Calls?