November 24, 2005

It's turtles and modules all the way down

Author: Bruce Byfield

Commentary -- According to urban legend, a famous scientist was confronted by a woman who insisted that the world is flat and rests on the back of a giant turtle. "But what does the turtle rest on?" he asked, hoping to disprove her belief by logic. "You're a clever man," she replied, "But it's turtles all the way down!" Recently, I realized that GNU/Linux is like that: From the desktop to the kernel, it's modules all the way down.

The higher up you go, the more easily replaceable Linux's modules become, but flexibility remains an essential feature of the operating system. Moreover, although some components are not exactly hot-swappable, developers act as though they were, swapping out parts of the operating system and replacing them with improved versions.

Long-time users may find this observation too obvious to be worth stating. If so, they forget how unusual it is in the larger world of computing. It's common on other Unix-like systems, yet it's one of those attitudes that many Windows users have trouble wrapping their minds around. Many Windows users are unaware that such things as window managers exist, or that an operating system doesn't need to have a graphical desktop. They're used to hearing that even desktop applications like the Web browser and mail reader are bundled with the rest of the operating system into a seamless, unbreakable whole. By contrast, on GNU/Linux, modularity is a basic principle that shapes the world view of developers and desktop users alike.

The modularity begins with the kernel. Even if users don't compile their own, the bootloader (which itself can be GRUB, LILO, or a less-known alternative such as Gujin) is there to remind them that they aren't limited to the installed kernel. In many distributions, the bootloader menu reinforces the fact by including a "failsafe" entry for the installed kernel that does not include or use components that may cause problems booting, such as ACPI. When users do compile their first kernel, they learn that its contents are configurable, and that many device drivers can be loaded as modules when needed rather than being compiled into the kernel.

And of course, the Linux kernel itself isn't a necessity, either. It's part of GNU/Linux's creation myth that that the operating system is the union of the Linux kernel with GNU system tools. One of the implications of this myth -- although it's not always stated -- is that both are replaceable. The Hurd project continues to inch its way towards providing an alternative Unix-like kernel that uses the same GNU tools as Linux does.

Moreover, the operating systems built around both the Hurd and Linux kernels borrow tools freely from other Unix-like sources such as BSD. In turn, other Unix-like systems have borrowed from the GNU Project. Such mixing and matching is often not an overnight hack, but what surprises newcomers is that it's possible at all. Yet few in the Unix-like systems communities find it the least bit unusual.

Looking at the various subsystems, you find the same modularity. The kernel supports more than 30 different filesystems. Package management has two main formats, RPMs and Debian packages, as well as several newer ones, such as Gentoo's Portage. Alternative package management systems are also in the works.

And the subsystems keep evolving, too. For example, lpd, the original printing system, was borrowed from Berkeley Unix. Over the years, it was enhanced with LPRng, then replaced by the Common UNIX Printing System (CUPS). Similarly, a few years ago, when XFree86 became unacceptable because a change in its licence made it non-free, X.org forked from an earlier version to replace it. More recently, the Advanced Linux Sound Architecture (ALSA) has replaced the earlier Open Sound System (OSS) in many distros.

To newcomers (not to mention some journalists), these changes sound catastrophic, the sort of evolutionary leap that Niles Eldredge and Stephen Jay Gould postulate in their theory of punctuated equilibrium. Yet, in practice, because of GNU/Linux's modularity, its free source code, and the communal scrutiny of patches, the changes have had more of the gradualness associated with natural selection. Far from disrupting the operating system, these changes happened so quietly that many users must have hardly noticed.

In the user interface, it's the same story. The default shell for most Linux systems is GNU bash, which has evolved nicely over the years. However, there are more than half a dozen replacements, such as tcsh, csh, pdksh, zsh, and BusyBox.

On the desktop, the story continues. KDE and GNOME, the most common desktop environments, offer the same basic functionality and interoperability, but their emphasis is in different places. KDE, for example, seems to focus on utilities and documentation, while GNOME emphasizes customization, and, more recently, user interface design. For window managers -- the software that controls the look and feel of graphical windows -- KDE has settled on KWM and GNOME on Metacity, but these default window managers can still be swapped for dozens of alternatives -- the xwinman site lists more than 80. In fact, several window managers, such as IceWM, are widely used instead of KDE and GNOME by those who favor performance over greater user-friendliness and a wide selection of tools.

By the time you turn to end-user applications, the pattern is too clear to need emphasizing. Originally built by developers for developers, GNU/Linux was perhaps slow to develop graphical tools for average users. In the last five years, however, the communities have more than made up for lost time. True, gaps still exist, such as first-rate OCR programs or state-of-the-art games, but users have plenty of choices for most tasks.

And now, with the rise of cross-platform applications such as Mozilla Firefox, OpenOffice.org, Inkscape, and the GIMP, many of these end-user tools might be said to make the operating system as a whole swappable, too. But the point is, on GNU/Linux, nothing seems a fixed part of the operating system. Still, from text editors to Web browsers and office productivity and graphics tool, the choice is overwhelming.

In fact, some pundits complain about the sheer amount of choice available. New users, they say, would be less anxious if the operating system had a single desktop and didn't come with half a dozen different programs for the same task.

In one sense, they're right. Option anxiety is a common reaction among those sitting down to a GNU/Linux system for the first time, especially if their computing experience is with Windows. That's why many distributions install only a limited selection of applications, or leave many choices off the menus.

Yet, in another sense, the pundits are missing the point. Like the turtles in the flat Earth world view, the choice brought about by modularity is one of the underpinnings of the culture that has built up around GNU/Linux. It underlies how programmers design the system. It influences even the least technical users' expectations of an operating system, so that after a few years of using GNU/Linux, they are apt to find Windows inflexible and limiting.

For all the anxiety and arguments it provokes, the modularity is too ingrained in users' thinking to be easily done away with. As in evolution, its diversity is an indication of its
success in survival.

The only difference, of course, is that, unlike the turtles, the assumption of modularity happens to be verifiable. It may not have inspired an alternate universe like Terry Pratchett's Discworld, but it has inspired an alternate way of looking at computing -- and one that we're better for having.

Category:

  • Linux
Click Here!