concurrency (was: Native garbage collector)

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Sep 14 18:46:37 AEST 1998


On 14-Sep-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 14-Sep-1998, Thomas Charles CONWAY <conway at cs.mu.OZ.AU> wrote:
> > Peter Schachte, you write:
> > > of *which* io__state?  count, as I conceived it, takes an io__state as
> > > input, and produces an io__state as output, and you aren't allowed to
> > > change it between those points.  All parts of the io__state that are
> > > needed to implement count *must* be there when you call count.
> > > Otherwise you're cheating.
> > 
> > Ah. What you need is the semantics for fork/4 which we've worked out,
> > but I'm still in the process of writing them up. Basically, fork is
> > a cc_multi predicate that performs an "arbitary" interleaving of all
> > the updates to the io__state of a pair of closures - Fergus alluded
> > to it in his post earlier.
> 
> So in essence you are splitting the io__state into two states,
> and fork defines the order of merging of those states (i.e. arbitrary
> interleaving)?

The things that get interleaved are _updates to_ the state.

Also, I don't think that "splitting" is quite the right way of thinking
about it.  We're not splitting the io__state into two halves, rather we're
*replicating* it so that we have two mirror image io__states.
The idea is that an io__state is a *view* on the state of the world --
replicating the view doesn't require physically replicating the world.
The two views share state, and concurrent accesses to that shared
state are allowed.  This can of course lead to nondeterminism (of the
committed choice variety).

This is quite different to the way that Concurrent Clean handles things,
for example.  As I understand it, Concurrent Clean does indeed
split the world, giving you deterministic parallelism, but disallowing
concurrent accesses to shared mutable state.  (I could be wrong, though,
I'm not very familiar with Concurrent Clean's library.)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the users mailing list