How often have you rebooted your TV set in the past year? Probably a lot less than you have rebooted your computer. Of course there are many “reasons” for this, but increasingly, nontechnical users don’t want to hear them. They just want their computer to work perfectly all the time and never crash. MINIX 3 is a project to develop an operating system as reliable as a TV set, for embedded systems and mission critical applications, but also for future $50 single-chip laptops and general desktop use. The focus is being small, simple, and reliable. Note: This is the last entry for the Alternative OS Contest.History
MINIX 3 has a bright future but somewhat checkered past. The first version, MINIX 1, was released in 1987 and was the first UNIX clone with all the source code available. It developed rapidly and soon had its own USENET newsgroup (comp.os.minix), with 40,000 subscribers within 3 months, a large number at a time when the Internet was only available to university researchers and students. One of the early MINIX adopters was a Finnish student named Linus Torvalds,
who went out and bought a PC just to run MINIX, studied it very carefully, and then decided to write his own operating system, inspired by MINIX. Although Linus knew MINIX very well, he didn’t steal any code from it, as some people
have alleged. Linus system grew into the modern Linux system. MINIX’ author, Andrew Tanenbaum and Torvalds have had some fairly public discussions on operating system design, originally in 1992
and most recently in 2006.
Rebirth
Although MINIX was (and still is) widely used used for teaching
operating systems courses at universities, it got a new impetus in 2005
when Tanenbaum assembled a new team of people to completely redo it as
a highly reliable system. MINIX 3 has some history with MINIX 1 and MINIX 2
(released in 1997 as a POSIX-conformant OS), but it is really a new system
(analogous to the relationship between Windows XP and Windows 3.1).
Various studies have shown that software broadly contains something like
6-16 bugs per 1000 lines of code and that device drivers have 3-7 times as
many bugs as the rest of the operating system. When combined with the
fact that 70% of a typical operating system consists of device drivers,
it is clear that device drivers are a big source of trouble. For Windows XP,
85% of the crashes are do to bugs in device drivers. Obviously,
to make OSes reliable, something has to be done to deal
with buggy device drivers. Building a reliable system despite the inevitable
bugs in device drivers was the original driving force behind MINIX 3.
Design
The approach that MINIX 3 uses to achieve high reliability is fault
isolation. In particular, unlike traditional OSes, where all
the code is linked into a single huge binary running in kernel mode, in
MINIX 3, only a tiny bit of code runs in kernel mode–about 4000 lines in all.
This code handles interrupts, process scheduling, and interprocess
communication. The rest of the operating system runs as a collection of
user-mode processes, each one encapsulated by the MMU hardware and none of
them running as superuser. One of these processes, dubbed the
reincarnation server, keeps tabs on all the others and when one of
them begins acting sick or crashes, it automatically replaces it by a fresh
version. Since many bugs are transient, triggered by unusual timing, in most
cases, restarting the faulty component solves the problem and allows the
system to repair itself without a reboot and without the user even noticing it.
This property is called self healing, and traditional systems do not have it.
The structure of MINIX 3 is shown in Fig. 1. It is constructed as a series of
layers. At the bottom, running in kernel mode, is a microkernel, consisting
of about 3000 lines of C and 800 lines of assembler. Above that comes a layer
of device drivers, with each driver in a separate user-mode process to ease
in replacing it should it fail. Then come the servers, which form the core
of the operating system. These include the reincarnation server mentioned
above, the file server, the process manager, and others, including the
X server, the data store, and various others. Finally, on top of that come
the user processes. Although internally, MINIX 3 is completely different
from other UNIX systems, it supports the standard POSIX interface to
applications, so normal UNIX software can be ported fairly easily.
Fig. 1. The MINIX 3 architecture
The components communicate by passing fixed-length messages. For example,
a user process requests file I/O send sending a message to the file server,
which then checks its cache and if the needed block is not present, sends a
message to the disk driver process to go get the block. While sending a
message adds a little bit of overhead (about 500 nsec on a 3-GHz Pentium 4),
the system is still quite responsive. For example, a complete system build,
which requires over 120 compilations, takes well under 10 sec.
User View
From the user’s point of view, MINIX 3 looks like UNIX, except less bloated.
It comes with the X Window System and over 400 standard UNIX programs, including:
Shells: ash, bash, pdksh, rsh
Editors: emacs, nvi, vim, elvis, elle, mined, sed, ed, ex
Language tools: cc, gcc, g++, bison, flex, perl, python, yacc
Programming tools: cdiff, make, patch, tar, touch
Networking: ssh, telnet, ftp, lynx, mail, rlogin, wget, pine
File utilities: cat, cp, bzip2, compress, mv, dd, uue, GNU utilities
Text utilities: grep, head, paste, prep, sort, spell, tail
Administration: adduser, cron, fdisk, mknod, mount, cvs, rcs
Games: dungeon, nethack
Currently the user interface is just X, but someday a GUI may be added if a suitable lightweight GUI can be
found.
Here are some
screen shots.
Availability
MINIX 3 is open source software, under the
BSD license.
It has its own Website
from which the a bootable CD-ROM image containing all the sources and binaries
can be downloaded. To install it, just boot the CD-ROM, login as root, and
type: setup. Installation takes about 10 minutes. After installation,
a large number of packages can be installed from the CD-ROM or the Website by
just typing: packman to select the choices. Currently MINIX 3 runs on x86
hardware, but ports to the PowerPC and Xscale are underway. It also runs fine on
virtual machines such as VMware and
Xen.
Since MINIX 3 went public in late 2005, the Website has had over 300,000 unique visitors and the CD-ROM image has been downloaded some 75,000 times. Currently, the site is getting over 1000 visitors a day. There is an active Google USENET newsgroup, comp.os.minix, where people ask and answer questions, post
new software, and discuss MINIX 3. MINIX 3 is a community effort and your help is most welcome. Go get the system, try it out, and join the future.
Does anyone who has played around with Minix have any idea on its potential as a full fledged desktop or server OS? Even if it may not have the app support yet, could it?
I run http://www.minixtips.com on a minix 3 server and it runs fine. So I think as an HTTP server it makes a fine OS. I’ve also run it as a desktop quite a lot – uses the X windows client and wiirc as the window manager. Again, no problems for normal desktop usage.
I did have to use remote X to another machine to run programs that haven’t been ported yet though. The main one being Firefox.
Edited 2006-09-25 22:41
Hmm.. every day I turn my TV off and on.. who knows what’s happening internally, so perhaps I do reboot my TV every day?
i wont recommend this article because of
“For example, a complete system build, which requires over 120 compilations, takes well under 10 sec.”
“i wont recommend this article because of
“For example, a complete system build, which requires over 120 compilations, takes well under 10 sec.””
What’s wrong with that sentence ?
Building a reliable system despite the inevitable bugs in device drivers was the original driving force behind MINIX 3.
Must be the case with less than 4000 lines of code.Interesting.
Currently the user interface is just X, but someday a GUI may be added if a suitable lightweight GUI can be found.
And here I was thinking that X was a GUI. Glad he cleared that up.
from Wikipedia: “X provides the basic framework for a GUI environment: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. X does not mandate the user interface – individual client programs handle this.”
X is not a GUI by itself. The main components of X are:
– an abstract interface to device drivers for displays, keyboards, mice, etc.
– a network protocol to connect to remote I/O devices
– an architecture for sharing these devices between applications
At the very least this will put some pressure on linux to become more reliable by putting less performance critical subsystems into user space.
At the very least this will put some pressure on linux to become more reliable by putting less performance critical subsystems into user space.
Not only linux,any OS.
At the very least this will put some pressure on linux to become more reliable by putting less performance critical subsystems into user space.
Not only linux,any OS.
I do see the sense of what you are saying about a stable OS being a good example for fellow OSes to live up to, be it Linux or any other.
Now compare that ideal path towards The Optimum to the actuality that Minix has been around longer than Linux and at this moment poses not even the slightest challenge to the market share of any mainstream OS. And maybe not to any niche OS either, but there are more niches than I keep tabs on, so perhaps I’ve overstated that a bit. (;
I’m still pulling for the paradigm you and tuttle have outlined, but I don’t think it has actually arrived yet. On the other hand if no one sets a good example we can’t expect stability to magically emerge from the Singularity. Oh, wait …
More alternatives is never a bad thing. This is what I love about free software.
hi
its me, the references to linux and linux here is an attempt to chagne history. pls ignore it
thanks
People – don’t mod down somebody, who I assume IS Andy Tanenbaum from the content of the post – who is trying to pre-empt a tedious flamefest about Linux. We’re discussing Minix here. It sounds great. I have just the machine for it, and will try it out. Hopefully someone will soon port a basic desktop manager to it (I’m a graphics worker) which would make it totally suitable for OLPC and other educational projects.
I would expect the “real” Andy Tanenbaum to be able to spell and not using silly acronyms like “pls”.
Edited 2006-09-25 10:14
pls is an abbreviation, not an acronym, or NAA, as I like to call it.
It was not the real Andy Tanenbaum. It was a fake account which I’ve suspended.
Clearly, this is the future. I claim that MINIX3 has a “high potential” just because of that.
“Andy Tanenbaum”, are you really Andrew S. Tanenbaum?
Edited 2006-09-25 09:43
Sorry if I offended you. I will definitely check this out. I think that microkernel OSes are a much better approach than monolithic kernels. To be honest, I think that all current mainstream OSes (Windows, Linux, OSX) are kind of lame.
I was just attempting to estimate how this would influence that other OS.
By the way: is there a stable interface for binary drivers for Minix 3? This is very important for wide scale adoption, and that other OS does not want to do it for ideological reasons.
well given that the interface is a messaging system, i think it can be made to be highly stable, in theory.
basicly they can introduce versioned messages, and if some drivers are so old that they dont pass version, assume it goes to the oldest of the old.
Rebirth
Although MINIX was (and still is) widely used used for teaching operating systems courses at universities, it got a new impetus in 2005 when Tanenbaum assembled a new team of people to completely redo it as a highly reliable system.
When the special contributor is Prof. Tanenbaum himself, why is the article written in third (second??) person ?
Has the article been edited by osnews before publishing?
BTW, a very good article. Enjoyed reading it.
Edited 2006-09-25 10:22
When the special contributor is Prof. Tanenbaum himself, why is the article written in third (second??) person ?
It takes some getting used to, but it is actually customary in academic circles to do it this way. It makes more sense when referring to articles the author wrote together with other people (e.g.: ‘Tanenbaum & X did..’), but I assume the custom is derived from such instances.
“X is not a GUI by itself. The main components of X are:
– an abstract interface to device drivers for displays, keyboards, mice, etc.
– a network protocol to connect to remote I/O devices
– an architecture for sharing these devices between applications”
“pls is an abbreviation, not an acronym, or NAA, as I like to call it.”
Bunch of crying babies. Why don’t you grammatically/historically/definitively correct me too you loosers. Go and write a poem somewhere to your boyfriends.
The Minix3 description/features look like it could have been pulled from the QNX4 website – except for the full C source available. (That’s a compliment).
Edited 2006-09-25 12:16
I received the CD at a lecture by Andy Tannenbaum, and it it’s pretty good stuff (boots lightning fast, but my hardware wasn’t supported). The article is more or less a condensed version of the lecture, so I am pretty convinced that this is the real Andy Tannenbaum. Still, projects like Minix may be the most elegant solutions, but they have to put up a battle against less elegant solutions that are mostly functioning and quite evolved, and that for the industry just work.
The ideas may be great, but I am not sure that the industry will be willing to put enough muscle behind minix to help it fly.
I have seen Bang & Olufsen TV-systems to lockup with text displayed “software mangel” (malfunction in Danish).
So drivers are living in user space. That should make developing drivers much easier.
What this project needs now is a kick ass driver development kit including a nice driver debugger including all the usual bells and whistles such as breakpoints etc.
Ideally it should be so easy to write drivers for Minix3 that people write the prototype driver for their hardware on Minix3 and then port it to the mainstream OSes.
That is the only way I can think of to have decent driver support for a new, non-mainstream OS.
What a disappointing article regarding he’s a computer science professor.
Why not model it after something really reliable, like a hammer. When’s the last time you rebooted your hammer?
Depends on how you define “rebooting my hammer”
Last time I checked the shaft of a hammer could actually break.
hmm, i can think of some potential guis for this one.
as for drivers, whats the chance of them being ported from BSD or linux?
I recently picked up from the library “Modern Operating Systems” by Prof. Tanenbaum. (2nd, edition, 2001, not too much mention of Minix.)
I wanted to know more about the concepts and nuts and bolts of OS design and implementation – not because I could ever hope to make any meaningful sort of contribution, but just to have a better appreciation of systems I work with.
I never expected to be able to do anything practical with it, but it turned out that I was able to use this book to squash a very annoying bug. I was reading it at the bus stop a few days ago, and after boarding noticed that a wasp had followed us on board the crowded bus. It was getting angrier by the minute at being cooped up, so seizing the opportunity I reached over and flattened it against the window with the back of Prof. Tanenbaum’s suitably hefty tome. I felt a little heartless, but not too many months before I had spared a wasp on the bus, and it had crawled up my pants leg and stung me in some painful areas (providing free entertainment for the other passengers). I wish I’d had his book then. (True story.)
Geoff
The more POSIX compliant OS’s we have the better it is in the long run.
The more POSIX compliant operating systems we have the fewer new ideas and apporaches will emerge. POSIX compliance is not the holy graal of operating systems and I applaude each and every project that dares to try something new and different.
I agree that POSIX compliance often limits an OS.
But in this case I am sure the POSIX compliance is just a user space module sitting on top of the real OS without compromising the OS design.
The performance will be slightly less than with an OS designed exclusively for POSIX compliance, but I will gladly accept that for better stability and easier driver development.
And with each and every project that tries to do something different, you add new incompatibilities between systems.
Trying out new things IS good, but there needs to be coordinated efforts to bring those things to a wider audience as well.
Get wide enough support, and keep it under strict, but open, control by suitable players, and you have a new standard that makes life better for the users… hopefully.
I wonder what it would take to make GNUstep run on that thing
…I can run Minix3 with these window managers:
-jwm (you can find it in the minix packages)
-icewm
-WindowMaker
…
Sounds great
Ever tried compiling GNUstep on it?
And how do icewm or WindowMaker fare on Minix3 compared with Linux?
The OSes now are bloated a lot, so, Minix3, L4 or all the microkernel based OSes have a lot of potential for the future of computing.
I like the concept behind this kernel. Putting all of the drivers and subsystems in userspace and reserving kernel mode for the low level operations like process scheduling and IPC is more secure and reliable. The live monitoring (daemon??) that dynamically restarts misbehaving drivers modules is also neat and could really improve overall stability.
But I’m assuming this dynamic monitoring feature inflicts some performance implications?
Its unfortunate that so few devices are supported by this kernel. Maybe someday an effort will be made to port the majority of open-source Linux drivers to the Minix kernel so that we can have a viable microkernel alternative to Linux. The alternatives now are mostly monolithic like Linux except for Hurd. But I suppose Duke Nukem Forever II will be available before Hurd ever stablizes.
Minix, with its Microkernel is very impressive and extensive for a guy like me who is after the awesome integration of OS in a very small but efficient core, I am also impressed by running drivers in user process, this would protect every user’s thread and activity.
This is such as a nice and genius innovation on the part of OS engineering and I hope Mr. Andrew will not stall from it’s graceful development…
Go Go GO Go …. Great Racoon
Edited 2006-09-26 06:18
I would be very satifisfied if Andrew will port SAMBA Server on Minix…
The old Minix was an academic OS that was designed primarily as a learning tool and not as a serious OS. Even Tannenbaum himself said so. Of course stuff like QNX has been available for a long time, but that is not open source.
Both Linux and Windows are moving in the right direction, albeit very slowly. Windows Vista is putting things like the Video and Audio stack into user space, and on linux there is stuff like FUSE (File System in User Space).
Since on UNIX almost everything is a file, you can do a lot more than just storage with FUSE.