Singularity (operating system)
Encyclopedia
Singularity is an experimental operating system
being built by Microsoft Research
since 2003. It is intended as a highly-dependable
OS in which the kernel, device driver
s, and applications are all written in managed code
.
interrupt
dispatch code is written in assembly language
and C
. Once this code has done its job, it invokes the kernel, whose runtime
and garbage collector
are written in Sing#
(an extended version of Spec#
, itself an extension of C#) and runs in unprotected 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 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) opcode
s are compiled into x86 opcodes using the Bartok compiler.
operating system. Unlike most historical 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.
Protection in this system is provided by a set of rules called invariant
s that are verified by static 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 certain policy
.
license that permits academic non-commercial use and is available from CodePlex. Version 1.1 was released in March 2007 and version 2.0 was released on November 14, 2008; the system is currently undergoing incremental development.
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...
being built by Microsoft Research
Microsoft Research
Microsoft Research is the research division of Microsoft created in 1991 for developing various computer science ideas and integrating them into Microsoft products. It currently employs Turing Award winners C.A.R. Hoare, Butler Lampson, and Charles P...
since 2003. It is intended as a highly-dependable
Dependability
Dependability is a value showing the reliability of a person to others because of his/her integrity, truthfulness, and trustfulness, traits that can encourage someone to depend on him/her.The wider use of this noun is in Systems engineering....
OS in which the kernel, device driver
Device driver
In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....
s, and applications are all written in managed code
Managed code
Managed code is a term coined by Microsoft to identify computer program code that requires and will only execute under the "management" of a Common Language Runtime virtual machine ....
.
Workings
The lowest-level x86X86 architecture
The term x86 refers to a family of instruction set architectures based on the Intel 8086 CPU. The 8086 was launched in 1978 as a fully 16-bit extension of Intel's 8-bit based 8080 microprocessor and also introduced segmentation to overcome the 16-bit addressing barrier of such designs...
interrupt
Interrupt
In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution....
dispatch code is written in assembly language
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...
and C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
. Once this code has done its job, it invokes the kernel, whose runtime
Run-time system
A run-time system is a software component designed to support the execution of computer programs written in some computer language...
and garbage collector
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...
are written in Sing#
Sing sharp
Sing# is a concurrent programming language that is a superset of the Spec# programming language; in turn, Spec# is an extension of the C# programming language. Microsoft Research developed Spec#, and later extended it into Sing# in order to develop the Singularity operating system...
(an extended version of Spec#
Spec sharp
Spec# is a programming language with specification language features that extends the capabilities of the C# programming language with Eiffel-like contracts, including object invariants, preconditions and postconditions. Like ESC/Java, it includes a static checking tool based on a theorem prover...
, itself an extension of C#) and runs in unprotected mode. The hardware abstraction layer is written in C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...
and runs in protected mode. There is also some C code to handle debugging. The computer's BIOS
BIOS
In IBM PC compatible computers, the basic input/output system , also known as the System BIOS or ROM BIOS , is a de facto standard defining a firmware interface....
is invoked during the 16-bit real mode
Real mode
Real mode, also called real address mode, is an operating mode of 80286 and later x86-compatible CPUs. Real mode is characterized by a 20 bit segmented memory address space and unlimited direct software access to all memory, I/O addresses and peripheral hardware...
bootstrap stage; once in 32-bit mode, Singularity never invokes the BIOS again, but invokes device drivers written in Sing#
Sing sharp
Sing# is a concurrent programming language that is a superset of the Spec# programming language; in turn, Spec# is an extension of the C# programming language. Microsoft Research developed Spec#, and later extended it into Sing# in order to develop the Singularity operating system...
. During installation, Common Intermediate Language
Common Intermediate Language
Common Intermediate Language is the lowest-level human-readable programming language defined by the Common Language Infrastructure specification and is used by the .NET Framework and Mono...
(CIL) opcode
Opcode
In computer science engineering, an opcode is the portion of a machine language instruction that specifies the operation to be performed. Their specification and format are laid out in the instruction set architecture of the processor in question...
s are compiled into x86 opcodes using the Bartok compiler.
Security design
Singularity is a microkernelMicrokernel
In computer science, a microkernel is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system . These mechanisms include low-level address space management, thread management, and inter-process communication...
operating system. Unlike most historical microkernels, its components execute in the same address space
Address space
In computing, an address space defines a range of discrete addresses, each of which may correspond to a network host, peripheral device, disk sector, a memory cell or other logical or physical entity.- Overview :...
(process
Process (computing)
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...
), 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.
Protection in this system is provided by a set of rules called invariant
Invariant (computer science)
In computer science, a predicate is called an invariant to a sequence of operations provided that: if the predicate is true before starting the sequence, then it is true at the end of the sequence.-Use:...
s that are verified by static analysis
Static code analysis
Static program analysis is the analysis of computer software that is performed without actually executing programs built from that software In most cases the analysis is performed on some version of the source code and in the other cases some form of the object code...
. 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
Memory management
Memory management is the act of managing computer memory. The essential requirement of memory management is to provide ways to dynamically allocate portions of memory to programs at their request, and freeing it for reuse when no longer needed. This is critical to the computer system.Several...
languages, such as Sing#, which have a garbage collector
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...
, allow no arbitrary pointers, and allow code to be verified to meet a certain policy
Computer security policy
A computer security policy defines the goals and elements of an organization's computer systems. The definition can be highly formal or informal. Security policies are enforced by organizational policies or security mechanisms. A technical implementation defines whether a computer system is secure...
.
Project status
Singularity 1.0 was completed in 2007. A Singularity Research Development Kit (RDK) has been released under a Shared SourceShared source
Shared source is an umbrella term covering some of Microsoft's legal mechanisms for software source code distribution. Microsoft's Shared Source Initiative, launched in May 2001, includes a spectrum of technologies and licenses...
license that permits academic non-commercial use and is available from CodePlex. Version 1.1 was released in March 2007 and version 2.0 was released on November 14, 2008; the system is currently undergoing incremental development.
Similar projects
- InfernoInferno (operating system)Inferno is a distributed operating system started at Bell Labs, but is now developed and maintained by Vita Nuova Holdings as free software. Inferno was based on the experience gained with Plan 9 from Bell Labs, and the further research of Bell Labs into operating systems, languages, on-the-fly...
, first created in 1995, based on Plan 9 from Bell LabsPlan 9 from Bell LabsPlan 9 from Bell Labs is a distributed operating system. It was developed primarily for research purposes as the successor to Unix by the Computing Sciences Research Center at Bell Labs between the mid-1980s and 2002...
, programs are run in a virtual machine and are written in Limbo instead of CIL/C#. - JavaOSJavaOSJavaOS is an operating system with a Java virtual machine as a fundamental component. It was jointly developed by Sun Microsystems and IBM. Unlike Windows, Mac OS, Unix or Unix-like systems which are primarily written in the C programming language, JavaOS is primarily written in Java.As of 2006,...
, a legacy OS based on the same concept as Singularity. - JNodeJNodeJNode is a free software project to create a Java platform operating system. The project has taken the unique direction of creating all the software in Java itself, with the exception of some assembly language to boot and load the system...
, an OS similar in concept to Singularity, but with Java instead of CIL/C#. - JXJX (operating system)JX is a microkernel operating system with both the kernel and applications implemented using the Java programming language.- Overview :JX is implemented as an extended Java Virtual Machine , adding support to the Java system for necessary features such as protection domains and hardware access,...
, a Java OS that, like Singularity, uses type-safety instead of hardware memory protection. - Phantom OSPhantom OSPhantom OS is an operating system mostly made by Russian programmers.Phantom OS is based on a concept of persistent virtual memory, and is managed-code oriented. Phantom OS is one of a few OSes that are not based on classical concepts of UNIX-like systems...
, a managed OS. - SharpOSSharpOS (operating system)SharpOS was an open source .NET-C# based operating system that was developed by a group of volunteers and presided over by a team of six project administrators . It is no longer in active development, and resources have been moved to the MOSA project...
, an open sourceOpen sourceThe term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
effort to write an operating system using C#. - MOSAMOSAMOSA is an effort by two projects, SharpOS and Ensemble OS, both aiming to create a C#-based, FOSS Operating system, to combine their resources.-Motivation:...
, result of merging Sharp OS and Ensemble OS - Cosmos (operating system)Cosmos (operating system)Cosmos is an open source operating system written in C#. It also encompasses a compiler for converting Common Intermediate Language bytecode into native instructions. The operating system is compiled together with a user program and associated libraries using IL2CPU to create a bootable...
, another open sourceOpen sourceThe term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
C# operating system
See also
- Language-based systemLanguage-based systemA language-based system is a type of operating system that uses language features to provide security, instead of or in addition to hardware mechanisms. In such systems, code referred to as the trusted base is responsible for approving programs for execution, assuring they cannot perform operations...
, General kernel design using language-based protection instead of hardware protection. - Spec#Spec sharpSpec# is a programming language with specification language features that extends the capabilities of the C# programming language with Eiffel-like contracts, including object invariants, preconditions and postconditions. Like ESC/Java, it includes a static checking tool based on a theorem prover...
, programming language derived from C# by adding EiffelEiffel (programming language)Eiffel is an ISO-standardized, object-oriented programming language designed by Bertrand Meyer and Eiffel Software. The design of the language is closely connected with the Eiffel programming method...
-like design by contracts. - Sing#Sing sharpSing# is a concurrent programming language that is a superset of the Spec# programming language; in turn, Spec# is an extension of the C# programming language. Microsoft Research developed Spec#, and later extended it into Sing# in order to develop the Singularity operating system...
, programming language derived from Spec# by adding channels and low-level constructs; used for building Singularity. - MidoriMidori (operating system)Midori is the code name for a managed code operating system being developed by Microsoft Research. It has been reported to be a possible commercial implementation of the Singularity operating system, a research project started in 2003 to build a highly-dependable operating system in which the...
, a Microsoft-developed microkernel-based operating system mooted as a possible successor to Microsoft WindowsMicrosoft WindowsMicrosoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
by some members of the IT press. Based on/related to Singularity.
External links
- Official home page and an
- 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)