OS2-Sharif University of Technology - Sem1-90-91; R. Jalili Communication Chapter 2.

Slides:



Advertisements
Similar presentations
1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
Advertisements

Chapter 4: Communication*
Remote Procedure Call (RPC)
Dr. Kalpakis CMSC621 Advanced Operating Systems Communication.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Last Class: RPCs and RMI
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
EECS122 - UCB 1 CS 194: Distributed Systems Remote Object Invocation, Message- Oriented Communications (Based on textbook slides) Computer Science Division.
1 Communication Inter-process Communication is the heart of a Distributed System Basic mechanisms are: RPC RMI MOM Streams.
Communication. Interprocess Communication The “heart” of every distributed system. Question: how do processes on different machines exchange information?
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
Persistent and Transient Objects Persistent objects continue to exist even if they aren’t in the address space of a server process Transient objects existence.
CS 582 / CMPE 481 Distributed Systems Communications (cont.)
Chapter 2  Communication 1 Communication Chapter 2.
Centralized Architectures
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
Communication in Distributed Systems –Part 2
Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)
Univ. of TehranDistributed Operating Systems1 Advanced Operating Systems University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
EEC-681/781 Distributed Computing Systems Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
EECS122 - UCB 1 CS 194: Distributed Systems Communication Protocols, RPC Computer Science Division Department of Electrical Engineering and Computer Sciences.
An adapted reference model for networked communication.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Communication Chapter 4
OS2-Sem 831, Rasool Jalili Communication Chapter 2.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W
1 Chapter 2. Communication. STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered Protocol But some other protocols.
Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Real-Time & MultiMedia Lab Communication Chapter 2.
Distributed Systems Principles and Paradigms Chapter 02 Communication 00 – 1.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Distributed (Operating) Systems -Communication in Distributed Systems- Fall 2011 Kocaeli University Computer Engineering Department.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Communication Chapter 2.
(a) Parameter passing in a local procedure call: the stack before the call (b) The stack while the called procedure is active. count =
Chapter 2 Applications and Layered Architectures Sockets.
3.1 Silberschatz, Galvin and Gagne ©2009Operating System Concepts with Java – 8 th Edition Chapter 3: Processes.
Communication 1. Interprocess Communication The “heart” of every distributed system. Question: how do processes on different machines exchange information?
Distributed Systems Principles and Paradigms Chapter 02 Communication 00 – 1.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved RPC Tanenbaum.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
 Communication Distributed Systems IT332. Outline  Fundamentals  Layered network communication protocols  Types of communication  Remote Procedure.
1 Conventional Procedure Call read(fd,buf,nbytes) a)Parameter passing in a local procedure call: the stack before the call to read b)The stack while the.
Distributed (Operating) Systems -Communication in Distributed Systems- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet.
Remote Procedure Call RPC
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Communication Chapter 2.
OS2-Sem 831, Rasool Jalili Communication Chapter 2.
OS2-Sem 831, Rasool Jalili Communication Chapter 2.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
OS2-SUT– Sem ; R. Jalili Communication Chapter 2.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 2, 3: Communication 1/30/20161Distributed Systems - COMP 655.
RPC Model, Stubs and Skeletons Divya Nampalli
1 Chapter 2. Communication. STEMPusan National University STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Communication Chapter 2. Layered Protocols (1) Layers, interfaces, and protocols in the OSI model. 2-1.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Prof. Leonardo Mostarda University of Camerino
Last Class: RPCs and RMI
Remote Procedure Call present by :Enas Alkhoshi
CMSC621: Advanced Operating Systems Advanced Operating Systems
Communication Chapter 2.
Outline Communication Primitives - continued Theoretical Foundations
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Last Class: Communication in Distributed Systems
Presentation transcript:

OS2-Sharif University of Technology - Sem ; R. Jalili Communication Chapter 2

OS2-Sharif University of Technology - Sem ; R. Jalili IPC Inter-Process Communication is the heart of all DSs. Processes on different machines. Always based on low-level message passing. In this chapter: –RPC –RMI –MOM (Message Oriented MiddleWare) –Streams (due to the advent of Multimedia DSs)

