You now know what the Linux directory structure looks like. Before going on to devices and filesystems, you must learn some higher-level concepts about the kernel.
The kernel of an operating system is the very core of a running system. It's a very special program that manages all processes, device drivers, and I/O. When the system boots, the kernel runs first, initializing hardware and internal data structures. After the kernel completes this stage, it loads and starts the init program.
The kernel also has many functions once the system boots. Process and device management are the most important. The idea is that although computers with one CPU run only one program at a time, the kernel can keep several programs in memory at the same time. Process and device management run together in a cycle like this:
The kernel has control of the processor. There are several processes in memory.
The kernel selects a process and finds out where that process was last running.
The kernel relinquishes control of the processor to that process.
That process runs for a few microseconds.
When the time is up, a clock interrupt stops the process and gives control back to the kernel.
The kernel takes care of any system work that it needs to do, such as reading to and from devices.
Go to step 2.
This description of the kernel's work is somewhat simplified, but as you can see, there is nothing magic about the kernel. It is not a process; it is just a piece of code that runs every now and then between processes.
On Linux systems, the kernel is normally in a file called /vmlinuz or /boot/vmlinuz . A boot loader loads this file into memory and sets it in motion when the system boots. Details on to how to configure the boot loader and how to create a Linux kernel are in Chapters 4 and 10.
If you are interested in the detailed workings of a kernel, the classic textbook is Operating System Concepts [Silberschatz].