Six - User mode Linux 2.1 for
Solaris sparc/x86
- Briefly, what is Six?
Six is Linux 2.1 "tweaked" to run as a user process on top of solaris
2.x. in
other words, "a" linux which compiles and runs on solaris like any
other user
level application.
- And in some detail?
once compiled, Six is just another solaris executable - but the code it
executes is
that of a linux 2.1 kernel. the whole of the application lies in
virtual memory like any other
solaris executable; it mmaps a configurable amount of memory (default -
32M) which is its
"ram". its "hard disk" is a solaris file that contains an ext2 file
system. the "hardware clock"
of Six is an unending stream of SIGALRMS, requested via a setitimer()
call. any keyboard
activity results comes in via a SIGPOLL. user programs are read in from
the disk file, mapped
and executed. each time the scheduler picks up a process to run, its
mappings are restored.
user programs request kernel services by issuing a SIGUSR1, which
effectively is the "software interrupt'" of Six. the core of process
switching is implemented via the solaris
context() routines - setcontext, getcontext, swapcontext, and
makecontext. As it might be
obvious, Six is heavily inspired by "SMX" - Solaris user-mode-Minix.
the debugging limitations
of smx and the "complexities" of the popular, more real, original user
mode linux were the prime reasons behind such an attempt.
- Ok so what is the idea?
idea is to have a "cute", or "toy", kernel that works, but yet can be
"tossed" or "pushed" or "fiddled" around. In other words, to take an
"industrial
strength" kernel and make a toy out of it. obviously, such an
application
will find its uses/purposes to be entirely along educational lines.
- And so where can it be
downloaded?
Here.
download it, gunzip it, untar it.
then do a "gmake symlinks".
and then a "gmake".
- Ok so what works?
there is around 140,000 lines of source code till now. the whole thing
compiles and runs on both
sparc and x86 versions of solarix 2.x. the whole of the kernel, mm, fs
with ext2, terminal and
keyboard drivers, hard disk driver, etc are done. a basic set of user
level applications have been
completed. compiling a new application and loading it into the "disk
file" - say to debug a particular system call etc - is very easy. the
entire range of system calls (almost), and a decent C library, is
available to
an application. a text screenshot of six booting up looks like this.
- And what does not?
- there is no support for any sort of
"networking" yet. which means that, if one wants to debug
say how the bind() or listen() system call works, or how the network
driver runs - there is no way right now.
- some sort (hint: heavy) of a "code cleanup"
needs to be done.
- x86 support is
lagging quite a bit. Six compiles on x86, but runs with numerous bugs.
- more user applications, more function support
in libc. right now the libc is a very thin
layer over the system call wrapper library, which itself is ultra
thin in the first place. a functional curses library would be another
idea.
- various run time bugs and race conditions need
to be fixed.
roughly - 80% done, 20% todo.
- suggestions/criticisms/bugs/abuses
etc to?
motorbreathing@gmail.com