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 (08:51)
From: Jean-Marie Gaillourdet <jmg@g...>
Subject: Re: [Caml-list] How INRIA people envision OCaml's parallel future?

Am Donnerstag, den 23.06.2005, 13:20 -0400 schrieb Jonathan_T_Bryant:
> As far as the GC, am I'm just kinda throwing this out off the cuff, but
> couldn't the heap be a shared memory segment that all threads attach to,
> thereby allowing easier collection on multiple processors.  All
> allocations could be synchronized (via some kind of semaphore) and could
> be locked only during a collection.  I know this is a lot harder than
> that, but, like I said, it's just an idea...

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 ;-)

Best Regards,