3 ms·
That idea is generally termed a neokernel: http://c2.com/cgi/wiki?NeoKernel http://c2.com/cgi/wiki?NeoKernel It's basically relying on the type system & safet
by nostrademons 11y ago
That idea is generally termed a neokernel:
http://c2.com/cgi/wiki?NeoKernel http://c2.com/cgi/wiki?NeoKernel
It's basically relying on the type system & safety mechanisms of the underlying programming language to enforce some of the isolation properties that an operating system is normally used for. The Lisp Machine was probably the most commercially successful example. Since neokernels typically require tight integration between the programming language and the kernel, there are also opportunities for efficiency gains, eg. in Lisp Machines the garbage collector was tightly integrated with virtual memory to prevent page thrashing on collection, or in modern languages you could replace the OS scheduler with promises or green threads.
The biggest downside of it is that it requires tight coupling between the programming language and OS, such that you can only use a single programming language (or a family of related ones that all share a type system) for all programs on the box. Few programming languages are flexible enough for that. With the move to cloud computing and virtualization, this becomes more practical, but then that same trend is also driving interest in the unikernel/exokernel pairing. If you only run a single application on a virtualized box, why not program directly to the hardware?
- agumonkey 11y agoSimilarly people describe C as a form of virtual machine. You don't really write for the hardware but for the C semantics.
- dikaiosune 11y ago> The biggest downside of it is that it requires tight coupling between the programming language and OS, such that you can only use a single programming language (or a family of related ones that all share a type system) for all programs on the box. I would point out (from a relatively lay perspective) that while this isn't strictly the case in current popular kernels (Mach/OSX, Windows, Linux), it's still a pretty strong trend. These kernels (AFAIK) are implemented in C and have large ecosystems of C code orbiting them. As such there are many benefits to having a program written in C or at least speaking C's ABI and memory layout. Maybe I'm mistaking the causes for this situation, but most developers are effectively using something that is either C itself, written in C, or speaks C in some way (CPython, JVM, MRI/CRuby, Perl, are notables that are written in C as far as I know). I think that if a language is sufficiently high performance and general purpose, it's fine for it to be the "core" language that other languages are expected to interface with.
- CountSessine 11y agoApparently a lot of telephone switches used neokernels. Ericsson's AXE series telephone switches ran software written in their proprietary PLEX language, and the PLEX runtime and the AXE OS were basically the same thing. That helped reduce overhead for context switches between tasks: hardware address spaces didn't need to be switched, or even supported; the runtime handled task separation. Erlang was meant to fill this role in newer switches, but it looks like PLEX is still being developed and used.
- jerf 11y agoThank you for the term to go Google on. I had not heard it before. It seems to me that recent advances in this field ought to ease the restrictions of requiring the entire stack to be the same language. It seems like a Rust neokernel ought to be able to run other programs on top much like a conventional kernel does, context switches and all. I'm not too worried about userspace/kernel context switches... there's a security barrier there that still strikes me as a good idea. I'm OK with something that produces an artifact in the end that looks like a monolithic kernel, and can function like one, and is merely internally structured with all the discipline of a microkernel. If all kernel elements have to be Rust, well, I'm fine with that.