3 ms·
It may well be the case that unikernels as currently envisioned by unikernel proponents are impossible to make fit for production; it may also well be the case
by geofft 11y ago
It may well be the case that unikernels as currently envisioned by unikernel proponents are impossible to make fit for production; it may also well be the case that there exists a product that is closer to a unikernel than current kernels, that is quite production-suitable, and unikernels are fruitful research to that point.
For instance, you could imagine a unikernel that did support fork() and preemptive multitasking, but took advantage of the fact that every process trusts every other one (no privilege boundaries) to avoid the overhead of a context switch. Scheduling one process over another would be no more expensive than jumping from one green (userspace) thread to another on regular OSes, which would be a huge change compared to current OSes, but isn't quite a unikernel, at least under the provided definition.
Along similar lines, I could imagine a lightweight strace that has basically the overhead of something like LD_PRELOAD (i.e., much lower overhead than traditional strace, which has to stop the process, schedule the tracer, and copy memory from the tracee to the tracer, all of which is slow if you care about process isolation). And as soon as you add lightweight processes, you get tcpdump and netstat and all that other fun stuff.
On another note, I'm curious if hypervisors are inherently easier to secure (not currently more secure in practice) than kernels. It certainly seems like your empirical intuition of the kernel's attack surface is going to be different if you spend your time worrying about deploying Linux (like most people in this discussion) vs. deploying Solaris (like the author).
- _wmd 11y ago> you could imagine a unikernel that did support fork() and preemptive multitasking but took advantage of the fact that every process trusts every other one No need to imagine, this is exactly how Microsoft Singularity worked (it benefited from a language expressive enough to make that trust possible)
- geofft 11y agoYeah, Singularity is an amazing existence proof of lots of cool stuff in the unikernel-ish space (though, sadly, not quite of anything being suitable for production). Is Singularity a unikernel? More specifically, would the unikernel.org folks consider a production-ready kernel inspired by Singularity and targeting a hypervisor to be a unikernel? The 2013 paper's introduction section contains the sentence, "By targeting the commodity cloud with a library OS, unikernels can provide greater performance and improved security compared to Singularity [4]," so I'd imagine no. But I don't see any expansion on that point, so I suspect it was added to appease a reviewer.
- __david__ 11y ago> Scheduling one process over another would be no more expensive than jumping from one green (userspace) thread to another on regular OSes, which would be a huge change compared to current OSes, but isn't quite a unikernel, at least under the provided definition. Sounds more or less like any embedded kernel that runs on an MMU-less cpu. Do unikernels handle interrupts? If so that means they can have preemptive threads, rather than green.
- nickpsecurity 11y agoI agree. SPIN did some similar stuff in a monolithic model that could probably help with such efforts: https://en.wikipedia.org/wiki/SPIN_%28operating_system%29 https://en.wikipedia.org/wiki/SPIN_%28operating_system%29 Each tactic is obsolete in CompSci has surpassed them since then. So, in reality, it would be better than SPIN for sure. The Midori write-ups are probably going to be our new baseline for what hybrid models can pull off.