Slide 1

Slide 1 text

Michael Ficarra MINIX

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

Features: Microkernel The MINIX kernel is only responsible for basic inter- process communication, virtual memory, scheduling, basic hardware abstraction, interrupt routing

Slide 9

Slide 9 text

Features: X11 with TWM

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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