Sunday, 20 May 2018

What is Interprocess Communication (IPC) in Operating System

What is Interprocess Communication (IPC) in Operating System:

¡IPC is a mechanism by which two or more process communicate with each other through message passing mechanism without using shared addressed space.
¡“IPC means how two process are communicate to each other”.
¡IPC can be perform by 2 method.

 1-Sharing of Data (Memory):
¡Two are more processes share their data with each other by which IPC is enable.
¡The disadvantage of this mechanism is that your data is shared among all the user.

2-Message Passing Mechanism :

¡Message passing send the message to the recipient and recipient receive the message from the source.

What is Message passing communication:

¡There are two type of message passing communication are used.
1-Direct Communication
2-Indirect Communication

1-Direct communication:

¡Sometime is called “Symmetric Naming Convention”.
¡In Direct communication sender and receiver both knows the identity (ID) of each other.

Direct communication use two type of naming convention.
i-Asymmetric Naming Convention
¡Both sender & receiver ID’s are known.

¡Send(recipient ID, Message); //Sender end
¡Receiver (source ID, message); //Receiver end

ii-Symmetric Naming Convention
¡Sender knows the ID of recipient but receiver only receive the message without knowing sender ID.

¡Send (recipient ID, message);   //sender end
¡Receiver( ,Message);   // receiver end

2- Indirect communication:

¡In this communication we doesn’t know the identity of receiver and sender. Receiver receive the message from that mail box. The system calls are as following.
¡Mailbox own by the receiver.

Synchronous & asynchronous message passing:
¡It is based on blocking & non blocking method.
¡Blocking refers synchronous message passing and non blocking refers asynchronous message passing .
¡There are four type of message passing.
Blocking Send: sender process is block until the receiver receive the message.
 2 Non-Blocking Send: sender process continuously send the message without looking whether receiver receive the message or not.
 3 Blocking Receive: receiver process is block till sender process send the message.
 4 Non blocking receive: receiver continuously receive the message without any restriction.

Buffering in IPC:
¡Buffering is a storage facility which are work in between communication between two or more devices.
¡In IPC messages are not directly transfer to the receiver, it transfer through buffer mechanism.
¡ There are three types of buffering techniques.
1-Zero capacity buffering:
2-Bounded buffer:
3-Unbounded buffer:

Buffering Techniques:
¡1. Zero capacity: There is no memory used take and deliver the message file that sending process is block.
¡These type of buffering has buffer size=0
2. Bounded Buffer: These type of buffer have finite length.
3. Unbounded Buffer: These type of buffer have infinite length

No comments:

Post a comment

Popular Posts