It'd be really interesting to see some performance numbers.
iirc, this was roughly predicted by Jonathan Blow who complained that in the 80s developers would routinely bundle an OS with the app and it would run bare-metal
This would mean you could take any application made for, eg., x86, and run it on any x86 cpu -- rather than being "windows-specific" etc.
It's also about hardware abstraction. You don't want to rewrite your network stack for each platform but the unikernel can handle that.
It doesn't have to be unikernel either, Linux without anything else, your code being PID 1 is also good: no cruft and extra services that can be security holes, but great platform support, optimized network stack etc.
Of course if you just run on one hardware why not, just write the drivers you need.
Can you explain? I vaguely recall using it on sparc workstations a couple decades ago, but I wasn't coding for that target. A quick wiki read says it was an API framework that was "endian free" and that it trageted the three architectures that next ran on. Was it doing emulation for software using it? Or was it, itself a single binary? Or both?
Yes, containers and unikernels are possible answers to the same issue. If you consider an application running on a virtualised OS you have three layers: hypervisor, os, application with some duplication of functionality between the hypervisor and the os.
From there, if you want to simplify you can either add hypervisor-like isolation functionalities to the OS (containers) or move the little that’s actually needed from the OS into the application (unikernels).
That’s why Docker bought MirageOS a few years ago.
Generally speaking multi-tasking includes both multi-processing and multi-threading. Many unikernel projects support multi-threading so languages like Go/Rust can work very very well when deployed as unikernels. As for scripting languages like javascript, python, ruby they are inherently single-process regardless so you have to horizontally scale those. (eg: instead of having N servers having nginx front-end X app servers you just right size your workloads and spin up as many app servers you need behind a load balancer)
It is nice to be able to listen to a podcast in the background while playing a game, and have the sound come out the same speakers/headphones. It's much harder to do that if the game runs bare metal.
Absolutely. But I think I'm correct in saying if today I wanted to play a game shipped as a unikernel, it would be pretty difficult to have the game and spotify running. First we need a spotify unikernel, then we need people to accept having to use the new unikernel version of spotify just when they play the game(s), maybe get used to the spotify unikernel not having access to graphics hardware, etc. Or we run spotify in a traditional OS in the hypervisor and lose all the benefits we were shooting for in the first place.
Technically all manageable, but that wasn't the aspect I was focusing on, rather the reality that we couldn't just do this today, or even really all that soon.
Alternatively, PCs become games consoles when running games, and you just can't do multitasking, just like you mostly can't on a PS2, etc. Honestly, I think this would be the most likely outcome if games went down this road.
iirc, this was roughly predicted by Jonathan Blow who complained that in the 80s developers would routinely bundle an OS with the app and it would run bare-metal
This would mean you could take any application made for, eg., x86, and run it on any x86 cpu -- rather than being "windows-specific" etc.