On Thu, Jun 26, 2008 at 06:47, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
> So why are you doing it this way, then? :-))
Because that's what fair schedulers do :P
> We have to keep track of the CPU usage of every thread anyway, so that
> at least wouldn't cause much additional trouble. Have you thought about
> using the thread priority as well as the CPU usage to compute the
> ratios?
Of course. But this would break the fairness model implemented via
thread grouping.
> For example, you could do something like ("priorityWeight" * priority /
> average CPU usage) and would therefore automatically boost high
> priority threads that don't use their full quantum over those that do.
> The "priorityWeight" would just be some arbitrarily chosen value that
> defines how important the priority is in comparison with the CPU usage.
My opinion still is that threads belonging to the same priority level
should have equal access to the CPU, regardless of the fraction of
quantum that they use. Quantum-based boosting isn't working for Linux,
so I'll avoid going that route for now. I guess I could square the
ratios instead of using straight division. Or something like that.
Anyway, I'll put the branding strategy on hold until I get a better
grasp of the locking primitives as used in Haiku.
A.