- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
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
Different Operations on Processes
There are many operations that can be performed on processes. Some of these are process creation, process preemption, process blocking, and process termination. These are given in detail as follows −
Process Creation
Processes need to be created in the system for different operations. This can be done by the following events −
- User request for process creation
- System initialization
- Execution of a process creation system call by a running process
- Batch job initialization
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 Preemption
An interrupt mechanism is used in preemption that suspends the process executing currently and the next process to execute is determined by the short-term scheduler. Preemption makes sure that all processes get some CPU time for execution.
A diagram that demonstrates process preemption is as follows −
Process Blocking
The process is blocked if it is waiting for some event to occur. This event may be I/O as the I/O events are executed in the main memory and don't require the processor. After the event is complete, the process again goes to the ready state.
A diagram that demonstrates process blocking is as follows −
Process Termination
After the process has completed the execution of its last instruction, it is terminated. The resources held by a process are released after it is terminated.
A child process can be terminated by its parent process if its task is no longer relevant. The child process sends its status information to the parent process before it terminates. Also, when a parent process is terminated, its child processes are terminated as well as the child processes cannot run if the parent processes are terminated.
- Related Articles
- Explain the different operations on Regular language in TOC.
- What are the different operations on files in C language?
- What are the different operations performed on strings in TOC?
- Operations on struct variables in C
- Operations on Queue in Data Structures
- Math Operations on BigInteger in Java
- What are the operations on process?
- Operations on an Array in Data Structures
- How to get all the processes on remote computers using PowerShell?
- What are different pointer operations and problems with pointers in C language?
- Arithmetic Operations on Images using OpenCV in Python
- Explain the basic mathematical operations on irrational numbers.
- C++ to perform certain operations on a sequence
- How to sort the Processes based on their property name using PowerShell?
- How to see top processes sorted by actual memory usage on Linux?
