All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ion Badulescu <ionut@moisil.cs.columbia.edu>
To: root@chaos.analogic.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: how to let all others run
Date: Thu, 5 Apr 2001 15:29:54 -0700	[thread overview]
Message-ID: <200104052229.f35MTse22138@moisil.dev.hydraweb.com> (raw)
In-Reply-To: <Pine.LNX.3.95.1010405124737.15946A-100000@chaos.analogic.com>

On Thu, 5 Apr 2001 12:52:28 -0400 (EDT), Richard B. Johnson <root@chaos.analogic.com> wrote:

> Only an observation:
> 
> 
> main()
> {
>    nice(19);
>    for(;;)
>        sched_yield(); 
> }
> 
> does...
> 
[...]
> 
> It consumes 99.1 percent CPU, just spinning.

And, umm, what *exactly* would you expect it to do? It's the only process
consuming cpu, and sched_yield() certainly doesn't yield to the idle
task. So it's basically the same as a "for(;;);" program, except it
spends more time in kernel space and schedules faster when something
else needs the cpu.

It's 100% expected behavior.

Ion

-- 
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.

      parent reply	other threads:[~2001-04-05 22:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-02 14:05 how to let all others run Oliver Neukum
2001-04-04 20:11 ` John Fremlin
2001-04-04 21:00   ` Richard B. Johnson
2001-04-05 15:55     ` John Fremlin
2001-04-05 16:52       ` Richard B. Johnson
2001-04-05 20:41         ` Oliver.Neukum
2001-04-05 21:08           ` Richard B. Johnson
2001-04-05 22:29         ` Ion Badulescu [this message]

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=200104052229.f35MTse22138@moisil.dev.hydraweb.com \
    --to=ionut@moisil.cs.columbia.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.