Re: User mode scheduling

Espen Skoglund <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
[Martin Christian]
> Hi!
> I was wondering how a user mode scheduler could be implemented with
> L4Ka::Pistachio? Let's say thread S shall be scheduler for A and
> thread A is created with the according parameter.  Is A still
> considered by the kernel scheduler? Or does A only get time slices
> if S donates them to A? Or is there any undocumented scheduling
> protocol similar to the one in OKL4? How is user mode scheduling
> supposed to work?

Yes, A is considered by the kernel scheduler.  The schduler of A will
only be notified when the total quantum of A runs out.  That is, when
the total quantum runs out the kernel will synthesize an RPC to S.
The scheduler thread S should then re-initialize the total quantum of
thread A.

One could give S more control of the scheduling of A by setting the
total quantum of A to the timeslice length.  Each time the timeslice
(and thus also the total quantum) is consumed the scheduler S will be
invoked.  Another approach would be to set timeslice and total quantum
to zero and only schedule thread A by donating the timeslice (via
ThreadControl or Ipc).  Mind you, though, the total qunatum RPC is not
implemented properly in the current L4Ka kernel, so all these
solutions are purely theoretical.  The typical way to run things is to
just specify an infinite total quantum.

There was a recent Diplomarbeit in Karlsruhe that slightly modified
the scheduling in the kernel.  A thread could be set up to always
deliver a preemption RPC to its scheduler if it got preempted in any
manner (i.e., a higher priority thread wakes up or current timeslice
runs out).  The scheduler would then donate time to its client threads
by answering the preemption RPC and get notified by another RPC when
the thread got preempted.

	eSk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.