public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Timothy Miller <miller@techsource.com>
To: Muli Ben-Yehuda <mulix@mulix.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Scheduler: Process priority fed back to parent?
Date: Tue, 16 Mar 2004 11:19:46 -0500	[thread overview]
Message-ID: <40572922.10109@techsource.com> (raw)
In-Reply-To: <20040316154611.GA31510@mulix.org>



Muli Ben-Yehuda wrote:
> On Tue, Mar 16, 2004 at 10:16:50AM -0500, Timothy Miller wrote:
> 
> 
>>This way, after gcc has run a few times, it'll be flagged as a CPU-bound 
>>process and every time it's run after that point, it is always run at an 
>>appropriate priority.  Similarly, the first time xmms is run, its 
>>interactivity estimate won't be right, but after it's determined to be 
>>interactive, then the next time the program is launched, it STARTS with 
>>an appropriate priority:  no ramp-up time.
> 
> 
> This is something that I've thought of doing in the past. The reason I
> didn't pursue it further is that it's impossible to get it right for
> all cases, and it attacks the problem in the wrong place. The kernel
> shouldn't need to guess(timate) what the process is going to do. The
> userspace programmer, who knows what his process is going to do,
> should tell the kernel. 

I agree... somewhat.  It would be nice if we could trust every program 
to always do the right thing, always accurately indicate its priority, 
and always yield the CPU at the best time.  But if that were reality, 
we'd still be using cooperative multitasking.

Unfortunately, the OS has to play babysitter to processes, because 
they're guaranteed to misbehave.  Preemption exists to ensure fairness 
amongst processes.  Thus, while you're right that it would be nice to 
have processes report their CPU requirements, if we were to actually DO 
that, it would be a disaster.



  reply	other threads:[~2004-03-16 16:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-16 15:16 Scheduler: Process priority fed back to parent? Timothy Miller
2004-03-16 15:46 ` Muli Ben-Yehuda
2004-03-16 16:19   ` Timothy Miller [this message]
2004-03-16 16:02     ` Muli Ben-Yehuda
2004-03-16 16:55       ` Timothy Miller
2004-03-16 18:49   ` Horst von Brand
2004-03-25 14:16     ` Pavel Machek
2004-03-16 16:06 ` Eric
2004-03-16 16:46   ` Timothy Miller
2004-03-16 19:23     ` Eric
2004-03-16 21:35       ` Timothy Miller
2004-03-16 23:05         ` Eric
2004-03-18  2:55       ` 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=40572922.10109@techsource.com \
    --to=miller@techsource.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mulix@mulix.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