You are on page 1of 6

1.

InterProcess
Communication

Silberschatz, et al, Operating System Concepts Compiled by: Samuel Banning


1.2

 When processes execute concurrently in the


operating system, they do so independently or
cooperatively
 A process is independent if it cannot affect or be
affected by other processes executing in the system.
Implies they don’t share data with any other process.
 A process is cooperative if it can affect or be
affected by the other processes
executing in the system
Silberschatz, et al, Operating System Concepts Compiled by: Samuel Banning
1.3

Why Allow Interprocess Communication


What
Information could Computational Speed
these
Sharing women be
doing?
Computation
Speed Share pieces of information Breaking tasks into subtasks

Modularity
modularity
Convenience

Convenience

To enable modules share data


Multiple tasks at a go!
Silberschatz, et al, Operating System Concepts Compiled by: Samuel Banning
1.4

Interprocess Communication (IPC)


 Cooperating processes require an interprocess
communication (IPC) mechanism that will allow them to
exchange data and information.
 There are two fundamental models of interprocess
communication:
1. shared memory
2. message passing
 Both models are common in operating systems, and many
systems implement both.
Silberschatz, et al, Operating System Concepts Compiled by: Samuel Banning
1.5

Shared-Memory. . . .
 In the shared-memory model, a common
region of memory is shared by cooperating
processes.
 The processes exchange information by
reading and writing data to the shared
region.
 useful for exchanging smaller amounts of
data
 allows maximum speed and convenience of
communication.
 faster than message passing, as message
passing systems are typically implemented
using system calls and thus require the
more time-consuming task of kernel
intervention
Silberschatz, et al, Operating System Concepts Compiled by: Samuel Banning
1.6

Message passing . . . .

 In the message-passing
model, communication
takes place by means of
messages exchanged
between the cooperating
processes
 easier to implement than
shared memory for inter-
computer communication.
Silberschatz, et al, Operating System Concepts Compiled by: Samuel Banning

You might also like