![]() | |||||||||||||
Messages in this thread |
Ingo Molnar wrote: > * Peter Williams <peterw@aurema.com> wrote: > > >>-- at the end of each time slice (or when waking up) each task is >>given a complete new time slice and, if class SCHED_NORMAL, is put in >>a priority slot given by (static_prio + MAX_BONUS - interactive_bonus) > > > this is the Achilles' heel of approaches that try to get rid of the > active/expired array and/or try to get rid of timeslice tracking. A > CPU-bound task which schedules away for small amounts of time will get a > disproportionatly larger share of the CPU than a CPU-bound task that > doesnt schedule at all. > > just try it - run a task that runs 95% of the time and sleeps 5% of the > time, and run a (same prio) task that runs 100% of the time. With the > current scheduler the slightly-sleeping task gets 45% of the CPU, the > looping one gets 55% of the CPU. With your patch the slightly-sleeping > process can easily monopolize 90% of the CPU! If these two tasks have the same nice value they should around robin with each other in the same priority slot and this means that the one doing the smaller bites of CPU each time will in fact get less CPU than the other i.e. the outcome will be the opposite of what you claim. This does, of course, not take into account the interactive bonus. If the task doing the shorter CPU bursts manages to earn a larger interactivity bonus than the other then it will get more CPU but isn't that the intention of the interactivity bonus? Peter -- Dr Peter Williams, Chief Scientist peterw@aurema.com Aurema Pty Limited Tel:+61 2 9698 2322 PO Box 305, Strawberry Hills NSW 2012, Australia Fax:+61 2 9699 9174 79 Myrtle Street, Chippendale NSW 2008, Australia http://www.aurema.com - 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/ | ||||||||||||
| Last update: 2005-03-22 14:03 [from the cache] ©2003-2008 | |||||||||||||