Re: Tree based scheduling

Andreas Jellinghaus (aj@dungeon.inka.de)
Mon, 26 Jan 1998 12:42:57 +0100


i have written a scheduling policy for linux.
normal scheduler gives each process the same time (+/- niceness).
my new scheduler gives each user the same time (+/- niceness).

the scheduler works as usual, till the counter of all processes are 0.
then every process has his counter increased (as usual, with respect to
niceness), but then the new policy works :
per user the number of processes in the new policy is counted, and all
these processes get their counter divided by this number.

because this would end with all processes only a very small counter, i
changed the whole thing a bit :
the first process gets his counter divided by 2, the second diviced by
4, the third devided by 8 etc.
because 1/2 + 1/4 + 1/8 wouldn't give a total of one, the last process
gets his counter doubled, so that 1/2 + 1/4 + 1/4 gives a total of 1.

i also added a lower limit : only up to 5 processes get time, if a user
has more processes (with this special policy), they get not time.
less than 1/16 of normal time would notbe very usefull.

and to make sure, every process gets the same time, i rotate this per
user list of processes. so every process gets at least half the normal
time in turn.

it's implemented for 2.0.30, available on ftp.inka.de/sites/dungeon/kernel
but that patch contains also other related changes (see readme). i will
split the whole thing. the patch should also work with 2.1.

andreas