Flow Chart
The following section describes a flow chart for most of the MSP. A distinction is made between calls made by local processes called SEND and RECEIVE, and messages coming in over the NET called IN and OUT. An additional distinction is made between calls (or messages) with a local rendezvous and those with a foreign rendezvous Host.
Since the code is quite similar, the distinction need not be made, but will be included for the sake of clarity.
It is assumed that the MSP has table provisions for the following items:
- source of message
- rendezvous Host
- FROM-PORT-ID
- TO-PORT-ID
- table position
- type of message
- data size and location
- data about the user process
User does a SEND or RECEIVE
A. Rendezvous is at a foreign host
-
Store the appropriate table data
-
Send a message to the rendezvous host
a. SEND: OUT + DATA
b. RECEIVE: IN
B. Rendezvous is local - look for entry in table
-
Entry NOT found: create entry with appropriate data
-
A matching entry exists in table:
a. RECEIVE: give user the data
b. Send a message to the other host (as specified by the source field of the original msg)
- SEND: OUT+DATA
- RECEIVE: IN
c. Alert user to the fact that transaction is complete
d. Clear table entry
An IN is received over the NET
Search table for matching entry.
A. No matching entry create an entry with appropriate data.
B. A match exists
-
Entry was cause by a local SEND
a. Send "OUT + DATA" to source of IN
b. Inform user of transaction
c. Clear table entry
-
Entry was caused by an OUT received over net-acting as third host.
a. Send IN to site that created table entry
b. Send OUT + DATA (previously buffered) to site sending the IN
c. Clear table entry
An OUT + DATA is received over the NET
Search table for matching entry
A. No match is found
-
buffer data
-
create appropriate table information
B. A match is found
-
Table entry was caused by locally executed RECEIVE
a. give data to the user and alert him to its existence.
b. send a matching "IN" to the source of the "OUT"
c. remove entry from table
-
Table entry was caused by the receipt of an "IN" over the NET, thus we are acting as a third party host
a. send the "OUT + DATA" to the host stored in the table
b. send an "IN" to the host from which the "OUT" had just arrived.