Comment by magicalhippo
5 years ago
That was the point behind Singularity OS[1] IIRC. Using managed code which could be verified safe by the OS using static analysis.
Can't find it right now, but I recall reading they implemented a network driver with minimal overhead compared to a traditional OS. While they used message passing, a lot of overhead could be eliminated due to the assumptions of safe code.
[1]: https://en.wikipedia.org/wiki/Singularity_%28operating_syste...
Message passing by itself doesn't have to be slow (you can use the paging subsystem for this purpose), but you are looking at two more context switches per system call.