Skip to main content

MSP Specification

Our MSP is essentially a generalization of the interprocess communication system outlined in Section 3 of the fourth reference. (Henceforth, if we are required to mention the interprocess communication system presented in Section 3 of reference 4, we shall call it "the IPC".) For two processes to communicate using the MSP, the process desiring to send must in some sense execute a SEND and the process desiring to receive must in some sense execute a RECEIVE. The SEND and RECEIVE, in effect, rendezvous somewhere and transmission is allowed to take place. With the RECEIVE are specified (among other things) a FROM-TO-PORT-ID, a TO-PORT-ID, and a RENDEZVOUS HOST. With SEND are specified a from-port-id, a to-port-id, a rendezvous Host, and (possibly) some data to be transmitted. Using SEND and RECEIVE, sending a message from a SENDER PROCESS to a RECEIVER PROCESS takes place as follows. The sender process executes a SEND which causes an OUT-MESSAGE plus the specified data to be transmitted to the Host specified as the rendezvous Host in the SEND. Concurrently (although not necessarily simultaneously) the receiver process executes a RECEIVE which causes an IN-MESSAGE to be sent to the Host specified as the rendezvous Host in the RECEIVE. At the rendezvous Host, OUT-messages and IN-messages are entered in a table called the RENDEZVOUS TABLE. When an OUT-message and an IN-message are detected with matching to-port-id, from-port-id, and rendezvous Host, three things are done: 1) the OUT-message plus the data is forwarded to the Host which was the source of the IN-message, 2) the IN-message is forwarded to the Host which was the source of the OUT-message, and 3) the IN-message and OUT-message plus the data are deleted from the rendezvous table in the rendezvous Host.

The process is greatly simplified if the rendezvous Host is also either the send Host or receive Host. Specific algorithms enumerating these sequences appear later in this note.

To clarify the basic concepts, let us look at a case involving three Hosts, to which we shall give the names SND, RCV, and RNDZ. At Host SND, process S is doing a send, and at Host RCV, process R is doing a receive. Both specify rendezvous at Host RNDZ.

+--------------------+     +----------+     +--------------------+
|HOST SND | | | |HOST RCV |
| | | | | |
| | | | | |
| (PROCESS) | +----------+ | |
| ( S ) | HOST | |
| \ | RNDZ | (PROCESS) |
| [DATA]| | ( R ) |
+--------------------+ +--------------------+

Process S now executes a SEND with

from-port-id = S, to-port-id = R, and rendezvous-Host = RNDZ.

Host SND then creates a table entry in its rendezvous table.

+-----------------------------------+
|HOST SND MSP _ _ _ |
| ------------->|_ _ _| |
| / ^ |_ _ _| <-|-------RENDEZVOUS
| / | |_ _ _| | TABLE
|(PROCESS) | |
|( S ) +-- SEND (from=S to=R; rend=RNDZ)
| \ |
| [DATA] |
+-----------------------------------+

Host SND now sends an "OUT" message with S's data to Host RNDZ.

  HOST SND                               HOST RNDZ
+------------+ +---------------------------+
| MSP| "OUT" + DATA |MSP _____ RENDEZVOUS |
| |--------------------|--> |_ _ _| TABLE |
| | from=S; to=R | \ |_ _ _| |
| | | \ |_ _ _| |
+------------+ | \ __ |
| \---------->| | DATA |
| |__|BUFFER |
| |
+---------------------------+

Concurrently process R at Host RCV executes a RECEIVE with from-port-id = S, to-port-id = R, and rendezvous-Host = RNDZ. As above, Host RCV creates a table entry in its rendezvous table and sends an "IN" message to Host RNDZ (see following figure).

(Don't panic now about buffering in an intermediate Host. The time to panic is afer you've read and understood the rest of our arguments.)

  HOST RNDZ                          HOST RCV
+------------------------+ +-----------------------+
| MSP | | MSP |
| TABLE _____ | | _____ TABLE |
| +-|_ _ _| | "IN" | |_ _ _| |
| | |_ _ _|<-|----------|_ _ _|<-\ |RECEIVE
| | |_ _ _| | | |_ _ _| \ <--|(from=S
| | | | \ | to=R
| _V_ | | \ | rend=RNDZ)
| BUFFER | | | | (PROCESS) |
| |___| | | ( R ) |
+------------------------+ +-----------------------+

