Information Technology Reference
In-Depth Information
8. pi_unlink(str n): marks the π-channel n for
deletion, returns -1 for open π-channels.
behaves like a stored file object, with data seg-
ments retrieved from π-Space.
This simple semantics facilitates a straightfor-
ward failure recovery mechanism. The key is to
enable the application to resume π-channel op-
erations upon recovery, without affecting its cor-
rectness. During writer recovery, pi_create() and
pi_write() operations are “redone.” If segments
are already cached, the sequence of pi_write()
operations are replayed, without changing
π-channel segments that are already on π-Space.
Eventually, a new segment is written marking to
start of normal operation. During reader recovery,
all pi_attach() and pi_read() are performed on
cached π-channels, with pipe segments delivered
from the cache. Processes are assumed to be
piecewise deterministic, thus able to repeat the
results it generated in a previous failed execution.
With persistence, a π-channel behaves as
both: (a) an archival file - writes can proceed
without readers; and (b) an online pipe - when
the reader/s and the writer are concurrent. This
duality makes pi_seek() possible, when such an
operation would be meaningless on conventional
pipes. All π-channels are immutable, so pi_seek()
is disabled at the “write” end.
SEMANTICS OF Π-CHANNEL
OPERATIONS
Figure 3 shows a state-transition diagram for
π-channels. The top three states show the life-
cycle of a π-channel as it is created, written-to,
closed, and deleted. The remaining states show
the transitions when there is a concurrent reader.
In particular, the Read/Write applies when the
π-channel has one active writer and at least one
active reader. At the Reading state, the π-channel
π-Spaces: Abstraction of
Shared Space for π-Channels
Process coordination is through one or more
π-Spaces. Similar to Linda tuplespace, a π-Space
is a shared space abstraction for π-channels, which
Figure 3. The states of a π-channel
Search WWH ::




Custom Search