ArticleslgStudy

science

Singularity (operating system)

Singularity (operating system) is a 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 Singularity (operating system) rather than just read about it. In short: Singularity is an experimental operating system developed by Microsoft Research between July 9, 2003, and February 7, 2015. It was designed as a high dependability OS in which the kernel, device drivers, and application software were all written in managed code.

Singularity (operating system) — main illustration
Singularity (operating system) — illustration

Key takeaways

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

Reference excerpt

Singularity is an experimental operating system developed by Microsoft Research between July 9, 2003, and February 7, 2015. It was designed as a high dependability OS in which the kernel, device drivers, and application software were all written in managed code. Internal security uses type safety instead of hardware memory protection.

Operation The lowest-level x86 interrupt dispatch code is written in assembly language and C. Once this code has done its job, it invokes the kernel, where the runtime system and garbage collector are written in Sing Sharp (Sing#) (an extended version of Spec Sharp (Spec#), itself an extension of C#) and runs in real mode. The hardware abstraction layer is written in C++ and runs in protected mode. There is also some C code to handle debugging. The computer's basic input/output system (BIOS) is invoked during the 16-bit real mode bootstrap stage; once in 32-bit mode, Singularity never invokes the BIOS again, but invokes device drivers written in Sing#. During installation, Common Intermediate Language (CIL) opcodes are compiled into x86 opcodes using the Bartok compiler.

Security design Singularity is a microkernel operating system. Unlike most historic microkernels, its components execute in the same address space (process), which contains software-isolated processes (SIPs). Each SIP has its own data and code layout, and is independent from other SIPs. These SIPs behave like normal processes, but avoid the cost of task-switches. Memory protection in this system is provided by a set of rules called invariants that are verified by static program analysis. For example, in the memory-invariant states there must be no cross-references (or memory pointers) between two SIPs; communication between SIPs occurs via higher-order communication channels managed by the operating system. Invariants are checked during installation of the application; in Singularity, installation is managed by the operating system. Most of the invariants rely on the use of safer memory-managed languages, such as Sing#, which have a garbage collector, allow no arbitrary pointers, and allow code to be verified to meet a given computer security policy.

Compiler Bartok is an optimizing compiler and managed runtime system for Common Intermediate Language (which .NET languages compile to), being developed by Microsoft Research. Bartok was used by Microsoft Research for the implementation of Singularity. Bartok aims to be efficient enough to be usable for writing operating systems. It provides services such as automatic memory management and garbage collection, threading, and marshalling data to and from native code, as well as verification of CIL code. Bartok is written in C#, including the garbage collector. Bartok allows various implementations of the garbage collector, base class library and other components to be chosen at runtime on a per-application basis. This feature is being used to write the different components of Singularity – kernel, device drivers, and applications – each using a separate class library that exposes functionality required by (and optimized for) the specific usage.

Project status The first Singularity Research Development Kit (RDK), RDK 1.1, was initially released on March 4, 2008, being released under a shared source license allowing academic non-commercial use and available from CodePlex. RDK 2.0 was later released on November 14, 2008.

Similar projects Inferno, first created in 1995, based on Plan 9 from Bell Labs; programs are run in a virtual machine and written in Limbo instead of C# with CIL; open-source software. JNode, an OS similar in concept to Singularity, but using Java instead of C# with CIL. Phantom OS, another similar Ring 0 operating system that uses Java for managed code. MOSA, a .NET Framework compiler and operating system using C# TempleOS, a ring-0 operating system with JIT compiler; open-source software.

References

Further reading Jeremy Condit; Juan Chen; Chris Hawblitzel; Derrick Coetzee (2008). "Type-Preserving Compilation for Large-Scale Optimizing Object-Oriented Compilers" (PDF). Association for Computing Machinery. Tim Harris; Mark Plesko; Avraham Shinnar; David Tarditi (2006). "Optimizing Memory Transactions" (PDF). Association for Computing Machinery.

External links Official website Singularity Design Motivation and an overview of the Singularity Project Singularity source code on CodePlex Singularity: A research OS written in C# an interview of the Channel 9 team to Jim Larus and Galen Hunt (video & thread) Singularity III: Revenge of the SIP, an interview of the Channel 9 team to 3 researchers of the Singularity Project Team (video & thread). Singularity IV: Return of the UI, a demo of Singularity actually running (video & thread). Singularity Revisited, an interview of the Channel 9 team to 4 researchers of the Singularity Project Team (video & thread) Advanced Compiler Technology at Microsoft Research

Illustrations

Singularity (operating system) illustration

Worked examples

Example 1 — a first encounter with Singularity (operating system)

Start with the simplest possible case. Write down what Singularity (operating system) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In 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 Singularity (operating system) 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 Singularity (operating system) 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 Singularity (operating system)

In research
Singularity (operating system) appears in 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 Singularity (operating system) 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
Singularity (operating system) is common in secondary-school and first-year university syllabi. It links to neighbouring topics .NET, Microkernel-based operating systems, Microkernels, so understanding it makes those chapters shorter.
In everyday life
Look for Singularity (operating system) 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Singularity (operating system)” →

How to study Singularity (operating system) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Singularity (operating system) 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 Singularity (operating system) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Singularity (operating system) in simple terms?

Singularity is an experimental operating system developed by Microsoft Research between July 9, 2003, and February 7, 2015. It was designed as a high dependability OS in which the kernel, device drivers, and application software were all written in managed code.

Why does Singularity (operating system) matter?

Because it connects several 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 Singularity (operating system)?

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 Singularity (operating system).

Tags

  • .NET
  • Microkernel-based operating systems
  • Microkernels
  • Microsoft Research
  • Microsoft operating systems
  • Operating system distributions bootable from read-only media
  • X86-64 operating systems
  • X86 operating systems

Keep exploring