Message Passing - Synchronous Versus Asynchronous Message Passing

Synchronous Versus Asynchronous Message Passing

Synchronous message passing systems require the sender and receiver to wait for each other to transfer the message. That is, the sender will not continue until the receiver has received the message.

Synchronous communication has two advantages. The first advantage is that reasoning about the program can be simplified in that there is a synchronisation point between sender and receiver on message transfer. The second advantage is that no buffering is required. The message can always be stored on the receiving side, because the sender will not continue until the receiver is ready.

Asynchronous message passing systems deliver a message from sender to receiver, without waiting for the receiver to be ready. The advantage of asynchronous communication is that the sender and receiver can overlap their computation because they do not wait for each other.

Synchronous communication can be built on top of asynchronous communication by using a so-called Synchronizer. For example, the α-Synchronizer works by ensuring that the sender always waits for an acknowledgement message from the receiver. The sender only sends the next message after the acknowledgement has been received.

The buffer required in asynchronous communication can cause problems when it is full. A decision has to be made whether to block the sender or whether to discard future messages. If the sender is blocked, it may lead to an unexpected deadlock. If messages are dropped, then communication is no longer reliable.

Read more about this topic:  Message Passing

Famous quotes containing the words message and/or passing:

    Never miss an opportunity to allow a child to do something she can and wants to on her own. Sometimes we’re in too much of a rush—and she might spill something, or do it wrong. But whenever possible she needs to learn, error by error, lesson by lesson, to do better. And the more she is able to learn by herself the more she gets the message that she’s a kid who can.
    Polly Berrien Berends (20th century)

    The little toy dog is covered with dust,
    But sturdy and stanch he stands;
    And the little toy soldier is red with rust,
    And the musket moulds in his hands.
    Time was when the little toy dog was new,
    And the soldier was passing fair;
    And that was the time when our Little Boy Blue
    Kissed them and put them there.
    Eugene Field (1850–1895)