DOC PREVIEW
U of I CS 241 - Interprocess Communication (VII)

This preview shows page 1-2-14-15-30-31 out of 31 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS241 System Programming Interprocess Communication (VII)ContentsAdministrativeInterprocess Communication Paradigms within a Single MachineConnection-Oriented Communication Paradigm for Client-Server InteractionConnection-Oriented Communication Paradigm between two Remote MachinesConnection-less Communication Paradigm between Two Different MachinesConnection-less Communication Paradigms between Two Different MachinesRemote Procedure Call (1)Remote Procedure Call (2)Remote Procedure Call (3)More RPC (4)RPC Semantics (5)Application of RPCApplication of RPC (Distributed File System)Performance Issues when Exchanging Messages between Clients and ServersSynchronous or AsynchronousLossNamingOther Performance IssuesNetwork Model - Topology: criteriaFully ConnectedHierarchicalStar-Connected NetworkBus-Connected NetworkRing-Connected NetworkRoutingContention - Collision DetectContention - Token PassingContention - Message SlotsSummaryCS241 System Programming Interprocess Communication (VII)Klara NahrstedtLecture 404/28/2006ContentsCommunication Paradigms – Putting it TogetherRemote Procedure CallPerformance Issues – Things to be aware offAdministrativeRead R&R Chapter 19,20MP5 is on – deadline May 1 (Monday), 4pmConflict Exam – Check the newsgroup posting Homework 2 – posted April 24 – deadline May 3, midnightQuiz 12 – May 3  OPTIONAL !!! –Cover Synchronization–Cover File Systems–Cover Memory Management There is more than 1 metaserver running for mp5, all the students appear to be using just one of them, check the status page, and spread out a little better; similarly, if need be, more servers will be running over the weekendInterprocess Communication Paradigms within a Single MachinePipes–Pipe command creates a communication butter that two processes (Parent and Child) can use to access via fildes[0] to read from and fildes[1] to write to. Shared memory–Shmid – shared memory segment is attached to the calling process –Shmget, Shmat assist in creating the shared memory segment and attaching it to the calling process–Read/write assist in communicating via shared memoryMessage Queues–Msqid – major data structure for message queue is needed–Msgget, msgsnd, msgrsv assist in creating the message queue and communicating via message queueConnection-Oriented Communication Paradigm for Client-Server Interaction TCPTCPNetworkProgramLogic for Server ProcessProgramLogic forClientProcessConnection-Oriented Communication Paradigm between two Remote MachinesConnection is established–Setup the socket structure–Bind the process and socket to a specific port on each side–Use the socket structure and port throughout the whole session until the connection is closedTCP Protocol ensures that the connection is reliable, packets arrive in order, and connection is on throughout the whole session In this paradigm we don’t need connection-related control operations (e.g., acknowledgement, reply messages) since TCP executes them and controls the data stream.Connection-less Communication Paradigm between Two Different Machinesu_openudp(p)u_openudp(p)u_sendtohost()closeu_recvfrom()UICI UDP ServerUICI UDP Clientcreate UDP endpointbound to port pCreate unbound UDP endpointWait for request send requestprocess requestresume waitingclose endpointrequest messageu_sendto()send responsereply messageu_recvfrom()wait for responseUDPUDP ProtocolNetworkProgramLogicFor ServerProcessProgram LogicFor ClientProcessConnection-less Communication Paradigms between Two Different MachinesNo connection setupDatagram messages are being exchangedSince no connection exists, each message must have in its send/recv message the source and destination information. Underlying UDP protocol provides only a forwarding mechanism, nothing elseIf the application processes want more reliability, but want to run on top of the UDP protocol, they must provide this capability themselves via ‘request-reply’ protocol or ‘request-reply-acknowledgement’ protocolsRemote Procedure Call (1)Steps in making a remote procedure call–the stubs are shaded grayRemote Procedure Call (2)Implementation IssuesCannot pass pointers–call by reference becomes copy-restore (but might fail)Weakly typed languages–client stub cannot determine sizeNot always possible to determine parameter typesCannot use global variables–may get moved to remote machineRemote Procedure Call (3)Parameters of RPC are marshaled into message in the RPC client processMessage sent and local RPC process waitsRemote machine receives RPC message, spawns remote process that will execute the remote computation on behave of the user clientRemote process assumes same protection domain as local processMore RPC (4)Remote process assembles parameters and makes procedure callRemote process marshals return parameters into messageMessage sent and remote process diesLocal process resumes and unpacks resultRPC Semantics (5)at most onceat least onceonceidempotentApplication of RPCTCPNetworkTCPDiskDisplayThin Client Machine Server MachineRPC ClientProcessRPC ServerProcessUser I/OProcessIPC12345910111213678Client Stub Server StubApplication of RPC (Distributed File System)Transfer Models(a) upload/download model(b) remote access model(a)(b)Performance Issues when Exchanging Messages between Clients and ServersSynchronous or asynchronousLoss, Timeouts, Acknowledgments, Sequence numbersCongestionSynchronous or AsynchronousSynchronous–Process waits for message – Rendezvous–Process waits for message to be receivedAsynchronous–Pool of messages with query mechanism to retrieve a message–Processes send messages without delay–Processes receive messages from poolLossTimeouts–Try again after some time limit–Heart Beat or Keep AliveAcknowledgments–Reply after message–Lost acknowledgementsSequence numbers–Losses become knownNamingAuthentication–Who is the message from?–Who gets the message?Ports–Send to a Port ID – any server process can receive. Process IDs – only one process receivesOther Performance IssuesHow many times is a message copied before its delivered?Loss of cache by receiving messageWait time for synchronous/asynchronous messagesSearch time for asynchronous messagesHow do network functions impact message passing/exchange–Network Model –


View Full Document

U of I CS 241 - Interprocess Communication (VII)

Documents in this Course
Process

Process

28 pages

Files

Files

37 pages

File I/O

File I/O

52 pages

C Basics

C Basics

69 pages

Memory

Memory

23 pages

Threads

Threads

14 pages

Lecture

Lecture

55 pages

C Basics

C Basics

24 pages

Signals

Signals

27 pages

Memory

Memory

45 pages

Threads

Threads

47 pages

Threads

Threads

28 pages

LECTURE

LECTURE

45 pages

Threads

Threads

30 pages

Threads

Threads

55 pages

Files

Files

37 pages

SIGNALS

SIGNALS

22 pages

Files

Files

37 pages

Threads

Threads

14 pages

Threads

Threads

13 pages

Load more
Download Interprocess Communication (VII)
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Interprocess Communication (VII) and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Interprocess Communication (VII) 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?