Open In App

IPC Full Form

Last Updated : 10 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

IPC stands for Interprocess Communication. It is a medium for the communication of processes. It is a technique where an operating system allows all the independent processes to interact or communicate with each other within a single or multiple systems connected via a network. At the same time, it can handle many requests. It is used for sharing data between multiple threads in one or more processes. They are used as abstract devices by processes, but in the operating system, they can be implemented in various ways.  

IPC-Full-Form

Generally, operating systems use IPC to transfer a large amount of data. This technique can affect performance and energy consumption. It is not supported by a single process operating system like DOS. IPC synchronizes the requests to be implemented simultaneously. So, we can say that each and every individual process runs without affecting each other and the communication between them can be seen as a method of cooperation between them. 

IPC

Characteristics of IPC

Synchronous and Asynchronous Communication

Each message is queued, sending processes cause messages to be added to remote queues, and receiving processes remove messages from the local queues. This communication between these sending and receiving processes can be synchronous or asynchronous. 

Both sending and receiving messages are synchronized at every message, in this case, both send and receive are blocking operation. If the message is sent by the sending process it remains blocked until the receive is issued by the receiving process and when the process receives the message it gets block until the next message arrives. 

The use of the send operation is nonblocking, as the sending process sends the message the transmission of the message proceeds in parallel along with the sending process, receive operation can have both blocking and non-blocking variants. The receiving process immediately proceeds with its program after issuing a receive operation.  

Message Destinations

Message destination is a local port within the computer, specified as an integer. A port can have only one receiver and many senders.

Reliability

Reliable communication can be defined in terms of validity and integrity. For validity, point-to-point message service is defined as reliable if the messages are delivered securely without any drop or loss in packets.  For integrity, messages should arrive without any corruption and without duplication.

Ordering

The requirement of some applications is that the messages should be delivered in sender order only, if the messages are out of sender order then those messages should be considered as a failure by those applications. 

Advantages of IPC

  • Sharing information because many processes are willing to share the same piece of information.
  • Task can be divided into subtasks and can then run on a separate processor, and they can use IPC for exchanging information, this improves the execution of the program.
  • Maintaining and debugging of the is easier as the program is divided into multiple chunks of code each performing functions separately.
  • At the same time an individual user can perform multiple tasks. For example, at the same time user can listen to music, can do editing, and compiling in parallel.

Disadvantages of IPC

  • It is slower than direct function calls.
  • Because of IPC writing an OS information need writing some message passing APIs that must be taken into account.
  • Problems like synchronization and memory protection can occur which needs to be addressed.
  • The processes cannot write to the same memory location.

Example of IPC in Operating Systems

Suppose we have other processes on a system for example a text editor, a compiler and music player processes. While each of these processes work is isolated, it may be necessary that they interact and exchange something like a resource or information. IPC facilitates this communication through items such as pipes, message queues and shared memory.

For instance, the text editor and the compiler can share a message queue as one of its functions. For instance, the editor may be in a position to send messages to the compiler concerning the completion of specific tasks, and also be in a position to note receipt of such messages.

Conclusion

IPC is an important paradigm studied in today’s operating systems because of the need of processes to be able to communicate and/or be synchronized. An IPC can be achieved through message queues, pipes as well as shared memory that enables independent process to work together and independently without comprising on performance. In spite of the mentioned weaknesses, for instance, in such aspects as IPC is usually slower than the direct function calls, it is crucial for multitasking and parallel processing in a distributed system.


Next Article

Similar Reads

  翻译: