littleguru wrote:Is Singularity a lot slower then traditional operating systems once hardware protection is activated?
Obviously, Singularity is very new, implemented in a radically different fashion from traditional OS' using languages and dev tools that are wayyy out there on the bleeding edge! However, despite this, comparing, for example a system the access a bunch of data on disk, processes it and exchanges it between worker processes, Singularity actually turns in perf numbers that are typically *very* close to the perf of XP or Linux! There are several scenarios, in fact, where Singularity wipes the floor with ANY other OS!
Don't forget, a typical user-mode <--> kernel transition is not cheap! This is why GDI, for example, batches up calls to the graphics driver rather than crossing the boundary every time something on the screen needs to be updated. Singularity gets to replace the CPU ticks lost during transitions with CPU ticks that actually do work like making sure that the software is running correctly.
littleguru wrote:How do you make sure that a pointer does not point to any address space of another process? Are there no classes in your C# dialect that allows that? Is there no IntPtr class and therefore no way to initialize a pointer with an int?
Spec# (derived from C#) is, like most managed languages, doesn't have a notion of pointers (as traditional C programmers would recognize them). SIP's (Software Isolated Processes) can't reach beyond their own boundaries, just like one Win32 process can't reach into the address space of another Win32 process.
Some days when I get down, I go and browse the Singularity source. The sheer beauty of this thing just cannot be overstated. Once you've seen a graphics driver or filesystem written in pure C# that exposes a hard contract which defines how callers MUST call it (whch cannot even be compiled unless they conform to the graphics driver SIP's contract). I've often been reduced close to tears looking at this thing - it's just jaw-droppingly beautiful!