[okl4-developer] Hello and first questions
Nelson Tam
nelson at ok-labs.com
Thu Mar 13 12:34:25 EST 2008
Hi Remy,
On 12/03/2008, at 10:13 PM, Remy Gottschalk wrote:
> I'm starting to get a better understanding of all this. I also finally
> discovered the l4 user manual and l4 experimental reference manual.
> Those
> two manuals also helped me a lot.
> But i wonder how relevant they are and how closely you stick to the
> architecture described there.
The authoritative reference manual for OKL4 can be found at
http://wiki.ok-labs.com/images/a/af/Okl4-progmanual.pdf
But previous versions of the L4 manuals are very useful in helping you
understand how many existing concepts in OKL4 are developed.
> I wonder for example if you still got the chief/clan scheme. If
> iguana can
> be seen as sigma0 and/or an OS personality.
The chief / clan scheme is not used in OKL4. A more powerful and
efficient replacement is found in L4_IpcControl(), which you will find
documented in the OKL4 manual.
The best analogy to Iguana is the roottask thread. The roottask, like
sigma0, is privileged. It alone can make privileged kernel syscalls.
sigma0 itself is not used anymore. By default there is only one one
privileged thread, and that's roottask.
You are correct in saying that Iguana is an OS personality. We
usually refer to the entire software stack as a whole, namely OKL4.
> Let me resume what i have understand so far so you can correct me,
> and it
> could help someone else trying to get inside this interesting but
> pretty
> tough project.
> - Pistachio is the L4 micro kernel thus it provide the strick minimal
> services.
More precisely, the L4 mircokernel provides the minimal set of
features that is required, in order to build a trustworthy, secure and
correct operating system.
> - The services we usually expect an OS to provide are given by
> servers.
It depends on what service you're talking about, but servers are used
prominently. On the other hand, Magpie the IDL compiler does a very
good job at hiding these details from the user, so on the client side,
it is usually as simple as making a function call. The programmer is
relieved from the concern of whether the service is implemented behind
a library or server.
> - Iguana server is the root task and a privileged server (It can call
> privileged l4 syscall)
Correct.
> - Kenge is the full framework.
We don't quite use Kenge in our vocabulary anymore. Kenge used to be
a lot of things, including helper libraries and the build system, and
you will still see a lot of references to it in OKL4. But its precise
definition is not crucial in understanding OKL4, so I will leave it at
that :)
> Now some questions.
>
> Is all the scheduling done by L4 or does iguana also take part in the
> process ?
All scheduling _decisions_ are made by the L4 kernel. Threads are
able to set the priority levels of themselves or other threads (but no
higher than their own priority level). The scheduling policy follows
a hard-priority, round-robin scheme. Hard priority means a lower
priority thread could never run if a higher priority thread is able to
run.
> Want kind of modification have been done to the linux kernel in
> order to
> interface it with Okl4 ?
The approach we took in para-virtualising Linux is to essentially
implement an architecture called "l4". So almost all of our code
resides in the arch-specific areas of the Linux code tree, namely arch/
l4 and include/asm-l4. The generic code in Linux is untouched, save a
few minor exceptions.
So when we compile OKLinux, we give the Linux config something like
CONFIG_L4 as opposed to CONFIG_I386, in other words we compile it
against the "l4" architecture.
Some header files from include/asm-arm or include/asm-i386 are
referenced from include/asm-l4, if they can be used unmodified.
Other points of note:
- Linux run completely in unprivileged mode on the CPU
- each Linux thread is mapped to an L4 thread, so Linux thread
creation is modified.
- Linux still keeps track of its page tables, but the real VM
mappings are performed by OKL4.
- L4 now receives interrupts and exceptions instead of Linux.
Interrupts that Linux ought to receive (e.g. for device drivers) are
redirected to the Linux irq handlers as necessary. Exceptions that
occur due to Linux user threads performing Linux syscalls are handled
similarly.
That's all I can think of off the top of my mind for now :)
--
(nt)
Nelson Tam
nelson at ok-labs.com
More information about the Developer
mailing list