2005-11-09 13:40:48

by Con Kolivas

[permalink] [raw]
Subject: [PATCH] Staircase cpu scheduler v13

Brief summary:

A complete cpu process scheduler policy rewrite based on the current O(1)
scheduler.

It uses a single priority array in a modified foreground-background design.

Each task starts at a dynamic priority dependant initially on the nice level
it is started at and then drops by one dynamic priority after one round-robin
interval (currently set to 5ms). Once it reaches lowest dynamic priority and
completes an RR there it is elevated back to its best dynamic prority.



The problem till now in current scheduler policies - nice was a determinant of
cpu% and hard intrinsic latency. There was no way relatively niced tasks
could get low latency no matter how little cpu they used in the presence of a
less niced task.


Changes in staircase v13

Based on the percentage of time sleeping compared to the time running (and
therefore the %cpu) accurately measured with the tsc clock in nanosecond
resolution, the highest dynamic priority is determined.

Any nice level can run at every possible internal dynamic priority from 0 to
39.

Nice -20 tasks always start at 0 and drop by one every rr interval till they
reach 39.

Nice 0 tasks start initially at dynamic priority 20 and drop till they reach
39. If they use less than 50% cpu (sleep 40 vs 20) they can start at dynamic
priority 0

Nice 19 tasks start at 39. If they use less than 2.5% cpu (sleep 40 vs 1) then
can start at dynamic priority 0.


Latest patch available here:
http://ck.kolivas.org/patches/staircase

and attached below is a full patch against 2.6.14.

Cheers,
Con


Attachments:
(No filename) (0.00 B)
(No filename) (189.00 B)
Download all attachments