public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Scheduler: Process priority fed back to parent?
@ 2004-03-16 15:16 Timothy Miller
  2004-03-16 15:46 ` Muli Ben-Yehuda
  2004-03-16 16:06 ` Eric
  0 siblings, 2 replies; 13+ messages in thread
From: Timothy Miller @ 2004-03-16 15:16 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Something occurred to me, so it has probably occurred to others as well.  :)

Anyhow, the idea that I had was to feed information about a process's 
behavior (interactive/not) to the process's parent (and it's parent, 
etc).  The next time the parent forks, that information is used to 
initially estimate the priority of the forked process.

This isn't perfect, but it would help distinguish between a user shell 
where compiles are being done and a user shell (say, Gnome) from which 
interactive processes are being launched.  Each process maintains a 
number which indicates the trends seen in the interactivity of its 
descendents.


Another idea I had, but which I think I've seen discussed before, was to 
cache information about individual executables.  Every time a process 
terminates (and/or periodically), the behavior of that process is fed to 
a daemon which stores it on disk (on a periodic basis) in such a way 
that the kernel can efficiently get at it.  When the kernel launches a 
process, it looks at the cache for interactivity history to estimate 
initial priority.

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.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-03-25 14:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox