Message Passing

Message Passing is a way for processes to communicate and synchronize by sending and receiving messages. It works well in distributed systems and multiprocessors.

Key Points:

The receiver cannot receive a message until it has been sent by another process.

Synchronization

Types of Message Passing:

  1. Blocking: The sender or receiver waits until the message is sent/received.
  2. Nonblocking: The sender or receiver continues without waiting.

Common Combinations:

  1. Blocking send, blocking receive: Both wait (tight synchronization).
  2. Nonblocking send, blocking receive: Sender continues, receiver waits.
  3. Nonblocking send, nonblocking receive: Both continue without waiting.

Addressing: