Linux Format

Linux Kernel 5.14

Mayank Sharma celebrates 30 years of Linux by examining its beating heart.

-

Mayank Sharma celebrates 30 years of Linux, by looking at the heart of it all.

Linux kernel v5.14 is under developmen­t, but should be out by the time this issue lands on your desk, marking three decades of what has become the leading example for collaborat­ive software developmen­t.

From 10,000-odd lines in 1991 written by Linus Torvalds, the kernel now spans tens of millions of lines of code contribute­d by thousands of developers. In fact, the recent v5.13 bundled the work of 2,062 developers, making it the first release that saw the participat­ion of over 2,000 developers in a single kernel release.

The 5.11 release of the Linux kernel had over 30 million lines of code, of which about 60 per cent were drivers. For comparison Linux 1.0.0, released in March 1994, had 176,250 lines of code.

In a sense new code is added to the kernel on a rolling basis. Each kernel subsystem is managed by a maintainer who reviews all relevant patches and queues them for submission to Torvalds within a merge window that opens for usually a couple of weeks.

Torvalds then merges all submitted patches into the source code of the prior stable Linux kernel release, creating the release candidate (marked with -rc) for the next stable kernel. Once the merge window is closed, only fixes to the newly added code in the developmen­t release are accepted. Torvalds usually goes through seven release candidates before he releases a new Linux kernel, opening the merge window for the next kernel.

All encompassi­ng

One of the highlights of Linux 5.14 is support for the Raspberry Pi 400. It’s hard to believe that one of the most widely ported operating system kernels, which runs on everything from system-on-chips to mainframes, wasn’t actually designed to be portable.

The kernel’s first port was performed on the Motorola 68000 platform. The modificati­ons to the kernel were so extreme that it led Torvalds to refer to the Motorola version as a fork. However, the move impressed Torvalds enough to restructur­e the kernel code to aid its porting to more computing architectu­res.

The kernel’s hardware support has come a long way since 1991 when it was conceived and created for the i386-based PC. It now runs on over 30 major hardware architectu­res, with developers dropping support for outof-vogue hardware. In fact, the 3.7 kernel series was the last one that supported the original processor.

Keeping up with the times, v5.13 became the first kernel to officially support Apple’s M1-powered devices. This was the first kernel that could boot on M1-based devices, though it’s still some way off from being usable for desktop users.

Perhaps the one recent change that reflects the true nature of the kernel’s dexterity is the move to add the Rust programmin­g language as a second language to the kernel. Most of the Linux kernel code is written in the C programmin­g language. However, some kernel developers have been pushing to add support for Rust, which offers most of the flexibilit­y and performanc­e of C, but with added security, as a secondary language for the kernel, especially in areas where security and memory safety are of utmost importance.

The initiative has already contribute­d over a dozen patches totalling over 33,000 lines, which help lay the groundwork with important components such as a beta Rust compiler, an example driver and more.

While the patches were submitted during the 5.14 kernel’s merge window, they weren’t labelled as a pull request and will presumably not land until a later cycle.

Torvalds has referred to the kernel as evolution. Change is the one thing that’s been consistent through the kernel’s first 30 years and there’s no indication that it’s going to be any different in the future.

 ??  ?? The Hypocrite commit row is the most recent of the conflicts that the kernel has seen in the 30 years of its existence.
The Hypocrite commit row is the most recent of the conflicts that the kernel has seen in the 30 years of its existence.

Newspapers in English

Newspapers from Australia