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 19CCCBB81 for ; Wed, 8 Mar 2006 11:39:08 +0100 (CET) Received: from outmail.freedom2surf.net (outmail1.freedom2surf.net [194.106.33.237]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k28Ad7rI030650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 8 Mar 2006 11:39:07 +0100 Received: from [10.0.0.1] (i-195-137-83-147.freedom2surf.net [195.137.83.147]) by outmail.freedom2surf.net (8.12.10/8.12.10) with ESMTP id k28Ad65K012590 for ; Wed, 8 Mar 2006 10:39:06 GMT Message-ID: <440EB4C2.2080102@asfandyar.cjb.net> Date: Wed, 08 Mar 2006 10:41:06 +0000 From: Asfand Yar Qazi User-Agent: Mozilla Thunderbird 1.0.7 (X11/20060217) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] STM support in OCaml References: <1474655.1141812700555.JavaMail.www@wwinf1632> In-Reply-To: <1474655.1141812700555.JavaMail.www@wwinf1632> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 440EB44B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 runtime:01 ocaml:01 runtime:01 cjb:98 optimistic:98 quicker:98 wrote:01 caml-list:01 structures:01 data:02 checking:02 seems:03 programming:03 guess: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.5 required=5.0 tests=DNS_FROM_RFC_WHOIS autolearn=disabled version=3.0.3 yoann padioleau wrote: >>>You make several claims: >>> >>>STM is not lock free. >>>STM is not useful on a small number of processors >>> >>>As for claim 1. "Lock-free" doesn't mean what you think it does. >> >>I know what STM does, thank you: I intend to implement it >>myself in my own programming language. Maybe you should >>read more carefully. >> >>I said "protected by a mutex under the hood." which means >>sure, the programmer is not writing locks, but they're used >>in the implementation and the associated costs are still paid. > > > I have read (very fastly) the atomcaml paper and I don't think they use "mutex under the hood". > It seems that they just log stuff and rollback. I guess that when you want to implement > STM on multiprocessor you may need to mutex stuff (the internal data structures maintained by the STM runtime), > but as ocaml runtime does not use multiprocessor, they dont need it. > Also, from what I remember, STM is "optimistic", while conventional lock-based design is "pessimistic" - thereby allowing STM based code to spend less time checking for locks or something, which apparently makes it quicker. But, I'll lets the experts explain it :-)