[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Poison



Peter,

> I'm looking for an electronic version :-( ... will send you hard copy if
> I can't find it.
I would very much appreciate that.

> Marcel:
> > I would expect something like: Poison can be sent via any channel.
> > To make a process gracefully terminate, one sends poison down a channel.
> > On reception of poison via an input channel, the process automatically
> > distributes Poison to all output channels.  One waits until poison
> > has been received on all input channels, and exits "gracefully".
> [...]
> Peter:
> Important point: after reciept of poison, the onward distribution and waiting
> for poison on all other channels must all be done in PAR - otherwise deadlock
> may happen.

It probably is like a PAR, but not a real PAR.
The Poinson part of the PAR will gracecully come to an end,
however, the other (functional) part of the PAR will
get stuck half way through its communication.  At that moment,
it is killed "gracefully"; in fact, the functional part of
the PAR is supposed to kill itself at the moment its PARtner,
the Poison Process, exits.

Exitting "gracefully" is in fact being suicidal... :-)
For emotianal reasons, I would not call a suicidal approach "graceful"... :-)

Don't you need something like a KILLPAR?

   PoisonDistributer KILLPAR Functional

With a rule like:

   (e KILLPAR X) == e

> Key property: anyone inside or outside a system can gracefully terminate it.
> Those decisions need no coordination - they can happen in parallel.

I think your Poison method does work when all processes support
"Graceful Termination".
However, in real-life, processes cannot just terminate at any
moment; typically, they can start termination sequences at certain
moments.  A termination sequence is a sequence of communication actions to
tell "resources" (partner processes) to end up in a state in which
termination can indeed be considered graceful.

The aspect "termination sequence" is completely missing in the picture
right now.  How can the Graceful Termination strategy be mixed with
situation in which "termination sequences" are needed?

For example, a filesystem writes its cache to disk before a graceful
exit.  How is this supported by your Poison-based exit approach?

Cheers,
	Marcel