OS2-Sharif University of Technology - Sem ; R. Jalili Layered Protocols (1) Layers, interfaces, and protocols in the OSI model. 2-1

OS2-Sharif University of Technology - Sem ; R. Jalili Layered Protocols Protocol –Connection Oriented –Connectionless Protocol Stack Description of the layers, Unit of exchange.

OS2-Sharif University of Technology - Sem ; R. Jalili Layered Protocols (2) A typical message as it appears on the network. 2-2

OS2-Sharif University of Technology - Sem ; R. Jalili Data Link Layer Discussion between a receiver and a sender in the data link layer. 2-3

OS2-Sharif University of Technology - Sem ; R. Jalili Transport Protocols Makes the underlying layers usable by the application layer. Provide a reliable or unreliable connection for the upper layer. UDP :: TCP RTP for real-time systems.

OS2-Sharif University of Technology - Sem ; R. Jalili Client-Server TCP a)Normal operation of TCP. b)Transactional TCP. 2-4

OS2-Sharif University of Technology - Sem ; R. Jalili Middleware Protocols An adapted reference model for networked communication. 2-5

OS2-Sharif University of Technology - Sem ; R. Jalili RPC PC? R…………….PC? Simple idea Complexity in provision

OS2-Sharif University of Technology - Sem ; R. Jalili Conventional Procedure Call a)Parameter passing in a local procedure call: the stack before the call to read Count = read (fd, buf, nbytes); b)The stack while the called procedure is active

OS2-Sharif University of Technology - Sem ; R. Jalili Issues Calling Method? –Call by value –Call by reference –Call by Copy/Restore –Call by name

OS2-Sharif University of Technology - Sem ; R. Jalili Client and Server Stubs Principle of RPC between a client and server program. The read stub is called on behalf of the real read procedure!

OS2-Sharif University of Technology - Sem ; R. Jalili Steps of a Remote Procedure Call 1.Client procedure calls client stub in normal way 2.Client stub builds message, calls local OS 3.Client's OS sends message to remote OS 4.Remote OS gives message to server stub 5.Server stub unpacks parameters, calls server 6.Server does work, returns result to the stub 7.Server stub packs it in message, calls local OS 8.Server's OS sends message to client's OS 9.Client's OS gives message to client stub 10.Stub unpacks result, returns to client

OS2-Sharif University of Technology - Sem ; R. Jalili Passing Value Parameters (1) Steps involved in doing remote computation through RPC It works fine, while the scenario is simple and straightforward; but …. 2-8

OS2-Sharif University of Technology - Sem ; R. Jalili Passing Value Parameters (2) Different character set standards (ASCII vs EBCDIC) Little-Endian vs Big-Endian Architecture. a)Original message on the Pentium (L. E.) b)The message after receipt on the SPARC (B. E.) c)The message after being inverted. The little numbers in boxes indicate the address of each byte

OS2-Sharif University of Technology - Sem ; R. Jalili Call by Reference Parameter Passing ???

OS2-Sharif University of Technology - Sem ; R. Jalili Parameter Specification and Stub Generation Both sides should agree on the content of passing data structures. Example in the next slide. The way a message including the parameters is interpreted is the main issue!! Client and server should agree on the representation of simple data structures. Agreement on the actual exchange of the messages (connection-oriented or connection-less)

OS2-Sharif University of Technology - Sem ; R. Jalili Parameter Specification and Stub Generation a)A procedure b)The corresponding message. c)Interface Definition Language  compiling into client stub and server stub

OS2-Sharif University of Technology - Sem ; R. Jalili Extended RPC Models RPC becoming as de facto standard for comm. in DSs. Popularity due to simplicity. Two extensions –Doors –Async RPC.

OS2-Sharif University of Technology - Sem ; R. Jalili Doors Equivalent to RPC for processes located on the same machine. A door is a name for a procedure in the address space of a server process, called by colocated processes within the server. Idea was originally from the Spirit OS (1994) Same as LightWeight RPC. The server process must register a door before use (calling door-create)

OS2-Sharif University of Technology - Sem ; R. Jalili Doors The principle of using doors as IPC mechanism.

