What SHOULD go in the kernel

News system owner ID news at bbn.COM
Sat Oct 21 08:00:35 AEST 1989


jfh at rpp386.cactus.org (John F. Haugh II) writes:
< The primary restriction against a paging kernel is keeping the
< paging code from being paged ;-).  After that, satisfying real-time
< constraints, etc. will yield a collection of pages which must
< be locked in memory as well.  What should be left in the list
< of locked pages should only be lower halves of device drivers,
< the VM manager, the pager, and the global data required by those.
< 
< Massive tables, seldom used device drivers, and one-time 
< initialization code should all be candidates for the pager.
< I paid for the memory, and damnit, I want to use it.

Actually, I guess there are two ways of looking at this.  The first is
you want your kernel to stay up even if your swap device fails.  If
true, then there is obviously no way to let part of your kernel swap
out.

On the other hand, if you consider the machine dead when a swap device
dies, then swapping out the kernel is fair enough.  If your kernel
could do this, then demand-loadable device drivers would be less
needed (although still nice to have for other good reasons).  As John
indicates, a kernel that ran this way would probably be much more
memory efficient (not a bad thing, considering some of todays kernels).

A sort of work-around for this is to have a bunch of user-level kernel
processes that do most of the work (like tty processing), and let them
get paged and swapped out when not in use.  This is even a performance
win for some things (tty drivers, among others).

		-- Paul <PPlaceway at bbn.com>



More information about the Comp.unix.wizards mailing list