Operating System entirely out of C#!

ohm55

In Runtime
Messages
141
Thats right, even though its such a high level, you dont need to write any assembly with this one! Cosmos is an OS made entirely out of C#, and is expandable. If you ever want to make your own OS without all that ASM, here is your chance!

Requirements:
Visual Studio (free or paid) or Visual C# (free or paid)
Bochs, Virtualbox, or any other Virtual Machine Emulator
Some C# and Kernel Module knowledge

Their blog is at http://gocosmos.org/
Have fun, kiddies! :D
 

ohm55

In Runtime
Messages
141
Another OS made intirely out of C# is microsoft experimental os called Singularity (oh, the irony!)
 

berry120

Fully Optimized
Messages
3,434
Location
UK
Another OS made intirely out of C# is microsoft experimental os called Singularity (oh, the irony!)
Nope. Singularity is a very interesting and cool project, but it's not written entirely in C# at all.

If you ever want to make your own OS without all that ASM, here is your chance!
I think it's worth pointing out here that writing your own OS isn't easy by any stretch of the imagination - in any language. The Cosmos guys had to write a whole new compiler that compiled C# down into native code just to get this to work, it wasn't a case of coding a few lines in visual studio and hitting run!

More fun writing them in C and assembly. I'm just sayin'.
From an educational viewpoint I agree that if you want to learn about the very low levels of OS design then you need to do your thing in C and assembly. However, this is fast becoming a purists viewpoint rather than a practical one. These days, C and ASM tend to be (rightly) used for nothing more than they have to be (and ASM is really being phased out pretty much completely now.) From pretty much all other perspectives (man hours, frustration, flaws, potential for bugs) it's better to keep the low level stuff as small as you can get it, then switch to a higher level langauge as soon as you feasibly can.
 

berry120

Fully Optimized
Messages
3,434
Location
UK
Well, I was about to say don't trust wikipedia without any sources (and you shouldn't) but in this case it appears you're just not reading it properly!

Source: http://en.wikipedia.org/wiki/Singularity_(operating_system)
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, whose runtime and garbage collector are written in Sing# (an extended version of Spec#, itself an extension of C#) and runs in unsafe mode. The hardware abstraction layer is written in C++ and runs in safe mode. There is also some C code to handle debugging.
How on earth does that equate to "entirely C#"?!
 

ohm55

In Runtime
Messages
141
http://channel9.msdn.com/shows/Going+Deep/Singularity-A-research-OS-written-in-C/
http://social.msdn.microsoft.com/Forums/en/hottechnology/thread/cf69ce1b-ca21-43fd-a904-7ce8718646b5
"Revealed at Tuesday's TechFest, Singularity is available for download on Microsoft's CodePlex site, as a Research Development Kit, or shortly, RDK. The package includes source code, build tools, test suites, design notes and other materials useful for those that feel up to the task of playing with a brand new system, written entirely in C#."

mmhmm.

I also think Microsoft would do this, cause C# is a really high-level language, so its more of a experience.
 

berry120

Fully Optimized
Messages
3,434
Location
UK
...and on the first link you gave:

However, we do have around some assembly code. Like a kernel written in C, our C# kernel needs assembly code to handle the lowest part of the interrupt dispatch on the x86. But once the assembly code has finished, it dispatches directly into compiled C# (no C). BTW, there is some C code in the system, primarily for the debugger stub.
The wikipedia article is correct in this instance - ASM and C most definitely find their way in there as well. Most of it is written in C# (and languages derived from it) but by no means all.
 
Top