Hi Brent,
this is what I'm planning to do next to get used to the L4-Ka interface.
If you are interested, let's do this together. Basically it's about
exercising misc. L4 syscalls in the root_task itself. Once we understand
this, we can grab libmom and add L4 sysdeps to glibc and the Hurd.
01. map from sigma0 the kernel info page into the address space of the
root_task. printf() its contents, especially its 'clock' field
which is updated by the ukernel. sleep some useconds and printf
clock again.
[-> learn more about sigma0 rpc protocol, how to send/receive a
message to/from sigma0, some memory managment issues in general
and l4_sleep(). ]
02. activate some threads in root_task, and let each thread continouusly
putc() a unique identifying character to the screen. look at the
resulting pattern.
A control thread could getc() chars from keyboard and use this char
to start/stop the thread that prints this char.
[-> learn about threads and scheduling.]
Add a pager to a thread which just printf()s each page request,
before forwarding it to sigma0. Alternatively, trap the request
and handle it by mapping an own page to the requester. Finally,
reclaim pages that are not needed anymore (how? and how to get
notified about this condition?).
[-> learn about pagers and the L4 application/pager protocol.]
03. create new (child) tasks and:
* map/grant some pages
* send/receive messages: short message, long message, with and without
string dopes etc..
* synchronize threads via blocking l4-receive syscalls.
[-> learn about messages, ipc calls.]
04. understand what rmgr really does, what its interfaces to the root_task
and other tasks are (a.k.a. how to request/receive ressources from rmgr)
and try to implement Okuji's idea about relocation of modules (glinux)
so that we can boot glinux with vanilla GNU Grub (no modaddr).
05. Attach a root_task thread to one interrupt number (say com1, clock,
keyboard or whatever) and printf/acknowledge each received interrupt.
[-> Handling interrupts. Is it possible to get an interrupt that is
already bound by rmgr? Hmmm... ]
[-> What about chaining interrupts/events? ]
Write a trivial device driver server (like sorta translator), e.g.
a clock device, that gets clock interrupts and reads the clock page
in the kernel to update its internal notion of time. Add protocol
so that other threads/tasks can ask the time via RPC (simple message)
from this clock server.
[-> generalize this to device driver servers in general. Think about
a Hurd abstraction to access such servers. Driver-Translators?
Driver-IPC? ]
06. Grab the code of a real device driver from OSKit and try to turn it
into a device driver server as in 05.
07. [...]
Real world examples are located in RMGR source code, and in the sources
of L4-Fiasco apps and L4Linux. I'll continue to use L4Ka right now though,
simply because I can compile it without problems on my FreeBSD box ;-).
Any suggestions?
-Farid.
--
Farid Hajji -- Unix Systems and Network Admin | Phone: +49-2131-67-555
Broicherdorfstr. 83, D-41564 Kaarst, Germany | farid.hajji(a)ob.kamp.net
- - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -
Murphy's Law fails only when you try to demonstrate it, and thus succeeds.