9 ms·
A Rust-Based Unikernel: First Version of a Rust-Based LibOS
- kjeetgill 8y agoAnyone use Unikernels in real life? They always sounded interesting but without a lot of examples of real usage they feel ... academic and theoretical?
- noselasd 8y agoMost embedded systems are really unikernels - so yes, certainly they are very widely used. Though the more recent developments of running traditional server software on unikernels have not gained that much traction.
- zaarn 8y agoI doubt you should call embedded systems unikernels. Stuff like the ATmega chips run the application barematal, yes, but they are cheap microcontrollers with 2KiB of RAM and no MMU. You can't run a kernel on that so your application runs bare. A lot of the higher-tiered embedded stuff usually either runs a Linux kernel or DOS (and older) from my experience.
- awelkie 8y agoFreeRTOS is essentially a unikernel. I assume many other RTOSs are as well.
- pjmlp 8y agoThere are plenty of OS for embedded systems deployment. Systems running Linux are the exception. Linux does not fulfill the security requirements of high integrity systems nor the real time constraints.
- magduf 8y agoThis is completely wrong. Embedded systems running Linux are extremely common, and becoming more and more popular because it runs on so many architectures (esp. ARM, but also PPC). For many applications, hard real-time is not necessary, and Linux is FAR easier to develop on. They are not "the exception" by any means. Look at almost any automotive "infotainment" system on current models: it's likely running on Linux. There's countless others. For high-integrity systems for critical safety applications, you would not use Linux, you'd use a dedicated RTOS, of which there are countless choices. But these all have big disadvantages: poor performance (they favor determinism over performance), poor development support, high license costs, etc. If you're doing avionics, then sure you'd use an RTOS, but if you're making a "smart TV" to play Netflix, you wouldn't, you'd use Linux. Also, Linux does have real-time capabilities, it just isn't hard real-time, only soft. It works well enough for controlling hobbyist-level CNC machines. I've used it myself for a pretty critical real-time system where ease of development and performance were more important than absolute real-time guarantees.
- pjmlp 8y agoSome numbers would be nice then.
- magduf 8y agoMost companies, and probably almost zero government projects, publicize what embedded OSes they use. You're not going to get any numbers. This means you also have no numbers to back up your claim.
- pjmlp 8y agoSince you insist. https://m.eet.com/media/1246048/2017-embedded-market-study.pdf https://m.eet.com/media/1246048/2017-embedded-market-study.p... Apparently I was wrong, see it wasn't that hard to find.
- perbu 8y agoYes. We have production deployments of IncludeOS. The use case was network functions like firewalls and load balancers. I think the perception of Unikernels as something that is suppose to replace containers is a bit artificial. They have a much stronger appeal in replacing Linux where Linux struggles. So CPU-based IoT devices where Linux security is a problem, serverless architectures where Unikernel boot-times of 5-10ms can provide more elasticity or network functions where the GNU/Linux footprint is significant. Certain containers could be a unikernel case down the line when the tooling improves. Once you can do "npm unikernel" and it spits out a bootable node-app might make node-based Unikernels attractive. But nobody is there yet, AFAIK.
- andrewstuart 8y agoI put alot of time and effort into unikernels and the technology is very appealing to me. It has been something of a puzzle as to why they have gotten no traction in any significant way. My conclusion is that there are other technologies (i.e. containers/Docker) that are not as good as Unikernels, but are good enough to solve the core industry demand for lightweight nested virtualization. And indeed containers solve that problem better than unikernels in two important ways which is boot time (and I'm talking here about booting useful unikernel based applications as opposed to theoretical unikernel OS boot times which can be milliseconds), and also containers are better because they don't need nested hardware virtualization switched on in the CPU - that's important obviously for cloud computing where nested virtualization has now arrived but is not widespread. And good enough is all that is needed. It's hard for me to imagine a time when unikernels gain more acceptance than they already have, which is basically little more than none, and the staunch backing of operating systems researchers and a few true believers who really hang on to the theoretical benefits.
- rwmj 8y agoKVM runs guests as host processes, so KVM + unikernel = ordinary Unix process.
- cdoxsey 8y agoUnikernels can be difficult to debug. All the tools that come with your operating system are missing. A big chunk of managing distributed systems at scale is trying to figure out what's wrong with them when they don't behave. Most operators will gladly trade some performance overhead for access to a suite of tools they're accustomed too.
- andrewstuart 8y ago>>Unikernels can be difficult to debug. This is an irrelevant objection that seems to get massive traction. Just like some politicians have scathing criticisms of other politicians, which despite being not true, are easily and widely believed. It's not even a relevant point. Nothing I ever did with Unikernels hit this as even an issue on the horizon. If you want to knock down the technology, this is the most effective way to do it because it very effectively frightens off people considering the technology. The origin of the "Unikernels can be difficult to debug." is from someone who works at a company that bet everything on containers. Nuff said.
- ingenieroariel 8y agoDoes hermitcore work on non x86 systems (aarch64 or riscv)?
- shmerl 8y ago> It promises a secure memory handling enabled by its principle of zero-cost abstraction. I thought memory safety comes from enforcing proper memory usage through ownership rules (borrow checker), not through zero cost abstraction, which simply indicates that high level language features are translated into efficient system level code.
- monocasa 8y agoWell, the borrow checker is a zero cost abstraction. It's enforced at compile time.
- laughinghan 8y agoI think because said enforcement is done at compile-time (by the borrow checker) and not at runtime, it is considered a zero-cost abstraction by the creators of Rust.
- tybit 8y agoYou are correct, the sentence implies that it is the zero cost abstractions that makes it possible which is not right. The zero cost abstractions part is a nice benefit, but unrelated to ensuring safety.
- 75dvtwin 8y agoNo doubt a significant accomplishment, and should generate some creative production uses. For 'larger masses' of 'application-in-a-box', I think, however, a NetBSD(like) with .NET CLR (or even .NET core) would be a much route. this was discussed on HN in 2016 https://news.ycombinator.com/item?id=11636926 https://news.ycombinator.com/item?id=11636926
- himom 8y agoUnikernels are fail and here’s why: they lack the whole panoply of production monitoring, security, debugging, troubleshooting, auditing and arbitrary general purpose infrastructure capabilities of JeOS boxes. From an ops-usability perspective, chopping down an OS is better than writing one from scratch.
- justicezyx 8y agoUnikernel can be interesting as a thought channel for CPU/hardware vendors to offer a meaningful alternative to public Cloud vendors, and avoid being commoditized. Roughly, K8s and many other container solution tries to commoditize hardware. And they require an evolutionary, and modest, changes to application development lifecycle. They emphasize horizontal scaling. Unikernel requires app developers to substantially change how their applications are written. It emphasize vertical scaling. It's imaginable that hardware vendors can build a cluster-like-machine, where lots of cpu/gpu/ram/spindle/ssd/accelerators, and offer a Unikernel scheduler; which greatly reduces the influence of the higher-level container-based solutions. I am interested in learning how others think about this view point.
- codeflo 8y agoI'm also trying to understand the use for Unikernels, because I find them very interesting from a technology perspective. To me, Unikernels might make sense when running a high-performance application on bare metal. There's probably quite a bit of performance to be gained by running your application in ring 0 directly on a physical machine. But once you add a hypervisor and a scheduler, you've essentially reinvented the OS. I struggle to see the point: just compile static executables and run them on Linux, natively installed on physical hardware, like we did 30 years ago. Deployment is just as easy (i.e. copy a file), performance should be comparable (calling into the kernel should be comparable to calling into the hypervisor), and the tooling is way more mature.
- justicezyx 8y ago> But once you add a hypervisor and a scheduler What I imagine is a giant machine with thousands of cores, running a unikernel scheduler, for horizontal-scaling apps. That means hardware vendors can sell their produce directly to application developers, instead of being shoved behind scene by Cloud vendors. That might means reinventing OS, which can be argued for K8s as well, which is also reinventing similar OS concepts (process management == job management, threading == sharding, ipc == SOA, kernel scheduling == container scheduling). But the point is that it offers a produce that has technical superiority, and hardware vendors would have more expertise to build them, i.e., unikernel would have much more intimate relationship with baremetal than containers, where hardware vendors would naturally know better to optimize.