Singularity (operating system)
Template:Short description Template:Refimprove {{ safesubst:#invoke:Unsubst||date=__DATE__|$B= Template:Main other {{#invoke:Infobox|infobox}}Template:Template other}}{{#invoke:Check for unknown parameters|check|unknown=Template:Main other|preview=Page using Template:Infobox OS with unknown parameter "_VALUE_"|ignoreblank=y| | bodystyle | caption | collapsible | developer | discontinued | family | first release date | first_release_date | GA date | GA url | GA_date | GA_url | human language | human_language | influenced | influenced by | influenced_by | instruction set | instruction sets | instruction_set | instruction_sets | kernel type | kernel_type | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | license | logo | logo alt | logo caption | logo size | logo_alt | logo_caption | logo_size | marketing target | marketing_target | name | native_name | native_name_lang | other articles | other_articles | package manager | package_manager | preceded by | preceded_by | preview date | preview url | preview version | preview_date | preview_url | preview_version | prog language | prog_language | programmed in | programmed_in | release date | release url | release version | release_date | release_url | release_version | released | repo | RTM date | RTM url | RTM_date | RTM_url | screenshot | screenshot_alt | screenshot_size | source model | source_model | succeeded by | succeeded_by | support status | support_status | supported platforms | supported_platforms | tagline | title | ui | update model | update_model | updatemodel | userland | version of | version_of | website | working state | working_state}} Singularity is an experimental operating system developed by Microsoft Research between July 9, 2003,[1] and February 7, 2015.[2] 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.[3]Template:Rp[4]Template:Rp 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.Template:R
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.Template:R
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.Template:Cn
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.Template:Cn
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.[5]
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,[6] being released under a shared source license allowing academic non-commercial use and available from CodePlex.[7] RDK 2.0 was later released on November 14, 2008.[8]
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
- {{#invoke:citation/CS1|citation
|CitationClass=web }}
- {{#invoke:citation/CS1|citation
|CitationClass=web }}
External links
- Template: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
Template:Microsoft operating systems Template:Operating system Template:Microkernel Template:Microsoft Research
- ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
- ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
- ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
- ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
- ↑ Singularity: Microsoft's research OS available for download
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedrdk1.1 - ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedrdk2.0