db_connect: Could not connect to paper db at "wotug@dragon.kent.ac.uk"
db_connect: Could not connect to paper db at "wotug@dragon.kent.ac.uk"
%T XCHANs: Notes on a New Channel Type
db_connect: Could not connect to paper db at "wotug@dragon.kent.ac.uk"
%A Øyvind Teig
db_connect: Could not connect to paper db at "wotug@dragon.kent.ac.uk"
%E Peter H. Welch, Frederick R. M. Barnes, Kevin Chalmers, Jan Bækgaard Pedersen, Adam T. Sampson
%B Communicating Process Architectures 2012
%X This paper proposes a new channel type, XCHAN, for
communicating
messages between a sender and receiver.
Sending on an XCHAN is
asynchronous, with the sending
process informed as to its success.
XCHANs may be buffered,
in which case a successful send means the
message has got
into the buffer. A successful send to an unbuffered
XCHAN
means the receiving process has the message. In either case,
a
failed send means the message has been discarded. If
sending on an XCHAN
fails, a built\-in feedback channel (the
x\-channel, which has
conventional channel semantics) will
signal to the sender when the
channel is ready for input
(i.e., the next send will succeed). This
x\-channel may be
used in a select or ALT by the sender side (only
input
guards are needed), so that the sender may passively
wait for this
notification whilst servicing other events.
When the x\-channel signal is
taken, the sender should send
as soon as possible \-\- but it is free to
send something
other than the message originally attempted (e.g.
some
freshly arrived data). The paper compares the use of
XCHAN with the use
of output guards in select/ALT
statements. XCHAN usage should follow a
design pattern,
which is also described. Since the XCHAN never blocks,
its
use contributes towards deadlock\- avoidance. The XCHAN
offers one
solution to the problem of overflow handling
associated with a fast
producer and slow consumer in message
passing systems. The claim is that
availability of XCHANs
for channel based systems gives the designer and
programmer
another means to simplify and increase quality.