3 ms·
That’s not the right conclusion to take from that video. WASM isn’t faster than native code. It’s that an operating system written from the ground up to use a
by ninkendo 5y ago
That’s not the right conclusion to take from that video.
WASM isn’t faster than native code. It’s that an operating system written from the ground up to use a language VM (for instance, wasm) to implement all memory protection, on the system — and most importantly, no other memory protection, including page tables or processor-level isolation that normally separates kernel code from user space — may end up being more performant than what we have now.
Running wasm on a standard OS kernel like Linux/windows/darwin is not going to give you the benefits. The benefits come from eliminating system call overhead associated with switching in and out of the kernel protection context, which is something you need if you’re executing raw machine code which can load/store any memory address. If you simply eliminate the ability to run arbitrary machine code, you can just let everything run in kernel space and use the language VM (like wasm) to protect memory. The result may or may not be faster overall, but it’s purely hypothetical today because essentially no operating system works this way. (Microsoft wrote a research OS back in the ‘00s to try this out but it ultimately didn’t turn into a shipping product. There may be other research OS’s out there that toy with this idea, but nothing in production… maybe the old symbolics lisp machines work on this principal but I’m not sure. There may have been some similar machines in the smalltalk days as well.)
- zamalek 5y ago> Microsoft wrote a research OS back in the ‘00s to try this out but it ultimately didn’t turn into a shipping product. They called it SIPs (software isolated processes). You can see the benefit of WASM for this problem, though. It has gained significant traction, and it is significantly simpler than CLR. I really hope something comes of it.
- ativzzz 5y agoSPIN, a research OS in the 90s also explored a similar concept by allowing the kernel to be extended via controlled interfaces. > For instance, the SPIN Web server executes entirely in the kernel address space. http://www-spin.cs.washington.edu/ http://www-spin.cs.washington.edu/ But like you said, not in production.