06:00 UTC Charta Aetatis Cyberpunk

Console Newsletter Pro Sign in Early access Register
Aa · Display
Themes
Type size
Density
Hacker Culture · YouTux Channel · · 18:33 runtime

How Linux Became Linux

In the wiki LinuxELFAndroid Also namedMinix, Red Hat, SUSE, Google, Meta, Amazon, UNIX
Transcript 2905 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

If you think the Linux kernel Torvalds wrote in 1991, 10,000 lines of code, is the same Linux running on your machine today, 30 million lines, you're dead wrong. Linux is what it is not by accident, not by natural evolution, not because it was destined to win. Linux is the result of seven precise choices, each one with a price, each one with an upside, each one that could have gone a different way. This is how a project like this actually evolves. The Linux you use today is not a historical accident. It's not the inevitable outcome of some natural law of software. It's a constructed object, choice after choice, compromise after compromise, made by people who had strong opinions, real technical limits, and sometimes were flat out wrong.

The difference between the 1991 kernel and the 2026 kernel is not a matter of size. It's a matter of architectural decisions that closed some doors forever and opened others nobody saw coming. In this video, we analyze seven of them. The seven choices without which Linux would not exist, or would exist in a form so different you wouldn't recognize it. September 17th, 1991. Linus Torvalds, 21 years old, a student at the University of Helsinki, uploads a compressed archive to the Funet FTP server. Inside are 10,239 lines of code. It's not even executable on its own. It needs Minix to compile. But it's a complete kernel. And above all, it's a monolithic kernel.

This is the first choice. Possibly the most important of them all. And it needs to be understood properly because there's a legend to dismantle. The legend says Linux became monolithic after the famous debate between Torvalds and Andrew Tanenbaum on the comp.os.minix newsgroup in January 1992.

Tanenbaum, the author of Minix, writes a post titled Linux is obsolete, arguing that in 1992 designing a monolithic kernel is an anachronism because the future belongs to microkernels. Torvalds replies, a discussion ignites, and the rest is history. The legend is false, or rather, incomplete. Linus doesn't choose monolithic after that debate. >> [music] >> He has already chosen it months earlier, line zero, when he starts writing. The debate with Tanenbaum is not the moment of the decision. It's the moment of the public justification of a decision already made. And the monolithic advantage in '91 is concrete, measurable, immediate. The entire kernel runs in the same address space.

Calls between subsystems are regular function calls, not messages that have to cross the boundary between user space and kernel space. On Torvalds' 386 processor with 8 MB of RAM, this difference is not an academic detail. It's the difference between a system that runs and a system that crawls. The price we're still paying today. A bug in any driver can crash the entire system. There's no isolation between subsystems. The kernel is a monolith, literally, and every new line of code adds a tax surface. 35 years later, when a CVE hits a printer driver, it can compromise the whole machine. This is the price of the '91 choice.

And we pay it in exchange for the performance that back then was the only thing that mattered. February 1992, Linus releases kernel 0.12, and he does something that at the moment looks like a bureaucratic formality. He changes the license. Previous versions of Linux had a license written by Torvalds himself. It allowed free distribution of the code, but explicitly forbade commercial redistribution. You could not sell Linux, period. It was an idealistic, anti-commercial license written by a Helsinki student who saw commercial software as the enemy. With 0.12, Torvalds adopts the GNU General Public License version 2. A license written by Richard Stallman, not by him. A license that explicitly allows commercial redistribution on the condition that the source code remains available.

Looks like a detail. It's not. It's the pivot that transforms Linux from a hobby project into industrial infrastructure. Because without GPLV2, there would be no Red Hat, no SUSE, no Android running on 3 billion devices, no servers behind Google, Facebook, Amazon. All these businesses exist because someone can take Linux, modify it, sell it, build an economic model on top of it, and give back modifications to the project because the license forces them to. The upside has been enormous, and we see it every day. The price we only see if we know where to look. GPLV2 is not GPLV3. Torvalds explicitly

refused to upgrade the license in 2007 when version 3 came out. The Linux kernel is the only major GNU project that didn't make the jump. This means Linux has no protection against tivoization, the practice of using free code inside devices that then prevent users from modifying them. Every Android you use is technically free Linux running on locked hardware. This is the direct consequence of the choice to stay on GPLV2. Freedom for distributors, not necessarily for end users. March 7th, 1995, Linus releases his version 1.2 of the kernel. In parallel, an engineer named Eric Youngdale is working on a transition invisible to users, but fundamental. The executable format changes.

Linux moves from a dot out to ELF, executable and linkable format. Why this matters to you, even if you don't know what an executable format is. Because every program you launch on your Linux machine is an ELF file. And the reason why today you can have dozens of shared libraries loaded dynamically managed by the linker at runtime without having to register every library with a central authority is that Linux made this transition in '95. The a.out format came from the '70s. It was Ken Thompson's format inherited from Unix, simple and elegant for small systems. But it had a structural problem. To make shared libraries work, you had to register the virtual address of every library with a central authority.

