To read all comments associated with this story, please click here.
The OS is technically not managed..yet, the kernel is converted into the intermediate language by Visual Studio and then they use an in-house tool to convert that IL to x86 Opcodes and build the executable header information.
So it may not be truly managed yet, but they can still make great security assumptions when converting to x86.
The next logical step would be getting as much runtime support as they can in the IL-to-x86 compiler and use that to build proofed low level kernel components.
From there it'd be possible to build an in-house VM capable of running true managed code.
What people really should be saying is that C#/MSIL is verifiable. The verifiability of the code allows the VM (or OS in this case) to allow the code to run in the same process as the kernel without causing it to do silly things like overwrite critical bits of memory, blowing up the stack or heap, changing the current instruction pointer etc.
DG
The JVM equivalent for .Net is called the Common Language Runtime: http://en.wikipedia.org/wiki/Common_Language_Runtime
There are some noticeable differences in architecture between it and the JVM though. Google is your friend.
As someone said earlier, the more important aspect of IL is that it contains enough information for memory safety to be verified at compile and runtime. In the case of Singularity, the IL is actually compiled down to machine code ahead of time by a trusted compiler (either the Bartok optimizing research compiler or the Phoenix compiler that's the backend of the next Visual C++). Work is being done to keep the type information next to the ASM code so that the compiler does not really need to be trusted and only a smaller verification system needs trust.
Ultimately you do need to trust the correctness of some pieces of code... and of the hardware.
The design of the .NET framework is that that they first compile down to a platform- and processor-independent common intermediate language (CIL); this CIL bytecode can either be run via interpreter, or (this is the important part) compiled a second time into native code (as is done the most often, trading off portability for speed). This may seem roundabout, but since you only have to worry about optimizing the compilation for CIL, instead of all the umpteen .NET languages, you can get very strong optimization.






Member since:
2006-12-07
When one writes in Java, the code is "managed" by JVM. The term "managed" is not used in Java circles, but you know what I mean. What is managing C# code ? I thought it was some .NET framework. And .NET framework is supposed to run in an OS, usually Windows, or Mono under UNIX. So, how is an OS written in managed code supposed to run and boot ?
DG