0% found this document useful (0 votes)
5 views

Distributed Computing practice questions Chapter 4 pt2

The document contains practice questions related to distributed computing, including multiple choice, essay, and fill-in-the-blank formats. It covers topics such as application-level multicast, gossip-based data dissemination, message-oriented middleware, and reliable communication in distributed systems. Answers and explanations for the questions are also provided, highlighting key concepts and challenges in the field.

Uploaded by

Yousef Fayez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Distributed Computing practice questions Chapter 4 pt2

The document contains practice questions related to distributed computing, including multiple choice, essay, and fill-in-the-blank formats. It covers topics such as application-level multicast, gossip-based data dissemination, message-oriented middleware, and reliable communication in distributed systems. Answers and explanations for the questions are also provided, highlighting key concepts and challenges in the field.

Uploaded by

Yousef Fayez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Distributed Computing practice questions (AI generated)

Multiple Choice Questions (Continued)

6. Which of the following is NOT a type of Application-level multicast (ALM) topology?

o (a) Tree

o (b) Mesh

o (c) Ring

o (d) Hybrid

7. In gossip-based data dissemination, what is the primary mechanism used to spread


updates?

o (a) Flooding

o (b) Unicasting

o (c) Broadcasting

o (d) Peer-to-peer exchange

8. Which MPI operation allows a process to send a message and continue without
waiting for it to be copied to a buffer?

o (a) MPI_BSEND

o (b) MPI_SEND

o (c) MPI_ISEND

o (d) MPI_IRECV

9. In the Advanced Message Queuing Protocol (AMQP), what is the equivalent of a


socket?

o (a) Connection

o (b) Channel

o (c) Link

o (d) Session

10. What is the purpose of a death certificate in gossip-based data dissemination?

o (a) To mark a node as inactive.

o (b) To register the removal of a value.

o (c) To initiate a new round of updates.

o (d) To prevent duplicate updates.


Essay Questions (Continued)

6. Discuss the different types of message-oriented communication middleware,


including message queuing systems and message brokers, and explain their roles
in facilitating persistent asynchronous communication.

7. Explain the concept of multicast communication and describe its applications in


distributed systems, highlighting the differences between application-level and
network-level multicasting.

8. Discuss the challenges in achieving fault tolerance in distributed systems and


explain how message-oriented middleware can contribute to fault-tolerant
communication.

9. Compare and contrast the different variations of remote procedure calls (RPCs),
such as asynchronous RPCs, one-way RPCs, and batched RPCs, discussing their
advantages and use cases.

10. Describe the role of epidemic protocols, such as anti-entropy and rumor spreading,
in achieving eventual consistency in distributed systems.

Fill in the Blanks (Continued)

6. The Berkeley _____________ interface provides a standard way for processes to


communicate over a network using transient messaging.

7. In ZeroMQ, the _____________ pattern is suitable for scenarios where a client sends a
request and expects a single reply from a server.

8. _________________ is a message-oriented middleware that supports persistent


asynchronous communication through queues.

9. In AMQP, a _____________ is a one-way communication path within a connection.

10. The _____________ metric in application-level multicasting measures how often a


message crosses the same physical link.
Answers:

6. (c) Ring

7. (d) Peer-to-peer exchange

8. (c) MPI_ISEND

9. (c) Link

10. (b) To register the removal of a value.

Essay Questions (Continued)

6. Message-oriented communication middleware facilitates persistent asynchronous


communication by providing a reliable and scalable way for applications to
exchange messages. There are two main types:

o Message Queuing Systems (MQS): These systems use queues to store


messages persistently. Applications send messages to queues, and
receivers retrieve them from queues. This allows for decoupling between
sender and receiver, as they don't need to be online simultaneously.
Examples include IBM MQ, RabbitMQ, and Apache ActiveMQ.

o Message Brokers: These provide additional features on top of message


queuing, such as message transformation, routing based on content, and
protocol bridging. They can handle heterogeneity between applications and
offer more advanced messaging patterns like publish-subscribe. Examples
include Apache Kafka and ActiveMQ Artemis.

7. Multicast communication is a one-to-many communication paradigm where a


single sender transmits a message to multiple receivers simultaneously. It is useful
in scenarios like video conferencing, stock tickers, and software updates.

o Application-level Multicasting (ALM): This is implemented at the application


layer, where nodes in a distributed system form an overlay network to
disseminate data. It offers flexibility and control but can be less efficient
than network-level multicasting.

o Network-level Multicasting: This is supported directly by the network


infrastructure, using specialized protocols like IGMP. It is more efficient but
may not be available in all networks and offers less control to applications.

