public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David Schwartz" <davids@webmaster.com>
To: "Robert Guerra" <rob_guerra@usa.net>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: system call sched_yield() doesn't work on Linux 2.2
Date: Mon, 5 Feb 2001 12:03:03 -0800	[thread overview]
Message-ID: <NCBBLIEPOCNJOAEKBEAKOEPFNHAA.davids@webmaster.com> (raw)
In-Reply-To: <20010205043355.12353.qmail@nwcst276.netaddress.usa.net>


> David,

>     please try to reply courteously to queries by other people.
> And specially
> when you're the one who's wrong. Mohit is right - Linux had a
> long standing problem where sched_yield() system call didn't work. It
> was only fixed in Linux 2.4.

	Didn't work in accordance with what standard? I just checked SuSv2, and it
appears to me that a 'sched_yield' that had no user-visible affects would be
fully compliant.

> > > Also, it is NOT unrealistic to expect perfect alternation.
> >
> >	Find one pthreads expert who agrees with this claim. Post it to
> > comp.programming.threads and let the guys who created the standard
> > laugh at you. Scheduling is not a substitute for synchronization, ever.
>
> I don't claim mastery over threads. But I have been programming
> with threads
> for a very long time and am well aware of the way OS schedulers
> work. In the example that Mohit posted, it is reasonable to expect
> perfect alternation once both threads have started. And it certainly isn't
> something to laugh at (even if it were wrong).

	No, it is completely unreasonable to expect the scheduler to provide
perfect thread synchronization. Implementations that provide threads in user
space may easily be able to provide this, but implementations of kernel
threads will not have it so easy.

	DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-02-05 20:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-05  4:33 system call sched_yield() doesn't work on Linux 2.2 Robert Guerra
2001-02-05 20:03 ` David Schwartz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-02-05  7:27 Mohit Aron
2001-02-05  5:29 Matt
2001-02-05  6:03 ` Davide Libenzi
2001-02-05  4:02 Mohit Aron
2001-02-05 16:49 ` Rik van Riel
2001-02-04 17:45 Mohit Aron
2001-02-05  0:21 ` David Schwartz
2001-02-03 22:53 Mohit Aron
2001-02-04 11:08 ` David Schwartz

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=NCBBLIEPOCNJOAEKBEAKOEPFNHAA.davids@webmaster.com \
    --to=davids@webmaster.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob_guerra@usa.net \
    /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