Skip to main content

Linux Kernel Development

Summarized information from Linux Kernel Development, 3rd Edition.

The kernel is the innermost portion of the operating system.

It provides basic services for all other parts of the system, manages hardware and distributes system resources.

Typical components of a kernel are interrupt handlers to service interrupt requests, a scheduler to share processor time, a memory management system to manage process address spaces and system services such as networking and interprocess communication.

Applications running on the system communicate with the kernel via system calls. The system call interface instructs the kernel to carry out tasks on behalf of the application. The instructions are running in kernel-space.

The kernel manages the system's hardware. When hardware wants to communicate with the system, it issues an numbered interrupt to the process which interrupts the kernel. The interrupt number controls which interrupt handler should process the request. Interrupts are run in an interrupt context.

Each processor is doing one of three things at any given moment:

  • In user-space, executing user code in a process.
  • In kernel-space, in process context, executing on behalf of a specific process.
  • In kernel-space, in interrupt context, not associated with a process, handling an interrupt.

contexts