3 ms·
>> Regarding #2, eliminating context switch overhead and system call latency by running everything in one address space would be huge for some applications. Th
by mtdewcmu 10y ago
>> Regarding #2, eliminating context switch overhead and system call latency by running everything in one address space would be huge for some applications.
That sounds like basically running node.js in kernel space, which is entirely doable. I think people have put HLLs into kernel space before.
- spitfire 10y agoYes, I ported Perl to the kernel for an April fools joke once.
- elihu 10y agoYeah, it's similar idea. Rust makes this a bit more interesting because the memory safety doesn't come along with a massive performance penalty. One could also go in the opposite direction and write an OS that just runs as a process inside another OS. Kind of like virtualization, but you don't need any of the specialized virtualization hardware features to do it. An advantage to doing this is that you could in theory setup the same environment on Windows, Linux, MacOS, or whatever, and be able to run one application on any of those platforms inside your process-level "guest OS" without modification. Sort of like Java, but with more OS-like features (like a shell, process and user management, a filesystem, and maybe a desktop environment), native code generation, and no GC.
- mtdewcmu 10y agoThere are already ways to run an OS as a process (at least, as long as that OS is Linux). There is/was a project called User Mode Linux, for instance.