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 WAA06908; Mon, 25 Nov 2002 22:06:03 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 WAA07352 for ; Mon, 25 Nov 2002 22:06:01 +0100 (MET) Received: from wetware.wetware.com (wetware.wetware.com [199.108.16.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gAPL60X29940 for ; Mon, 25 Nov 2002 22:06:00 +0100 (MET) Received: from wetware.com(ra01.wetware.com[199.108.16.81]) (2269 bytes) by wetware.wetware.com via sendmail with P:esmtp/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) id for ; Mon, 25 Nov 2002 13:05:59 -0800 (PST) (Smail-3.2.0.114 2001-Aug-6 #1 built 2002-Sep-2) Date: Mon, 25 Nov 2002 13:06:01 -0800 Subject: Re: [Caml-list] Why systhreads? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v548) Cc: The Trade To: Blair Zajac From: james woodyatt In-Reply-To: <3DE2736D.F4FCC064@orcaware.com> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.548) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk [this thread should probably migrate to ocaml_beginners@yahoogroups.com] On Monday, Nov 25, 2002, at 11:01 US/Pacific, Blair Zajac wrote: > Xavier Leroy wrote: >> >> Threads have at least three different purposes: >> 1- Parallelism on shared-memory multiprocessors. > > [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? Assuming you meant (1) not (3), then the answer is: No. They're not. > 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? Not necessarily. > Does Ocaml support this? No. All threads are serialized, so an SMP machine only loads one processor at a time. > 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? If I had to guess, I would say you are probably missing how your application is covered by case (2) or case (3) in M. LeRoy's standard lecture on the subject. I've been a very long way down this road myself, and I agree with him. If you want your application to parallelize well, the winning design pattern seems to be message passing between distributed memory processes. -- j h woodyatt markets are only free to the people who own them. ------------------- 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