At small scale, it worked. At industrial scale, it was a nightmare. As Youngdale wrote in Linux Journal in April 1995, Linux was literally about to get crushed by the weight of its own shared libraries in a.out format. ELF was the forced choice. And once the transition was made, doors opened that nobody had anticipated. Full C++ support, which requires initializers and finalizers that a.out couldn't handle. Cross-architecture support, the same format on x86, Alpha, Spark, Arm. Modern

debugging, sophisticated dynamic linking. The price was painful at the time. Every binary had to be recompiled. Every user, every distribution had to manage the transition. But without that choice, Linux would have stayed a toy for engineers unable to scale. The a.out support stayed in the kernel until 2019, 25 years later. It was removed only with kernel 5.18. This is the real lifespan of a well-made architectural choice. June 1996,

kernel 2.0 ships. For the first time, Linux supports symmetric multiprocessing, SMP. You can run Linux on a machine with multiple CPUs and the kernel knows how to use all of them, at least in theory. In practice, the way Linux 2.0 supports SMP is, let's be clear, a patch. It's called the big kernel lock, shortened to BKL. It's a global lock. When a CPU enters the kernel, it takes the lock. All the other CPUs that want to enter the kernel have to wait. You have four processors, but the kernel can only be executed by one of them at a time. It's a pragmatic choice. It's a brutal choice.

It's a choice that works. The upside is that Linux becomes multi-processor in record time. While other operating systems spend years redesigning their internal structures to support multiple CPUs cleanly, Linux slaps on a lock and says, "This is fine for now." 2000 arrives, dual processor workstations become common, Linux is there. Imperfect, but there. The price has been 15 years of refactoring. 15 years during which generations of kernel developers worked, one subsystem at a time, to replace the big kernel lock with more granular, more specific locks that wouldn't freeze the entire kernel. The BKL was finally removed completely only in 2011 with kernel 2.6.39.

15 years to repair a choice made in a few weeks. This is the pattern you'll see repeating. The first solution that works wins. The right solution comes later, if it comes at all. And in the case of the BKL, it came, but at an enormous cost in engineer hours paid for decades to fix a '96 compromise. Let's stay on the theme of the compromise that becomes technical debt. Let's talk about threads. In 1996, Xavier Leroy at INRIA writes a library called Linux threads. It's the first serious implementation of POSIX threading on Linux. Until then, Linux had no real threads. Linux threads works more or less. It respects the POSIX standard, at least on paper, but it has serious structural problems. Linux threads implements threads as normal processes that share memory using the clone system call that Torvalds had added to the kernel precisely for this purpose.

The result is that every thread, from the system's point of view, is a separate process with its own PID. Signals don't behave the way the POSIX standard requires. The parent process is not the one you'd expect. The PS command shows you 20 rows for a program with 20 threads. It worked, but it was a caricature of POSIX threading, not real POSIX threading. In 2003, NPTL arrives, native POSIX thread library, written by Ulrik Drepper at Red Hat and Ingo Molnar. They rewrite everything. They change the clone call in the kernel, add new primitives like futex, and implement threading that finally respects the standard for real. The upside of NPTL is that Linux becomes a credible platform for serious multi-threaded applications, databases, web servers, scientific software.

Without NPTL, Linux would have stayed a monolithic server system and poorly suited to modern workloads. The price was a fracture. For years, there were two different ABIs, >> [music] >> two different ways of handling threads, and applications compiled against Linux threads that behaved differently from those compiled against NPTL. Distributions had to manage the transition. Users saw regressions. And Ulrik Drepper, the main author of NPTL, became over the years a controversial figure in the glibc community, to the point that his maintenance style generated a fork, eglibc, later reabsorbed. Once again, the pattern is the same. First working solution, then right solution. [music] But in between, pain. This is the most told story, and it still keeps getting told wrong. Let's try to do it right.

For the first 11 years of kernel development, from '91 to 2002, there was no version control system at all. Torvalds received patches by email, applied them by hand to his tree, released versions. His lieutenants, Alan Cox and a few others, did the same on their branches. It was a fragile system, slow, and didn't scale. But it worked because Linus himself was the version control system. In 2002, Torvalds makes a controversial choice. He adopts BitKeeper, a commercial proprietary system created by Larry McVoy. BitKeeper is given for free to the Linux project, but with a restrictive license that forbids reverse engineering and working on competing tools while using it. The open source community protests.

