Interprocess Communication and Synchronization
Interprocess Communication and Synchronization
Synchronization
Interprocess Communication
Processes within a system may be independent or cooperating
Cooperating process can affect or be affected by other processes,
including sharing data.
Reasons for cooperating processes:
Information sharing: when several users want to access the same
piece of information. They require concurrent access to these types
of resources.
Computation speedup: A task is broken down into various subtasks
so that each of them run in parallel.
Modularity: When a system to be created into modular fashion by
dividing it into small functional units.
Cooperating processes need interprocess communication (IPC)
Two models of IPC
Shared memory
Message passing
Messaging Passing Method
In this method, processes communicate with each other without using any
kind of shared memory. If two processes p1 and p2 want to communicate
with each other, they proceed as follow: