CSC320_chapter9 - Inter Process Communication Original...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Inter Process Communication Original version created by: Dr. Mohamed El Bachir Menai Updated by: Dr. Safwan Qasem – Spring 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Introduction Traditionally describe mechanism for message passing between different processes that are running on some operating system.
Background image of page 2
IPC Mechanism for processes to communicate and to synchronize their actions. Message system – processes communicate with each other without resorting to shared variables. IPC facility provides two operations: send(message) – message size fixed (signals) or variable (sockets) receive(message) If P and Q wish to communicate, they need to: establish a communication link between them (connection oriented e.g. TCP/IP, pipe) exchange messages via send/receive (e.g. UDP/IP) Implementation of communication link physical (e.g., shared memory, hardware bus, network) logical (e.g., logical properties: FIFO, error free)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Direct Communication Processes must name each other explicitly: send (P, message) – send a message to process P receive(Q, message) – receive a message from process Q Properties of communication link Links are established automatically. A link is associated with exactly one pair of communicating processes. The link may be unidirectional (e.g. signaling), but is usually bi-directional (e.g. sockets).
Background image of page 4
Indirect Communication Messages are directed and received from mailboxes (also referred to as ports). Each mailbox has a unique id. (e.g. shared memory, shared file, message Q) Processes can communicate only if they share a mailbox. Properties of communication link A link may be associated with many processes. Each pair of processes may share several communication links. Link may be unidirectional or bi-directional.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Indirect Communication Operations create a new mailbox send and receive messages through mailbox destroy a mailbox Primitives are defined as: send (A, message) – send a message to mailbox A receive (A, message) – receive a message from mailbox A
Background image of page 6
Synchronization Message passing may be either blocking or non-blocking. Blocking is considered synchronous Non-blocking is considered asynchronous send and receive primitives may be either blocking or non-blocking. Buffering: Queue of messages attached to the link; implemented usually with bounded capacity. finite length of n messages. Sender must wait if link full.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Persistence Persistence: How long an IPC object of that type remains in existence. Process persistence IPC (socket) Kernel persistence IPC (message Q) File-System persistence IPC (shared file)
Background image of page 8
Examples Direct Communication
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Signals The source process can "raise" a signal and have it delivered to destination process. The destination process' signal handler is invoked and the process can handle it. A direct communication
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/28/2011 for the course COMPUTER S 320 taught by Professor Dr.safwanqasem during the Spring '11 term at King Saud University.

Page1 / 46

CSC320_chapter9 - Inter Process Communication Original...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online