public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David Schwartz" <davids@webmaster.com>
To: "Mohit Aron" <aron@Zambeel.com>, <linux-kernel@vger.kernel.org>
Subject: RE: system call sched_yield() doesn't work on Linux 2.2
Date: Sun, 4 Feb 2001 03:08:32 -0800	[thread overview]
Message-ID: <NCBBLIEPOCNJOAEKBEAKMEICNHAA.davids@webmaster.com> (raw)
In-Reply-To: <200102032253.OAA08890@mohit-linux.zambeel.com>


	The program you attached worked perfectly for me. You need to
'fflush(stdout);' after each 'printf'. You didn't expect perfect alternation
did you? That's totally unrealistic. You cannot use the scheduler as a
synchronization mechanism.

--

Thread1
Thread1
Thread2
Thread1
Thread1
Thread2
Thread1
Thread2
Thread2
Thread2

--

	DS

> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org]On Behalf Of Mohit Aron
> Sent: Saturday, February 03, 2001 2:53 PM
> To: linux-kernel@vger.kernel.org
> Subject: system call sched_yield() doesn't work on Linux 2.2
>
>
> Hi,
> 	the system call sched_yield() doesn't seem to work on Linux
> 2.2. Does
> anyone know of a kernel patch that fixes this ?
>
> Attached below is a small program that uses pthreads and demonstrates that
> sched_yield() doesn't work. Basically, the program creates two
> threads that
> alternatively try to yield CPU to each other.
>
>
> - Mohit
>
>

-
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-04 11:08 UTC|newest]

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

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=NCBBLIEPOCNJOAEKBEAKMEICNHAA.davids@webmaster.com \
    --to=davids@webmaster.com \
    --cc=aron@Zambeel.com \
    --cc=linux-kernel@vger.kernel.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