Table of Contents

A Look Inside Linux series

A series of short topics on how Linux works and how to make it work the way you want it to, which I present during the weekly sessions of the Linux User Net. The target audience is Hams who are new to Linux and want to know more about it, as well as experienced Linux users who can learn more about their chosen operating system. These are my notes for the presentations. (Russ, KC7MM)

8. The Linux Kernel

Layer 1 of the Linux system – its core.

Introduction

Linux is amazingly popular. It runs on probably billions of computers, both real and virtual. The Internet is built on Linux. Cloud computing is built on Linux. Every form of computer, from tiny embedded systems to the most powerful supercomputers, can run Linux. How is that possible?

It all comes down to the heart of the system, the Linux kernel – how it's designed and how it's developed. Let's look at those.

Design

Development

In short, the kernel is flexible, free, and open.

What it does

The kernel is the heart of any operating system. It is a translation layer, which interacts directly with the hardware on one side, and application software on the other. It makes the system's hardware available to for use by applications, by means of a uniform interface.

In Linux, that is implemented by treating every system resource as a file that can be read from and written to. (More on the Linux file system at a future date.)

How it does it

It uses interfaces

The kernel runs directly on the computer's hardware. That is, it connects directly to the interfaces created by hardware components' embedded firmware.

Its purpose is to provide programs with a uniform interface that they can use to interact with computer hardware. This gives them access to system resources without having to know anything specific about them, such as their memory address or how they operate – or even where they're located. “Interact with” means moving data to and from them.

The Linux kernel creates a single virtual file system, and all hardware is mounted as a file in that system. Programs perform read and write operations on those files in order to communicate with the hardware.

It runs device drivers

Device drivers run as part of the kernel. A device driver is a bit of software that provides the common Linux read/write interface for specific hardware.

Writers of device drivers for Linux tend to target chip sets that are commonly used in hardware, rather than specific brands and models. That way, a single driver can be used for any hardware that uses it, regardless of manufacturer. Also, kernels for Linux distributions often come with drivers for commonly-used devices already installed. That's why, for example, when you plug in a new USB device, it so often “just works” without having to download and install a device driver specifically for it.

It runs programs

The kernel knows how to run programs. The basic operations are:

It manages memory

A major aspect of running programs is allocating system memory to them. The kernel has to:

What we need to know

We've seen what the kernel does. Now we'll look at what we users should know about it in order to configure and maintain our systems. This is just a quick list – more detailed coverage will come later.

Summing up

The Linux kernel is the heart of any Linux system. It makes it possible for a Linux-based operating system to run on any given computer hardware.

It is, in fact, the one part of the system that is clearly “Linux”. Almost all the software that runs on top of the kernel is developed independently by others. (Android is an extreme example.)

You generally will use a kernel provided by someone else – usually a distribution – but you have the option of compiling your own.

Keep your system's kernel up to date.

You have the option of installing other versions of the kernel in order to get functionality not provided by the one currently in use.

Return to series index