One operating system kernel per processor core, researchers at Microsoft and ETH Zurich had that idea 17 years ago. In many server systems that's already the reality, except hardware virtualization via a hypervisor became the standard way to implement it in practice. MKLinux aims to run multiple kernels in parallel on the same hardware without any hypervisor at all. Long-time kernel developer Cong Wang has publicly released a first version; his modified version of kernel 7.0 is available on GitHub.
One kernel hands hardware off to further kernels
The concept sounds similar to a hypervisor at first: initially, one kernel boots and manages all the hardware. That kernel can then release parts of it again and hand them over to additional kernels started via kexec. Unlike with a hypervisor, the newly started kernels get direct access to the hardware assigned to them even without Single Root I/O Virtualization (SR-IOV). According to Wang, this happens through hot-plugging, which also lets additional hardware be assigned to the newly started kernels later on. The initially assigned hardware is passed via a device tree, so MKLinux relies only on techniques that already exist.
Faster than a hypervisor, safer than a container
According to Wang, who also founded a company around the multi-kernel concept, the approach offers clear advantages over other isolation mechanisms. As with containers, software runs without abstraction, so hypervisor calls and extra page tables disappear, even though the latter are practically negligible these days anyway. Wang's own benchmarks show noticeably lower latencies in some cases for system calls and context switches. As with a hypervisor, though, a problematic kernel can't immediately take down the whole system, since the individual kernels are isolated from each other, which also limits the attack surface.
Wang sees hosting different server components on one machine as a use case. The concept can even be pushed further, down to isolating individual applications: first, a so-called device kernel starts up and manages the assigned hardware. It can then launch further app kernels, which communicate with each other or with the device kernel via shared memory. For that, Wang built his own filesystem called Daxfs. He considers the app kernels especially useful for AI agents, an obvious use case given the growing number of autonomously acting AI systems that need hard isolation from one another.
So far, MKLinux only supports 64-bit x86 systems. Whether the concept will make it into the mainline kernel remains unclear, and if it does, that isn't expected anytime soon.