Inter-Process Communication allows one process to communicate with another process. In a multiprogramming systems there are hundreds of processes running at the same time and a lot of them require some other process to give input to them or receive input for them to complete the execution of a process.
IPC is supported by OS that allows one process to communicate with another process. These processes can be running on the same computer or multiple other computer connected throug a network. It enables one application to control other application and share data between each other.
All the processes that are being executed in an OS can be specified into two groups, Independent Processes and Cooperating Processes.
Independent Processes
A process that cannot be accessed or access any other process in the oprating system is called an Independent Process. It does not share data with any other process and does not get any data from any other process.
Cooperating Processes
A process that can access and can be accessed by other processes is called a Cooperating Process. It shares and receives data to and from other processes. Following are the some advantages of Cooperating Processes.
Information Sharing
Cooperating processes are necessary because there may be more than one user accessing the same file and process cooperating allows the OS to share the same file to all the process at the same time.
Modularity
Modularity furthur divides the process into smaller processes and threads to allow the OS to speedup the execution.
Computation Speedup
Cooperating process allows the OS to divide the process into smaller parts to speedup the computation. This way subprocesses of a process needs to be communicating with each other to complete its execution.
Convenience
Process cooperatin provides convenience if a single user is working on multiple tasks at the same time. It ensures that any conflict is avoided in the system if the user is using the same file in multiple tasks.