Version française
Home     About     Download     Resources     Contact us    
Browse thread
"ok with parallel threads" GC (aka ocaml for multicore)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Philippe Wang <philippe.wang@l...>
Subject: Re: [Caml-list] "ok with parallel threads" GC (aka ocaml for multicore)
> On Sat, Apr 18, 2009 at 1:05 AM, forum@x9c.fr <forum@x9c.fr> wrote:
>     I was indeed mostly worried with the runtime itself. I wanted to  
> have a fully reentrant runtime for the OCaml-Java
>     project (to be able to execute several programs in the very same  
> JVM) and remember that it implied primitives
>     from "compare.c", "hash.c", "intern.c" and "extern.c" among  
> others to be written differently for this purpose.

Indeed. We have made them reentrant but we haven't made much stress  
testing on that.
Reentrance on those are not free (they have a cost), and the way we  
chose is the "simplest or quickest way".

>     Out of curiosity: you state that your GC is of "stop-the-world"  
> nature, what about finalizers ?
>     Are they executed by the GC thread when the world is stopped or  
> concurrently with
>     application threads ?
>     Not sure this question really matters, just curious (I mean, it  
> is doubtful that one would write finalizers with
>     a long execution time).

Finalizers are supposed to be called by the thread that does the  
garbage collection, so there is no concurrency with finalizers as the  
rest of the world is meant to be stopped when garbage collecting.
(Our garbage collector does not try to be as smart as the original one  
on many many things)

By the way, we are late on writing the documentation for our future  
release...
but we have just implemented a (simple) experimental growing heap.

Here is a quote from wikipedia (http://en.wikipedia.org/wiki/Speedup):
<<
Sometimes a speedup of more than N when using N processors is observed  
in parallel computing, which is called super linear speedup. Super  
linear speedup rarely happens and often confuses beginners, who  
believe the theoretical maximum speedup should be N when N processors  
are used.
 >>
Well, we *have* observed that on a matrix multiplication :-)

--
Philippe Wang
  Philippe.Wang@lip6.fr
  http://www-apr.lip6.fr/~pwang/