[coyotos-dev] Sleep for interval
William Leslie
math.gasm.ttg at gmail.com
Tue Oct 9 08:43:16 EDT 2007
On 10/5/07, Jonathan S. Shapiro <shap at eros-os.com> wrote:
>
> On Fri, 2007-10-05 at 01:50 +1000, William Leslie wrote:
> > You could have the kernel hand off control to the scheduler after the
> > interrupt, and if a task was supposed to be given control at this
> > critical
> > time, it will be next on the list.
>
> Yes you could. That amounts to virtualizing the interval timer
> interrupt, which is certainly possible.
>
> But your original note implied something quite different: moving the
> entire scheduler into user land. This can also be done. Instead of
> viewing the interval timer as a reason to pick the next process from the
> ready queue, you view it as forcing a directed context switch into the
> (user level) scheduler. The user level scheduler in turn invokes the
> process that should run, "donating" it the remainder of the scheduler's
> slice after reprogramming the slice timeout appropriately.
>
> ...the issue in this case is a little more
> subtle: we are trying to decide whether it is better to implement the
> list in user mode or in kernel mode.
>
After some more thought on the subject, I can't see any real benefit to
putting the top level scheduler outside the kernel. If there ever was a
demand to do so, it would be easy to do, by leaving only one entry in the
top level, in-kernel scheduler.
That said, tiered scheduling is itself horribly complicated, because of the
need to nest timer interrupts in order for a second level scheduler to
subdivide its own execution time, among other things. Do we intend to
allow tiered scheduling?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/coyotos-dev/attachments/20071009/9d1e1838/attachment.html
More information about the coyotos-dev
mailing list