Just for Fun : The Story of an Accidental Revolutionary (14 page)

Read Just for Fun : The Story of an Accidental Revolutionary Online

Authors: Linus Benedict Torvalds

Tags: #Autobiography and memoir

That’s the biggest argument against microkernels. The simplicity you try to reach is a false simplicity.
Linux started out much smaller and much, much simpler. It didn’t enforce modularity, so you could do a lot of things more straightforwardly than you ever could with Minix. One of the original problems I had with Minix was that if you had five different programs running at the same time and they all want to read five different files, the tasks would be serialized. In other words, you would have five different processes sending requests to the file system: “Can I please Read From File X?” The file system daemon that handles reading takes one of them and sends it back, then takes the next one and sends it back, and so on.
Under Linux, which is a monolithic kernel, you have five different processes that each do a system call to the kernel. The kernel has to be very careful that they don’t get confused with each other, but it very naturally scales up to any number of processes doing whatever they want. It makes Linux much faster and more efficient.
Another problem with Minix was that you got the sources but the licenses didn’t allow you to do a lot. Take someone like Bruce Evans, who performed major surgery on Minix and made it much more usable. He couldn’t just incorporate his improvements. He was restricted to only making patches. From a practical standpoint that’s a complete disaster. He couldn’t legally make a bootable image available to people so they could easily upgrade. So users had to take a multiple-step process to even get a usable system, which was horribly impractical.
The only time I ended up communicating with Andrew Tanenbaum was in early 1992. Imagine logging on one blizzardy morning and running across the unedited version of this:
From:
[email protected]
(Andy Tanenbaum)
To: Newsgroups: comp.os.minix
Subject: LINUX is obsolete
Date: 29 Jan 92 12:12:50 GMT
I was in the U.S. for a couple of weeks, so I haven’t commented much on LINUX (not that I would have said much had I been around), but for what it’s worth, I have a couple of comments now.
As most of you know, for me MINIX is a hobby, something that I do in the evening when I get bored writing books and there are no major wars, revolutions, or senate hearings being televised live on CNN. My real job is a professor and researcher in the area of operating systems.
As a result of my occupation, I think I know a bit about where operating systems are going in the next decade or so. Two aspects stand out:
Most older operating systems are monolithic, that is, the whole operating system is a single a.out file that runs in “kernel mode.” This binary contains the process management, memory management, file system and the rest. Examples of such systems are UNIX, MS-DOS, VMS, MVS, OS/360, MULTICS, and many more.
The alternative is a microkernel-based system, in which most of the OS runs as separate processes, mostly outside the kernel. They communicate by message passing. The kernel’s job is to handle the message passing, interrupt handling, low-level process management, and possibly the I/O. Examples of this design are the RC4000, Amoeba, Chorus, Mach, and the not-yet-released Windows/NT.
While I could go into a long story here about the relative merits of the two designs, suffice it to say that among the people who actually design operating systems, the debate is essentially over. Microkernels have won. MINIX is a microkernel-based system. The file system and memory management are separate processes, running outside the kernel. The I/O drives are also separate processes. LINUX is a monolithic style system. This is a giant step back into the 1970’s.
2. PORTABILITY
MINIX was designed to be reasonably portable, and has been ported from the Intel line to the 680x0 (Atari, Amiga, Macintosh), SPARC, and NS32016. LINUX is tied fairly closely to the 80x86. Not the way to go.
Don’t get me wrong, I am not unhappy with LINUX. It will get all the people who want to turn MINIX in BSD UNIX off my back. But in all honesty, I would suggest that people who want a **MODERN** *free* OS look around for a microkernel-based, portable OS, like maybe GNU or something like that.
Andy Tanenbaum (
[email protected]
)
I knew I needed to defend my honor, so I wrote back:
From:
[email protected]
(Linus Benedict Torvalds)
Subject: Re: LINUX is obsolete
Date: 29 Jan 92 23:14:26 GMT
Organization: University of Helsinki
Well, with a subject like this, I’m afraid I’ll have to reply. Apologies to minix-users who have heard enough about linux anyway. I’d like to be able to just *ignore the bait* but… Time for some serious flamefesting!
In article <
[email protected]
>
[email protected]
(Andy Tanenbaum) writes:
>I was in the U.S. for a couple of weeks, so I haven’t commented much on LINUX (not that
>I would have said much had I been around), but for what it is worth, I have a couple of
>comments now.
>As most of you know, for me MINIX is a hobby, something that I do in the evening when
>I get bored writing books and there are no major wars, revolutions, or senate hearings
>being televised live on CNN. My real job is professor and researcher in the area of
>operating systems.
You use this as an excuse for the limitations of minix? Sorry, but you lose: I’ve got more excuses than you have, and linux still beats the pants off minix in almost all areas. Not to mention the fact that most of the good code for minix seems to have been written by Bruce Evans.
Re 1: You doing minix as a hobby-look at who makes money off minix, and who gives linux out for free.
Then talk about hobbies. Make minix freely available, and one of my biggest gripes with it will disappear. Linux has very much been a hobby (but a serious one; the best type) for me: I get no money for it, and it’s not even part of any of my studies in the university. I’ve done it all on my own time, and on my own machine.
Re 2: Your job is being a professor and researcher: That’s one hell of a good excuse for some of the brain damages of minix. I can only hope (and assume) that Amoeba doesn’t suck like minix does.
True, linux is monolithic, and I agree that microkernels are nicer. With a less argumentative subject, I’d probably have agreed with most of what you said. From a theoretical (and aesthetical) standpoint, linux loses. If the GNU kernel had been ready last spring, I’d not have bothered to even start my project: the fact is that it wasn’t and still isn’t.
Linux wins heavily on points of being available now.
>MINIX is a microkernel-based system. [deleted, but not so that you miss the point] LINUX is a monolithic style system.
If this was the only criterion for the “goodness” of a kernel, you’d be right. What you don’t mention is that minix doesn’t do the microkernel thing very well, and has problems with real multitasking (in the kernel). If I had made an OS that had problems with a multithreading file system, I wouldn’t be so fast to condemn others: in fact, I’d do my damnedest to make others forget about the fiasco.
[yes, i know there are multithreading hacks for minix, but they are hacks, and bruce evans tells me there are lots of race conditions.]
>2. PORTABILITY
“Portability is for people who cannot write new programs”
-me, right now (with tongue in cheek)
The fact is that linux is more portable than minix. What? I hear you say. It’s true-but not in the sense that ast means: I made linux as conformant to standards as I knew how (without having any POSIX standard in front of me). Porting things to linux is generally/much/easier than porting them to minix.
I agree that portability is a good thing: but only where it actually has some meaning. There is no idea in trying to make an operating system overly portable: adhering to a portable API is good enough. The very/idea/of an operating system is to use the hardware features, and hide them behind a layer of high-level calls. That is exactly what linux does: it just uses a bigger subset of the 386 features than other kernels seem to do. Of course this makes the kernel proper unportable, but it also makes for a/much/simpler design. An acceptable trade-off, and one that made linux possible in the first place.
I also agree that linux takes the non-portability to an extreme: I got my 386 last January, and linux was partly a project to teach me about it. Many things should have been done more portably if it would have been a real project. I’m not making overly many excuses about it though: it was a design decision, and last april when I started the thing, I didn’t think anybody would actually want to use it. I’m happy to report I was wrong, and as my source is freely available, anybody is free to try to port it, even though it won’t be easy.
Linus
PS> I apologise for sometimes sounding too harsh: minix is nice enough if you have nothing else. Amoeba might be nice if you have 5-10 spare 386’s lying around, but I certainly don’t. I don’t usually get into flames, but I’m touchy when it comes to linux:)
There were a few more installments in this, one of my few flame wars. But you get the point: There were opposing voices, even in the early days. (Or maybe the point is: Be careful when you put yourself out there in an electronic forum. Your typos and errors of grammar will haunt you forever.)
Linus and I leave our families and friends back at the campsite and take an afternoon hike along a clear stream. We’re camping at Grover Hot Springs, way up in the Eastern Sierra over the July 4th weekend, at a site that seems to have been lifted from the pages of
National Geographic—“
This is a Kodak moment,” Linus proclaims, pausing to look out over a wildflower-dusted meadow and the dramatic cliffs that provide the backdrop. We settle at a site along the stream, and I ask him to describe his lift during those days when Linux’s appeal was spreading far beyond its original family of newsgroup enthusiasts, few of whom Linus had even personally met.

