SMART KERNEL Covado, Fotolia

SMART KERNEL Covado, Fotolia

RevIews Minix 3 Minix 3 and the microkernel experience SMART KERNEL covado, Fotolia covado, Minix is often viewed as the spiritual predecessor of Linux, but these two Unix cousins could never agree on the kernel design. Now a new Minix with a BSD-style free license is poised to attract a new generation of users. BY RÜDIGER WEIS inux has a long and stormy rela- documented system soon became popu- ponents incorporated into the kernel. In tionship [1] with another Unix- lar with OS enthusiasts. In a post to the a famous post to the Minix group, the Llike operating system known as Minix newsgroup, upstart Finnish under- Minix creator referred to Linux as “… a Minix [2]. Noted author and computer graduate Linus Torvalds announced his giant step back to the 1970s,” and a con- scientist Andrew S. Tanenbaum released own experimental system in 1991, and fident reply from young Torvalds to this the first version of Minix in 1987 as a many early Linux contributors came leading expert in the field of operating tool for teaching students about operat- from the ranks of the Minix community. systems is early evidence of his now-leg- ing systems, and this small and well- But Tanenbaum and Torvalds clashed endary directness. Still, Linus has ac- early over issues of design. Tanenbaum knowledged the importance of Tanen- Rüdiger Weis is a professor of system has always favored the microkernel ar- baum’s work to the formation of his own programming at TFH Berlin. Between chitecture, a distinguishing feature of ideas. In his autobiography Just for Fun 2002 and 2005, he was involved in Minix to this day (see the box titled [3], Linus refers to Tanenbaum’s Operat- post-doctorate research on secure op- “Why Can’t Computers Just Work All ing Systems: Design and Implementation erating systems under Professor An- the Time?”). Linus, on the other hand, as the book that changed his life. drew S. Tanenbaum at the Vrije Uni- built Linux with a monolithic kernel, The debate about micro- versus mono- THE AUTHOR THE versiteit, Amsterdam. with filesystems, drivers, and other com- lithic kernels goes on to this day, and 48 ISSUE 99 FEBRUARY 2009 NETWAYS OSDC OPEN SOURCE DATA just as Linux didn’t Program/ Program/ fade away, neither CENTER CONFERENCE Server Server Filesystem did Minix. Version 3 of the Minix oper- 29 & 30 April 2009 | Nuremberg Reincarnation Server ating system is de- User Space Network Stack signed with the ob- Driver Driver Driver jective of creating a system that is more secure and reliable Microkernel than comparable POSIX systems, I/O access Scheduler MMU and a BSD-style Kernel Space open source license makes the latest Figure 1: The Minix microkernel encapsulates many subsys- Minix a strong can- tems in user space, including drivers, the filesystem, and the didate for produc- network stack. The kernel just runs critical functions, such tion as well as edu- as underlying I/ O, schedulers, and memory management. cational uses. Minix is even at- tracting the attention of some major sponsors. The EU is now sponsoring the project with several million Euros of funding, and Google has a number of Minix projects in its “Summer of Code” program. Minix 3 runs on 32-bit x86 CPUs, as well as on a number of virtual machines including Qemu, Xen, and VMware. The operating system includes an X Win- dow System (X11), a number of editors (Emacs and Vi), shells (including bash and Zsh), GCC, script languages such as Python and Perl, and network tools such as SSH. A small footprint and crash-resistant design make Minix a good http://www.netways.de/osdc candidate for embedded systems, and its superior stability has led to a promis- ing new role as a firewall system. EARLY BIRD SPECIALS - BOOK NOW Insecure by Design The security problems facing the current crop of operating systems, including Windows, but also including Linux, are the result of design errors. The errors were inherited for the most part from their predecessors of the 1960s. Most of Top IT professionals will meet, discuss, these problems can be attributed to the fact that developers aren’t perfect. Hu- learn and share their expertise on mans make mistakes. Of course, it would be nice to reduce the numbers and mitigate the effects; however, designers have frequently been far too willing to Open Source solutions for large IT compromise security and a clean design for speed. Tanenbaum refers to this as infrastructures. a “Faustian pact.” In addition to the issues related to sheer size, monolithic designs are also prone to inherent structural problems: Any error is capable of endangering the Break new ground on: whole system. A fundamental design error is that current operating systems do • High Availability The Question of Extension • Clustering Many developers and users disagree with Tanenbaum’s doctrine, which he has • Load Balancing maintained for over a decade, of being very cautious about introducing exten- sions to the kernel. Tanenbaum’s measure of reasonable operating system com- • Security Management | Firewalling plexity is a system that can be taught in a single term. Modularity makes it possi- ble to complete the development of a practically deployable solution in the scope • Large Scale Databases of a thesis. Examples of this are ports for various processor architectures, modifi- • Configuration Management cations to Minix for Xen virtualization, and security applications. In his memoir [3], Linus Torvalds states his reason for rejecting the microkernel architecture for Linux. “The theory behind the microkernel was that you split the kernel into fifty independent parts, and each of the parts is a fiftieth of the com- OPEN SOURCE DATA plexity. But everybody ignores the fact that the communication among the parts CENTER CONFERENCE is actually more complicated than the original system was – never mind the fact 29. & 30. April | Nürnberg that the parts are still not trivial.” A messy monolithic system can thus offer some performance and scalability benefits, even if it lacks the stability of a micro- kernel. presented by supported by ® NETWAYS MAGAZIN AnzeigeV1.1_Englisch.indd 1 20.11.2008 16:35:28 RevIews Minix 3 not follow the Principle Of Least Author- Continued operating system growth package from a stranger and bringing it ity (POLA). To put this simply, POLA comes with the integration of new driv- into the cockpit of a plane. states that developers should distribute ers. Monolithic systems build device systems over a number of modules so an drivers into the kernel, which means Transparent Architecture error in one module will not compromise that a driver error can compromise the Minix is probably the most fully docu- the security and stability of other mod- stability of the whole system. Closed mented operating system around. The ules. They should also make sure that source drivers in particular endanger Minix Book by Tanenbaum and Wood- each module only has the rights that it system security. According to Tanen- hull [4] is the primary reference. Numer- actually needs to complete its assigned baum, building a closed source driver ous publications on new features and tasks. into the kernel is like accepting a sealed ongoing research are found on the Minix Why Can’t Computers Just Work All the Time? By Andrew S. Tanenbaum Computer users are changing. Ten years the more bugs there are. Various studies They have to use kernel services to read ago, most computer users were young have shown that the number of bugs per and write to the hardware. The layer of people or professionals with lots of techni- thousand lines of code (KLoC) varies from processes running in user-mode directly cal expertise. When things went wrong – 1 to 10 in large production systems. A re- above the kernel consists of device drivers, which they often did – they knew how to ally well-written piece of software might with the disk driver, the Ethernet driver, fix things. Nowadays, the average user is have 2 bugs per KLoC over time, but not and all the other drivers running as sepa- far less sophisticated, perhaps a 12-year- fewer. An operating system with, say, 4 rate processes protected by the MMU old girl or a grandfather. Most of them million lines of code is thus likely to have hardware so they cannot execute any privi- know about as much about fixing com- at least 8000 bugs. Not all are fatal, but leged instructions and cannot read or write puter problems as the average computer some will be. A study at Stanford Univer- any memory except their own. nerd knows about repairing his car. What sity showed that device drivers – which Above the driver layer comes the server they want more than anything else is a make up 70% of the code base of a typical layer, with a file server, a process server, computer that works all the time, with no operating system – have bug rates 3x to 7x and other servers. The servers make use of glitches and no failures. higher than the rest of the system. Device the drivers as well as kernel services. For drivers have higher bug rates because (1) Many users automatically compare their example, to read from a file, a user process they are more complicated and (2) they are computer to their television set. Both are sends a message to the file server, which inspected less. While many people study full of magical electronics and have big then sends a message to the disk driver to the scheduler, few look at printer drivers. screens. Most users have an implicit model fetch the blocks needed. When the file sys- of a television set: (1) you buy the set; (2) The Solution: Smaller Kernels tem has them in its buffer cache, it calls the you plug it in; (3) it works perfectly without The solution to this problem is to move kernel to move them to the user’s address any failures of any kind for the next 10 code out of the kernel, where it can do space.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us