SMP Scheduling

Julian Stecklina <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
Hello,

I am porting Bastei[1], which is a new userland for the Fiasco
microkernel, to Pistachio. The initial port is done and (minus some
bugs) is working fine. 

As I am particularly interested in Pistachio's SMP capabilites, I am
planning to add SMP-awareness to the Bastei system. At the moment,
Bastei does not handle scheduling at all, which leaves me with a lot of
possible paths to persue. But since my experience with L4 is quite
small, I tried to collect some information about scheduling in Pistachio
first to avoid basing this work on false assumptions (please correct me
if I am wrong):

 - Threads have priorities. Threads in one priority class are served
   round-robin. Higher priority queues are served first.

 - A thread has a timeslice size and a "total quantum". Each time the
   thread is preempted (or calls L4_Yield), the time it has consumed is
   subtracted from the total quantum until it is depleted. At this point
   the thread's scheduler gets a preemption message.

 - Whether the preemption message is delivered to the scheduler or not,
   a thread's quantum is reset to its initial value and the thread is
   runnable again.

 - Pistachio always creates threads on the first CPU unless told
   otherwise via L4_ThreadControl.

 - Because preemption messages are sent with timeout 0, one would need
   at least one thread per CPU that handles preemption
   messages. Otherwise one could lose messages when the scheduler is
   busy.

Is this basically right?

MfG,
Julian Stecklina

Footnotes: 
[1] To quote the paper: "Bastei is an experiment to elaborate on a new
    multiserver OS architecture with the focus on security and safety."
    
    A paper describing its architecture can be found here:
    http://www.inf.tu-dresden.de/index.php?node_id=1429&ln=en#T2006120000

-- 
Well, take it from an old hand: the only reason it would be easier to
program in C is that you can't easily express complex problems in C,
so you don't. - Erik Naggum (in comp.lang.lisp)

(Spam-Experiment: http://cthulhu.c3d2.de/~astro/badpit.html )
signature.asc (application/pgp-signature, 196 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkgWea0ACgkQoSK1GFwLZrOgXQCg6VidhPI7P5v1PZ1aG4teFJ0A
0QAAn2/SJeDd3cpU83Q0ayltRzUEOZbt
=A408
-----END PGP SIGNATURE-----
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.