We discuss some special cases of communications and how the mechanism from the previous sections can be used in these cases.
Last MessageIt can be the case that the receiver of the messages is not interested in all messages, but only the most recent one. With unidirectional indirect communication we can relax on the constraint that a message has to be read before another write of a message can take place. The receiver can then ignore messages and the sender does not have to wait for a message to be read before writing the next one. Depending on whether the involved parties want to check on the status of the communication mechanism, an implementation can either use the status based communication mechanism, or fall back to the basic communication mechanism.
A similar thing can be done for bidirectional indirect communication with sharing of the location for the messages in both directions. But then we have to make sure that it is always possible to read the last message by holding on to the constraint that a message can only be written by a side if there is no message waiting to be read by this side. So a status is still needed and thus we have to use the status based communication mechanism.
Undirected CommunicationIf we dispose of all constraints with bidirectional indirect communication with sharing of the storage location for messages in both directions we get a form of communication that can be considered as undirected. All parties involved can write and read from the location at any time. In this case the communication is not with eachother anymore, but with the storage location. This is what at a low level of abstraction typically is meant by shared memory. It can be implemented with the basic communication mechanism.
In using undirected communication it can be required to generate a new message based on the latest available message. To make sure the new message is based on the latest message and that there has not been written a new message in the meantime, it must be possible to lock the location during the process. A sequence of actions has to be lock - read - generate - write - unlock. So in this case, an implementation has to fall back to the basic locking mechanism.