360 likes | 593 Views
Advanced Operating Systems. Lecture 9: Communication in distributed Systems. University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani. Communication in Distributed systems. Goal: To study different form of communication among process in DS. References
E N D
Advanced Operating Systems Lecture 9: Communication in distributed Systems University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Distributed Operating Systems
Communication in Distributed systems • Goal: To study different form of communication among process in DS. • References • Chapter 2 of the text book Distributed Operating Systems
Outline • Introduction • Type of communications • Remote Object/Method Invocation (RMI) • Message passing • Stream base communication • Quality of Service in communication in DS. Distributed Operating Systems
Communication Models • Communication of processes in distributed system environment. • Communication is being done on the higher levels. • Remote procedure call (RPC) • Remote Object Invocation. • Message passing queues • Support for continuous media or stream Distributed Operating Systems
Distributed Objects • Common organization of a remote object with client-side proxy. 2-16 Distributed Operating Systems
Binding a Client to an Object • An example with implicit binding using only global references • An example with explicit binding using global and local references Distr_object* obj_ref; //Declare a systemwide object referenceobj_ref = …; // Initialize the reference to a distributed objectobj_ref-> do_something(); // Implicitly bind and invoke a method (a) Distr_object objPref; //Declare a systemwide object referenceLocal_object* obj_ptr; //Declare a pointer to local objectsobj_ref = …; //Initialize the reference to a distributed objectobj_ptr = bind(obj_ref); //Explicitly bind and obtain a pointer to the local proxyobj_ptr -> do_something(); //Invoke a method on the local proxy (b) Distributed Operating Systems
Remote Method Invocation (RMI) • To have a Location server for binding to keep track of the machine where an object’s server is currently running. • Static RMI: specify interface in an IDL or like JAVA to handle stub, proxy, generation • Dynamic invocation: At runtime Distributed Operating Systems
Parameter Passing • The situation when passing an object by reference or by value. 2-18 Distributed Operating Systems
DCE Distributed-Object Model • Distributed dynamic objects in DCE. • Distributed named objects 2-19 Distributed Operating Systems
Java RMI • Distributed objects have been integrated into the language • Aim: high degree of transparency, but not always, in case inefficiency or implementation. • Object cloning: local or remote? In remote cloning, proxies are not cloned. • Objects are constructed as monitors: distributed synchronization is complex. • Solution: block at the server Distributed Operating Systems
Message Passing • Basic communication primitives: • Send message. • Receive message. • Modes of communication: • Synchronous versus asynchronous. • Semantics: • Reliable versus unreliable. Sending Q ... Send Receiving Q Receive ... Distributed Operating Systems
Persistence and Synchronicity in Communication (1) • General organization of a communication system in which hosts are connected through a network 2-20 Distributed Operating Systems
Persistence and Synchronicity in Communication (2) • Persistent communication of letters back in the days of the Pony Express. • The message is stored in the network until delivered. Distributed Operating Systems
Persistence and Synchronicity in Communication (3) • Persistent asynchronous communication • Persistent synchronous communication 2-22.1 Distributed Operating Systems
Persistence and Synchronicity in Communication (4) • Transient asynchronous communication • Receipt-based transient synchronous communication 2-22.2 Distributed Operating Systems
Persistence and Synchronicity in Communication (5) • Delivery-based transient synchronous communication at message delivery • Response-based transient synchronous communication Distributed Operating Systems
Berkeley Sockets (1) • Socket primitives for TCP/IP. Distributed Operating Systems
Berkeley Sockets (2) • Connection-oriented communication pattern using sockets. Distributed Operating Systems
The Message-Passing Interface (MPI) • Some of the most intuitive message-passing primitives of MPI. Distributed Operating Systems
Message-Queuing Model (1) • Four combinations for loosely-coupled communications using queues. 2-26 Distributed Operating Systems
Message-Queuing Model (2) • Basic interface to a queue in a message-queuing system. Distributed Operating Systems
General Architecture of a Message-Queuing System (1) • The relationship between queue-level addressing and network-level addressing. Distributed Operating Systems
General Architecture of a Message-Queuing System (2) • The general organization of a message-queuing system with routers. 2-29 Distributed Operating Systems
Message Brokers • An application level gateway in a message-queuing system to convert message format. 2-30 Distributed Operating Systems
Example: IBM MQSeries • MCA- Message Channel Agent. 2-31 Distributed Operating Systems
Channels • Message channel is associated with exactly one send queue. • Transfer along channel is possible if two end point agents are up and running. Distributed Operating Systems
Message Transfer (1) • The general organization of an MQSeries queuing network using routing tables and aliases. Distributed Operating Systems
Message Transfer (2) • Primitives available in an IBM MQSeries MQI Distributed Operating Systems
Data Stream (1) • Setting up a stream between two processes across a network. Distributed Operating Systems
Data Stream (2) • Setting up a stream directly between two devices. 2-35.2 Distributed Operating Systems
Data Stream (3) • An example of multicasting a stream to several receivers. Distributed Operating Systems
Specifying QoS (1) • A flow specification. Distributed Operating Systems
Specifying QoS (2) • The principle of a token bucket algorithm. Distributed Operating Systems
Setting Up a Stream • The basic organization of RSVP for resource reservation in a distributed system. Distributed Operating Systems
Synchronization Mechanisms (1) • An interface to control streams and devices. . Distributed Operating Systems
Synchronization Mechanisms (2) • Higher level synchronization 2-41 Distributed Operating Systems