
contributed articles DOI:10.1145/2795228 80-column punched cards and brought MINIX shows even an operating system them to the human operator, who read them in. Several hours later the results can be made to be self-healing. appeared, printed on 132-column fan- fold paper. A single misplaced comma BY ANDREW S. TANENBAUM in a FORTRAN statement could cause a compilation failure, resulting in the programmer wasting hours of time. To give users better service, MIT de- veloped the Compatible Time-Sharing Lessons System (CTSS), which allowed users to work at interactive terminals and re- duce the turnaround time from hours to seconds while at the same time us- Learned ing spare cycles to run old-style batch jobs in the background. In 1964, MIT, Bell Labs, and GE (then a computer vendor) partnered to build a successor from 30 Years that could handle hundreds of users all over the Boston area. Think of it as cloud computing V.0.0. It was called MULTiplexed Information and Com- of MINIX puting Service, or MULTICS. To make a long and complicated story very short, MULTICS had a troubled youth; the first version required more RAM than the GE 645’s entire 288kB memory. Eventually, its PL/1 compiler was im- proved, and MULTICS booted and ran. WHILE LINUX IS well known, its direct ancestor, MINIX, Nevertheless, Bell Labs soon tired of the project and pulled out, leaving one is now 30 and still quite spry for such aged software. of its programmers on the project, Ken Its story and how it and Linux got started is not well Thompson, with a burning desire to reproduce a scaled-down MULTICS on known, and there are perhaps some lessons to be cheap hardware. MULTICS itself was learned from MINIX’s development. Some of these released commercially in 1973 and ran lessons are specific to operating systems, some to at a number of installations worldwide until the last one was shut down on software engineering, and some to other areas (such Oct. 30, 2000, a run of 27 years. as project management). Neither MINIX nor Linux Back at Bell Labs, Thompson found a was developed in a vacuum. There was quite a bit of discarded Digital Equipment Corp. PDP- 7 minicomputer and wrote a stripped relevant history before either got started, so a brief down version of MULTICS in PDP-7 as- introduction may put this material in perspective. sembly code. Since it could handle only In 1960, the Massachusetts Institute of Technology, one user at a time, Thompson’s col- where I later studied, had a room-size vacuum- key insights tube-based scientific computer called the IBM 709. ˽ Each device driver should run as Although a modern Apple iPad is 70,000x faster and an independent, user-mode process. has 7,300x more RAM, the IBM 709 was the most ˽ Software can last a long time and should be designed accordingly. powerful computer in the world when introduced. ˽ It is very difficult to get people Users wrote programs, generally in FORTRAN, on to accept new and disruptive ideas. 70 COMMUNICATIONS OF THE ACM | MARCH 2016 | VOL. 59 | NO. 3 MINIX’s longtime mascot is a raccoon, chosen because it is agile, smart, usually friendly, and eats bugs. league Brian Kernighan dubbed it the Australia, wrote a commentary on the MINIX Is Created UNIplexed Information and Computing V6 source code, explaining line by line There matters rested until 1984, when I Service, or UNICS. Despite puns about what it meant, a technological version decided to rewrite V7 in my spare time EUNUCHS being a castrated MULTICS, of a line-by-line commentary on the while teaching at the Vrije Universiteit the name UNICS stuck, but the spelling Bible. Hundreds of universities world- (VU) in Amsterdam in order to provide was later changed to UNIX. It is some- wide began teaching UNIX V6 courses a UNIX-compatible operating system times now written as Unix since it is not using Lions’s book as the text. my students could study in a course or really an acronym anymore. The lawyers at AT&T, which owned on their own. My idea was to write the In 1972, Thompson teamed up with Bell Labs, were aghast that thousands system, called MIni-uNIX, or MINIX, his Bell Labs colleague Dennis Ritchie, of students were learning all about for the new IBM PC, which was cheap who designed the C language and their product. This had to stop. So the enough (starting at $1,565) a student wrote a compiler for it. Together they next release, V7 (1979), came equipped could own one. Because early PCs did reimplemented UNIX in C on the PDP- with a license that explicitly forbade not have a hard disk, I designed MINIX 11 minicomputer. UNIX went through anyone from writing a book about it to be V7 compatible yet run on an IBM several internal versions until Bell Labs or teaching it to students. Operating PC with 256kB RAM and a single 360kB decided to license UNIX V6 to universi- systems courses went back to theory- 5¼-inch floppy disk—a far smaller con- ties in 1975 for a $300 fee. Since the only mode or had to use toy simula- figuration than the PDP-11 V7 ran on. PDP-11 was enormously popular, UNIX tors, much to the dismay of professors Although the system was supposed to spread fast worldwide. worldwide. The early history of UNIX run on this configuration (and did), I In 1977, John Lions of the Univer- has been documented in Peter Salus’s realized from the start that to actually 14 IMAGE BY IWONA USAKIEWICZ/ANDRIJ BORYS ASSOCIATES BORYS USAKIEWICZ/ANDRIJ IWONA BY IMAGE sity of New South Wales in Sydney, 1994 book. compile and build the whole system MARCH 2016 | VOL. 59 | NO. 3 | COMMUNICATIONS OF THE ACM 71 contributed articles on a PC, I would need a larger system, system components, including the namely one with the maximum possible file system and memory manager, was RAM (640kB) and two 360kB 5¼-inch compiled as a separate program and floppy disks. run as a separate process. Because the My design goals for MINIX were as 8088 did not have a memory manage- follows: Be careful what ment unit (MMU), I could have taken ˲ Build a V7 clone that ran on an IBM you put out on the shortcuts and put everything into one PC with only a single 360kB floppy disk; executable but decided against it be- ˲ Build and maintain the system us- Internet; it might cause I wanted the design to work on ing itself, or “self-hosting”; come back to haunt future CPUs with an MMU. ˲ Make the full source code available It took me approximately two years to everyone; you decades later. to get it running, working on it only ˲ Have a clean design students could evenings and weekends. After the sys- easily understand; tem was basically working, it tended to ˲ Make the (micro) kernel as small as crash after an hour of operation for no possible, since kernel failures are fatal; reason at all and in no discernible pat- ˲ Break the rest of the operating tern. Debugging the operating system system into independent user-mode on the bare metal was well nigh impos- processes; sible and I came within a hair of aban- ˲ Hide interrupts at a very low level; doning the project. ˲ Communicate only by synchro- I then made one final effort. I wrote nous message passing with clear pro- an 8088 simulator on which to run tocols; and MINIX, so when it crashed I could get ˲ Try to make the system port easily a proper dump and stack trace. To my to future hardware. horror, MINIX would run flawlessly for Initially, I did software develop- days, even weeks, at a time on the sim- ment on my home IBM PC running ulator. It never once crashed. I was to- Mark Williams Coherent, a V7 clone tally flummoxed. I mentioned this pe- written by alumni of the University culiar situation of MINIX running on of Waterloo. Its source code was not the simulator but not on the hardware publicly available. Using Coherent to my student, Robbert van Renesse, was initially necessary because at first who said he heard somewhere that the I did not have a C compiler. When my 8088 generated interrupt 15 when it programmer, Ceriel Jacobs, was able got hot. I told him there was nothing to port a C compiler based on the Am- in the 8088 documentation about that, sterdam Compiler Kit,18 written at the but he insisted he heard it somewhere. VU as part of my research, the system So I inserted code to catch interrupt 15. became self-hosting. Because I was Within an hour I saw this message on now using MINIX to compile and build the screen: “Hi. I am interrupt 15. You MINIX, I was extremely sensitive to any will never see this message.” I immedi- bugs or flaws that turned up. All devel- ately made the required patch to catch opers should try to use their own sys- interrupt 15. After that MINIX worked tems as early as feasible so they can see flawlessly and was ready for release. what users will experience. Lesson. Do not trust documentation Lesson. Eat your own dog food. blindly; it could be wrong. The microkernel was indeed small. Thirty years later the consequences Only the scheduler, low-level process of Van Renesse’s offhand remark are management, interprocess communi- enormous. If he had not mentioned cation, and the device drivers were in it.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-