lkml.org 
[lkml]   [1998]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: scheduling

On Fri, 1 May 1998, Rik van Riel wrote:

> For some things, you just want to do the O9(nr_tasks)
> stuff. Even if it only was because you need data from
> all processes to do your calculations :-)

not necessarily. Eg., the schedule() for_each_task() thing could be
avoided by saving 'i was scheduled last at' timestamps in
remove_from_runqueue() into struct_task, and fixing up p->counter
'quantums left' in add_to_runqueue(). Both are O(1). This works because
'quantums left' is only needed for runnable processes. The frequency of
calls to add_to_runqueue() is about the same as calls to schedule(), so
it's most probably a win.

this trick works because p->counter 'can be integrated' :), ie. has a
predictable future value even over several iterations.

> (fair swapping can't be done without considering _all_
> processes)

maybe there is a trick for this case too? ;)

-- mingo


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

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