Short answer, for UP kernels yes.
If all the tasks on the runqueue have the same priority (nice value),
then they will all (almost) have the same goodness value at the start
of the new epoch. However, tasks with the same memory map as the
currently running task will get their goodness value boosted by 1.
The next task to run will be the first one found that has the same
memory map as the currently running task. The check for 'still_running'
ensures that the the currently running task will be found first.
Not sure if this is by design, but this is what the code does.
Also, note that this is only true for UP kernels. In SMP, there
are other factors to consider and a level of unpredictability
due to racing with other CPUs as a result of dropping the runqueue
lock during the 'recalculate' operation.
-- Mike Kravetz kravetz@us.ibm.com IBM Linux Technology Center (we're not at Sequent anymore) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/