Distributed Computing practice questions Chapter 4 pt2
Distributed Computing practice questions Chapter 4 pt2
o (a) Tree
o (b) Mesh
o (c) Ring
o (d) Hybrid
o (a) Flooding
o (b) Unicasting
o (c) Broadcasting
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
o (a) Connection
o (b) Channel
o (c) Link
o (d) Session
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.
7. In ZeroMQ, the _____________ pattern is suitable for scenarios where a client sends a
request and expects a single reply from a server.
6. (c) Ring
8. (c) MPI_ISEND
9. (c) Link
6. Socket
7. Request-reply
8. Message-oriented middleware
9. Channel
Essay (Continued)
• 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.
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.
• 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.
• Client-based killing requires the client to track its outstanding requests, adding
complexity.
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.
• 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.