It must have felt great,” I say. “For years you were toiling away on your own in your bedroom, with little contact with the world outside your CPU. Suddenly you have people from every corner of the planet acknowledging what great work you’re doing. You’re the center of this growing community that is looking to you to—”

I don’t have a memory of it being a big deal for me,” he replies. “I really don’t think it was. It was kind of the thing I was thinking about all the time, but mainly because there was always a problem to be solved. In that sense, I was thinking about it a lot, but it was not, emotionally, a big thing. Intellectually, it was something big.

I liked the fact that there were a lot of people giving me motivation to do this project. I thought I had seen the end of it, a point where it was almost done. But that point never came because people kept giving me more reasons to continue and more brainteasers to worry about. And that kept it interesting. Otherwise, I probably would have just moved on to another project, because that’s how I worked, and that was fun. But I suspect I worried more about my nose or something like that,” he says.
A few weeks later we are at the Stanford Shopping Center, where Linus is perplexed over the selection of running shoes from which he can choose. “How many miles do you typically run each week?” asks the salesman. Linus smiles; he hasn’t run as much as a mile during the past ten years
.
Exercise hasn’t been a major priority
.
But in his weaker moments
,
Linus admits that he would like to shed some of his excess poundage.

Tove must have convinced you to help me get rid of my pouch,” he jokes, patting his gut.

