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
Faking concurrency using Unix forks and pipes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-30 (19:14)
From: Erik de Castro Lopo <mle+ocaml@m...>
Subject: Re: [Caml-list] Faking concurrency using Unix forks and pipes
Jon Harrop wrote:

> 1. Shared memory and locks should be much faster for synchronization than 
> marshalling between processes.

Shared memory and locking becomes completely intractable beyond about 
10 cores and Intel is already talking about 80 cores.
> 2. Forking results in multiple GCs redundantly traversing the same heap and, 
> worst case, it may end up copying the entire heap in the child process in 
> order to deallocate it.

To exploit multi-process message-passing style concurrency you need to 
fork early before much has been allocated.

Erik de Castro Lopo
"... a discussion of C++'s strengths and flaws always sounds
like an argument about whether one should face north or east
when one is sacrificing one's goat to the rain god."
-- Thant Tessman