From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA10917; Sat, 23 Nov 2002 22:48:28 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA09021 for caml-list@pauillac.inria.fr; Sat, 23 Nov 2002 22:48:28 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA04894 for ; Sat, 23 Nov 2002 15:39:42 +0100 (MET) Received: from porsta.cs.Helsinki.FI (porsta.cs.helsinki.fi [128.214.48.124]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gANEdf102998 for ; Sat, 23 Nov 2002 15:39:41 +0100 (MET) Received: from alkokrunni.cs.Helsinki.FI (sslwrap@localhost [127.0.0.1]) by porsta.cs.Helsinki.FI (8.11.6/8.11.6) with ESMTP id gANEaVa18420 for ; Sat, 23 Nov 2002 16:36:31 +0200 Received: from localhost (lealanko@localhost) by alkokrunni.cs.Helsinki.FI (8.11.6/8.11.2) with SMTP id gANEaQ817295 for ; Sat, 23 Nov 2002 16:36:31 +0200 X-Authentication-Warning: alkokrunni.cs.Helsinki.FI: lealanko owned process doing -bs Received: from la by la.iki.fi with local (Exim 3.35 #1 (Debian)) id 18FWGl-00022y-00 for ; Sat, 23 Nov 2002 11:08:07 +0200 Date: Sat, 23 Nov 2002 11:08:06 +0200 From: Lauri Alanko To: caml-list@inria.fr Subject: [Caml-list] Why systhreads? Message-ID: <20021123090806.GA633@la.iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello. A simple, fundamental question: why is native-code threading done using system threads? Why isn't pure user-level scheduling used as with bytecode? It seems that all the time incompatibilities and deficiencies in Win32 threads and pthreads cause no end of trouble, for instance they fail to support the asynchronous exceptions which I yearned for. Since there is a single heap and threads are run in a strictly serialized order, system threads don't even give any support for parallelism. So user-level threading seems like the sensible option. For instance, the GHC Haskell compiler uses pure user-level threading both in native code and when interpreted, and it works pretty well. (All right, there's now talk of adding systhread support, but only for foreign interface issues.) I cannot believe that supporting many different system thread interfaces is easier than managing native-code stacks manually. So could someone please clarify what the motivation here is? Thanks. Lauri Alanko la@iki.fi ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners