What is the Linux kernel?
24 October 2024

 

 

Authors
Mesh Flinders Writer
Ian Smalley Senior Editorial Strategist
What is the Linux kernel?

The Linux® kernel is a free, open-source kernel that is critical to many computer systems. In the Linux operating system (OS), the Linux kernel forms a critical interface between the hardware and software layers, allowing the OS to manage many different components at once. 

Kernels are computer programs that form the core of an operating system (OS) and give a user complete control over the hardware and software components that make up the system. Kernels help prevent conflicts between important processes that are essential to the proper functioning of the system. Kernel code is kept in the computer’s memory and enables all interactions between software and hardware; for example, input/output (I/O), CPU and cache usage, device drivers, file systems and network sockets.

The Linux kernel was developed in 1991 by Linus Torvalds as a free alternative to Unix, one of the first OSs that allowed users to interact directly with computers. In the years since, the Linux kernel and subsequent kernel versions and kernel releases have become critical to Linux distributions. Today, they are used by some of the largest tech, software and computing companies in the world.  

Linux kernel distributions

Every 9-10 weeks, a new version of the Linux kernel is released. These versions, called “stable kernels,” are tended to by Linux kernel developers and maintainers of Linux repositories and can be found off kernel.org and GitHub.

Some vendors, however, such as Debian and Red Hat, prefer to maintain a customized source tree—a collection of all Linux kernel source code for their own projects. This approach has critical ramifications for the use of the Linux kernel in many modern enterprise applications such as artificial intelligence (AI)edge computing and Internet of Things (IoT)

For example, Red Hat® enterprise Linux is a stable, high-performance Linux platform that features bespoke security and management capabilities, and it is built using Red Hat’s customized Linux source tree. Debian uses its source tree to maintain Ubuntu, an open-source code that is fundamental to many IoT architectures. 

Linux kernel vs. Linux operating system

A kernel is a computer program that functions as the beating heart of the OS, the system that allows users to interact with the computer’s hardware and software. In the case of the Linux OS, the Linux kernel is the code that forms the core component of the OS, enabling it to perform its functions.

The Linux OS is made up of various components besides the Linux kernel, such as system libraries, user space utilities and applications. However, all these components rely on the Linux kernel to communicate with the OS so they can receive commands, such as input/output (I/O), and fulfill user requests. The Linux kernel is known for its flexibility and can be modified according to user need or to fit a specific program’s requirements.

Linux kernel lifecycle

Each Linux kernel release has a lifecycle where it’s tested, released to the public and then gradually phased out. The Linux kernel lifecycle is broken down into five phases: Prepatch, Mainline, Stable Review, Long Term Support (LTS) and End of Life (EOL). 

  • Prepatch: Linux developers experiment with new features in the kernel source tree.
  • Mainline: The changes are stabilized through rigorous testing and adjusting.
  • Stable Review: The kernel undergoes additional testing to fix more critical issues identified in the mainline phase before its released. 
  • Long Term Support (LTS): Only some kernels are identified as LTS kernels and maintained for a longer period than other kernels, typically two years. 
  • End of Life: Kernels not selected for LTS have their support halted when newer kernels are released.  

 

Aerial view of highways
Keep your head in the cloud 
 Get the weekly Think Newsletter for expert guidance on optimizing multicloud settings in the AI era.
Linux kernel benefits

