Next: 3.3.2 Gather-Scatter operations
Up: 3.3 Basic global operations
Previous: 3.3 Basic global operations
  Contents
3.3.1 EXCHANGE
Exchange of data between processes
and
via link
.
Variant a)
- Works only in case of non-blocking communication,
i.e., the sending process does not require an
acknowledgment that the message was received.
- Blocking communication ends with a deadlock.
Figure 3.12:
EXCHANGE non-blocking
 |
Variant b)
In case of a blocking communication,
a deadlock free EXCHANGE between
and
needs a unique function determining which one of the
two processes may send/receive first.
The function BTEST(
)
XOR(
)
tests whether the
bit is set or not.
The definition that this process, whose appropriate bit is set first
sends and then receives (vice versa on the other process)
allows a deadlock-free EXCHANGE procedure.
Figure 3.13:
EXCHANGE blocking
 |
Gundolf Haase
2000-03-20