ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
MINIX 3 - Wikipedia, the free encyclopedia

MINIX 3

From Wikipedia, the free encyclopedia

MINIX 3
Image:Minix3.png
Screenshot of MINIX 3
Minix 3 running X11 with TWM as Window Manager.
Website http://www.MINIX3.org
Company/
developer
Andrew S. Tanenbaum
OS family Unix-like
Source model Free and open source software
Latest stable release 3.1.2a / May 29, 2006
Latest unstable release 3.1.3a / June 8, 2007
Supported platforms i386 architecture
Kernel type Microkernel
Default user interface ash
License BSD License
Working state Current

MINIX 3 is a project with the aim to create a small, highly reliable and functional Unix-like operating system. The main goal of the project is for the system to be fault tolerant by detecting and repairing its own faults on the fly, without user intervention. It is published under the BSD license and can be downloaded for free from www.minix3.org. The main uses of the operating system are envisaged to be embedded systems (such as ADSL routers) as well as the education sector, such as universities or the XO-1 laptop.[1]

MINIX 3 currently supports IA-32 architecture PC compatible systems. It is also possible to run MINIX under emulators or virtual machines, such as Bochs,[2][3] VMware Workstation,[4] Microsoft Virtual PC,[5] and QEMU. Ports to the PowerPC[6] and ARM architectures (Intel XScale)[7] are in development.

The distribution comes on a Live CD and also can be downloaded as a USB stick image.[8]

Contents

[edit] Goals of the project

Reflecting on the nature of monolithic kernel based systems, where a driver (which has, according to MINIX creator Tanenbaum, approximately 3-7 times as many bugs as a usual program) can bring down the whole system[9], MINIX 3 aims to create an operating system that is a "reliable, self-healing, multiserver UNIX clone".[10] In order to achieve that, the code running in kernel must be minimal, with the file server, process server, and each device driver running as separate user-mode processes. Each driver is carefully monitored by a part of the system known as the reincarnation server. If a driver fails to respond to pings from the reincarnation server, it is shut down and replaced by a fresh copy of the driver. In a monolithic system, a bug in a driver can easily crash the whole kernel, something that is much less likely to occur in MINIX 3.[11].

[edit] Reliability in MINIX 3

One of the main goals of MINIX 3 is reliability. Below, some of the more important principles that enhance MINIX 3's reliability are discussed.

[edit] Reduce kernel size

Monolithic operating systems (e.g., Windows, Linux, BSD) have millions of lines of kernel code. In contrast, MINIX 3 has about 4000 lines of executable kernel code, which can make problems easier to find in the code.

[edit] Cage the bugs

In monolithic operating systems, device drivers reside in the kernel. This means that when a new peripheral is installed, unknown, untrusted code is inserted in the kernel. A single bad line of code in a driver can bring down the system. In MINIX 3, each device driver is a separate user-mode process. Drivers cannot execute privileged instructions, change the page tables, perform arbitrary I/O, or write to absolute memory. They have to make kernel calls for these services and the kernel checks each call for authority.

[edit] Limit drivers' memory access

In monolithic operating systems, a driver can write to any word of memory and thus accidentally trash user programs. In MINIX 3, when a user expects data from, for example, the file system, it builds a descriptor telling who has access and at what addresses. It then passes an index to this descriptor to the file system, which may pass it to a driver. The file system or driver then asks the kernel to write via the descriptor, making it impossible for them to write to addresses outside the buffer.

[edit] Survive bad pointers

Dereferencing a bad pointer within a driver will crash the driver process, but will have no effect on the system as a whole. The reincarnation server will restart the crashed driver automatically. For some drivers (e.g., disk and network) recovery is transparent to user processes. For others (e.g., audio and printer), the user may notice. In monolithic systems, dereferencing a bad pointer in a (kernel) driver normally leads to a system crash.

[edit] Tame infinite loops

If a driver gets into an infinite loop, the scheduler will gradually lower its priority until it becomes idle. Eventually the reincarnation server will see that it is not responding to status requests, so it will kill and restart the looping driver. In a monolithic system, a looping driver could hang the system.

[edit] Limit damage from buffer overruns

