The role of message passing in inter-process communication
The role of message passing in inter-process communication (IPC)
Definition of IPC
Need essay sample on "The role of message passing in inter-process communication" ? We will write a custom essay sample specifically for you for only $12.90/page
From the definitions,inter-process communication (IPC) is a set of programming interfaces which gives room for coordination of activities by the programmer among different processes in the program that the operating system can run concurrently. Therefore in IPC,many user requests can be handled at the same time by a program. A single user request may likely result to several processes running in the operating system, communication has to be there among these processes and these is achieved by the inter-process communication interfaces. Inter Process Communication may also be referred to as the inter-thread communications or inter-application communication (Stephens and Martin 1999).
It can also be defined as a method by which data in one particular memory is put or rather duplicated onto the another memory of the other processor. In a normal way this data is sent inform of packets of information through a network that is placed between one processor and the other.
Single or multiple pockets may be included in a message and this consists of routing and other control information.
A process in message passing may be defined as a set of executable instructions or rather program which can be run on a processor.
Single or multiple processes may execute on a processor. Every process in a message passing system has to communicate with each other and is usually done by sending messages which might be running on the same processor. For efficiency reasons message passing systems are normally associated by a single process per processor.
Definition of message passing
Message passing is a communication form that is used in parallel computing, object-oriented programming and inter-process communication. The best way of communicating in message passing is by sending of messages. It is also defined as a method of communication that is mostly used between parallel process (Johnson and Vincent 1987).
In message passing ,there is the message passing system which gives room for provision of primitives for sending and receiving messages. These messages are usually sent to processes that are given names or also still they may be sent to a named mailbox. Usually message passing does better than shared memory
Roles of message passing
There are various roles of message passing in inter process communication. Some of these roles are as below;
It creates a responsibility for the programmer to explicitly do an implementation of a scheme for data distribution, all the interprocess communication and synchronization ( Gropp, Lusk and Skjellum 1996).
Another common role of message passing is that it is used in the communication in a parallel computer. This is whereby processes running on one computer will send a message to a process that is running on the similar processor or another. It is the operating system that usually handles the transmission of the message ( Gropp, Lusk and Skjellum 1996).
Synchronization of two processes in addition to communication of data is also another role of message passing. It can also be used in implementation of producers and consumers with blocking receive and non blocking send and automatic buffering to the sent messages. This is commonly done by the operating system (OS) until received (Crovella , Bianchini, Le blanc, Markatos and Wisniewski 1992).
The discovery of some interesting design problems is as a result of message passing in inter process communication(Stephens and Martin 1999).
One other important role of message passing comes forth when using the UDP connections in sending messages,it enables one to “broadcast” or “multi cast” to a wide range of destination of hosts at once and this is basically at your subnet. Moreover, with UDP version, checking of the messages asynchronously by simulation is possible (Stevens and Martin 1999) .
As it enhances the use of a shared memory platform(Harvey, Hudson and Brown 1997), it also helps in the passage of information within the file system for example when reading a file,there is dire need for a program informing the processes managing the file system to open that file (Stephens and Martin 1999).
Helping in connection of two commands is another role. For example in a shell,there is a possibility of using a pipe in connecting the output and the input of the two commands (Mc Quillan, John, David and Walden 1975).
It has lead to the establishment of message passing models which are a set of processes having only local memory and the communication among the processes is by sending and receiving messages.
In a way,message passing is responsible for the data transferred between processes that require cooperative operations for performance by individual processing.
(Gropp et al 1996) , It does the implementation of different models on any hardware given appropriate operating system support.
It (message passing) did play a role in the development of message passing libraries which included the public domain packages that do not target a particular machine (PICL, PVM, PARMACS, P4, MPI, etc.)as well as those depending on machine or rather the machine dependent vendor implementation s (MPL, NX, CMMD, etc.)
It gave users of message passing libraries an option of choosing between public domain packages for an improved code portability and the machine dependent implementation s for a better performance on a given machine.
Work was made much easier for the users of the message passing libraries to understand the different terminologies in use since the terms have already been defined in the terminology section within the message passing library.
Operations in the message passing libraries were enabled for example the send and receive operations. Collective computation has also been made easy by message passing. It is where data is collected by one member of a group from other members and operations such as min,max,multiply etc are performed on the data.
Through the establishment of message passing libraries, it has been possible to improve the performance of programs written using libraries of message passing.
Message passing concurrency synchronizes communication and there is no need to be worried of mutual exclusion as every process has got its specific state which no other process can interfere with.
It has ensured that value objects are well handled in the message passing models and in addition to that it gives the programmer the task of explicitly handling all the parallelism and distribution of data.
One of the many common roles of message passing is to communicate in a parallel computer. A message may be send to a process running on the same processor or another by a process running one processor. Actual transmission of the message is purely dealt with by the run-time support of the language in which processes have been written or alternatively by the operating system.
Message passing system gives the provision of primitives for sending and receiving messages and these primitives are usually synchronous or asynchronous or even both of them ,as it had been seen earlier on.
Asynchronous is the type that will never get to the completion stage until the message has been received from the receiving process. An asynchronous send will lead to queuing of the messages for transmission without waiting for its reception.
Messages which are sent to the named mailbox can be readable either by one processes or by many processes. Location determination of the recipient and the choosing of a route to get to the said location are what are involved in the transmission.
Johnson J, Vincent M.(1987) inter process communication, AM publishers.
Mc Quillan, John M, David C. Walken (1975).Message passing in IPC. (1975).
Stephens and Martin, Networking programming , 2nd edition: Inter process communications ( 1999). Crovella M. Bianchini R. Le Blanc,Markatos T,Wisniewski E.
communication in parallel program design(1992).
Gropp . Lusk E. Doss N. and Skjellum A. MPI message passing interface standard, parallel computing (1996).
Stephen J. Harvey, Hudson M, Brown K. Inter process communication, (1997)