|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Sunday, 23 July 2000||Author: John Biggs|
|Published to: featured_articles/Featured Articles||Page: 1/1 - [Std View]|
Community Forum: Philosophizing the Kernel
Red Hat Software's Letter to Shareholders that accompanied its 2000 Annual Report contains something very special. The back of the letter holds both the key to all wisdom and the key to Red Hat's business plan: the source code and comments for the Linux v0.01 kernel, written by Linus Torvalds in 1991.
This arcane document, recreated in its entirety by Red Hat Linux scholars (although the open-source Taliban are sure to argue against its placement of include files and source for years to come) proves two things about Linux: it's small (the entire kernel fits on the back of a poster-sized sheet, albeit in small type) and it's a gripping read. In an effort to trace the philosophy of Linux back to its source, the following is a brief and admiring look at what some would call The Writings of Linus Torvalds: The Hacker Way of Power.
Linus' kernel begins with a rare thing in the Linux kabala. Here we find Linux's true name, the name given to it by its creator: Freax. If time and history had not stepped in, news of the Freax revolution would have been plastered on Business Week, People, Cat Fancy, etc., leading confused investors to put money into refrigerants.
Like the Teachings of Don Juan, the first section of the code includes a warning and a whiff of mystery. "Note!" writes Linus, "Dependencies are done automatically by 'make dep', which also removes any old dependencies." Automagically! Smacking of a brush with the supernatural, the first Linux makefile is as hopeful as the first rays of light through an open bedroom window the morning after an all-night coding session.
Later, in the routines that handle keyboard and screen I/O, Linus once again sighs, "Hopefully all is well." Even he is unsure as to the outcome of this vision quest. Soon, we enter the realm of the metaphysical. One particularly stirring line of code implores us not to "panic" and that the system is "trying to release [a] non-existent task." Here, Linus begins by freeing our minds from the shackles of fear, reminding us of the ephemeral nature of Office Assistants and Start menus. All is illusion, he tells us, just release your non-existent task.
Soon we come to the fork in the road. This is the point in the narrative where Linus, like Lao Tsu before him, stops at a gatekeeper's cottage, recites his little Tao, and moves on. During the description of forking processes, we are reminded that "process leadership doesn't inherit." But we also remember that Linus, unlike Lao Tsu, is not humble. He knows that his "elevator block-seek algorithm doesn't need to disable interrupts[,] due to clever programming." He is not afraid to admit pride and challenges others to follow him in his upward journey.
Like any great leader, Linus disparages the status quo. In his elegant date-handling functions, he rails against the Man and the Church: "I hate whoever though [sic] up the year 1970 - couldn't they have gotten a leap-year instead? I also hate Gregarious, pope or no. I'm grumpy." "I'm grumpy." is the shortest line in the entire source code. Here we see a human side to Linus: he can get grumpy, like us, and is subject to bouts of self-doubt and dissatisfaction. But Linus, like Linux, gives us some advice for dealing with human emotion: "Look where the interrupt is coming from," he writes, "and take appropriate action." One hand clapping, Linus. One hand clapping.
But all is not roses and light in this Philosophy. There are some things even the master cannot explain. For example, during a particularly hard system call routine Linus admits "This needs to some heave[sic] checking... I just haven't got the stomach for it. I also don't fully understand sessions/pgrp etc. Let somebody who does explain it." Casting the Freudian mating of "heave" and "stomach" aside (also ignoring the obvious allusion to the Buddha's choking on a piece of pork), this comment is a call for disciples. It is a call for brave men and women to take up Linus' fallen keyboard and begin to tap out the next version. Linus has gone to a better place, his Transmeta, his Nirvana, and we journey on. But the kernel is not over yet. There is still one more step.
All code must die, in the end, to be rebooted. Linus codes his die() routine without fanfare. This routine runs when the kernel crashes and is a distant relative of the Windows Blue Screen of Death. But this screen is not all blue histrionics and dire warnings. Linus' Linux, Linus' creation, his Freax, does not die. Linus' Linux just dumps its stack.
In the end, isn't that what we all should do?
John Biggs, firstname.lastname@example.org