lkml.org 
[lkml]   [1999]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch] new scheduler
Date
> Greg Lindal suggested this alternate solution for schedule selection:
>
> while (p!= &init_task)
> {
> if (can_schedule())
> {
> int weight = goodness(p,prev,this_cpu);
> if (weight>=0)
> {c=weight, next=p; break;}
> } p = p->next_run
> }

This was just a straw man to test if the overhead could be
dramatically reduced by an O(1) algorithm. It is possible to make the
current algorithm O(1).

Which processes can be scheduled?

1) The one with the highest priority
2) The one with the highest prority on the same CPU (+PROC_CHANGE_PENALTY)
3) The current process (+1)

If you keep the runq sorted by priority, you can do a small search to
find (2) and (3); it ought to be a lot cheaper than O(N).

I haven't looked at 2.2.8, though, so all this may be moot.

-- g

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.040 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site