English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
How INRIA people envision OCaml's parallel future?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-06-24 (09:36)
From: David MENTRE <david.mentre@g...>
Subject: Re: [Caml-list] How INRIA people envision OCaml's parallel future?

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*: