The Wayback Machine - https://web.archive.org/web/20240811000753/https://www.geeksforgeeks.org/cooperating-process-in-operating-system/
Open In App

Cooperating Process in Operating System

Last Updated : 01 Mar, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Pre-requisites: Process Synchronization

In an operating system, everything is around the process. How the process goes through several different states. So in this article, we are going to discuss one type of process called as Cooperating Process. In the operating system there are two types of processes:

  • Independent Process: Independent Processes are those processes whose task is not dependent on any other processes.
  • Cooperating Process: Cooperating Processes are those processes that depend on other processes or processes. They work together to achieve a common task in an operating system. These processes interact with each other by sharing the resources such as CPU, memory, and I/O devices to complete the task.
Cooperating Process in Operating System

 

So now let’s discuss the concept of cooperating processes and how they are used in operating systems.

  • Inter-Process Communication (IPC): Cooperating processes interact with each other via Inter-Process Communication (IPC). As they are interacting to each other and sharing some resources with another so running task get the synchronization and possibilities of deadlock decreases. To implement the IPC there are many options such as pipes, message queues, semaphores, and shared memory.
  • Concurrent execution: These cooperating processes executes simultaneously which can be done by operating system scheduler which helps to select the process from ready queue to go to the running state. Because of concurrent execution of several processes the completion time decreases.
  • Resource sharing: In order to do the work, cooperating processes cooperate by sharing resources including CPU, memory, and I/O hardware. If several processes are sharing resources as if they have their turn, synchronization increases as well as the response time of process increase.
  • Deadlocks: As cooperating processes shares their resources, there might be a deadlock condition. Deadlock means if p1 process holds the resource A and wait for B and p2 process hold the B and wait for A. In this condition deadlock occur in cooperating process. To avoid deadlocks, operating systems typically use algorithms such as the Banker’s algorithm to manage and allocate resources to processes.
  • Process scheduling: Cooperating processes runs simultaneously but after context switch, which process should be next on CPU to executes, this is done by the scheduler. Scheduler do it by using several scheduling algorithms such as Round-Robin, FCFS, SJF, Priority etc.

In conclusion, cooperating processes are essential unit to increase the concurrent execution and because of it, the performance of the overall system increases.



Similar Reads

Two State Process Model in Operating System
Pre-requisite: States of a Process in Operating Systems The process in an operating system passes from different states starting from its formation to its completion. A process consists of program data and its associated data and a process control block (PCB). A process may change its state because of the following events like I/O requests, interru
3 min read
Three State Process Model in Operating System
Pre-requisites: States of a Process in Operating Systems, Two-State Process Model in Operating SystemIn this article, we'll be discussing a three-state process model in an operating system and also discussing the need for this process model, how the process executes, what will be the possible transition that can occur, and last its benefits and som
4 min read
Six-State Process Model in Operating System
In this article, we are going to discuss the Six-State Process Model in Operating Systems and we will also understand what was the need for introducing these process models, what are the states present in these process models, and all the possible transitions that can occur in these models. Need for Six-State Process Model:The Five-State process mo
4 min read
Lottery Process Scheduling in Operating System
Prerequisite - CPU Scheduling, Process Management Lottery Scheduling is a type of process scheduling, somewhat different from other Scheduling. Processes are scheduled in a random manner. Lottery scheduling can be preemptive or non-preemptive. It also solves the problem of starvation. Giving each process at least one lottery ticket guarantees that
4 min read
Booting Process in DOS Operating System
Booting may be defined as process of loading the operating system into memory. The booting process starts from the moment when we power on computer and continues till moment, computer is ready for use. In the case of DOS, booting process starts when we start computer and continues till DOS prompt is displayed. The booting process of DOS mainly deal
3 min read
Process Schedulers in Operating System
In computing, a process is the instance of a computer program that is being executed by one or many threads. Scheduling is important in many different computer environments. One of the most important areas of scheduling is which programs will work on the CPU. This task is handled by the Operating System (OS) of the computer and there are many diffe
7 min read
5 State Process Model in Operating System
In an operating system (OS), managing how programs run and interact with system resources is crucial for efficient performance. The 5-state process model is a fundamental framework used by OSs to categorize and control the behavior of processes, which are individual instances of programs running on a computer. This model divides the lifecycle of a
6 min read
Difference Between Process, Parent Process, and Child Process
Running program is a process. From this process, another process can be created. There is a parent-child relationship between the two processes. This can be achieved using a library function called fork(). fork() function splits the running process into two processes, the existing one is known as parent and the new process is known as a child. Here
8 min read
System Protection in Operating System
Introduction: System protection in an operating system refers to the mechanisms implemented by the operating system to ensure the security and integrity of the system. System protection involves various techniques to prevent unauthorized access, misuse, or modification of the operating system and its resources. There are several ways in which an op
3 min read
User View Vs Hardware View Vs System View of Operating System
User View of Operating System: The Operating System is an interface, hides the details which must be performed and present a virtual machine to the user that makes it easier to use. Operating System provides the following services to the user. Execution of a programAccess to I/O devicesControlled access to filesError detection (Hardware failures, a
1 min read
three90RightbarBannerImg