Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!bbn!news From: news@bbn.COM (News system owner ID) Newsgroups: comp.unix.wizards Subject: Re: What SHOULD go in the kernel Keywords: device drivers Message-ID: <47040@bbn.COM> Date: 17 Oct 89 17:52:45 GMT References: <2186@ektools.UUCP> Reply-To: pplacewa@antares.bbn.com (Paul W. Placeway) Distribution: na Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 28 jwr@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 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.