On Thu, 18 Jun 1998, Alastair Reid wrote:
> > What modules do I have to import to use it?
>
> Read the Hugs-GHC documentation in hugs/doc
Can you give me a more direct pointer? I am not finding it in my docs.
> > Also, if you are using system
> > threads then you get the additional benefit that some operating systems
> > will automatically distribute them accross CPUs.
>
> Hugs/GHC runs everything in a single OS thread.
> There's no gain from having multiple threads because we'd have to
> put a mutex round access to the heap - and Haskell programs spend
> all their time touching the heap.
You would gain from having multiple threads if they distributed themselves
across processors and memory was cheap (you do a memcpy of all
datastructures accessable from the fork point). I guess this is was
parallel haskell is for.
> > 3. Do concurrent Haskell child-processes/threads survive the completion of
> > main?
>
> I've no idea.
I guess I can test once I know how to invoke forkIO (see above).
> > 3. The paper discusses a distributed implementation.
>
> There is a parallel GHC implementation - but I know very little about
> it. It tries to be totally transparent to the programmer.
> AFAIK it can't handle machine/network failure in any useful way.
The paper says:
"We are working on a distributed implementation of Concurrent Haskell.
Once nice property of MVars is that they seem relatively easy to implement
in a distributed setting..."
I assume that they are not referring to GPH here.
(I was surprised that at this statement given what I presume are the
substantial difficulties of defining a wire format for lazy
datastructures).
I would assume that the distributed implementation gives the programmer
some access to whether a machine is "up" or I suppose that you could use
distributed mvars to design your own ping (cool!)
-Alex-
___________________________________________________________________
S. Alexander Jacobson i2x Media
1-212-697-0184 voice 1-212-697-1427 fax