Minimum set of primitives?

Kragen kragen@pobox.com
Thu, 19 Mar 1998 10:35:18 -0500 (EST)


On Thu, 19 Mar 1998, Chris Bitmead wrote:
> > What else is needed?  Anything?  What else would be much more useful in the
> > kernel than anywhere else?
> 
> Is it useful to think in terms of "in the kernel" and "out of the
> kernel" ?

Well, in some cases.

For example, if we want to implement system-wide garbage collection, we
have to guarantee that, at some level of granularity, all pointers
between objects are known to the garbage collector.  The easiest way to
handle this on a fine granularity (the usual Lisp way) is to make data
types `holy' and inviolable -- only special kernel code has the right
to do pointer arithmetic, for instance, and no userland programs.

Ideally, we could get away from this evil distinction between
kernelland and userland.  I don't know how, though.  All I've ever seen
is moving the barrier around and changing the granularity -- on a Lisp
machine, if I understand correctly, the `kernel' was the hardware
itself, which made sure pointers weren't stored as integers and vice
versa, and did bounds-checking on arrays.  (Is this correct?)

When something is `in the kernel', it is something user programs cannot
avoid using in some circumstances.  Access to I/O and to memory are two
examples.

Kragen