MINIX 3 uses fixed-length messages for internal communication, which eliminates certain buffer overruns and buffer management problems. Also, many exploits work by overrunning a buffer to trick the program into returning from a function call using an overwritten stacked return address pointing into the overrun buffer. In MINIX 3, this attack does not work because instruction and data space are split and only code in (read-only) instruction space can be executed.

[edit] Restrict access to kernel functions

Device drivers obtain kernel services (such as copying data to users' address spaces) by making kernel calls. The MINIX 3 kernel has a bit map for each driver specifying which calls it is authorized to make. In monolithic systems every driver can call every kernel function, authorized or not.

[edit] Restrict access to I/O ports

The kernel also maintains a table telling which I/O ports each driver may access. As a result, a driver can only touch its own I/O ports. In monolithic systems, a buggy driver can access I/O ports belonging to another device.

[edit] Restrict communication with OS components

Not every driver and server needs to communicate with every other driver and server. Accordingly, a per-process bit map determines which destinations each process may send to.

[edit] Reincarnate dead or sick drivers

A special process, called the reincarnation server, periodically pings each device driver. If the driver dies or fails to respond correctly to pings, the reincarnation server automatically replaces it by a fresh copy. The detection and replacement of nonfunctioning drivers is automatic, without any user action required. This feature does not work for disk drivers at present, but in the next release the system will be able to recover even disk drivers, which will be shadowed in RAM. Driver recovery does not affect running processes.

[edit] Integrate interrupts and messages

When an interrupt occurs, it is converted at a low level to a notification sent to the appropriate driver. If the driver is waiting for a message, it gets the interrupt immediately; otherwise it gets the notification the next time it does a RECEIVE to get a message. This scheme eliminates nested interrupts and makes driver programming easier.

[edit] Architecture

The Architecture of MINIX 3
The Architecture of MINIX 3

As can be seen, at the bottom level is the microkernel, which is about 4000 lines of code (mostly in C, plus a small amount of assembly language). It handles interrupts, scheduling, and message passing. In addition it supports an API of about 30 kernel calls that authorized servers and drivers can make. User programs cannot make these calls. Instead, they can issue POSIX system calls which send messages to the servers. The kernel calls perform functions such as setting interrupts and copying data between address spaces.

At the next level up, we find the device drivers, each one running as a separate user-mode process. Each one controls some I/O device, such as a disk or printer. The drivers do not have access to the I/O port space and cannot issue I/O instructions directly. Instead, they must make kernel calls giving a list of I/O ports to write to and the values to be written. While there is a small amount of overhead in doing this (typically 500 nsec), this scheme makes it possible for the kernel to check authorization, so that, for example, the audio driver cannot write on the disk.

At the next level we find the servers. This is where nearly all the operating system functionality is located. User processes obtain file service, for example, by sending messages to the file server to open, close, read, and write files. In turn, the file server gets disk I/O performed by sending messages to the disk driver, which actually controls the disk.

One of the key servers is the reincarnation server. Its job is to poll all the other servers and drivers to check on their health periodically. If a component fails to respond correctly, or exits or gets into an infinite loop, the reincarnation server (which is the parent process of the drivers and servers) kills the faulty component and replaces it with a fresh copy. In this way the system is automatically made self healing without interfering with running programs. Currently the reincarnation server, the file server, the process server, and the microkernel are part of the trusted computing base. If any of them fail, the system crashes. Nevertheless, reducing the trusted computing base from 3-5 million lines of code found in Linux and Windows systems to about 20,000 lines greatly enhances system reliability.

[edit] Differences between MINIX 3 and prior versions

Main article: MINIX
Diagram of the relationships between several Unix-like systems
Diagram of the relationships between several Unix-like systems

MINIX 1, 1.5, and 2 were developed as tools to help people learn about the design of operating systems. MINIX 1.0, released in 1987, was 12,000 lines of C (programming language) and some x86 Assembly language. Source code of the kernel, memory manager, and file system of MINIX 1.0 are printed in the book. Tanenbaum originally developed MINIX for compatibility with the IBM PC and IBM PC/AT microcomputers available at the time. MINIX 1.5, released in 1991, included support for MicroChannel IBM PS/2 systems and was also ported to the Motorola 68000 and SPARC architectures, supporting the Atari ST, Commodore Amiga, Apple Macintosh and Sun Microsystems SPARCstation computer platforms. A version of MINIX running as a user process under SunOS was also available. MINIX 2.0, released in 1997, was only available for the x86 and Solaris-hosted SPARC architectures. Minix-vmd was created by two Vrije Universiteit researchers, and added virtual memory and support for the X Window System. MINIX 3 does the same, and provides a modern operating system with many newer tools and many UNIX applications.[12] Prof. Tanenbaum once said:

Please be aware that MINIX 3 is not your grandfather's MINIX ... MINIX 1 was written as an educational tool ... MINIX 3 is that plus a start at building a highly reliable, self-healing, bloat-free operating system ... MINIX 1 and MINIX 3 are related in the same way as Windows 3.1 and Windows XP are: same first name.[10]

There have also been many improvements in the structure of the kernel since MINIX 2 was released, making the operating system more reliable.[13]

MINIX version 3.1.2 was released 8 May 2006. It contains X11, emacs, vi, cc, gcc, perl, python, ash, bash, zsh, ftp, ssh, telnet, pine, and over 400 other common UNIX utility programs. With the addition of X11, this version marks the transition away from a text-only system. Another feature of this version, which will be improved in future ones, is the ability of the system to withstand device driver crashes, and in many cases having them automatically replaced without affecting running processes. In this way, MINIX is self-healing and can be used in applications demanding high reliability.

[edit] Books and Articles

  • Tanenbaum, Andrew S; Albert S. Woodhull (2006). Operating Systems: Design and Implementation, Third Edition, ISBN 0-13-142938-8., Prentice Hall. 
  • J.N. Herder et al., Modular System Programming in MINIX 3, ;Login, April 2006 [12]
  • Pablo A Pessolani. MINIX4RT: A Real-Time Operating System Based on MINIX [13]
  • Building Performance Measurement Tools for the MINIX 3 Operating System, by Rogier Meurs [14]
  • Design and implementation of the MINIX Virtual File system [15]
  • Reference manual for MINIX 3 Kernel API [16]
  • Towards a true microkernel operating system [17]
  • Construction of a Highly Dependable Operating System [18]

[edit] See also

[edit] References and notes

  1. ^ "LWN.net." LWN: MINIX 3 hits the net. 28 Oct 2005. Eklektix, Inc.. 4 Jul 2006 [1].
  2. ^ Woodhull, Al. Getting Started with Minix on Bochs on Mac OS. 20 Feb 2003. 8 Jul 2006 [2].
  3. ^ Senn, Will. "OSNews.com." Virtually Minix: A Tutorial & Intro to Minix on XP via Bochs - OSNews.com. 08 Jul 2006. OSNews.com. 8 Jul 2006 [3].
  4. ^ Wagstrom, Patrick. Minix under VMWare Installation How-To. 8 Jul 2006 [4].
  5. ^ Woodhull, Al. Minix on Virtual PC: first look. 02 Jun 2005. 8 Jul 2006 [5]
  6. ^ Alting, Ingmar A. MinixPPC: A port of MINIX 3 to the PowerPC platform, 15 Sep 2006. [6]
  7. ^ MINIX 3 Operating System official website
  8. ^ Download
  9. ^ Tanenbaum, Andrew. CSAIL Event Calendar. 25 Aug 2006 [7].
  10. ^ a b Tanenbaum, Andrew. "Tanenbaum-Torvalds debate, Part II:." 12 May 2006. Vrije Universiteit. 15 Jun 2006 [8].
  11. ^ Tanenbaum, Andrew S.. "Reliability." The MINIX 3 Operating System. Vrije Universiteit.. 22 Jun 2006 [9]
  12. ^ Woodhull, Albert S.. "MINIX 3: A small, reliable free operating system:" MINIX 3 FAQ. 24 Oct 2005. Vrije Universiteit. 15 Jun 2006 [10].
  13. ^ Tanenbaum, Andrew. "The MINIX 3 Operating System." Improvements since V2. 05 Jul 2006 [11].

[edit] External links

Wikibooks
Wikibooks has a book on the topic of


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -