The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: <ron@ronnatalie.com>
To: "'TUHS main list'" <tuhs@minnie.tuhs.org>
Subject: [TUHS] C Threading
Date: Fri, 29 Jun 2018 12:27:29 -0400	[thread overview]
Message-ID: <012201d40fc6$137b3590$3a71a0b0$@ronnatalie.com> (raw)

Thread local storage and starting threads up is largely a rather
inconsequential implementation detail.   When it comes down to actual
parallel programming, of which I have done more than a little, the big thing
is thread synchronization.    It's rather hardware dependent.    You can
pretty much entirely wipe out any parallism gains with a synchronization
call that results in a context switch or even a serious cache impact.    On
one side you have machines like the Denelcor HEP where every memory word had
a pair of semaphores on it and the instructions could stall the process
while waiting for them and the hardware would schedule the other threads.
On the other hand you have your x86, which you can do a few clever things
with some atomic operations and inlined assembler but a lot of the
"standard" (boost, pthread, etc...) synchs will kill you.



             reply	other threads:[~2018-06-29 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-29 16:27 ron [this message]
2018-06-29 16:59 ` Warner Losh

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='012201d40fc6$137b3590$3a71a0b0$@ronnatalie.com' \
    --to=ron@ronnatalie.com \
    --cc=tuhs@minnie.tuhs.org \
    /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).