Operations on Processes

Last Updated : 20 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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. Operations on processes are crucial for managing and controlling the execution of programs in an operating system.

Operations on processes are fundamental to the functioning of operating systems, enabling effective flow of program execution and resource allocation. The lifecycle of a process includes several critical operations: creation, scheduling, blocking, preemption, and termination. Each operation plays a vital role In ensuring that processes are efficiently managed, allowing for multitasking and optimal resource utilization. In this article, we will discuss various operations on Process.

What is a Process?

A process is an activity of executing a program. It is a program under execution. Every process needs certain resources to complete its task. Processes are the programs that are dispatched from the ready state and are scheduled in the CPU for execution. PCB (Process Control Block) holds the context of the process. A process can create other processes which are known as Child Processes. The process takes more time to terminate, and it is isolated means it does not share the memory with any other process. The process can have the following states new, ready, running, waiting, terminated, and suspended. 

process in memory

  • Text: A Process, sometimes known as the Text Section, also includes the current activity represented by the value of the Program Counter. 
  • Stack: The stack contains temporary data, such as function parameters, returns addresses, and local variables. 
  • Data: Contains the global variable.
  • Heap: Dynamically memory allocated to process during its run time.

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: 

Process_creation

1. 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:

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

2. 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.

3. 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. 

4. 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. 

5. 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:

  • The process completes its execution fully and it indicates to the OS that it has finished.
  • The operating system itself terminates the process due to service errors.
  • There may be a problem in hardware that terminates the process.

Conclusion

Operations on processes are crucial for managing and controlling program execution in an operating system. These activities, which include creation, scheduling, blocking, preemption, and termination, allow for more efficient use of system resources and guarantee that processes run smoothly. Understanding these procedures is critical to improving system performance and dependability.so these processes help our computers do many things at once without crashing or slowing down.

Frequently Asked Questions on Operations on Process – FAQs

What are process operations?

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.

What is process termination?

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).

What is process suspension?

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.

What is IPC in OS?

Inter-process communication (IPC) is a mechanism that allows processes to communicate with each other and synchronize their actions.

What is context switching?

Context switching in an operating system involves saving the context or state of a running process so that it can be restored later, and then loading the context or state of another. process and run it.



Previous Article
Next Article

Similar Reads

