{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ch4 - CHAPTER 4 INTERPROCESS COMMUNICATION AND COORDINATION...

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CHAPTER 4: INTERPROCESS COMMUNICATION AND COORDINATION Chapter outline • Discuss three levels of communication: basic message passing, request/reply and transaction communication based on message passing • Discuss name services for communication • Show examples of process coordination using message passing Basic message passing communication Communication primitives: send (destination, message) receive (source, message) channel naming = process name, link, mailbox, port • direct communication : symmetric/asymmetric process naming, link • indirect communication : many-to-many mailbox, many-to-one port 1 Message buffering and synchronization 7 source kernel sender destination kernel receiver network Service 8 message 4 request 3 1 2 ack 5 reply 6 1. Nonblocking send, 1+8 : Sender process is released after message has been composed and copied into sender’s kernel (local system call) 2. Blocking send, 1+2+7+8 : Sender process is released after message has been transmitted to the network 3. Reliable blocking send, 1+2+3+6+7+8 : Sender process is released after message has been received by the receiver’s kernel (kernel receives network ACK). 4. Explicit blocking send, 1+2+3+4+5+6+7+8 : Sender process is released after message has been received by the receiver process (kernel receives kernel delivery ACK) 5. Request and reply, 1-4, service, 5-8 : Sender process is released after message has been processed by the receiver and response returned to the sender 2 Message passing API • Pipe : A FIFO byte-stream unidirectional link for related processes • Message queue : A structured variable length message queue • Named Pipe : A special FIFO file pipe using path name for unrelated processes under the same domain (explicitly created and accessed) • Socket : A logical communication endpoint for communication between autonomous domains (bound to physical communication endpoint) 3 Connectionless socket communication sendto / recvfrom bind bind socket socket endpoint (PCE) physical communication endpoint (socket, LCE) logical communication peer process endpoint (socket, LCE) endpoint (PCE) peer processes physical communication logical communication • peer process : application-level process - application protocol • LCE : Logical Communication Endpoint - established with socket call • PCE : Physcial Communication Endpoint - (a.k.a. endpoint in network) (Transport TSAP/L4SAP, Network NSAP/L3SAP) pair bound to LCE with bind() call • Network : Accessed by sendto()/recvfrom() primitives 4 Connection-oriented socket communication Server Client rendezvous request reply socket socket bind listen connect accept read write read write 5 Asymmetric - Client and Server Server Starts first: • Server process : application-level process - server protocol • LCE : Logical Communication Endpoint - established with socket call • PCE : Physcial Communication Endpoint - (a.k.a. endpoint in network) (Transport TSAP/L4SAP, Network NSAP/L3SAP) pair bound to LCE...
View Full Document

{[ snackBarMessage ]}

Page1 / 29

ch4 - CHAPTER 4 INTERPROCESS COMMUNICATION AND COORDINATION...

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

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