You are on page 1of 2

Summary Singularity - Rethinking the Software Stack

Raghav Sethi - 2009035

Singularity is a research project undertaken by Microsoft Research to create a modern operating


system written in managed code. The paper “Singularity - Rethinking the Software Stack”
describes the motivations and fundamental features of the Singularity project. This project aims
to rethink an operating system from the ground up and to re-examine design decisions in modern
OS’s that were dictated by the limitations of legacy hardware.

The major structural difference between Singularity and other popular operating systems is that it
is largely written in a type-safe garbage collected language called Sing# (which is derived from
C#). Apart from this significant feature, Singularity also introduces three major new ideas in OS
design.

1. Software Isolated Processes


a. SIPs do not share data; instead they use higher-level communication channels to
communicate.
b. SIPs are isolated by software, not hardware, protection.
c. SIPs are sealed; they cannot load or generate code into themselves.
d. A comparison of cost (in processor cycles) shows that SIPs are computationally
cheaper than process creation in most modern operating systems.
2. Contract-based Channels
a. A channel is a bi-directional message transfer medium with exactly two
endpoints; it provides a lossless, in-order message queue.
b. All channels are bi-directional. This results in overhead where uni-directional
channels are required, but also allows for efficient and analyzable communication
between SIPs.
c. Channel contracts provide a safe means for interacting components and help in
understanding the system architecture at a high level.
3. Manifest-based Programs
a. A MBP is a program defined by a static manifest. No code is allowed to run on a
Singularity system without a manifest.
b. A manifest describes in detail the requirements of an MBP; which include:
i. Code resources
ii. System resources
iii. System dependencies
iv. Declarative expression of expected behaviours
v. Type and memory safety
vi. Use of privileged-mode instructions
c. MBPs help in static and dynamic verification

Singularity is based on a microkernel design. File systems, device drivers etc. reside outside the
kernel. By default, SIPs cannot do more than control its own state and its child processes. To
access the kernel, SIPs must rely on ABI – Application Binary Interface. SIPs that require
privileged code (eg: device drivers) can include ABI calls.

Singularity is designed to be a multi-threaded OS with a large number of interacting processes.


As singularity makes several design decisions geared towards making it an efficient OS for
research. One significant limitation is the favouring of design clarity over performance. Another is
that the abandoning of application and driver compatibility to explore new design options.

Overall, though, Singularity is an exciting research project with a large theoretical reliability
advantage over common OSs. If it were to turn into an engineering project for large-scale
deployment, we could better understand it’s real world benefits.

You might also like