Next: 3.2.2.3 Monitor concept
Up: 3.2.2 Semaphores
Previous: 3.2.2.1 Concept of semaphores
  Contents
The message passing is a mechanism transfering data directly
from one process to a another one.
We distinguish in the Message Passing (
communication)
between synchronous and asynchronous communication :
Figure 3.9:
Blocking communication
 |
In the blocking communication, all
(often 2) involved processes wait until all processes
signaled their readiness for data/message exchange.
The following communication acts for processes
and
like 2 semaphores :
V(
) : Ready for SEND
P(
) : Wait until
is ready to receive.
V(
) : Ready for RECV
P(
) : Wait until
is ready to send.
Figure 3.10:
Non-blocking communication
 |
In the non-blocking,
all processes send or receive their data totally independent from
the status of the remaining processes.
- Similar to the synchronization of characteristics using
semaphores.
- Guarantees high efficiency in communication
without deadlock (in difference to blocking communication).
- The sending process expects no acknowledgment that the operation
was executed successfully.
Output parameters of the receiving process must not have an
undefined value - otherwise the whole program may crash.
This to prevent is a function of the programmer!
- Other operations can be executed between the request
for a communication routine and its
appropriate (but not necessary) status query.
The semaphore concept is typical for shared memory computers
wherein the resource management is usually unnoticed by the programmer.
On the other hand, the message passing occurs on distributed memory
computers and must be completed at least partially by the programmer.
Next: 3.2.2.3 Monitor concept
Up: 3.2.2 Semaphores
Previous: 3.2.2.1 Concept of semaphores
  Contents
Gundolf Haase
2000-03-20