As I understand it, the kernel does all the interaction with the hardware, and manages the memory, the I/O devices, etc. So the kernel is doing everything, yet it is just a part of the operating system. So what else is there in an OS ? Just the applications that come bundled with it ? For example, what does Ubuntu have other than a kernel ? The Gnome Desktop, and a few other applications ?
The shell, of course.
The original metaphor that got us the word "kernel" for this in the first place is too often forgotten. The metaphor is that an operating system is a seed or a nut. The "kernel" of the seed is the core of the operating system, providing operating system services to applications programs, which is surrounded by the "shell" of the seed that is what users see from the outside.
Some people want to tie "kernel" (and, indeed, "shell") down to be more specific than that. But in truth there's a lot of variation across operating systems. Not the least these variations is what constitutes a "shell" (which can range from Solaris'
There are other terminologies. In IBM mainframe terminology, the "kernel" in the seed/nut metaphor is called the control program. Other names include the supervisor, the monitor, the core, and the executive. Core is another fairly obvious biological metaphor. It is interesting that so too is another name. Harvey M. Deitel, in his Operating Systems, calls the control program the nucleus, and says
The nucleus normally represents a small portion of the code of what is commonly thought to be the entire operating system [...]
The word "nucleus" comes from the Latin nucleus, and means the kernel of a nut (c.f. the Latin nux, which means "nut"). So even calling the control program "the nucleus" is in fact making this same operating-system-as-a-nut analogy. It's an analogy that is used for more than just operating systems. If you are familiar with chemistry, for example, you'll know that an atomic nucleus is surrounded by electrons in shells.
What the pseudonymous person
(It is ironic that
The name "nucleus" is probably the older name; certainly predating Unix, which favours the kernel/shell terminology that today — probably in no small part thanks to Unix — is the more prevalent. Here's what's in Alan C. Shaw's 1974 book The logical design of operating systems (Prentice-Hall, ISBN 9780135401125) for example:
That part of the system which permanently resides in main storage has historically been called the nucleus. The nucleus will usually consist of a minimal set of primitives and processes for the management of processes, resources, and input-output.Shaw has a diagram, too. ☺
Other parts of the operating system include the drivers that interact with the kernel, there are several layers of helper programs that deal with the user interface, the networking and other core parts of the OS that sit between kernel and the actual application.
To give an example, I've shown the structure of OS X, as you can see on top of the Kernel (light blue) lies several layers of "core" functionality, system tools, services and APIs (Application Programming Interface) before you even get to the GUI which is what you typically work with in the actual applications themselves.
Most operating systems have a similar structure, but there is wide scope for differences with regard to just how much is actually part of the kernel. See the Wikipedia article on Microkernels for a comparison.
EDIT - To answer your comment (my comment got a bit long)
You could boot just a linux kernel, but you would not be able to really achieve much, it's all those helper applications that provide all the interface that you see and use.
Once the kernel is booted (and initialised the hardware) it will attempt to hand off to other parts of the GNU/Linux Operating System which provide the functionality for starting services (such as UDEV which populates
But yes, you could simply boot the kernel itself, it would just sit there with a "I've booted, now what?" prompt.
|show 1 more comment|