The return of Minix
[Posted October 26, 2005 by corbet]
Back in the early days, when an entirely free, Unix-like system was still a
dream, a young student named Linus Torvalds got his hands on a system called
Minix. This system had been put together by Andrew Tanenbaum as part of a
book on operating systems design; it was intended mainly as a teaching
aid. Linus, like many others, found that Minix was also fun to hack on.
Also like others, he quickly discovered that the Minix license
was not particularly friendly to third-party hacking. While the code was
available, it was not possible to distribute enhancements, and there was no
mechanism for accepting patches into the official version. So Linus went
off and developed his own kernel, and Minix never did become much more
than a teaching tool. Minix was put under the BSD license in 2000, but
that was far too late. Had Minix carried a free license from the
beginning, subsequent events may have taken an entirely different course.
Minix has largely faded from view in recent years, but it is certainly not
gone. Last June, Andrew Tanenbaum announced that a new version of
Minix, to be called Minix 3, was in the works, along with an updated
version of the book. Like its predecessors, Minix 3 will be aimed at
education, but Mr. Tanenbaum is going for a wider market this time. In
particular, Minix 3 is aimed at "real world" use in low-end systems
and embedded systems. This release also targets "Companies who want
a small (real-time) modular, open source operating system free of the
GPL."
The result of this work is now available from minix3.org. Happily, this release has
passed on Mr. Tanenbaum's suggestion to use a cockroach as its logo
("they are tough as nails and have survived 300 million
years"), going, instead, with the critter seen on the right. This
release includes some design information, bits of
documentation, and a live CD with the operating system itself. Version
3.1.1 includes two compilers (the internal "ACK" compiler is faster than
gcc, but with lower-quality code production), TCP/IP networking, and about 300 programs. This
release only works on i386 processors, and does not yet support a window
system.
Interestingly, the site offers no option to download the source code. As
of this writing, the only way to get at the source appears to be to grab
the live CD and boot it. For those who would like to browse, a good part
of the source will be included as an appendix in the book, and has been
posted in one very large
page.
Minix 3 is very much a microkernel system; the core kernel is said to be
less than 4,000 lines of code. Everything else runs in user space. From
the web site:
The parts that run in user mode are divided into small modules,
well insulated from one another. For example, each device driver
runs as a separate user-mode process so a bug in a driver (by far
the biggest source of bugs in any operating system), cannot bring
down the entire OS. In fact, most of the time when a driver crashes
it is automatically replaced without requiring any user
intervention, without requiring rebooting, and without affecting
running programs.
As others have pointed out, this claim reaches a bit far: no amount of
isolation can protect the system against a driver which, for example,
wedges the bus. If Minix 3 ever grows to the point that it supports
DMA transfers, driver bugs will also be able to hose down any other part of
the system. And, in any case, quietly restarting buggy drivers also may
not be the best way to get those drivers fixed.
There is plenty of room to criticize the Minix 3 approach, but there
is not much use in that exercise. Minix 3 is free software. Anybody
can play with it and see for themselves how well it works. Interested
parties can improve it, and share their work with others. The Linux kernel
has grown complicated, to the point that it can be hard for beginning
hackers to approach. The much simpler nature of Minix 3 may well
appeal to developers who find the Linux learning curve to be unpleasantly
steep. So there may well be a wider role for this version of Minix. It is
a welcome contribution to the free software community.
(
Log in to post comments)