9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: jmk@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Kernel question: i386 test-and-set problem
Date: Wed, 19 Jul 2000 22:03:27 -0400	[thread overview]
Message-ID: <200007200203.WAA24856@cse.psu.edu> (raw)

	>Richard Miller <miller@hamnavoe.demon.co.uk> writes:
	>
	>Russ Cox <rsc@plan9.bell-labs.com> writes:
	>
	>> ... Since we don't
	>> play funny games with lock-free data structures, ...
	>
	>A notable exception is the funny game which sleep() and wakeup()
	>play with the Rendez structure, which no longer has the lock
	>which protected it in the original 2nd edition kernel.  This game
	>is not just funny but dangerous, as evidenced by the new coherence()
	>calls introduced to counteract the resulting vulnerability to weakly
	>coherent memory on some multiprocessors, and the long explanatory
	>comment.
	>
	>Kids, don't try this at home ... practise the discipline of Safe
	>Sharing (always use a lock) and you won't need to worry about
	>memory coherence. 
	>
	>-- Richard Miller

I think that's a misrepresentation.

The sleep/wakeup/postnote Rendez structure still has a lock which
protects it, it just moved somewhere else. The 2nd Edition code would
have needed coherence() calls too, but in different places, had it not
been rewritten before we tried running on a multiprocessor Pentium Pro.
Sleep/wakeup/postnote in the 2nd Edition was hopelessy broken in many
other ways.

--jim


             reply	other threads:[~2000-07-20  2:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-20  2:03 jmk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-03  9:56 miller
2000-08-02 16:24 presotto
2000-08-02 15:43 jmk
2000-08-02 14:51 miller
2000-08-02 13:20 presotto
2000-08-02  8:32 miller
2000-07-31 17:26 presotto
2000-07-23 14:41 miller
2000-07-21 13:15 presotto
2000-07-21  9:10 miller
2000-07-20 17:09 presotto
2000-07-20 13:54 miller
2000-07-10 16:21 miller
2000-07-10 12:40 Russ Cox
2000-07-11  8:51 ` Jakub Jermar
2000-07-10  9:57 Jakub Jermar

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=200007200203.WAA24856@cse.psu.edu \
    --to=jmk@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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).