Resource Allocation Techniques for Processes
The Operating System allocates resources when a program need them. When the program terminates, the resources are de-allocated, and allocated to other programs that need them. Now the question is, what strategy does the operating system use to allocate these resources to user programs? There are two Resource allocation techniques: 1. Resource parti
2 min read
Reasons for Processes Termination
A process in an operating system can be terminated when certain errors or default conditions occur. Following are some of the reasons that lead to process termination, Reasons for Process Termination: Normal Completion: A process can complete its execution in a normal manner by executing an operating system service call. Unavailability of the Requi
3 min read
Concurrent Processes in Operating System
Concurrent processing is a computing model in which multiple processors execute instructions simultaneously for better performance. Concurrent means, which occurs when something else happens. The tasks are broken into subtypes, which are then assigned to different processors to perform simultaneously, sequentially instead, as they would have to be
2 min read
Find the order of execution of given N processes in Round Robin Scheduling
Given an array arr[] representing burst time of N processes scheduled using the Round Robin Algorithm with given quantum time Q. Assuming that all the process arrive at time t = 0, the task is to find the order in which the process execute. Examples: Input: arr[] = {3, 7, 4}, q = 3Output: 0 2 1Explanation:The order of execution is as follows P0, P1
12 min read
Find the time taken finish Processing of given processes
Given N processes and two arrays, arr1[] and arr2[] of size N each. arr1[] contains time spent by any process in critical section and arr2[] denotes time taken by a process to complete processing after coming out of the critical section. The task is to find the time taken by all the processes to complete their processing (both in critical section a
6 min read
Relation Between Number of Processes and Number of Resources to Prevent Deadlock
A set of blocked processes where each process is holding some resource and waiting to acquire some other resource held by another process in the set. This situation is called deadlock in the operating system. Deadlock can be prevented if the number of resource instances in a system is significantly larger than the number of processes asking for a r
3 min read
Program for FCFS CPU Scheduling | Set 2 (Processes with different arrival times)
We have already discussed FCFS Scheduling of processes with same arrival time. In this post, scenarios, when processes have different arrival times, are discussed. Given n processes with their burst times and arrival times, the task is to find the average waiting time and an average turn around time using FCFS scheduling algorithm. FIFO simply queu
15+ min read
Zombie Processes and their Prevention
Zombie state: When a process is created in UNIX using fork() system call, the parent process is cloned. If the parent process calls wait() system call, then the execution of the parent is suspended until the child is terminated. At the termination of the child, a 'SIGCHLD' signal is generated by the kernel which is delivered to the parent. Parent,
5 min read
Difference between Zombie, Orphan and Daemon Processes
1. Zombie Process :A Zombie is a process that has completed its task but still, it shows an entry in a process table. The zombie process usually occurred in the child process. Very short time the process is a zombie. After the process has completed all of its tasks it reports the parent process that it has about to terminate. Zombie is unable to te
2 min read
Complexity of different operations in Binary tree, Binary Search Tree and AVL tree
In this article, we will discuss the complexity of different operations in binary trees including BST and AVL trees. Before understanding this article, you should have a basic idea about Binary Tree, Binary Search Tree, and AVL Tree. The main operations in a binary tree are: search, insert and delete. We will see the worst-case time complexity of t
4 min read
Dual Mode operations in OS
An error in one program can adversely affect many processes, it might modify data of another program or also can affect the operating system. For example, if a process stuck in the infinite loop then this infinite loop could affect the correct operation of other processes. So to ensure the proper execution of the operating system, there are two mod
7 min read
Read and Write operations in Memory
A memory unit stores binary information in groups of bits called words. Data input lines provide the information to be stored into the memory, Data output lines carry the information out from the memory. The control lines Read and write specifies the direction of transfer of data. Basically, in the memory organization, there are [Tex]2^{l} [/Tex]me
3 min read
Functionally Complete Operations
Prerequisite - Functional Completeness A switching function is expressed by binary variables, the logic operation symbols, and constants 0 and 1. When every switching function can be expressed by means of operations in it, then only a set of operation is said to be functionally complete. The set (AND, OR, NOT) is a functionally complete set.The set
3 min read
Basic Laws for Various Arithmetic Operations
Prerequisite - Number System A number is a way to represent arithmetic value, count or measure of a particular quantity. A number system can be considered as a mathematical notation of numbers using a set of digits or symbols. In simpler words the number system is a method of representing numbers. Every number system is identified with the help of
1 min read
Arithmetic Micro-operations in Registers
We can perform arithmetic operations on the numeric data which is stored inside the registers. Example : R3 <- R1 + R2 The value in register R1 is added to the value in the register R2 and then the sum is transferred into register R3. Similarly, other arithmetic micro-operations are performed on the registers. Addition - In addition micro-operat
3 min read
Transforming of I/O Requests to Hardware Operations
We know that there is handshaking between device driver and device controller but here question is that how operating system connects application request or we can say I/O request to set of network wires or to specific disk sector or we can say to hardware -operations. To understand concept let us consider example which is as follows. Example - We
4 min read
Designing finite automata for various operations like 1's complement, 2's complement
Transducers in Finite Automata(FA) means FA with Output.There are two types of Machines for FA with Output. 1. Mealy Machine : It is FA in which output is associated with each transition. (that means output depends on state and input).2. Moore Machine : It is FA in which output is associated with each state. (that means output depends on state only
4 min read
Atomic Operations in OS
Atomic operations in Operating System are those operations, which execute without interruption of any other process in between their execution phase. They execute at the lowest level and can't be broken down further. Formally, when an atomic operation is in its executing process, no other process can read, modify, or interrupt that operation's data
3 min read
OS File Operations
File operations within an operating system (OS) encompass a set of essential tasks and actions directed at files and directories residing within a computer's file system. These operations are fundamental for the effective management and manipulation of data stored on various storage devices. In this article, we will learn different file operations
4 min read
Set Theory Operations in Relational Algebra
Relational Algebra in DBMS These Set Theory operations are the standard mathematical operations on set. These operations are Binary operations that are, operated on 2 relations unlike PROJECT, SELECT and RENAME operations. These operations are used to merge 2 sets in various ways. The set operation is mainly categorized into the following: Union op
3 min read
Difference between Data Science and Operations Research
1. Data Science : It’s a set of methodologies of taking thousands of forms of data that are available to us today and using them to draw meaningful conclusions. Data is being collected all around us, every like, click, email, credit card swipe, or tweet is a new piece of data that can better describe the present or better predict the future. In dat
3 min read
Arithmetic Operations of Binary Numbers
Binary is a base-2 number system that uses two states 0 and 1 to represent a number. We can also call it to be a true state and a false state. A binary number is built the same way as we build a normal decimal number. Binary arithmetic is an essential part of various digital systems. You can add, subtract, multiply, and divide binary numbers using
1 min read
Shift Micro-Operations in Computer Architecture
Shift micro-operations are those micro-operations that are used for the serial transfer of information. These are also used in conjunction with arithmetic micro-operation, logic micro-operation, and other data-processing operations. There are three types of shift micro-operations: 1. Logical ShiftIt transfers the 0 zero through the serial input. We
7 min read
Set Operations
Set Operations can be defined as the operations performed on two or more sets to obtain a single set containing a combination of elements from all the sets being operated upon. There are three types of operation on sets in Mathematics; they are The Union of Sets (∪), the Intersection of Sets (∩), and the Difference between Sets (-). Table of Conten
7 min read
DBMS Tutorial – Learn Database Management System
Database Management System is a software or technology used to manage data from a database. Some popular databases are MySQL, Oracle, MongoDB, etc. DBMS provides many operations e.g. creating a database, Storing in the database, updating an existing database, delete from the database. DBMS is a system that enables you to store, modify, and retrieve
8 min read
Types of Operating Systems
An Operating System performs all the basic tasks like managing files, processes, and memory. Thus, the operating system acts as the manager of all the resources, i.e. resource manager. Thus, the operating system becomes an interface between the user and the machine. It is one of the most required software that is present in the device. Operating Sy
11 min read
TCP/IP Model
The TCP/IP model is a fundamental framework for computer networking. It stands for Transmission Control Protocol/Internet Protocol, which are the core protocols of the Internet. This model defines how data is transmitted over networks, ensuring reliable communication between devices. It consists of four layers: the Link Layer, the Internet Layer, t
13 min read
What is OSI Model? - Layers of OSI Model
OSI stands for Open Systems Interconnection , where open stands to say non-proprietary. It is a 7-layer architecture with each layer having specific functionality to perform. All these 7 layers work collaboratively to transmit the data from one person to another across the globe. The OSI reference model was developed by ISO - 'International Organiz
15+ min read
Types of Network Topology
Network topology refers to the arrangement of different elements like nodes, links, or devices in a computer network. It defines how these components are connected and interact with each other. Understanding various types of network topologies helps in designing efficient and robust networks. Common types include bus, star, ring, mesh, and tree top
11 min read
Introduction of ER Model
Peter Chen developed the ER diagram in 1976. The ER model was created to provide a simple and understandable model for representing the structure and logic of databases. It has since evolved into variations such as the Enhanced ER Model and the Object Relationship Model The Entity Relational Model is a model for identifying entities to be represent
10 min read