Re:Minimalist Microkernel Memory Management
Posted: Sun Aug 14, 2005 7:47 am
Such a task would block after it has polled for its data and therefore shouldn't get more than it wants in any other system either. In such a situation the free time-slices should be given to a idle task that can handle power management much better than the kernel ever could.QuiTeVexat wrote:First, I'd like to note that even if there are tasks with allocated timeslice, there isn't necessarily any work to do. A task could have, for instance, intending to sleep, reserved a timeslice in the future at the time it wants to awaken, or have something set up on a polling interval. In that case, it needs no more timeslice than it requested, and should not be given extra timeslices it didn't ask for.
Do you really want the apps to fight for their time-slices ?!QuiTeVexat wrote:And there's nothing that keeps the other tasks from acquiring their fair share afterwards.
Well.. that's nice, but what's the advantage for the tasks if they now know that they have been revoked a time-slice. After all there's nothing they have to save and the only way to get the time-slice back is to steal it again..QuiTeVexat wrote:Tasks would be informed when they receive timeslice by this method (possibly just by informing them of the timeslice number upon entry), so the allocation would be both exposed and requested.
Making decisions based on task priority directly in the kernel doesn't sound like such a good idea to me. And what happends if it's not a driver that wants to claim a TS but a normal app ? Who makes sure that the less privileged tasks won't starve ?QuiTeVexat wrote:The driver has the right to do this because it is a higher priority task. If it is not, then it would have to wait for a lower priority task to begin executing.
I don't doubt that it can be made to work, the question is just how many kernel hacks and user-level scheduler cooperation it will require. Lottery scheduling is in my opinion a much more natural approach as it doesn't try to multiplex the CPU like any other block-device, but in a way that is really appropriate for it.QuiTeVexat wrote:So we just need to come up with some clever ideas so we don't have to sacrifice the benefits we're seeking.
regards,
gaf