9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Jakub Jermář" <jj@comberg.cz>
To: "9fans" <9fans@cse.psu.edu>
Subject: [9fans] sleep(), sched() and ilock()
Date: Wed, 20 Sep 2000 04:40:12 +0200	[thread overview]
Message-ID: <000501c022ac$54713b00$9a6214d4@cz99.cz> (raw)

I am now reconsidering some aspects of sleeping, scheduling and ilocking
that I considered clear.

First. Am I right when supposing that the reason ilock() doesn't call
scheduler is that it has to be sure
that iunlock() executes on the same cpu?

Second. Why doesn't sleep() simply call sched() right after it releases both
locks? Am I unaware of some possible race condition?

Third. It seems to me that sleep() might disable interrupts on a different
cpu than is the one that enables them again before sleep() finishes. Is it
ok when a process brings the old processor state to the new current
processor and leaves the old one in (say) the splhi()'d state?

Jakub Jermar



             reply	other threads:[~2000-09-20  2:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-20  2:40 Jakub Jermář [this message]
2000-11-09 21:15 presotto
2000-09-20  4:35 ` Jakub Jermar
2000-11-10  2:11 Russ Cox
2000-11-10  9:17 ` Boyd Roberts
2000-09-20  5:27   ` Jakub Jermar
2000-11-10 13:06 presotto
2000-09-20  9:22 ` 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='000501c022ac$54713b00$9a6214d4@cz99.cz' \
    --to=jj@comberg.cz \
    --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).