The Linux kernel has once again reached a remarkable milestone, now surpassing 40 million lines of code – a tremendous amount of work driven by the dedication of countless developers who generously contribute their time and skills to developing the operating system.
For those who love numbers and statistics, this represents a substantial leap from the 20 million lines recorded in mid-2015, effectively doubling its size in less than a decade.
It’s also worth mentioning that the Linux kernel contains much more code than its UNIX counterparts, such as OpenBSD, NetBSD, and FreeBSD.
However, this is mainly due to design differences—the BSD kernels are modular, while the Linux kernel follows a monolithic architecture (with modular capabilities), meaning that it runs as a single large process in kernel mode, with full access to the hardware and all system resources.
However, this considerable growth is often a source of discussion among developers and industry observers who worry that a larger kernel might introduce unnecessary complexity. Some have proposed methods to trim its size, such as outsourcing drivers—currently accounting for more than half of the code.
At first glance, that might look like a smart approach to lighten the load. Yet, on closer inspection, many experts argue that separating drivers could lead to performance overhead, increased maintenance headaches, and complicated version tracking.
Going forward, it will be fascinating to see how kernel maintainers balance the need to stay lean with the desire to remain inclusive of cutting-edge hardware. So, the Linux kernel will only keep growing, but we’re confident that Linus Torvalds has it all under control with a clear vision for its future development—the heart of our favorite operating system.