Tell her that her check never arrived this week,” I reply.
Soon we are circling the Stanford campus in search of a legal parking space. After maybe half an hour, we do a few stretches, then we start to run over narrow dirt paths past the campus’s dried up lake, into the woods, and in the direction of our goal: the huge hillside satellite dish. We never make it. I set an unfairly swift pace and am surprised that Linus can stick right behind me for about a mile. Then he loses his wind, A few minutes later we spread out on the grass along the lake.

What was your family’s reaction to everything that was happening to Linux?” I ask. “They must have been pretty excited about it.”

I don’t think anybody really noticed,” he replies. “I won’t say that nobody really cared. But I had been doing programming most of my lift, and this was not anything different as far as they were concerned.” “Well, you must have said something to your folks. Like if your dad was driving you someplace, didn’t you say, ‘Hey, you’re not going to believe this but you know the stuff I’ve been doing with my computer? Well, I’ve got hundreds of people who are using it…


No,” he answers. “I just didn’t feel the need to share this with my family and friends, I never had the feeling that I wanted to push it on people. I remember Lars Wirzenius, around the time I was writing Linux, decided to buy XENIX, SCO’s version of Unix, and I think I remember he tried to make excuses, like, ‘Don’t take this the wrong way,

I personally don’t think I ever cared. He eventually switched, but it wasn’t a big deal for me. To me the fact that people used it was nice, and it was wonderful that I got comments back, but at the same time it was not that important. I didn’t want to spread the gospel. I was proud of having people use my code, but I don’t remember ever having the feeling that I wanted to share that with anybody. And I didn’t think it was the most important thing on Earth. I didn’t think that I was doing something really important because a hundred people were using my software. It was more like it was fun. And that’s how I feel about it today.”

So you didn’t even want to tell your parents and family and friends about it. And you really weren’t excited by everything that was happening?” I ask, not masking my disbelief.

Other books

Bookends by Liz Curtis Higgs
Black notice by Patricia Cornwell
The Art of Forgetting by McLaren, Julie
Hurricane Butterfly by Vermeulen, Mechelle
The Orange Eats Creeps by Krilanovich, Grace
The Perfect Lover by Stephanie Laurens
Night Edge by Jessica Hawkins
From Ashes by Molly McAdams