Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
What are the operations on process?
A process is a program in execution that includes more than just program code (called the text section). This concept is fundamental to all operating systems because every task performed by the OS requires a process to execute it.
The process executes as it changes state. The state of a process is defined by the current activity of that process.
Process States
Each process may be in one of the following states −
New − The process is being created.
Running − Instructions are currently being executed.
Waiting − The process is waiting for an event to occur (such as I/O completion or receiving a signal).
Ready − The process is waiting to be assigned to a processor.
Terminated − The process has finished execution.
It is important to note that only one process can be running on any processor at any instant. However, many processes may be ready and waiting for execution.
Process Creation
There are four principal events that cause processes to be created −
System Initialization
Numerous processes are created when an operating system boots. These include −
Foreground processes − Processes that interact with users and perform work for them.
Background processes − Also called daemons, these are not associated with particular users but perform specific system functions.
Execution of Process-Creation System Call
A running process issues system calls to create one or more new processes to help accomplish its task. In UNIX, the system call used is fork(). In Windows, CreateProcess() handles both process creation and loading the program into the new process.
User Request to Create New Process
A new process is created when a user explicitly requests it, typically through an existing process executing a process creation system call.
Initiation of Batch Job
When users submit batch jobs to the system, the operating system creates new processes to run these jobs from the input queue.
Process Termination
Process termination occurs through system calls like kill in UNIX or TerminateProcess in Windows. Processes terminate for the following reasons −
Normal exit − Most processes terminate when they complete their work and execute a system call to exit voluntarily.
Error exit − Process terminates due to program errors such as executing illegal instructions, invalid memory references, or division by zero.
Fatal error − Process discovers a fatal error that prevents it from continuing execution.
Killed by another process − One process executes a system call to terminate another process.
Conclusion
Process operations form the foundation of operating system functionality. Understanding process states, creation mechanisms, and termination conditions is essential for system design and process management. These operations ensure efficient resource utilization and proper task execution in modern operating systems.
