MessiahAndrw wrote:Look at all the resources Microsoft have and so far all it does is load applications, multi-task, have a cool debugger and comes with 1000 page documents on memory management and security.
That's a lot farther than most hobbyists get.
Were it C++ instead of C# then they wouldn't spend so much time implementing global garbage collection theories and writing research documents than actually moving ahead and working on other things. But I guess they don't call it Microsoft 'Research' for nothing.
Exactly, that would defeat the entire purpose of the project. They're looking at what advantages can be had by using a safe language like C# in all parts of the system.
What I don't get about this whole Singularity "you can block programs with unsafe code from running" is wouldn't that mean a lot of programs could not use pointers? (The thing I don't like in C# is if I pass an object to a function, I don't know if I'm making a copy of it or a reference?)
In C#, if you're passing an instance of a class, you're passing a reference. If you're passing an instance of a struct, you're passing a copy. Pointers have more power than is necessary for just passing by reference (e.g. -- the ability to do arithmetic on them, cast them arbitrarily to different types, etc.).
I guess it could be useful for systems without any sort of memory protection.
Exactly. Singularity by default runs everything in ring 0 in a single address space. Even though the primary goal of Singularity is dependability, better performance has been a nice side benefit (especially for IPC, which is zero-copy in Singularity).
But then, couldn't someone use a modified compiler so that it claims a program isn't using unsafe code when it actually is?
Yes, but that someone would have to install the modified compiler on the system somehow. Remember, the compiler we're talking about is an MSIL-to-x86 translator and optimizer. Singularity programs are deployed as MSIL binaries, not as source code.
In a future version of Singularity, they'll have the MSIL-to-x86 compiler ("Bartok") emit proofs along with the generated x86 code so that the code can be checked by a small verifier before being run. Currently Bartok is a "trusted" part of the system because they rely on it to reject any unsafe code.