Re: Scheduler patch recoding ...

From: fsawd@uaf.edu
Date: Fri Jan 21 2000 - 06:50:04 EST


I'm just courious if anybody tried a multiple-run queue scheduler.
More precisely, when a process belongs to a run queue which represents
it's priority in some way.
For example in functions add_to_runqueue, move_last_runqueue,
move_first_runqueue instead of doing

        list_add(&p->run_list, &runqueue_head);

do
        list_add(&p->run_list, &runqueue_head[p->priority]);

and then in schedule():

for (q=MAX_PRIORITY; q>=0 && !found; --q) {
        tmp = runqueue_head[q].next;
        while (tmp != &runqueue_head[q]); {
                p = list_entry(tmp, struct task_struct, run_list);
                if (can_schedule(p)) {
                        int weight = goodness(p, this_cpu, prev->active_mm);
                        if (weight > c)
                                c = weight, next = p, found = 1;
                }
                tmp = tmp->next;
        }
}

..has anybody tried something similar?

-Adrian Drzewiecki

-
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/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:25 EST