OS2-Sharif University of Technology - Sem ; R. Jalili Asynchronous RPC (1) a)The interconnection between client and server in a traditional RPC b)The interaction using asynchronous RPC 2-12

OS2-Sharif University of Technology - Sem ; R. Jalili Asynchronous RPC (2) A client and server interacting through two asynchronous RPCs 2-13

OS2-Sharif University of Technology - Sem ; R. Jalili Writing a Client and a Server The steps in writing a client and a server in DCE RPC. 2-14

OS2-Sharif University of Technology - Sem ; R. Jalili Binding a Client to a Server Client-to-server binding in DCE. 2-15

OS2-Sharif University of Technology - Sem ; R. Jalili Performing an RPC The whole scenario! Semantics –At-most-once operation Idempotency

OS2-Sharif University of Technology - Sem ; R. Jalili Remote Object Invocation OO technology in centralized systems. Promoting the idea of RPC to the OO technology. Proxy as the client delegate == Client stub. Skeleton == server stub The object state is normally not distributed  remote object instead of distributed object

OS2-Sharif University of Technology - Sem ; R. Jalili Distributed Objects Common organization of a remote object with client-side proxy. 2-16

OS2-Sharif University of Technology - Sem ; R. Jalili Message-Oriented Communication Sometimes both RPC and RMI is not appropriate Synchronous nature of RPC and RMI!  Messaging.

OS2-Sharif University of Technology - Sem ; R. Jalili Berkeley Sockets (2) Connection-oriented communication pattern using sockets.

OS2-Sharif University of Technology - Sem ; R. Jalili The Message-Passing Interface (MPI) Some of the most intuitive message-passing primitives of MPI. PrimitiveMeaning MPI_bsendAppend outgoing message to a local send buffer MPI_sendSend a message and wait until copied to local or remote buffer MPI_ssendSend a message and wait until receipt starts MPI_sendrecvSend a message and wait for reply MPI_isendPass reference to outgoing message, and continue MPI_issendPass reference to outgoing message, and wait until receipt starts MPI_recvReceive a message; block if there are none MPI_irecvCheck if there is an incoming message, but do not block

OS2-Sharif University of Technology - Sem ; R. Jalili Stream-Oriented Communication Till now, focus was on exchanging one or more independent and complete units of info. However, consider an audio stream, CD quality is also required  the original sound has been sampled at Hz  a sample in each 1/44100 Sec is required to re-produce the original sound. Time-dependent and continuous media is required :: Temporal relationship between data items are crucial.

OS2-Sharif University of Technology - Sem ; R. Jalili Data Stream (1) Setting up a stream between two processes across a network. Data stream is a sequence of data units.

OS2-Sharif University of Technology - Sem ; R. Jalili Transmission Modes Async Trans Mode: Sending regardless of time Synch Trans Mode: There is a max end-to-end delay for each unit: Sensor info! Isochronous Trans Mode: Data units should be transferred on time:: A max and min end-to-end delay (bounded jitter).

OS2-Sharif University of Technology - Sem ; R. Jalili Data Stream (2) Setting up a stream directly between two devices

OS2-Sharif University of Technology - Sem ; R. Jalili Data Stream (3) An example of multicasting a stream to several receivers.

OS2-Sharif University of Technology - Sem ; R. Jalili QoS Time-Dependent requirement:: QoS Next slide as a sample QoS specification Formulation based on the token bucket algorithm Basic idea is that tokens are generated at a constant rate. Token is a fixed # of bytes, an application is allowed to pass to the network.

OS2-Sharif University of Technology - Sem ; R. Jalili Specifying QoS (2) The principle of a token bucket algorithm.

OS2-Sharif University of Technology - Sem ; R. Jalili Setting Up a Stream The basic organization of RSVP (Resource reSerVation Protocol) for resource reservation in a distributed system.

OS2-Sharif University of Technology - Sem ; R. Jalili Synchronization Mechanisms (1) The principle of explicit synchronization on the level data units.

OS2-Sharif University of Technology - Sem ; R. Jalili Synchronization Mechanisms (2) The principle of synchronization as supported by high-level interfaces. 2-41

End of Chapter 2 OS2-Sharif University of Technology - Sem ; R. Jalili