From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1BCF2BB81 for ; Wed, 8 Mar 2006 08:08:36 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k2878Zpx007848 for ; Wed, 8 Mar 2006 08:08:35 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA22787 for ; Wed, 8 Mar 2006 08:08:34 +0100 (MET) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k2878X68015403 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 8 Mar 2006 08:08:34 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FGsmb-0008JP-EA for caml-list@inria.fr; Wed, 08 Mar 2006 08:08:29 +0100 Received: from 0x535f962a.boanxx20.adsl-dhcp.tele.dk ([83.95.150.42]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Mar 2006 08:08:29 +0100 Received: from spam by 0x535f962a.boanxx20.adsl-dhcp.tele.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Mar 2006 08:08:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Bardur Arantsson Subject: Re: STM support in OCaml Date: Wed, 08 Mar 2006 08:08:16 +0100 Message-ID: References: <440DB255.1030701@asfandyar.cjb.net> <1141751708.20944.355.camel@budgie.wigram> <440DD982.8080800@asfandyar.cjb.net> <1141779125.20944.405.camel@budgie.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 0x535f962a.boanxx20.adsl-dhcp.tele.dk User-Agent: Mail/News 1.5 (X11/20060206) In-Reply-To: <1141779125.20944.405.camel@budgie.wigram> Sender: news X-Miltered: at nez-perce with ID 440E82F3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 440E82F1.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 posix:01 mutexes:01 tokens:01 granularity:01 cheers:01 sdu:01 2006:98 wrote:01 wrote:01 caches:01 slightly:02 variables:02 seems:03 seems:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 skaller wrote: > On Tue, 2006-03-07 at 19:05 +0000, Asfand Yar Qazi wrote: [--snip--] > I point out that in fact, under the right conditions -- lots > of processors and lots of variables -- it will probably provide better > performance too. However this is hard to test -- not many > of us have access to >2 cores on the same board. There certainly > no way POSIX can deliver good performance: mutexes have to be > synchronisation points and that requires ALL the CPUs to > flush their caches -- it doesn't scale. Interestingly, DragonflyBSD seems to be moving toward a slightly weaker (relative to mutex) form of synchronisation which seems somewhat similar to STMs: http://en.wikipedia.org/wiki/Serializing_tokens I haven't look at it in detail, but it might be possible to use these to implement STM in a mutex-free (cheap) way. (Though you might need some level of hardware support unless you're content with page granularity 'exclusion'). Just thought I'd throw that in there. :) Cheers, -- Bardur Arantsson - Am I paying for this abuse or is it extra? Edmund Blackadder, 'Blackadder'