On Fri, May 09, 2008 at 09:10:12AM +0100, Jon Harrop wrote:
> On Friday 09 May 2008 08:45:09 Richard Jones wrote:
> > > 1. Lack of Parallelism: Yes, this is already a complete show stopper.
> >
> > Why can't you just fork off enough processes to cover each core?
>
> They need to share data, e.g. write results into the same matrix or
> mutate the same array.

You might want to look at the 'ancient' module.  While the common
understanding is that the shared data should be immutable, in fact
you'd be OK if all you want to do is mutate a simple array of unboxed
ints or floats[1].  Of course to an extent you're back to using manual
memory management, but if it's only a few structures that may be
acceptable.  Getting parallelism right is hard enough that programmers
should be forced to think about exactly which structures need to be
shared, rather than threads where the default is to share everything
and make the naive assumption that the programmer knows what they're
doing.

Rich.

[1] The real basis for the 'immutable restriction' is explained in the
documentation, along with exceptions, but it's complicated so I won't
go into it here.

-- 
Richard Jones
Red Hat

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to