Your questions

What exactly is a kernel?

Using terms which a leyman's gran would understand, and without using the word 'popcorn', just what exactly is a kernel?

The kernel is the innermost bit of the operating system. Typically responsible for dealing with interrupts, scheduling and task switching and allowing communication between processes. Easiest to define the kernel as that part of the operating system which runs in the most privileged mode of the CPU, usually called the 'supervisor' or 'kernel' mode (or 'ring 0' on the Intel x86). Application programs and parts of the operating system outside the kernel execute in 'user' mode and have less privileges---they are not allowed to disable interrupts, for example, or fiddle with the page tables.

Some OSs, like UNIX and Windows, have a big kernel---most of the OS's functionality, including the filesystem, memory management and device drivers run in kernel mode. Other OSs, like Mach and Plan 9, and QNX (a real-time operating system), have very small kernels, and they offload as much functionality as possible to user-level processes (the QNX kernel, for example, is only 10K; Windows' must run into MBs).

Needless to say, systems with smaller kernels tend to be more robust, since there's less that can go wrong. This may be one reason that trends in OS design are towards smaller kernels with fewer funcions.

A 'microkernel' is just a kernel which is very small (like a few KB). Apple were talking about a 'nanokernel' for their next-generation operating system, but I think that was just sales talk (it wasn't a kernel; it was just a small library of useful functions).


updated 18 May, 1998