The document discusses primitives for distributed communication. It describes message passing primitives like send and receive that allow processes to exchange data. The primitives can be blocking or non-blocking, and synchronous or asynchronous. Different combinations of these primitives, like blocking send with blocking receive, allow for varying levels of synchronization between processes. Common libraries for message passing include MPI and PVM. RPC, RMI, and CORBA are also discussed as approaches to remote procedure and method calls between distributed systems.
Download as PPTX, PDF, TXT or read online on Scribd
100%(2)100% found this document useful (2 votes)
427 views
Primitives For Distributed Communication
The document discusses primitives for distributed communication. It describes message passing primitives like send and receive that allow processes to exchange data. The primitives can be blocking or non-blocking, and synchronous or asynchronous. Different combinations of these primitives, like blocking send with blocking receive, allow for varying levels of synchronization between processes. Common libraries for message passing include MPI and PVM. RPC, RMI, and CORBA are also discussed as approaches to remote procedure and method calls between distributed systems.
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10
UNIT 1
Primitives for Distributed
Communication Primitives for Distributed Communication Blocking/Non-blocking,Synchronous/Asynchronous Primitives: • Message send communication primitives is denoted by Send() and receive communication primitives denoted by Receiver(). • Message passing primitive commands: SEND (msg, dest) RECEIVE (src, buffer) • A Send primitive has two parameters: the destination, and the buffer in the user space that holds the data to be sent. • The Receive primitive also has two parameters: the source from which the data is to be received and the user buffer into which the data is to be received. Primitives for Distributed Communication • Send primitives uses two options for sending data: Buffered and unbuffered. • In buffered options, user data is copied in the kernel buffer. • In unbuffered options, the data gets copied directly from the user buffer onto the network. • Receive primitive, the buffered option is usually required because the data may already have arrived when the primitive is invoked, and needs a storage place in the kernel. • The communication of a message between two processes implies some level of synchronization between the two processes. Sender and receiver can be blocking or nonblocking. Primitives for Distributed Communication • Three combinations are possible using • a. Blocking send, blocking receive. • b. Nonblocking send, blocking receive. • c. Nonblocking send, nonblocking receive
• 1. Blocking send, blocking receive: Both the sender
and receiver are blocked until the message is delivered. This is called Rendezvous. This combinations allows for tight synchronization between processes
• 2. Nonblocking send, blocking receive: Sender may
continue on, the receiver is blocked until the requested message arrives. Primitives for Distributed Communication • A process that must receive a message before it can do useful work needs to be blocked until such message arrives. • An example is a server process that exists to provide a service or resource to other processes.
process sends the message and resumes the operation. Receiver retrieves either a valid message or a null Le neither party is required to wait.• Processor synchrony:
• Processor synchrony indicates that all the processors
execute in lock step with their clocks synchronized.
• Since distributed systems do not follow a common clock,
this abstraction is implemented using some form of barrier synchronization to ensure that no processor Libraries and standards
There exists a wide range of primitives for message-
passing. The message-passing interface (MPI) library and the PVM (parallel virtual machine) library are used largely by the scientific community.
• Message Passing Interface (MPI): The primary goal of
the Message Passing Interface is to provide a widely used standard for writing message passing programs. • Parallel Virtual Machine (PVM): It is a software tool for parallel networking of computers. It is designed to allow a network of heterogeneous Unix and/or Windows machines to be used as a single distributed parallel processor. • Remote Procedure Call (RPC): The Remote Procedure Call (RPC) is a common model of request reply protocol. In RPC, the procedure need not exist in the same address space as the calling procedure. The two processes may be on the same system, or they may be on different systems with a network connecting them. • Remote Method Invocation (RMI): RMI (Remote Method Invocation) is a way that a programmer can write object-oriented programming in which objects on different computers can interact in a distributed network. It is a set of protocols being developed by Sun's Java Soft division that enables Java objects to communicate remotely with other Java objects. • Remote Procedure Call (RPC): RPC is a powerful technique for constructing distributed, client-server based applications. In RPC, the procedure need not exist in the same address space as the calling procedure. The two processes may be on the same system, or they may be on different systems with a network connecting them. By using RPC, programmers of distributed applications avoid the details of the interface with the network. RPC makes the client/server model of computing more powerful and easier to program. Differences between RMI and RPC
RMI RPC
RPC is not object oriented and does
RMI uses an object oriented paradigm not deal with objects. Rather, it calls where the user needs to know the specific subroutines that are already object and the method of the object he established needs to invoke.
RMI handles the complexities of
With RPC looks like a local call. RPC passing along the invocation from the handles the complexities involved local to the remote computer. But with passing the call from the local to the remote computer. instead of passing a procedural call, RMI passes a reference to the object and the method that is being called. The commonalities between RMI and RPC are as follows:
• They both support programming with interfaces.
• •
• Common Object Request Broker Architecture (CORBA):
CORBA describes a messaging mechanism by which objects distributed over a network can communicate with each other irrespective of the platform and language used to develop those objects. The data representation is concerned with an external representation for the structured and primitive types that can be passed as the arguments and results of remote method invocations in CORBA. It can be used by a variety of programming languages.