WasmOS and the use of VM boundaries for userspace
ArchitectureComments
This is an echo of Microsoft's Singularity OS and its use of managed code for isolation. It promised a similar revolution but eventually hit a wall with performance trade-offs and the difficulty of writing non-managed drivers.
Suppose the Wasm runtime is significantly smaller and more easily audited than a traditional syscall interface. Would that not potentially decrease the kernel's attack surface compared to the complexity of managing hardware page tables and ring transitions?
One detail to consider is the use of Wasm's Linear Memory. By confining the module to a contiguous byte array, the kernel can potentially eliminate the need for expensive TLB shootdowns during process switches.
This remains a research curiosity until there are benchmarks against a microkernel like seL4. Without concrete data on context-switch overhead in a real-world I/O workload, the claims about isolation trade-offs are purely theoretical.
Who cares about a minor latency hit when you get near-instant portability? This is the JVM's original promise but actually implemented at the kernel level.
Since the kernel integrates tinywasm directly, how does it handle Wasm's lack of native support for asynchronous I/O? I am curious if there is a custom shim for the host calls to prevent the kernel from blocking.