Browse thread
How INRIA people envision OCaml's parallel future?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David MENTRE <david.mentre@g...> |
| Subject: | Re: [Caml-list] How INRIA people envision OCaml's parallel future? |
Hello, 2005/6/24, Jean-Marie Gaillourdet <jmg@gaillourdet.net>: > I am not a garbage collector specialist, too. But I guess it is much > harder than this. Your idea implies that every allocation requires to > obtain a lock. How often do you allocate memory in a functional > programming language? Quite often, I guess. Every simple tuple, every > constructor application and so on. So you would synchronize all threads > very often. Additionally, during every collection phase, all other cpus > have to wait for the garbage collector. I am pretty sure, that this > would not scale very far. Sorry ;-) One simple solution to this issue would be to have a per thread minor allocation zone, with a global, lock-protected, major zone. For newly allocated objects and minor collection phase, the code is lock-free. But I suspect that interleaving between minor and major phases makes things much more difficult. Maybe dedicating a thread to major collection could be useful (major collection would be blocked by access to minor zone, with priority given to minor zone). Anyway, INRIA people have already worked on those issues and had proposals. It is just that they feel it was not worth the trouble, *at that time*: http://groups.google.com/groups?q=doligez+parallel+GC+caml-list&hl=fr&lr=&selm=fa.dlqoshv.1a66ho7%40ifi.uio.no&rnum=2 Yours, d.