Open In App

Operations on Processes

A process is an activity of executing a program. Basically, it is a program under execution. Every process needs certain resources to complete its task.

Operation on a Process

The execution of a process is a complex activity. It involves various operations. Following are the operations that are performed while execution of a process: 

Creation

This is the initial step of the process execution activity. Process creation means the construction of a new process for execution. This might be performed by the system, the user, or the old process itself. There are several events that lead to the process creation. Some of the such events are the following:

  1. When we start the computer, the system creates several background processes.
  2. A user may request to create a new process.
  3. A process can create a new process itself while executing.
  4. The batch system takes initiation of a batch job.

Scheduling/Dispatching

The event or activity in which the state of the process is changed from ready to run. It means the operating system puts the process from the ready state into the running state. Dispatching is done by the operating system when the resources are free or the process has higher priority than the ongoing process. There are various other cases in which the process in the running state is preempted and the process in the ready state is dispatched by the operating system.

Blocking

When a process invokes an input-output system call that blocks the process, and operating system is put in block mode. Block mode is basically a mode where the process waits for input-output. Hence on the demand of the process itself, the operating system blocks the process and dispatches another process to the processor. Hence, in process-blocking operations, the operating system puts the process in a ‘waiting’ state. 

Preemption

When a timeout occurs that means the process hadn’t been terminated in the allotted time interval and the next process is ready to execute, then the operating system preempts the process. This operation is only valid where CPU scheduling supports preemption. Basically, this happens in priority scheduling where on the incoming of high priority process the ongoing process is preempted. Hence, in process preemption operation, the operating system puts the process in a ‘ready’ state. 

Process Termination

Process termination is the activity of ending the process. In other words, process termination is the relaxation of computer resources taken by the process for the execution. Like creation, in termination also there may be several events that may lead to the process of termination. Some of them are:

  1. The process completes its execution fully and it indicates to the OS that it has finished.
  2. The operating system itself terminates the process due to service errors.
  3. There may be a problem in hardware that terminates the process.
  4. One process can be terminated by another process.

Frequently Asked Questions

Q.1: What are process operations?

Answer:

Process operations refer to the actions or activities performed on processes in an operating system. These operations include creating, terminating, suspending, resuming, and communicating between processes.

Q.2: What is process creation?

Answer:

Process creation is the operation of creating a new process in an operating system. It involves allocating resources, setting up the necessary data structures, and initializing the process’s execution environment. The new process typically inherits certain attributes from the parent process.

Q.3: What is process termination?

Answer:

Process termination is the operation of ending the execution of a process. It involves releasing allocated resources, closing open files, deallocating memory, and removing the process’s data structures from the system. The termination can be voluntary (process calls an exit system call) or involuntary (due to an error or external intervention).

Q.4: What is process suspension?

Answer:

Process suspension, also known as process blocking or process waiting, is the operation of temporarily pausing the execution of a process. The process enters a blocked state, typically waiting for a certain event or resource to become available before it can resume execution.

Article Tags :