[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: User Mode Mach?



On Tue, Dec 21, 1999 at 02:08:00PM -0500, Glenn Chambers wrote:
> There is a 'User Mode Linux' project up at SourceForge,
> 
>    http://www.sourceforge.net/project/index.php?form_grp=429
> 
> which is a copy of the Linux kernel hacked to run as a
> set of processes under another Linux kernel.

A case of ``reflection'' again.

> This leads me to wonder whether a user-mode GnuMach is
> possible.  The project home page talks about the benefits

I'll try to answer this.

#ifdef __USE_RANT

Everything is possible, but how deep we may be in the Turing tar-pit
depends on what it is exactly that you mean.

If you are referring to running Mach as a user process under Mach,
then indeed it is possible ; more than that, it is essentially
trivial, because Mach was designed so as to make it easy (see page 26
of ``Mach 3 Kernel Principles'', Keith Loepere, OSF&CMU: ``As
mentioned [earlier], a thread that executes a system call instruction
can have that system call redirected back into user space.  This is
accomplished by setting an emulation routine address[...].'').  This
is a capacity for reflexivity, and this is what User-Land Linux
emulates by using strace (which lets you catch Unix system calls
before they are sent to the kernel).

It is also possible to virtualize the Hurd under the Hurd.  See
section 3.2.3 (``Recursive Bootstrap'') of the GNU Hurd Reference
Manual: ``The most appealing use of the serverboot program is to start
a set of core Hurd servers while another Hurd is allready running.''
However, the Hurd's virtualization capacities are much more
considerable, since not only can the entire Hurd be reflected under
the Hurd, but each individual server can, too.  In fact, this is the
very point of the Hurd, and Mach's reflective capacities are what
makes this possible.

It is also possible to run Linux as a user-land task under Mach.  That
is what MkLinux is.

However, what you're interested in, I suppose, is the possibility of
running Mach as a user process under Linux.  I do not think this is
possible (without considerable efforts, involving a major rewrite of
Linux, or else using some dirty tricks like emulating the entire
machine, à la VMWare).  Indeed, Linux, for all its goods, is basically
a Unix kernel, and so does not have all the RPC capabilities and
fine-grained security that a microkernel such as Mach has (disclaimer:
I don't know anything of what I'm talking about), and this is the sort
of things you must have in kernel land, you cannot just emulate it
from user land.  If we could, we wouldn't bother, we would just make
the Hurd run atop Linux rather than try to have the Hurd running atop
a Mach which is running atop Linux.

I don't know how profound changes would need to be made to the Linux
kernel to add to it the functionalities to make the Hurd run atop it.
I shudder at the thought of having the large Hurd servers run atop a
megalolothic kernel like Linux, but this would be a fun idea,
certainly.

The tar-pit strikes.  The tar-pit hits.  --more--  The kernel hacker
is confused.

#endif

-- 
     David A. Madore
    (david.madore@ens.fr,
     http://www.eleves.ens.fr:8080/home/madore/ )


Reply to: