9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: leimy2k@gmail.com, 9fans@9fans.net
Subject: Re: [9fans] Plan 9 on Blue Gene
Date: Thu, 31 Jul 2008 10:01:29 -0400	[thread overview]
Message-ID: <5e33596f6e327984bcba73a0386dfd83@quanstro.net> (raw)

> I've been writing a lot of Erlang code lately, and I keep thinking about,
> but not having too much time to do much about, wanting to have a runtime for
> the libthread "threads" that could auto-schedule them to libthread "procs",
> in much the same way Haskell "sparks" may end up real threads, or Erlang
> processes, might run in parallel.

the model is that there may be any number of procs sharing memory,
channels, etc.  each proc has at least one thread.  threads have their
own stack and one one-at-a time.

since threads run one at a time and have a few, well-known calls that
implicitly schedule, one often needs no locking.  this is like the big
kernel lock in linux.  and so in general converting threadcreate to
proccreate will break programs which rely on the implicit mutex
between threads to keep memory accesses from overlapping.

my personal and uninformed opinion is that it's better to be explicit
about resource sharing and just lock critical sections—or better yet,
don't overlap data use.  use channels to transfer data.  if there's no
overlapping data access then proccreate and threadcreate may usually
be interchangable.

another personal opinion is that parallelism can be a
"performance hack".  however, when the speed differences
between various resources (e.g. disk drive seek vs anything else)
is great enough, the difference between working and broken
can be parallelism.

- erik



             reply	other threads:[~2008-07-31 14:01 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31 14:01 erik quanstrom [this message]
     [not found] <2049e07e918215a675b00f15ee549436@quanstro.net>
2008-07-31 14:28 ` David Leimbach
2008-07-31 15:20   ` erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2008-07-26 18:37 Steven Vormwald
2008-07-26 18:47 ` Eric Van Hensbergen
2008-07-30 12:32   ` Roman V. Shaposhnik
2008-07-30 14:07     ` Eric Van Hensbergen
2008-07-30 15:10       ` ron minnich
2008-07-30 15:21         ` Steven D. Vormwald
2008-07-30 15:38           ` Eric Van Hensbergen
2008-07-30 15:41           ` ron minnich
2008-07-30 16:10             ` Steven D. Vormwald
2008-07-30 17:42               ` ron minnich
2008-07-30 17:52                 ` Steven D. Vormwald
2008-07-31 21:32               ` Charles Forsyth
2008-07-30 16:34             ` Joel C. Salomon
2008-07-30 15:25         ` gdiaz
2008-07-30 15:36           ` Eric Van Hensbergen
2008-07-30 23:36             ` David Leimbach
2008-07-31  0:02               ` ron minnich
2008-07-31  0:45                 ` erik quanstrom
2008-07-31  1:48                 ` David Leimbach
2008-07-31  2:23                   ` ron minnich
2008-07-31 12:53                     ` Philippe Anel
2008-07-31 13:35                       ` David Leimbach
2008-07-31 14:11                         ` Philippe Anel
2008-07-31 14:32                           ` David Leimbach
2008-07-31 16:04                       ` ron minnich
2008-08-04 23:19                     ` Uriel
2008-07-31 13:24             ` gdiaz
2008-07-31 13:24             ` gdiaz
2008-07-30 15:40           ` ron minnich
2008-07-30 17:36             ` don bailey
2008-07-30 17:39               ` Benjamin Huntsman
2008-07-30 17:47                 ` ron minnich
2008-07-30 18:03               ` don bailey
2008-07-30 18:08                 ` Eric Van Hensbergen
2008-07-30 18:18                 ` ron minnich
2008-07-30 18:21                 ` erik quanstrom
2008-07-30 18:32                   ` ron minnich
2008-07-31 22:03                   ` Charles Forsyth
2008-07-31 22:06                     ` ron minnich
2008-07-31 21:27           ` Charles Forsyth
2008-07-30 15:43         ` Jack Johnson

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=5e33596f6e327984bcba73a0386dfd83@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    --cc=leimy2k@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).