From: james woodyatt <jhw@wetware.com>
To: Blair Zajac <blair@orcaware.com>
Cc: The Trade <caml-list@inria.fr>
Subject: Re: [Caml-list] Why systhreads?
Date: Mon, 25 Nov 2002 13:06:01 -0800 [thread overview]
Message-ID: <B39CC849-00B9-11D7-AC61-000393BA7EBA@wetware.com> (raw)
In-Reply-To: <3DE2736D.F4FCC064@orcaware.com>
[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 <jhw@wetware.com>
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
next prev parent reply other threads:[~2002-11-25 21:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-23 9:08 Lauri Alanko
2002-11-24 7:36 ` Sven Luther
2002-11-24 17:41 ` Chris Hecker
2002-11-24 18:12 ` Basile STARYNKEVITCH
2002-11-24 21:10 ` Christopher Quinn
2002-11-24 17:14 ` Vitaly Lugovsky
2002-11-24 17:18 ` Lauri Alanko
2002-11-24 18:27 ` Dmitry Bely
2002-11-24 23:14 ` Vitaly Lugovsky
2002-11-27 14:33 ` Tim Freeman
2002-11-29 13:25 ` Vitaly Lugovsky
2002-11-25 10:01 ` Xavier Leroy
2002-11-25 14:20 ` Markus Mottl
2002-11-25 19:01 ` Blair Zajac
2002-11-25 21:06 ` james woodyatt [this message]
2002-11-25 22:20 ` Chris Hecker
2002-11-26 6:49 ` Sven Luther
2002-11-27 13:12 ` Damien Doligez
2002-11-27 18:04 ` Chris Hecker
2002-11-27 21:04 ` Gerd Stolpmann
2002-11-27 21:45 ` [Caml-list] Calling ocaml from external threads Quetzalcoatl Bradley
2002-11-26 9:02 ` [Caml-list] Why systhreads? Xavier Leroy
2002-11-26 9:29 ` Sven Luther
2002-11-26 9:34 ` Xavier Leroy
2002-11-26 9:39 ` Sven Luther
2002-11-26 18:42 ` Chris Hecker
2002-11-26 19:04 ` Dave Berry
2002-11-27 0:07 ` Lauri Alanko
2002-11-26 19:23 Gregory Morrisett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B39CC849-00B9-11D7-AC61-000393BA7EBA@wetware.com \
--to=jhw@wetware.com \
--cc=blair@orcaware.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox