Singularity – Microsoft’s Experimental OS
codingkaiser.blog
codingkaiser.blog
Here Joe Duffy mentions towards the end that even with Midori running in front of them, the Windows team was sceptical of it.
https://www.youtube.com/watch?v=CuD7SCqHB7k
Since .NET's introduction, Microsoft seems to lack the same kind of culture that Apple and Google have towards into steering their platforms into safer languages (e.g. how constrained NDK happens to be, or first class bindings to all OS APIs in Swift).
It appears that every attempt to do so ends up being sabotaged in some way to assure C++'s reign at Microsoft and Windows subsystems.
Note that Windows is the only desktop/mobile OS where the GUI stack is still fully C++ aware, and they even make a point out of it.
https://microsoft.github.io/microsoft-ui-xaml
> WinUI is powered by a highly optimized C++ core that delivers blistering performance, long battery life, and responsive interactivity that professional developers demand. Its lower system utilization allows it to run on a wider range of hardware, ensuring your sophisticated workloads run with ease.
Even the Longhorn failure, which resulted on the "everything COM", that then evolved into WinRT (basically COM + IInspectable + .NET metadata + sandboxing), could have worked out if everyone actually worked together.
I don't believe that if there was actually a willingness from Windows/C++ crowd, they couldn't have helped to push the .NET runtime into improvements similar to .NET Native.
Or to put into another way, the efforts done by Google and Apple improving the Objective-C, Swift and ART, respectively.
In fact, probably the reasoning behind bringing Midori learnings into .NET Core (thus making C# into D like), has more to do with C++/CLI being Windows only, and the managed languages competition outside Windows than anything else.
Apparently, Sinofsky suffers dreadfully from "not invented here syndrome." He simply does not trust anything that his team has not built, and Midori is the tip of the iceberg. There are a some instances where his attitude worked, but they were far and few between.
You'll notice that there is a very distinct "firewall" between core architecture and "other teams" on the projects he managed, even today (e.g. .Net Office extensions are just COM).
though another way of looking at it is that rewriting the entirety of Windows in Midori would be been a monumental feat, and by the time Satya became CEO it was clear Windows wasn't the future of the company, so that kind of investment didn't make sense.
Of course, all of these concerns could presumably have been addressed or mitigated, but by the time analysis was released it was too late
Back in the day Nokia did road shows to gather employees feedback before going public.
One point regarding Maemo that I and others did, was the missing radio link.
Naturally that was a no go as they would eat into Symbian's turf.
I happened to be in Espoo shortly after the burning platforms memo, and it did not land well, specially since the Qt and PIPS effort was finally gathering some support.
.NET 4 disables CAS by default though there can still be a bit of faff to get an exe to launch from a file share, but it is doable.
.NET core abandoned CAS (https://docs.microsoft.com/en-us/dotnet/core/compatibility/c...)
https://www.zdnet.com/article/whatever-happened-to-microsoft...
Everything I state comes from reading between the lines from ways things have been written, presented and so forth.
I might be wrong, obviously.
I also wonder whether there's anything stopping _Linux_ slowly becoming something more like this over time by supporting kernel modules that have direct but _limited_ access to talk to each other in more ways that can be verified at load time. In theory even some kinds of "arbitrary shared memory" patterns could work just fine, and get you pretty close to the best of both worlds even with supporting "binary blob" drivers etc. Instead of requiring modules to be compiled to a special kind of bytecode (which would require compiler support), maybe you could even create some special conventions for how memory is accessed by these sandboxed kernel modules (fake syscalls or something?) that let them be rewritten at load time.
I guess it boils down to: how much could you statically verify the behavior of a kernel module without preventing from having the flexibility to do what it needs to do?
You are more or less describing eBPF and the evolution you are wondering about has indeed started slowly happening for some years now.
It does however use special bytecode but getting compiler support is not such a hard problem compared to building the safe VM.
Example: I completely rewrote the process loader to load binaries from "the cloud" and other than a heisenbug caused by a misconfigured F5 router that had us scratching our heads for a couple of months, everything just kept working
It's a shame that it's not going to see the light of day, it sounds like it'd be invaluable to see the decisions and mistakes made.
The key idea in Opal was to put all processes in the same address space (like Singularity does), but to use hardware systems to provide memory protection (whereas Singularity relies on "software mechanisms"). Communication between processes now becomes as simple as one process giving the other a pointer (obviously it has to refer to a page with appropriate access). As with Singularity, the overhead of TLB flushes and page table management goes away, making context switches much faster (especially for large working set processes). To quote:
> Protection in Opal is independent of the single address space; each Opal thread executes within a protection domain that defines which virtual pages it has the right to access. The rights to access a page can be easily transmitted from one process to another. The result is a much more flexible protection structure, permitting different (and dynamically changing) protection options depending on the trust relationship between cooperating parties. We believe that this organization can improve both the structure and performance of complex, cooperating applications.
You can read lots more about Opal here (it's all quite old now): https://homes.cs.washington.edu/~levy/opal/opal.html
I still think it's one of the best OS ideas ever, and I'm sad that it never really came to fruition.
We need a microkernel based OS that uses hardware protection to keep all the user code well contained. We need a default assumption of NO when it comes to access to resources, instead using capabilities and powerboxes.
What happens if actual native code gets run somehow by a user processes in this system? The system is owned, instantly. There's no secondary layers of protection at all. It's like counting on a single cable to support a bridge.
Per the article, it ended in 2008. Beyond that, there are probably dozens of embedded systems I interact with every day where I would choose performance over the level of security you're suggesting. Beyond even that, I lived through an era of multi-process machines before MMUs were ubiquitous, and the main problem wasn't that malware had root access, it was that poorly written code would corrupt the memory of other processes and the OS, which this system solves.
Does Zircon/Fuschia fit the bill at all?
https://fuchsia.dev/fuchsia-src/get-started/learn/intro/zirc...
So obviously this would never fly in the real world. Did they ever resolve how to make JITed code work? Maybe in separate container space that didn't have full privileges?
Our current software is designed around a particular set of operations being the "expensive" ones. Maybe other configurations are workable too, with enough rearchitecting. For example, Singularity IPC looks like it should have about the same cost as a typical userspace dynamic library function call.
(IMO the main problem with Singularity's approach is instead that it leaves everything wide open to Spectre...)
In any case, AOT and OS IPC cover most cases, welcome to UNIX pre-shared-objects.
In any case, Midori had another approach.
iOS is just willing to cut themselves off of entire classes of applications in a way that a lot of systems aren't.
Adding back VirtualProtect to WinRT has hardly helped to improve its uptake.
Had Microsoft played an Apple move, probably WinRT would look much better nowadays.
Is it true that this idea is dead nowadays, because of Spectre-style attacks?
Edit: I misunderstood your question. Yes, Spectre cannot be fixed with software. But if Spectre were fixed in hardware (as it must be in new designs), software process isolation could still work barring new undiscovered hardware vulnerabilities.
An analysis of Spectre and software isolation is here:
>> can we improve security and robustness?
>> can we prevent unexpected interactions between applications?
Of course you can. Are there incentives, though, for MS to do so?
>> Goals [...] Lack of robustness
Did Windows 11 _have to_ become dependent on users' internet connection? I don't think so.
Are there incentives that would guide MS towards not introducing a complete and utter dependence on the net, thereby making it possible to opt-out from their telemetry?
Good! The inability to play a local game by putting in a disc and playing is enormously stupid, possibly even more than with a general purpose computer.
Perhaps I should amend to "would be enormously stupid".
I'm not taking an absolutist stance on this, I think there's scope for regulation of how accounts can or cannot be used and privacy protection of user data. I just don't think eliminating online accounts is practical.
But I don't think we should use them in a reasonable argument.
"Need to make money" is the main reason, actually. Leadership are merely running after that.
It's like they thought that keep improving on the things they work would make them hit a ceiling so instead of steadily climb they take one step back to delay the climb.
And the reason why I think it's deliberate is because none of their other products follows that pattern: Azure faces fierce competition so you cannot afford to stumble, C# is amazing compared to Java at least, Office has alternatives breathing on their back, VS Code... used to have competition but now that it's super popular I'm scared it'll be the next product to follow the "Windows progression pattern".
I share it once and it gets uploaded to Sharepoint (as `foo.jpg`). This happens even if you're just sharing a funny image in a private message. It gets uploaded to Sharepoint. Ugh.
Anyway, let's say I share the same image again. Teams says "hey do you want to overwrite `foo.jpg`, or keep the existing one?" I select keep. Teams now creates `foo-1.jpg`.
We're already off to a bad start, but bear with me. Here's where it gets amazing:
1. I share `foo.jpg` a third time.
2. Teams says "Do you want to overwrite or keep?" I select keep.
3. Teams then again asks "Do you want to overwrite or keep?", because `foo-1.jpg` is taken. I select keep.
4. Teams tries to create `foo-2.jpg`. Return to step #2 until an unused integer is found.
That chain of dialogs can continue for a while for common file names on large teams.
So the issue I detailed would only rear it's head in your scenario if you sent employee #1 their review twice.
Humorously, this issue does not occur when uploading files directly in the Sharepoint interface – despite the interface looking like it stepped out of Windows 95.
So it's not hard for me to imagine that it could be set up in a way that causes this issue across discussions. Yuck.
For those still on Teams, my condolences, here's a workaround: copy the image onto your clipboard and paste it into the textbox. It skips the uploading to Sharepoint, prevents the issue I described, and is sendable in milliseconds. Downsides: a. they're randomly ephemeral and sometimes just permanently disappear, b. no animated images - it'll just send the first frame of a GIF/APNG/etc.
And for those on macOS, that means you can get screenshots sent quickly. Ctrl-Cmd-Shift-3, Cmd-V into the text field. Send.
Or, it was then when they (intentionally?) ripped off the name of an existing, open source, OS-related project. https://sylabs.io/singularity/
1. https://techcrunch.com/2018/02/08/sylabs-launches-singularit...
2. https://www.microsoft.com/en-us/research/project/singularity...
AFAICT Sylabs Singularity started after Microsoft's research project ended, probably by some years. So no-one is ripping anyone off.
Whereas the last commit on MS' Singularity project is from 2010.
Yeah.. They didn't AFAIK.
> Utilize a safe programming language — no more of C’s shenanigans, we don’t want to “cook” pointers out of integers, no more manually freeing memory and no more buffer overflows.
C language is little mora than (portable) assembler. To the CPU the difference between pointers and integers is in the code, not in the type.
These people thinks C is unsafe. C is as safe as your design and skills. Yes, you need to be a very careful C programmer and still getting bugs. But also be able to squeeze all the juice out of your hardware.