What SHOULD go in the kernel

News system owner ID news at bbn.COM
Wed Oct 18 03:52:45 AEST 1989


jwr at ektools.UUCP (Jim Reid) writes:
< Subject: What SHOULD go in the kernel
< 
< Is there a rule of thumb of what should and should not be put in the
< kernel?  To be more specific, is it better to make a device driver 
< 'lean-and-mean' or sophisticated, so that the user interface (the read(),
< write(), ioctl()) is simpler?

As little as possible?. (both a statement and a question)

First off, kernels are generally harder to debug than user programs,
so the less stuff you add there the better off you will be.  Also,
most kernels won't do VM on themselves (for several _good_ reasons
:-) ), so any extra code you put in the kernel will be sitting there
taking up space even if you don't need it right now.

On the other hand, it's much harder to do real-time-ish things in a
user program than in the kernel on most UNIXes.

Personally, I'd go for lean and mean just 'cause.  Very seldom is fat
and featureful better than lean and mean, especially in a kernel.
Compare, for instance, v9 and SunOS 4.  (yes, it _is_ an often
repeated cheap shot at Sun, but it's also _true_.)

	-- Paul Placeway <PPlaceway at bbn.com>
	   Am I a wizard?  Are you qualified to judge?  Does it really
	   matter in the end?  "What I am is what I am, are you what
	   you are or what?" -- E.B.



More information about the Comp.unix.wizards mailing list