ArticleslgStudy

computer science

Minix 3

Minix 3 is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Minix 3 rather than just read about it. In short: Minix 3 is a small, Unix-like operating system published under a BSD-3-Clause license, and is a successor project to the earlier versions, Minix 1.x and 2.0. The project's main goal is for the system to be fault-tolerant by detecting and repairing its faults on the fly, with no user intervention.

Minix 3 — main illustration
Minix 3 — illustration

Key takeaways

  • Minix 3 belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Minix 3 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Minix 3 from memory before moving on to harder problems.

Reference excerpt

Minix 3 is a small, Unix-like operating system published under a BSD-3-Clause license, and is a successor project to the earlier versions, Minix 1.x and 2.0. The project's main goal is for the system to be fault-tolerant by detecting and repairing its faults on the fly, with no user intervention. The main uses of the system are envisaged to be embedded systems and education. As of 2017, Minix 3 supports IA-32 and ARM architecture processors. It can also run on emulators or virtual machines, such as Bochs, VMware Workstation, Microsoft Virtual PC, Oracle VirtualBox, and QEMU. A port to PowerPC architecture is in development. The distribution comes on a live CD and does not support live USB installation. The project has been dormant since late 2018, and the latest release is 3.4.0 rc6 from 2017, although the Minix 3 discussion group is still active. Minix 3 is the Intel Management Engine (ME) OS found in Intel's Platform Controller Hub, starting with the introduction of ME 11, which is used with Skylake and Kaby Lake processors. It was debated that Minix could have been the most widely used OS on x86/AMD64 processors, with more installations than Microsoft Windows, Linux, or macOS, because of its use in the Intel ME.

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, Minix 3 aims to create an operating system that is a "reliable, self-healing, multiserver Unix clone". 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 named the reincarnation server. If a driver fails to respond to pings from this 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. This is far less likely to occur in Minix 3.

History

Minix 3 was publicly announced on 24 October 2005 by Andrew Tanenbaum during his keynote speech on top of the Association for Computing Machinery (ACM) Symposium Operating Systems Principles conference. Although it still serves as an example for the third edition of Tanenbaum and Woodhull's textbook (2006), it is comprehensively redesigned to be "usable as a serious system on resource-limited and embedded computers and for applications requiring high reliability." Initially released under the same BSD-3-Clause license that Minix was licensed under since 2000, in late 2005, the copyright owner was changed and a fourth clause was added.

Reliability policies One of the main goals of Minix 3 is reliability. Below are some of the more important principles that enhance its reliability.

Reduce kernel size Monolithic operating systems such as Linux and FreeBSD and hybrids like Windows have millions of lines of kernel code. In contrast, Minix 3 has about 6,000 lines of executable kernel code, which can make problems easier to find in the code.

Cage the bugs In monolithic kernels, device drivers reside in the kernel. Thus, when a new peripheral is installed, unknown, untrusted code is inserted in the kernel. One bad line of code in a driver can bring down the system. In contrast, in Minix 3, each device driver is a separate user-mode process. Drivers cannot execute privileged instructions, change the page tables, perform arbitrary input/output (I/O), or write to absolute memory. They must make kernel calls for these services and the kernel checks each call for authority.

Limit drivers' memory access In monolithic kernels, a driver can write to any word of memory and thus accidentally corrupt user programs. In Minix 3, when a user expects data from, for example, the MINIX file system, it builds a descriptor telling who has access and at what addresses. It 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.

Survive bad pointers Dereferencing a bad pointer within a driver will crash the driver process, but will not affect the system as a whole. The reincarnation server will restart the crashed driver automatically. Users will not notice recovery for some drivers (e.g., disk and network) but for others (e.g., audio and printer), they might. In monolithic kernels, dereferencing a bad pointer in a driver normally leads to a system crash.

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 kernel, a looping driver could hang the system.

Limit damage from buffer overflows Minix 3 uses fixed-length messages for internal communication, which eliminates certain buffer overflows 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 stack return address pointing into attacker controlled memory, usually the overrun buffer. In Minix 3, this attack is mitigated because instruction and data space are split and only code in (read-only) instruction space can be executed, termed executable-space protection. However, attacks which rely on running legitimately executable memory in a malicious way (return-to-libc, return-oriented programming) are not prevented by this mitigation.

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 kernels, every driver can call every kernel function, authorized or not.

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

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.

… excerpt ends here. Continue reading the full article.

Illustrations

Minix 3 illustration
Minix 3 illustration
Minix 3: Structure of monolithic kernel– and microkernel-based operating systems, respectively
Structure of monolithic kernel– and microkernel-based operating systems, respectively
Minix 3: The architecture of Minix 3
The architecture of Minix 3
Minix 3: Diagram of the relationships between several Unix-like systems
Diagram of the relationships between several Unix-like systems

Worked examples

Example 1 — a first encounter with Minix 3

Start with the simplest possible case. Write down what Minix 3 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Minix 3 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Minix 3 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Minix 3

In research
Minix 3 appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Minix 3 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Minix 3 is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2005 software, Computer science in the Netherlands, Computing platforms, so understanding it makes those chapters shorter.
In everyday life
Look for Minix 3 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Minix 3 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Minix 3 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Minix 3 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Minix 3 in simple terms?

Minix 3 is a small, Unix-like operating system published under a BSD-3-Clause license, and is a successor project to the earlier versions, Minix 1.x and 2.0. The project's main goal is for the system to be fault-tolerant by detecting and repairing its faults on the fly, with no user intervention.

Why does Minix 3 matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Minix 3?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Minix 3.

Tags

  • 2005 software
  • Computer science in the Netherlands
  • Computing platforms
  • Educational operating systems
  • Information technology in the Netherlands
  • Microkernels
  • Minix
  • Operating system distributions bootable from read-only media

Keep exploring