I had an observation; it seems that your support for native C++ is a
limiting factor to the Hurd.  One thing to remember is that I do not
have any experience in Operating Systems.  Second thing, forgive me if
this is not the right address for this subject.

 

My understanding is that one thing that hurts a multi-server microkernel
is the context switch.  The need to store registers, stack points, copy
message buffers etc.  Ideally a call of any sort would be just that a
function call.  It seems to me that C++ prevents this, its ability to
reference any memory in its memory space, and read or write that memory
makes a simple function call to the kernel impossible.

 

The basic scenario is that program A calls kernel nonblocking function
B.  Then right after invoking B program A modifies the data sent as
parameters to B.  At this point function B has no way to guarantee the
correctness of the parameters passed to it.  It must make a copy of
those parameters so that program A can not modify the parameters after
the function has validated them.

 

My general design question, what if you moved C++ to emulation?  The
native language would then be a programming language that did not have
random access to the entire memory space.  I'll use Java as an example.

 

In this scenario we'll have the same program A and function B except
this time we'll name the parameter C.  Program A would create C,
initialize C and call B with C.  Once B is called it locks C.  This
makes it so that C can no longer be changed.  Now B does not have to
make a copy of C but just needs to verify it.  Seems faster.

 

Also it seems at this point you would not need a separate memory space
for each program.  At this point a program only has access to the
objects it created or that were handed to it via reference.  So if one
program never hands away the references to its objects then those
objects are in effect in their own memory space immune to the actions of
any other program.  

 

Since there is only one memory domain the need for a context switch goes
away. In order to call through to the kernel there is no need to context
switch to get into the kernel's memory space.  All the program would
need is a reference to an object defining the kernel.  That object would
manage the references that make up the kernel.  In reality the kernel
would be made up of any number of user level servers (wouldn't actually
be kernel level anything?).  

 

I could go on with some other stuff, but I am not sure if I am crazy or
if this is even the right audience.

 

Mike Power

Reply via email to