Many people are wondering on why Windows Vista wasn't created using C# as indicated in my friends' blog post (
Windows Vista a .Net no no).
Well, an easier straight honest answer is that C# is a "pure-oop" language. And by that it consumes a lot of memory and too-slow to create an operating system. C++ has been successfully used by microsoft to create operating systems for a long time. So why change it to C# now? C++ has been proven to get the job done.
It was then embedded on my mind that C# cannot create an OS. It's a RAD language so its primary purpose is to rapidly create an application and OS developement is a big no-no.
Well, my beliefs was crushed into bits as I read my MSDN mag. An article there discusses an OS which is entirely written in C#!
It's called
Singularity. This is a research based OS which is gaining some notice nowadays.
While reading the document, I was like, hell! C# is slow to be able to create a dependable OS. Ok, I guess I was entirely wrong on downsizing C#. Here's an excerpt on the article that explains their approach more clearly:
"When the C and C++ programming languages were invented, computers were slow, memory was limited, and compilers were simple and memory challenged, so a practical language could be little more than a veneer for assembly language. Times change, though, and so do the limits on software development. Today, program performance is seldom limited by raw processor speed. Instead, latency—memory, disk, network, database—often determines performance."
That's the line that got me thinking that its entirely possible! Oh, how great does these people from microsoft are turning into?!
The singularity uses the Bartok kernel. It is entirely a new OS, its not windows! Although some parts of the code were written in C++ (including the kernel) most of the code is in managed and unsafe C# code.
I guess this OS would be a possible hit in mobile devices.
There was also a video presentation of the singularity team on chanel9. They have already benchmarked the OS versus Windows. The results is quite promising. Its indeed 10% more faster than windows! Hmmm... Cool! And to top that, since C# is a safe-type language, then the resulting OS is more stable than the current windows system.
Wondering how they did that? Well, according to the team, they have developed a managed-native compiler! (What should I do to get my hands on that!) The native code produced by their compiler is very similar to C++. In fact you can debug it using a C++ debugger.
Since this OS is still in its research state, you could be expecting it in the next 3-5 years. But some of the C# advancements that they are using could be available a little much earlier such as "sing#", its a C# extension that they have developed to create the OS.
Can't wait to get my hands on this! (*drooling*)
For more resources: