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 WAA05776; Wed, 27 Nov 2002 22:04:43 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 WAA05892 for ; Wed, 27 Nov 2002 22:04:42 +0100 (MET) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gARL4f126055; Wed, 27 Nov 2002 22:04:41 +0100 (MET) Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 18H9MM-0000Pf-00; Wed, 27 Nov 2002 22:04:38 +0100 Received: from [80.129.96.180] (helo=gate.gerd-stolpmann.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 18H9ML-0002bY-00; Wed, 27 Nov 2002 22:04:37 +0100 Received: from ice.gerd-stolpmann.de (ice.gerd-stolpmann.de [192.168.0.13]) by gate.gerd-stolpmann.de (Postfix) with ESMTP id 53AF7CCDD; Wed, 27 Nov 2002 22:04:33 +0100 (CET) Received: from ice (localhost [127.0.0.1]) by ice.gerd-stolpmann.de (Postfix) with ESMTP id 176D4B0B7; Wed, 27 Nov 2002 22:04:32 +0100 (CET) Date: Wed, 27 Nov 2002 22:04:31 +0100 From: Gerd Stolpmann To: Chris Hecker Cc: Damien Doligez , caml-list@inria.fr Subject: Re: [Caml-list] Why systhreads? Message-ID: <20021127210431.GA1066@ice.gerd-stolpmann.de> References: <4.3.2.7.2.20021125134858.037b4ef8@localhost> <4.3.2.7.2.20021127090821.032eae90@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4.3.2.7.2.20021127090821.032eae90@localhost>; from checker@d6.com on Mit, Nov 27, 2002 at 19:04:55 +0100 X-Mailer: Balsa 1.4.1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Am 2002.11.27 19:04 schrieb(en) Chris Hecker: > Now, as you point out, threads are complicated to design, program, and > debug. I agree with this completely. As I said, I never use threaded > designs if I can avoid it. However, if it becomes very easy to spawn very > small scale parallel threads in C on an HT processor, then it could make a > big performance difference for some algorithms. People are working on C > compilers that have these extensions built in. Intel's got one > now. They'll be first, everyone will ignore it until the installed base is > big enough, and then it'll go into msvc. MMX, SSE, and 3dnow followed the > exact same path. If it is really easy to spawn a second thread (or wake an existing thread up), this could be useful for OCaml's runtime system internally. I can imagine that it is not that difficult to rewrite the GC such that it runs in two threads. I don't mean that it runs in parallel with the rest of the program (expensive locking problems), but that the runtime system wakes two GC threads up when it is necessary, and waits until both threads have done their job. That would reduce the time spent with GC, maybe from 30% to 20% for a typical program. Of course, this is only possible when there are good ideas to parallelize the GC such that the extra coordination time does not eat up the extra CPU power. Just an idea, I really do not know whether it is doable (or worth doing it). Gerd ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de ------------------------------------------------------------ ------------------- 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