Re: [RFC][PATCH] O(1) Entitlement Based Scheduler
From: Helge Hafting
Date: Fri Feb 27 2004 - 05:12:20 EST
Peter Williams wrote:
Timothy Miller wrote:
How about this:
The kernel tracks CPU usage, time slice expiration, and numerous other
statistics, and exports them to userspace through /proc or somesuch.
Then a user-space daemon adjusts priority.
Yes, the right statistics could allow these processes to be identified
reasonably accurately. The programs in question would have the
1. low CPU usage rate, and
2. a very regular pattern of use i.e. the size of each CPU bursts would
be approximately constant as would the size of the intervals between
There is no need for the regularity. When I use a word processor, I
use it very irregularly. Sometimes I type text, and wants each letter
typed to appear instantly. This fits well with "low cpu usage" and
sudden short bursts. There may be lots of long delays though while
I think about stuff to write. So the intervals are irregular, I still
believe I should get the boosts as long as the bursts are small.
Doing something big (such as invoking latex on a big document)
is cpu-heavy, but then it is ok not to get the boost.
Current schedulers based on io-waiting gets this right already.
The appropriate statistic to identify the second of these would be
variance or (equivalently but more expensively) standard deviation.
Whether this problem is bad/important enough to warrant the extra
overhead of gathering these statistics is a moot point. We had to
generate very high system loads on a single CPU system in order to cause
one or two skips in xmms over a period of a couple of minutes.
Well, perhaps you could give a slightly bigge boost to a very regular
thing like xmms. But even that might have some snags, the load
might change a lot when doing midi in software, depending on how
many instruments are active simultaneously. There goes the
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/