Host RNDZ now notices that the "OUT" from Host SND and the "IN" from R at RCV match one another and thus Host RNDZ takes three actions:

  1. Sends an "IN" to Host SND (from-port-id = S, to-port-id = R, rendezvous-Host = RNDZ).

  2. Sends an "OUT" and the buffered data to Host RCV (from-port-id = S, to-port-id = R, rendezvous-Host = RNDZ)

  3. Clears the entry from its table.

HOST SND                                           HOST RCV
+------------------+ +------------+ +-------------+
| | | TABLE | | |
| TABLE ___ | "IN" | ___ | "OUT" | ___ TABLE|
| |___| | | |___| | + DATA | |_ _| |
| |___|<---|--------|---|___|----|---------|->|_ _| |
| |___| | | |___| | | |_ _| |
| ( S ) | +------------+ | ( R )|
| | HOST RNDZ | |
+------------------+ +-------------+

Host RCV gets the "OUT" and DATA and finds the matching entry in its table. It gives the DATA to process R and clears the entry from its table.

Host SND gets an "IN" which matches an entry in his table and clears that entry. This message serves as a combined acknowledgement and go ahead which can be passed along to process S.

The transmission is now complete.

By both, one, or neither of the sender and receiver processes specifying a remote rendezvous Host, four important different kinds of transmissions can be made to take place. These are illustrated in the following four figures. In the figures crossed or parallel dotted lines are used to indicate rendezvous. The site of the "crossed rendezvous" is the important difference between types of transmission illustrated in figures. Circles indicate processes. Rectangles are rendezvous tables.

The figures also show "(IN)" and "(OUT)" messages being passed into the processes. The parentheses are used to indicate that the "IN" and "OUT" are only CONCEPTUALLY passed into the processes. What actually happens is implementation dependent. The process might be awakened and be given no further information if it blocked when issuing the SEND or RECEIVE. The process might be interrupted and passed some information such as the to-port-id from the IN or the from-port-id of the OUT. The process might actually be passed the complete IN or OUT message.

   ------         _________           ------
( ) | | ( )
( ) SEND | | RECEIVE ( )
( )------>|--+ +---|<--------( )
( ) | \/ | ( )
( ) (IN) | /\ | (OUT) ( )
( )<------|--+ +--|-------->( )
(______) |_________| +DATA (______)

|<------------- Host K ------------------>|

A Rendezvous at the Sender's Host
   ----         _______               ______          ----
( ) | | | | ( )
( ) SEND | | IN | | RECEIVE( )
( )------>|-+ +--|<------------|------|<-------( )
( ) | \/ | | | ( )
( ) (IN) | /\ | OUT+DATA | | (OUT) ( )
( )<------|-+ +--|------------>|------|------->( )
(____) |_______| |______| +DATA (____)

|<---- Host K ------>|<-- Network-->|<----- Host L ----->|

A Rendezvous at the Sender's Host
   ----         ______                _______          ----
( ) | | | | ( )
( ) SEND | | OUT+DATA | | RECEIVE( )
( )------>|------|------------->|-+ +--|<-------( )
( ) | | | \/ | ( )
( ) (IN) | | IN | /\ | (OUT) ( )
( )<------|------|<-------------|-+ +--|------->( )
( ) | | | | +DATA ( )
(____) |______| |______ | (____)

|<---- Host K ----->|<-- Network-->|<----- Host L ----->|

A Rendezvous at the Receiver's Host
----         ______            _______            ______         ----
( ) | | | | | | ( )
( ) SEND | | OUT+DATA | | IN | |RECEIVE( )
( )------>|------|--------->|-+ +--|<---------|------|<------( )
( ) | | | \/ | | | ( )
( ) (IN) | | IN | /\ |OUT+DATA | | (OUT) ( )
( )<------|------|<---------|-+ +--|--------->|------|------>( )
( ) | | | | | | +DATA ( )
(____) |______| |______ | |______| (____)

|<---- Host K ----->|<--Net-->|<-Host->|<--Net-->|<----- Host L ----->|
M

A Rendezvous at an Intermediate Host