You are on page 1of 10

Interprocess

Communication
BY SYAHID
A PROCESS CAN BE INDEPENDENT
OR COOPERATING PROCESS
WHY WE NEED COOPERATING PROCESS ?

 Information Sharing
 Computation Speedup
 Modularity
 Convenience
WHY WE NEED COOPERATING PROCESS ?

 Information Sharing
 Computation Speedup
 Modularity
 Convenience
Cooperating Process need an Interprocess
Communication (IPC)
Model of IPC :-
a). Shared Memory b). Message Passing
SHARED MEMORY
Advantages Disadvantages

> More faster > Cache coherency issue

MESSAGE PASSING
Advantages Disadvantages

> Better performance > Using system call


> Easier to implement
Shared Memory (Implementation):
Producer – Consumer Problem

- A producer process produces information that is consumed by a


consumer process
- Two types of buffer can be used:
1). Unbounded buffer ( no limit )
2). Bounded buffer ( fixed size )
Message Passing System

 Allow processes to communicate and to synchronize their action


without sharing same address space
 Operation :
1. Send(message)
2. Receive(message)

 Establish a communication link between them


Example

 Implementation of communication link


 Physical:
 Shared memory
 Hardware bus
 Network
 Logical:
 Direct or indirect
 Synchronous or asynchronous
 Automatic or explicit buffering
Direct Communication

 Each process that wants to communicate must explicitly name the


recipient or sender of the communication
 This scheme exhibits symmetry and asymmetry in addressing
 ‘Causes limited modularity of the resulting process definitions

You might also like