So far, we have looked only at cases of one process, P1, sending messages to another process, P2. Here, the execution dependency is only one way, with P2 dependent on arriving P1 messages. While the overhead analysis handles the two scenarios above, it does not address cases of process interdependencies. The simplest example of such a scenario is a two message ``handshake'' where P1 sends a message to P2 and P2 then sends a message to P1. When we add in overhead and waiting variables, four cases result. These are presented below. Specifically, what are we looking for in this scenario is insight on what value P2 should send back to P1 for overhead compensation analysis.
Figure 5 shows the first two cases. The handling of the first message sent from P1 to P2 is consistent with that of Cases 1 and 2 of the Two Sends scenario. After the first message is processed, the calculated value of reflects a delay in P2 caused by the combined effects of overhead intrusion on P1 and P2. Thus, when P2 sends the message to P1, it should indicate that its send was delayed by plus any additional overheads incurred (given by ) since the last receive. If this is done, we claim the second message received on P1 can then be processed in same manner as the second message received in the Two Sends scenario.
This is exactly what we see. The approach validates the rational reconstruction of the approximated execution. Furthermore, we see a high degree of similarity in the equations for processing the second message with those for handling a single message, just the terms are slightly different, rewritten as in the Two Sends scenario and for the inverse situation of P1 receiving and P2 sending. These observations are born out in Cases 3 and 4, shown in Figure 6 for completeness.
As further validation of the equations for overhead, waiting, and delay processing, we would expect to see the execution interdependency due to the message handshake result in a synchronization of sorts between the two processes. This is apparent in the fact that the two delay values ( and ), when added to last events (Re on P1 and S on P2), end at the same time.