8. Fault tolerance is the ability of a distributed system to continue functioning even


when some components fail. Challenges include:

o Network failures: Messages may be lost or delayed.

o Node failures: Servers or clients may crash.

o Data inconsistencies: Replicas may diverge.

Message-oriented middleware can help by:


o Persistent storage: Queues ensure messages are not lost due to temporary
failures.

o Guaranteed delivery: Middleware can retry message delivery until it


succeeds.

o Load balancing: Distributing messages across multiple servers prevents


overload.

9. Remote Procedure Calls (RPCs) are a mechanism for invoking procedures on


remote servers. Variations include:

o Asynchronous RPCs: The client doesn't block waiting for a response,


improving responsiveness.

o One-way RPCs: The client sends a request without expecting a reply,


suitable for notifications.

o Batched RPCs: Multiple requests are sent together, reducing network


overhead.

10. Epidemic protocols are used to achieve eventual consistency in distributed


systems, where all replicas eventually converge to the same state.

o Anti-entropy: Nodes periodically exchange state differences with random


peers, gradually resolving inconsistencies.

o Rumor spreading: Nodes that receive updates propagate them to a few


random peers, spreading information like rumors.

Fill in the Blanks (Continued)

6. Socket

7. Request-reply

8. Message-oriented middleware

9. Channel

10. Link stress

Essay (Continued)

6. Challenges of Reliable Client-Server Communication and RPC Semantics:

Reliable client-server communication faces several challenges due to the distributed


nature of the system and the potential for various failures. These challenges include:

• Message Loss: Network issues can lead to the loss of request or reply messages.

• Server Crashes: The server might crash after receiving a request but before sending
a reply.
• Client Crashes: The client might crash after sending a request, leaving the server
performing unnecessary work.

• Network Latency and Partitions: Delays or disruptions in the network can cause
timeouts and inconsistencies.

To address these challenges, different RPC semantics are employed:

• At-least-once semantics: Guarantees that the server executes the requested


operation at least once. This ensures that the operation is not lost due to message
loss or server crashes. However, it might lead to the operation being performed
multiple times if the original reply was lost, which can be problematic for non-
idempotent operations.

• At-most-once semantics: Guarantees that the server executes the requested


operation at most once. This prevents duplicate executions in case of message loss
or server crashes. However, it might lead to the operation not being performed at all
if the request or reply is lost, which can be an issue for critical operations.

The choice between these semantics depends on the specific requirements of the
application. At-least-once semantics is suitable when it's crucial for the operation to be
executed, even if it risks duplication. At-most-once semantics is preferred when duplicate
executions must be avoided, even if it means the operation might not be performed in case
of failures.

7. Orphan Computations and Solutions:

Orphan computations occur in client-server communication when a client crashes after


sending a request, and the server continues processing the request even though the client
is no longer available to receive the reply. This wastes server resources and can lead to
inconsistencies.

Several solutions exist to handle orphan computations:

• Client-Based Orphan Killing: Upon recovery, the client identifies and explicitly
terminates any orphan computations it initiated before crashing.

• Epoch Numbers: The client includes an epoch number in its requests. Upon
recovery, it broadcasts a new epoch number, signaling the server to terminate any
computations associated with previous epochs.

• Expiration Timers: The server sets a time limit for each computation. If the
computation doesn't complete within the limit, it's assumed to be an orphan and is
terminated.

Each solution has its trade-offs:

• Client-based killing requires the client to track its outstanding requests, adding
complexity.

• Epoch numbers introduce additional communication overhead.


• Expiration timers might prematurely terminate long-running but valid
computations.

The choice of solution depends on the specific requirements of the system, balancing the
need for orphan handling with the associated overhead and potential for premature
termination.

8. Reliable Group Communication:

Reliable group communication ensures that a message sent to a group of processes is


delivered to all non-faulty members of the group. It's crucial for maintaining consistency
and coordination in distributed systems.

Key concepts in reliable group communication include:

• Receiving vs. Delivering: A process receives a message when it arrives from the
network. However, the message is only delivered to the application after certain
guarantees are met, such as ensuring all other group members have also received
it.

• Atomicity: Either all non-faulty processes deliver the message, or none do. This
prevents inconsistencies where some processes act on the message while others
don't.

• Ordered Delivery: Messages are delivered in the same order to all processes,
preserving the intended sequence of events.

Reliable group communication protocols often use techniques like acknowledgments,


retransmissions, and consensus algorithms to achieve these guarantees. They are
essential for building fault-tolerant distributed applications that require coordination and
agreement among multiple processes.

You might also like