SharpOS: Proof of Concept for a C# Operating System Kernel
The SharpOS project has completed a proof-of-concept implementation of an operating system kernel written in C#; offers basic kernel subsystems as well as interactive diagnostics shell.
January 1st, 2008 (UTC). The SharpOS Project today announced the immediate availability of the first release of the SharpOS Kernel and Ahead-Of-Time (AOT) Common Intermediate Language (IL) byte code compiler, both written using the ECMA standard C# programming language and licensed under the GNU General Public License version 3.0 with the Classpath Linking Exception. Our AOT engine takes a CIL assembly as it’s input and produces machine code output which is meant to be run directly on the processor, without an underlying operating system. Our The kernel offers a set of basic kernel subsystems for developers as well as a diagnostics shell, allowing users to interact with and query the kernel’s information.
The AOT, developed primarily by Mircea-Cristian Racasan, is currently capable of converting most IL instructions to the equivalent native machine instructions. We are currently targeting the Intel x86 line of processors, but the AOT has extensible architecture support mechanisms. It supports most of the primitive data types including (to an extent) the System.String class and excluding managed arrays and generics. It does not yet handle object references or the creation of new objects, because the runtime support in the kernel for these features is not yet completed. The AOT also offers a library that provides a number of essential stubs that allow the kernel to access labelled data embedded in the kernel image, and perform static memory allocation. These stubs are replaced with AOT-generated code to perform the desired operation. It also provides a set of method stubs representing machine-level instructions, which are replaced by the AOT with the actual instructions during compilation, which allows assembly-level programming in C#. To keep the kernel design extensible, an Architecture-Dependent Code mechanism was added which allows the AOT to select the correct architecture implementations at compile-time.
The kernel, which was authored collaboratively by Bruce Markham, Sander van Rossen, Mircea-Cristian Racasan, Asgeir Halldórsson, Jonathan Dickinson and William Lahti and other members of the SharpOS Community is written in C# and can be compiled using either the Microsoft .NET or Novell Mono compilers. The resulting kernel executable is then translated to machine code by the AOT engine, and can be booted by Multiboot-compatible boot loaders like GNU Grub. It has support for interrupts, US and UK keyboards, console input/output, memory paging, basic memory management, experimental scheduling support, serial ports, and more. The kernel is not yet capable of running user executables or indeed executing processes, instead the user is greeted by a demonstration shell which can be used to interact with and query the kernel state.
Obtaining SharpOS
The official builds and source code of the kernel, AOT, and supporting tools can be downloaded from the project website at http://sharpos.org/. Virtual machine configurations are available for VMware, Bochs, and QEmu, and raw disk images. There are ISO images for those who would like to test SharpOS on a real computer. Source code is available via the project’s Subversion repository on Sourceforge.net. The project is listed at open source statistics site Ohloh.net as well as the project activity monitoring site CIA.vc.
Contributing to SharpOS
Due to the limitations of the project’s chosen source control management (subversion), new developers are required to gain a certain level of trust before they are given access to the repository. Developers may do this by joining the mailing list and by submitting patches; after the other developers see that the new developer is competent that new developer will be given access to the repository.
They kindly ask third parties not to create their own branches of SharpOS elsewhere on the internet.
Future Direction
The developers now intend to focus on bringing high-level object support to the platform, in the process updating the subsystems which exist currently and adding new ones. Their next milestone focuses on completing the missing pieces of the AOT compiler, but development between the compiler and the kernel must go hand-in-hand due to technical constraints.
For more information, the SharpOS Project hosts a wiki at http://sharpos.org/redmine/wiki/3.
Press Contact
For press-related inquiries, please contact press /at/ sharpos /dot/ org.

