Open In App

Message Passing Model of Process Communication

Improve
Improve
Like Article
Like
Save
Share
Report

So message passing means how a message can be sent from one end to the other end. Either it may be a client-server model or it may be from one node to another node. The formal model for distributed message passing has two timing models one is synchronous and the other is asynchronous. 

The fundamental points of message passing are:

  1. In message-passing systems, processes communicate with one another by sending and receiving messages over a communication channel. So how the arrangement should be done?
  2. The pattern of the connection provided by the channel is described by some topology systems.
  3. The collection of the channels are called a network.
  4. So by the definition of distributed systems, we know that they are geographically set of computers. So it is not possible for one computer to directly connect with some other node.
  5. So all channels in the Message-Passing Model are private.
  6. The sender decides what data has to be sent over the network. An example is, making a phone call.
  7. The data is only fully communicated after the destination worker decides to receive the data. Example when another person receives your call and starts to reply to you.
  8. There is no time barrier. It is in the hand of a receiver after how many rings he receives your call. He can make you wait forever by not picking up the call.
  9. For successful network communication, it needs active participation from both sides.

Message Passing Model

Algorithm:

  1. Let us consider a network consisting of n nodes named p0, p1, p2……..pn-1 which are bidirectional point to point channels.
  2. Each node might not know who is at another end. So in this way, the topology would be arranged.
  3. Whenever the communication is established and whenever the message passing is started then only the processes know from where to where the message has to be sent.

Additional Information:

  1. Security Measures: It is important to add security measures in message passing as the data being sent is vulnerable to attacks. Hence, techniques such as encryption and authentication should be used to ensure secure communication.
  2. Types of Messages: The article could mention the types of messages that can be sent in the message passing model, such as request messages, reply messages, broadcast messages, and multicast messages.
  3. Message Routing: It is essential to mention the message routing algorithm used in message passing. The routing algorithm decides the path that the message should take to reach the destination node.
  4. Error Handling: The article can mention the error handling mechanism used in message passing, as errors can occur during communication. Error handling ensures that the system can continue its operation even in the presence of errors.
  5. Communication Protocols: The article can also mention the various communication protocols used in message passing, such as TCP/IP, UDP, and RDP.
  6. Comparison with other models: It would be interesting to compare the message passing model with other models, such as shared memory and Remote Procedure Call (RPC) models. This will help readers understand the advantages and disadvantages of message passing over other models.

Advantages of Message Passing Model :

  1. Easier to implement.
  2. Quite tolerant of high communication latencies.
  3. Easier to build massively parallel hardware.
  4. It is more tolerant of higher communication latencies.
  5. Message passing libraries are faster and give high performance.

Disadvantages of Message Passing Model :

  1. Programmer has to do everything.
  2. Connection setup takes time that’s why it is slower.
  3. Data transfer usually requires cooperative operations which can be difficult to achieve.
  4. It is difficult for programmers to develop portable applications using this model because message-passing implementations commonly comprise a library of subroutines that are embedded in source code. Here again, the programmer has to do everything on his own.

Last Updated : 15 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads