RE: Concurrency, Exceptions and Poison

From: Campbell, John (John.Campbell_at_email.domain.hidden)
Date: 2001-09-10 21:46:32


Peter wrote:
> BUT ... it really screws up some basic algebraic laws! For example:
>
> P = PAR = PAR
> P SKIP
> SKIP P
>
> where the = means semantic equivalence. But, on the LHS, P's
> exception is
> thrown. On the middle/RHS, it isn't! So, with exceptions,
> that law no longer
> holds :-( ...

It seems to me that the discrepancy is resolved if PAR were to handle
exceptions of subprocesses the same way the OS does. Ie if poisoning
P causes the OS to print a message for the LHS, it should also cause
the same behavior in PAR (perhaps delayed until sub processes terminate).

> The good thing about this is that it gives us a safe way of
> freezing processes
> temporarilly or permanently. The bad thing is that, in the
> latter case, it
> doesn't permit any tidy-up actions (that involve further
> synchronisation).

I think the way out of this dilemma is to view all processes as
having a default handler. If you need tidy-up operations,
replace the default handler with explicite code. (Or, if you're
a stickler for WYSIWYG, require all processes to explicitly
handle poison. Personally, I like the former)

What do you think?
-jc


Original text of this message

This archive was generated by hypermail 2.1.7 on 2004-10-31 20:04:00 GMT
© Copyright WoTUG
All rights reserved