Today, Linux is one of the most widely used open-source operating systems in the world. This is largely due to the flexibility and effectiveness of the Linux kernel. It provides many of the management and control capabilities that make Linux OS such a powerful platform, including those that power the CPU (the active brain of a computer system) and its networking ability (its capacity to connect with other devices and share resources and information). Here are some of the widest enterprise benefits of the Linux kernel: 

  • Abstraction: In computer science terms, the term ‘abstraction’ simply means the omitting of noncritical information to allow for more seamless interaction between devices and programs. The Linux kernel can abstract underlying hardware, hiding unimportant details about it from the OS and enabling systems and software to function more efficiently. 
  • Customization: The Linux kernel can be customized to meet the specific needs of different users or different kinds of OS. The customization process typically requires changing the kernel source code and compiling a custom kernel image, which is simply a kernel that has been adjusted to serve a specific purpose. Then, specific kernel features and kernel modules—pieces of code that are loaded or unloaded into the kernel to add or subtract certain functions—can be selected to fit specific computing needs. Popular kernel modules exist for tasks and devices such as high-performance computing (HPC), enterprise applications and graphics processing units (GPUs).  
  • Containerization: Containerization, the packaging of software code with just the OS libraries and dependencies required to run it in any computing environment, is critical to many modern cloud-native applications. The Linux kernel is essential to containerization and adjacent technologies such as Docker and Kubernetes that make containers possible. Docker and Kubernetes are the two most popular containerization tools on the market, with 94% of companies surveyed either using one or both1. Docker is used to create and run containers, and Kubernetes is an open-source container orchestration platform that enables the management and scaling of containerized applications. 
  • Virtualization: The Linux kernel can run virtual machines (VMs), on a single physical machine using its "Kernel-based Virtual Machine (KVM)" feature. VMs are important because they allow the resources of a single physical machine, such as memory, CPU, network interface and storage, to be used by different operating systems on a single device. This process essentially turns the Linux system into a hypervisor, a tool used to manage and monitor VMs, allowing it important capabilities when it comes to managing VMs. 
How does the Linux kernel work?

The Linux kernel is made up of six distinct layers, or subsystems that enable its core functions: 

  • System call implementation (SCI)
  • Process management
  • Memory management
  • Virtual memory
  • Network stack
  • Device drivers

Here’s a closer look at each one and how it functions.

SCI

The SCI layer carries the functionality that allows the kernel to execute system calls from user space into the kernel. This is a critical capability of the Linux kernel because the user space is where application software and drivers execute their workloads, while the kernel space is strictly for running critical OS functions. The SCI layer forms a bridge between the two spaces. When a system call is initiated from user space, for example, a request to refresh an email inbox or open a mobile banking application, the system call triggers a switch to the kernel layer, allowing the request to be transmitted to the OS.

Process management

The process management layer enables the Linux kernel to execute the processes that allow for users to interact with the computer. For example, when Linux first boots, Init (short for "initialization”), brings the system to a usable state by running startup scripts and managing run levels. Each process represents an individual virtualization of the processor—for example, thread code, data, stack and CPU registers.  

Memory management

Computers manage virtual memory using what’s known as ‘pages.’ Pages are the smallest unit data can be broken down into in an OS that relies on virtual memory. The Linux kernel’s memory management layer enables the OS—and by extension, the user—to manage a computers’ available memory. Virtual memory is critical to the functionality of all programs and applications.

Virtual file system (VFS)

The Linux kernel’s virtual file system (VFS) provides a common interface for file systems. The VFS operates as a switching layer between the SCI and the file systems supported by the kernel, enabling many critical functions (for example, open, close, read and write). 

File system abstractions—in other words, the way files, directories and file systems appear to users—are another key component of the VFS layer, helping present the complexity of a computing system in a representative way that is easy for a user to understand.

The network stack

Every computer on a network, also known as a ‘node,’ must follow networking protocols—a strict set of rules to share and receive data. These protocols are crucial to enabling incompatible devices to use the same network—for example, an Android phone and a Mac computer. 

To facilitate this kind of communication, networking protocols rely on gateways, which are hardware devices (such as routers) that facilitate communication between two different networks. The network stack in the Linux kernel uses many common gateway devices—such as rate converters, protocol translators and others—to make internetwork communication between incompatible devices possible.

Device drivers

Device drivers provide an OS with a software interface that allows a specific device to function, such as an external keyboard or drive, a mouse or a printer. The Linux kernel source code is mostly made up of code contained in device drivers specific to a certain device. 

The Linux source tree, a directory containing all source code for the Linux kernel and device drivers, is divided up into the various devices that are supported and their connections, such as Bluetooth or serial port. The device driver recognizes commands given to an individual device, or class of device, and builds I/O requests containing these commands so the device performs in the way the user intended. 

Linux kernel use cases

Enterprises across vastly different industries rely on the Linux kernel and the various capabilities that they provide to keep their workforces innovating and to provide the programs, applications and services their customers rely on. Here are some of the most common enterprise use cases for the Linux kernel.

Computer networking

The Linux kernel enables computers and computing devices to be securely connected via a Wi-Fi, ethernet or other connection type, regardless of device compatibility. This functionality enables critical knowledge and resource sharing, such as the use of intranets and the fast, efficient delivery of software as a service (SaaS) products.

The Linux kernel is equipped with robust security capabilities that help protect users and operating systems from cyberthreats that can harm computers, programs, applications and the networks they run on. These threats include many different types of malware, such as ransomware, rootkits, worms and more. The threats that target the Linux kernel’s vulnerabilities are addressed through frequent patches, such as bug fixes, that secure systems and the programs that run on them. 

Resource optimization

With 89% of enterprises undertaking digital transformation initiatives2, optimizing compute resources dedicated to digital transformation has become an essential part of most business strategies. 

The Linux kernel helps enterprises balance the needs of their most prized compute resources—such as servers, databases and cutting-edge application software—so they can be confident their systems and networks are performing at peak levels through a process called kernel tuning. 

Kernel tuning is subtly adjusting the Linux kernel’s settings to enhance performance across specific Linux kernel subsystems, such as networking, memory, process scheduling and file systems. In the case of file systems, for example, many data-intensive applications including video games, financial trading apps and social media sites require the tuning of file system parameters to run at peak levels. The proc file system, a VFS in Linux OS, interfaces between internal data structures in the kernel to get data about the system so kernel parameters can be adjusted to optimize application performance.

Device management

Today’s most successful enterprises must equip employees with cutting-edge technology, such as laptop computers and mobile devices, to thrive. The Linux kernel enables programs and networks that support thousands of employees in different locations—and using different kinds of devices—to collaborate seamlessly. The kernel allows hardware devices to interact using specific device modules that can be loaded onto the kernel so they can be managed by the OS.

One popular Linux device management process is known as interruptInterrupt helps conserve compute resources by allowing the Linux kernel to stop communication between a device and an application when it isn’t necessary for a specific operation. Another is udeva Linux device management tool that manages the adding and subtracting of devices from an OS and controls how each device appears in a directory.

Cloud computing

Cloud computing, the on-demand delivery of computing resources over the internet, has become an essential tool for many modern enterprises, spurring innovation and helping deliver solutions to customers in a fast, scalable way. 

The Linux kernel enables cloud computing in critical ways and has become an essential component of all the largest cloud providers in the world, including Amazon (AWS), Microsoft Azure, Oracle and Google Cloud.

The kernel’s scalability allows it to support massive computer systems, such as supercomputers and data centers, without significantly increasing compute resources—a capability that is essential to cloud architectures. The Linux kernel is also ideal for cloud workloads because it is highly stable, with relatively low downtime. Finally, the Linux kernel is highly versatile and can operate on many kinds of hardware, a key capability in the virtualized environments that are central to the modern cloud.

Footnotes

1.     Top five containerization technologies in 2024, (link resides outside ibm.com), 6Sense, 2024

2.     The Value of Digital Transformation, (link resides outside ibm.com), Harvard Business Review, July 31, 2023

Related solutions Linux on IBM systems

Running Linux on IBM servers brings a new level of reliability, security and scalability to your business-critical workloads.

KVM on IBM Z® and LinuxONE

KVM for IBM Z® and LinuxONE is an open-source alternative to the IBM z/VM hypervisor for the virtualization of Linux® workloads.

IBM Hyper Protect Virtual Servers

Securely build, deploy and manage mission-critical applications for the hybrid multicloud on IBM Z and LinuxONE.

Linux on IBM Z mainframe

Bring security and resiliency to your business applications and hybrid cloud with Linux on an open, enterprise platform.

Resources What is eBPF? Related topic

Learn more

What are hypervisors? Related topic

Learn more

What are containers? Related topic

Learn more

What is Docker? Related topic

Learn more

Take the next step

IBM Cloud for VMware Solutions supports a wide variety of VMware products and services in its cloud environment. Migrate all of your VMware workloads from on-premises infrastructure to IBM Cloud, or mix and match, creating a hybrid cloud environment you can manage from a single place.

Explore Cloud for VMware Solutions