
- Operating System Tutorial
- OS - Home
- OS - Overview
- OS - Components
- OS - Types
- OS - Services
- OS - Properties
- OS - Processes
- OS - Process Scheduling
- OS - Scheduling algorithms
- OS - Multi-threading
- OS - Memory Management
- OS - Virtual Memory
- OS - I/O Hardware
- OS - I/O Software
- OS - File System
- OS - Security
- OS - Linux
- OS - Exams Questions with Answers
- OS - Exams Questions with Answers
- Operating System Useful Resources
- OS - Quick Guide
- OS - Useful Resources
- OS - Discussion
What is Inter process communication?
Inter process Communication (IPC) is a mechanism which allows the exchange of data between processes. It enables resource and data sharing between the processes without interference.
Processes that execute concurrently in the operating system may be either independent processes or cooperating processes.
A process is independent and it may or may not be affected by other processes executing in the system. Any process that does not share data with any other process is independent.
Suppose if a process is cooperating then, it can be affected by other processes that are executing in the system. Any process that shares the data with another process is called a cooperative process.
Given below is the diagram of inter process communication −
Reasons for Process Cooperation
There are several reasons which allow process cooperation, which is as follows −
Information sharing − Several users are interested in the same piece of information. We must provide an environment to allow concurrent access to such information.
Computation speeds up − If we want a particular task to run faster, we must break it into subtasks, then each will be executed in parallel with the other. The speedup can be achieved only if the computer has multiple processing elements.
Modularity − A system can be constructed in a modular fashion dividing the system functions into separate processes or threads.
Convenience − An individual user may work on many tasks at the same time. For example, a user may be editing, compiling, and printing in parallel.
The cooperative process requires an IPC mechanism that will allow them to exchange data and information.
IPC Models
There are two fundamental models of IPC which are as follows −
Shared memory
A region of memory that is shared by cooperating processes is established. Processes can then exchange information by reading and writing data to the shared region.
Message passing
Communication takes place by means of messages exchanged between the cooperating processes. Message passing is useful for exchanging small amounts of data because no conflicts need be avoided.
It is easier to implement when compared to shared memory by using system calls and therefore, it requires more time-consuming tasks of the kernel.
- Related Articles
- What is inter process communication (IPC)?
- What are the two methods to implement inter process communication?
- Inter thread communication in Java
- Explain the pointers for inter-function communication in C language.
- Process Communication in Operating System
- Process and Types of Communication
- What is Inter-Switch Link (ISL)?
- Shared Memory Model of Process Communication
- Message Passing Model of Process Communication
- What are the Network protocol requirements in the communication process?
- What is Interprocess Communication?
- What is the Purpose of Inter-Firm Comparisons?
- Message Passing vs Shared Memory Process communication Models
- What is cellular network communication?
- What is Basic Communication Model?
