Upgrade to Pro — share decks privately, control downloads, hide ads and more …



created as part of Operating Systems class back in school


Michael Ficarra

May 20, 2010


  1. Michael Ficarra MINIX

  2. History •MINIX = "mini-Unix" •Inspired Linus to make Linux •Created

    by Andrew S. Tanenbaum ◦Vrije Universiteit (VU, Free University) in 1987 ◦designed to help teach class about Operating Systems •Current major version (3) shares no code with previous versions "MINIX 1 and MINIX 3 are related in the same way as Windows 3.1 and Windows XP are: same first name" -- Andrew S. Tanenbaum
  3. History •MINIX 1 ◦released in 1987 ◦goal: exemplify the principles

    conveyed in Tanenbaum's textbook, Operating Systems: Design and Implementation ◦syscall-compatible with 7th edition UNIX •MINIX 1.5 ◦released in 1991 ◦supported many more platforms ▪Motorola 68000 and SPARC architectures ▪supported Atari ST, Commodore Amiga, Apple Macintosh, Sun SPARCstation ▪unofficial ports to Intel 386, National Semiconductor NS32532, ARM
  4. History •MINIX 2 ◦released in 1997 ◦dropped support for all

    architectures except for x86 and SPARC ◦used as example for second edition of textbook ◦POSIX.1 compliant ◦TCP/IP stack replaced "Amoeba" network protocols
  5. History •MINIX 3 ◦released in 2005 ◦first major release as

    free and open source software ▪previous versions had a restrictive license that required a fee, included in the textbook price ◦first release available as a "live" image ◦only supports x86 ◦focused heavily on reliability ◦added X11 support
  6. Relationship With Linux •Linus Torvalds studied MINIX in an OS

    class at University of Helsinki •inspired to write his own OS •developed Linux on MINIX •MINIX used as a guide
  7. Features •Fully open source ◦released under the 4-clause BSD license

    ◦participated in GSoC every year since 2006 •pkgin package manager ◦manages pkgsrc binary packages •POSIX compliant •~650 UNIX programs ported to MINIX •Extremely high reliability •Microkernel architecture
  8. Features: Microkernel The MINIX kernel is only responsible for basic

    inter- process communication, virtual memory, scheduling, basic hardware abstraction, interrupt routing
  9. Features: X11 with TWM

  10. Applications •Projects that require very high reliability •Projects that require

    a very nonrestrictive license •OLPCs and other netbooks •web/file/DNS/anything server •Embedded systems: cell phones, consumer electronics •Teaching operating systems concepts
  11. Negatives •Limitations ◦32-bit addressing limits system to max 4GB RAM

    usage ◦only supports a single architecture: x86 ▪ports to ARM and PPC are in progress ◦hardware requirements ▪i386 or greater Pentium processor ▪16MB of RAM ▪50MB of persistent storage (unless using live image) •very barebones: need to fetch "standard" packages (bash, gcc, make, ...) manually •porting software from other UNIX-like OSes is non-trivial ◦no cross-compiler support in gcc ◦software must be compiled in MINIX ◦as a consequence, not very many programs exist
  12. Reliability •Major focus of MINIX 3 •Made possible due to

    microkernel •Entire kernel contains ~6000 lines of C code •Derives most of its reliability from removing device drivers from the kernel •Device drivers run as user-mode processes ◦use virtual memory ◦well isolated ◦can't bring down the OS ▪even bad pointer dereferences
  13. Reliability: Device Drivers •Reincarnation server ◦periodically pings drivers ◦kills unresponsive

    drivers ◦automatically replaces drivers upon crash ◦often transparent to the user •Priority governed by the scheduler ◦drivers stuck in an infinite loop will have priority gradually lowered ◦priority is lowered to the point of complete unresponsiveness ◦now unresponsive, driver will be killed and replaced by the reincarnation server
  14. Reliability: Device Drivers •Lazy interrupts ◦interrupts get converted by kernel

    to notifications ◦notifications are sent to the appropriate driver ◦if the program has registered as listening for the notification, it will be immediately interrupted ◦otherwise, the notification gets added to a message queue which the driver may check at its leisure