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

Re: Occam vs. monitor



On Wed, 27 May 1998, phw wrote:

> > > No!  Erroneous channel usage certainly causes deadlock.  That's the only
> > > way deadlock occurs in occam systems.  Example:
> > 
> > Do you really mean this, Peter?
> 
> Sorry!  I was assuming that the following are all equivalent:
> 
>   (1) STOP
> 
>   (2) IF
>         FALSE
>           SKIP
> 
>   (3) CHAN OF INT a:
>       a ! 42
> 
>   (4) CHAN OF INT a, b:
>       PAR
>         SEQ
>           a ! 42
>           b ! 99
>         INT x, y:
>         SEQ
>           b ? x
>           a ? y
> 
> which they are according to occam's formal semantics.  In that sense, items
> (1) and (2) above are "Erroneous channel usage" ;-) ...

Yes, they are.  The point is that most programming languages just drop off
the end of a failed IF.  Occam doesn't; it creates a deadlock.  Thus
sequential programming errors are entangled with "real" concurrent
deadlocks.  This is Good for the language semantics, but is not what most
C programmers expect.


Denis A Nicole                      WWW:   http://www.hpcc.ecs.soton.ac.uk/~dan 
High Performance Computing Centre   Email: dan@xxxxxxxxxxxxxxx                  
University of Southampton           Phone: +44 1703 592703                      
UK.                                 Fax:   +44 1703 593903