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 UAA04817; Mon, 25 Nov 2002 20:00: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 UAA05129 for ; Mon, 25 Nov 2002 20:00:42 +0100 (MET) Received: from orcaware.com (bdsl.66.12.233.174.gte.net [66.12.233.174]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gAPJ0e122226; Mon, 25 Nov 2002 20:00:40 +0100 (MET) Received: from orcaware.com (localhost.localdomain [127.0.0.1]) by orcaware.com (8.12.5/8.12.5) with ESMTP id gAPJ0V76009846; Mon, 25 Nov 2002 11:00:31 -0800 Message-ID: <3DE2736D.F4FCC064@orcaware.com> Date: Mon, 25 Nov 2002 11:01:01 -0800 From: Blair Zajac X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en,x-ns1rfacHe4WNh5,x-ns2U100btwUq5f MIME-Version: 1.0 To: Xavier Leroy CC: Lauri Alanko , caml-list@inria.fr Subject: Re: [Caml-list] Why systhreads? References: <20021123090806.GA633@la.iki.fi> <20021125110133.A12077@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Xavier Leroy wrote: > > It seems that the annual discussion on threads started again. Allow > me to deliver again my standard lecture on this topic. > > Threads have at least three different purposes: > > 1- Parallelism on shared-memory multiprocessors. > 2- Overlapping I/O and computation (while a thread is blocked on a network > read, other threads may proceed). > 3- Supporting the "coroutine" programming style > (e.g. if a program has a GUI but performs long computations, > using threads is a nicer way to structure the program than > trying to wrap the long computation around the GUI event loop). [Discussion on (1), (2) and (3) removed]. To summarize, for (2) system threads are required and and you can't prevent blocking with user level threads easily or at all. For (3), making the Ocaml system support SMP is "Too complex; too hard to debug" and SMP boxes aren't all that popular. Aren't these contradictory statements? For Ocaml to support a Ocaml program to have one thread to block on a system call and to allow other threads to continue, doesn't this support SMP? Does Ocaml support this? I need the functionality to have multiple threads where one thread can block and not stop the others, either due to the OS or to the Ocaml runtime system. What am I missing here? Best, Blair -- Blair Zajac Web and OS performance plots - http://www.orcaware.com/orca/ ------------------- 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