From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 791DFBC69 for ; Wed, 30 May 2007 21:14:29 +0200 (CEST) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l4UJEOKl027499 for ; Wed, 30 May 2007 21:14:28 +0200 Received: (qmail 6825 invoked from network); 30 May 2007 19:14:47 -0000 Received: from unknown (HELO hendrix.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 30 May 2007 19:14:47 -0000 Received: from hendrix (hendrix [192.168.200.99]) by hendrix.mega-nerd.net (Postfix) with SMTP id 037342FED6 for ; Thu, 31 May 2007 05:14:23 +1000 (EST) Date: Thu, 31 May 2007 05:14:22 +1000 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Re: [Caml-list] Faking concurrency using Unix forks and pipes Message-Id: <20070531051422.c8699462.mle+ocaml@mega-nerd.com> In-Reply-To: <200705300954.32784.jon@ffconsultancy.com> References: <200705300442.59906.jon@ffconsultancy.com> <200705300902.06760.jon@ffconsultancy.com> <20070530181300.d4179bca.mle+ocaml@mega-nerd.com> <200705300954.32784.jon@ffconsultancy.com> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.11; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 465DCD10.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 forks:01 marshalling:01 traversing:01 goat:98 heap:01 heap:01 unix:01 wrote:01 caml-list:01 gcs:01 argument:02 concurrency:02 concurrency:02 face:97 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 -- ----------------------------------------------------------------- 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