Distributed Systems - Communication Part 1

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Define the terms: frame, datagram, packet, protocol, and protocol suite.

A frame is a grouping of bits at the physical layer. A datagram is a basic transfer unit associated with a packet-switched network, and the name of the unit of communication for the Data link layer A packet is the name of the unit of communication for the Transport and Network layers. A protocol is a set of rules governing the format of messages that are exchanged between computers. A protocol suite is the collection of protocols used in a particular system.

*Compare and contrast asynchronous RPC and deferred asynchronous RPC.

Asynchronous RPC is a form of communication that occurs when a message is sent and the sender is not blocking while waiting on a reply and continues to work. With deferred asynchronous RPC, the client continues working while expecting a response from the server. Similar: In both methods, the client (sender) continues doing work. Different: With deferred asynchronous RPC, the sender expects a response from the server, whereas regular asynchronous RPC continues working with no such expectation.

Compare and contrast big endian and little endian.

Big-endian refers to the ordering of bytes in which the most significant byte is at a lower address and each subsequent byte is at a higher address in memory or in transmission over a digital link. Little-endian refers to the ordering of bytes in which the most significant byte is at a higher address and each subsequent byte is at a lower address in memory or in transmission over a digital link. Similar: They both describe byte ordering in memory or in communication. Difference: The only difference is the order, where one is the reverse of the other.

List and explain three forms of parameter passing.

Call by Value: In programming, new memory is allocated with a copy of an input value and the new memory reference is passed to the procedure. Call by Reference: In programming, only a reference to a location in memory is passed. This form often relies on data types. Call by copy/restore: In programming, parameters are passed as in Call by value but the value is copied back (restored) at the end of the call.

*Take a position on whether or not call-by-copy/restore is ideal for client server architectures in distributed computing. Defend your answer.

Call-by-copy/restore is ideal for client server architectures because it allows for the client to receive the updated value for a parameter after the method has completed with minimal traffic. This is preferred over call-by-value, in which the client wouldn't receive the returned values, and call-by-reference, where the server would have to communicate with the client's system directly to update the parameters passed.

Explain how communication using the OSI model is "layer-to-layer".

Communications are always divided into smaller, more manageable chunks. As these chunks traverse the OSI model, a new "layer" is applied by encapsulating the previous layer with a new "data structure." The peer will read and strip the data structures in order to read the unit of the communication. In this way, communication is layer to layer.

Compare and contrast persistent and transient communication.

In persistent communication, the message is stored in middleware for as long as it takes for the client to receive it. In transient communication, the message is stored in middleware for a brief time before being passed on or discarded. (only for only as long as sending and receiving applications are executing) Similar: They both pertain to storing messages in the communication system using middleware as an intermediate service in application-level communication. Different: In persistent communication, a message is stored by the middleware for as long as it takes to deliver it to the receiver, whereas in transient communication, messages are stored for only a brief time before being received or discarded.

Explain how RPC achieves transparency in procedure calls.

Instead of calling the procedure locally, the RPC achieves transparency by providing a shared library definition of the procedure in question, whereby the client packs the parameters into a message sent to the server for processing. As far as the local machine is concerned, it is unaware of whether the procedure is processed locally or remotely.

*Compare and contrast network protocol and application protocol.

Network protocol: The means of communication at the network layer from host to host using tcp or udp network layer data structures. Application protocol: The content of what is being communicated from application to application using messages or packets. Similar: Both protocols are involved with communicating data. Difference: Network protocol determines how the packets and bits are delivered, whereas application protocol communicates what is being done in the application.

List three (two?) methods by which RPC may handle passing parameters by reference.

One solution is to forbid pointers, however this approach breaks transparency. Another solution is to replace with a call by copy/restore, where only "output" parameters are returned.

Compare and contrast TCP and UDP.

Similar: TCP and UDP are both transportation protocols used in the communication between systems. Different: User programs that do not need a connection-oriented protocol normally use UDP. Also, TCP guarantees delivery of data and also guarantees that packets will be delivered in the same order in which they were sent, whereas UDP provides no such guarantees.

Compare and contrast asynchronous and synchronous communication.

Synchronous communication is communication in which the sender blocks immediately after it has submitted its message for transmission. (DOES NOT CONTINUE WORK) Asynchronous communication is communication in which the sender continues immediately after it has submitted its message for transmission. (CONTINUES DOING WORK) Similar: They both pertain to using middleware as an intermediate service in application-level communication. Different: In asynchronous communication, the sender continues work immediately after it has submitted its message for transmission, whereas in synchronous communication, the sender blocks work immediately after it has submitted its message for transmission.

Explain how a local procedure is called. Be sure to identify how parameters are passed within the program stack.

The caller pushes the parameters onto the stack in order, last one first. After the procedure has finished running, it puts the return value in a register, removes the return address, and transfers control back to the caller. The caller then removes the parameters from the stack, returning the stack to the original state as it was before the call.

Compare and contrast client stub and server stub.

The client stub is a substituted library procedure that transparently calls procedures on a remote system using RPC. The server Stub is a piece of code that transforms requests coming in over the network into local procedure calls Similar: They are both pieces of code used for converting parameters passed during a Remote Procedure Call (RPC). Different: The client stub is a substituted library procedure that transparently calls procedures on a remote system using RPC, whereas the server stub is a piece of code that transforms requests coming in over the network into local procedure calls.

List the seven layers of the OSI model and identify the name given to units of communication at each layer.

The layers of the OSI model (from layer 1 to layer 7) are the Physical layer, the Data link layer, the Network layer, the Transport layer, the Session layer, the Presentation layer, and the Application layer. For the Application, Presentation, and Session layers, the unit of communication is a message. For the Transport and Network layers, the unit of communication is a packet. For the Data link layer, the unit of communication is a datagram. For the Physical layer, the unit of communication is a frame.

List three models for communication in distributed systems. Provide an example of how each might be ideally used.

The three models for communication in distributed systems are Remote Procedure Call (RPC), Message-Oriented Middleware (MOM), and Data Streaming. A RPC might be ideally used for client-server applications, MOM might be ideally used for computer networks, and Data Streaming might be ideally used for continuous media or multimedia distributed systems.

List and define three models for communication in distributed systems.

The three models for communication in distributed systems are Remote Procedure Call (RPC), Message-Oriented Middleware (MOM), and data-streaming. A RPC aims at hiding most of the intricacies of message passing. MOM is a high-level message-queuing model, in which communication proceeds much the same as in electronic mail systems. Data-streaming is the notion of a stream that can support the continuous flow of messages, subject to various timing constraints.

List and explain three hazards of parameter marshaling.

Three hazards of parameter marshaling are text encoding, byte order, and integer size. With text encoding, problems can occur with different representations for numbers, characters, and other data items. With byte order, problems can occur with integers stored and interpreted using differing big endian or little endian formats. With integer size, problems can occur with the representation of integers (one's complement versus two's complement) and floating-point numbers.


Kaugnay na mga set ng pag-aaral

Pax Romana, Roman Judea, Jesus, Spread of early Christianity

View Set

MODULE 10 : TEAM SPORT(VOLLEYBALL)

View Set

ENGT Chapter 5 and 6 Study Guide

View Set

ch 13 spinal cord and spinal nerves

View Set

Quiz 2 Data Structure, Quiz 1 Data Structure

View Set