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=AWL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 6B266BC69 for ; Thu, 31 May 2007 00:14:30 +0200 (CEST) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4UMETG1001438 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 31 May 2007 00:14:30 +0200 Received: from [80.229.56.224] (helo=beast.local) by ptb-relay01.plus.net with esmtp (Exim) id 1HtWR3-0002fB-Cz for caml-list@yquem.inria.fr; Wed, 30 May 2007 23:14:29 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Faking concurrency using Unix forks and pipes Date: Wed, 30 May 2007 23:08:59 +0100 User-Agent: KMail/1.9.7 References: <5F7D2956-2B0A-465A-8AC2-06D7EDC457F9@valdosta.edu> <20070531055756.2e328baa.mle+ocaml@mega-nerd.com> <139AB75C-8B84-4E2A-AD75-09A7124D88FD@valdosta.edu> In-Reply-To: <139AB75C-8B84-4E2A-AD75-09A7124D88FD@valdosta.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705302309.00243.jon@ffconsultancy.com> X-Miltered: at discorde with ID 465DF745.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; forks:01 runtime:01 node:01 high-level:01 c-style:01 ocaml:01 ocaml:01 frog:98 heap:01 heap:01 unix:01 wrote:01 caml-list:01 explicitly:01 data:02 On Wednesday 30 May 2007 21:05:11 Jonathan Bryant wrote: > Just throwing out an idea, so someone who is more familiar with the > GC/runtime correct me if this can't be done, but what about a smaller > separate heap in shared memory that is reserved for concurrent data? > Maybe you could declare a type > > stype 'a tree = > > | Node of 'a * 'a tree * 'a tree > | Leaf of 'a > > that is always allocated in the shared heap, and have a separate GC > thread that manages that heap. Could that GC be concurrent without > affecting the performance of non-concurrent data? The programmer would need to explicitly move data from one heap to another, which undermines the high-level nature of a functional programming language. You'd be back to C-style memory allocation. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e