Richard Stallman is furious. But, Torvalds, as he himself will say years later, takes a pragmatic approach. He wants the best tool available, period. And BitKeeper in 2002 is light-years ahead of CVS or Subversion. For 3 years, BitKeeper transforms kernel development. Change set tracking becomes granular. Lieutenants can maintain their own trees cleanly. The distributed model that will later become Git signature is born here with BitKeeper. April 2005, Andrew Tridgell, kernel developer and author of Samba, writes a tool that manages to extract data from BitKeeper repositories without accepting the license. BitMover, McVoy's company, considers this reverse engineering and revokes the free license for the Linux project. April 6th, 2005, Torvalds writes to the kernel mailing list, subject kernel SCM saga. He says BitKeeper is no longer usable and an alternative must be found. No existing alternative meets the kernel's requirements.

CVS he hates. Subversion is centralized. Monotone is too slow. April 7th, the day after, Torvalds starts writing Git. 10 days later, Git is ready enough to be used for kernel development itself. The first kernel commit made with Git is from mid-April. June 16th, kernel 2.6.12, the last one released without Git, ships. From that moment on, Linux lives on Git. The upside is that Torvalds built in 10 days a tool that today runs practically all software development on the planet. GitHub, [music] GitLab, Bitbucket, the entire modern open and closed software infrastructure. 10 days of work in 2005 changed the way billions of lines of code get written.

The price is that Git, written in 10 days by a person who had an urgent problem, has a notoriously hostile user interface. 20 years later, beginners still get lost among rebase, cherry-pick, detached head, and the only real way to use Git is to understand its internals. This is the signature of a tool born in emergency and never redesigned for usability. The last choice is not a single date. It's a process that takes shape between 2005 and 2010, and that today is the way

Linux gets developed. Before Git, the development model was patch-based. Developers sent patches by email. Torvalds and his lieutenants applied them. Versions came out when they were ready. There was no defined cycle. Major releases could be years apart. 2.4 arrives in 2001. 2.6 arrives in 2003.

In between, chaos. With Git and with the explosive growth in the number of contributors, a new model emerges. It's called the mainline model, and it's the one Linux still uses today. It works like this. Every kernel release has a fixed cycle of about 9 weeks. The first 2 weeks are the merge window, during which Torvalds accepts new features from his lieutenants. After the merge window, no new feature is accepted. Seven or eight release candidates follow, one per week, during which only bugs get fixed. At the end, Torvalds releases the final version. Then the cycle starts again. The upside is that Linux stopped having major releases.

There's no more big jump from two to three as an epochal event. Every release is a release. Kernel 3.0 was a cosmetic version bump. 4.02, 5.02, 6.0 shipped and was an increment like all the others. This has let Linux evolve continuously without the trauma of major releases of other operating systems. Windows is still living in the shadow of the jump from Windows 7 to Windows 8, which was a commercial disaster. Linux hasn't had traumas like that since 2005. The price is that this model only works thanks to Torvalds. Only because there's a physical person with 20 years of accumulated authority who decides what gets into the merge window and what doesn't.

The whole mainline model rests on a single human point of failure. When Torvalds took a break in 2018 to reflect on his own communication style, the machine kept running thanks to Greg Kroah-Hartman, his second. But the question the kernel community never asks publicly, even though everyone has asked it privately, is what happens to Linux when Torvalds is no longer there? There's no answer. There's only the fact that the mainline model has worked for 20 years, has produced 30 million lines of stable code, and has held Linux's growth from a student hobby to the infrastructure of 3 billion Android devices. Every supercomputer in the top 500 list and practically every cloud server.

It's the price we pay to have a kernel that works this well, and so far it's been a sustainable price. Seven choices. Monolithic kernel in '91 out of pragmatism at the price of missing isolation. GPLv2 in '92, which opened Linux to the commercial world at the price of never making the jump to GPLv3. ELF in '95, which let Linux scale at the price of a painful transition. SMP with the big kernel lock in '96, which gave us multiprocessor at the price of 15 years of refactoring. Linux threads replaced by NPTL in 2003 at the price of years of fragmentation. BitKeeper replaced by Git in 2005 at the price of a powerful but hostile tool.

The mainline model from 2005 to today at the price of total dependence on a single person. Linux is not the result of a brilliant design. It's not the result of long-term planning. It's the result of dozens of choices made in the moment under pressure with the constraints of the moment. Every choice closed doors that will never reopen. Every choice opened possibilities nobody had predicted. And the operating system you have on your machine today is the sum of all these choices including their flaws, including their compromises, including their imperfection. This is the real story of how free software gets born. Not a triumphant march toward a clear goal.

A series of pragmatic decisions made by fallible people that turned out in most cases to be just about right. Next time someone tells you Linux is a masterpiece of engineering, remember these seven choices. It is a masterpiece, but it's a masterpiece built with hammers, not chisels. And that's exactly why it won. See you in the next video and may Linux be with you.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers

Sign in to join the discussion.

Make the first comment.

That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

Drawn from the 538 sources the paper read this month. Text and HTML, one-click unsubscribe, free.

How often
Your desks