azblue wrote:
Unikernels have apparently been around since the 90s, but I had never heard of them until a couple days ago.
Processes are isolated under a hypervisor, but what makes unikernels
really unique is that the "operating system" is really just a collection of library files compiled together with the application. That means no privilege switching, which speeds things up (nearly 200%-300% under some loads).
Sounds more complex than something I want to tackle for a first OS; nevertheless, the concept is intriguing enough I figured anyone else who, like me, has apparently been out of the loop for 30 years, would like learning about it.
https://en.wikipedia.org/wiki/UnikernelAllow me to re-phrase your definition of unikernel in a different way: the application is just bundled together with the OS code in one big bundle. Unikernels are loaded and boot more or less like other OSs, but they don't run multiple applications: the whole business logic (= application) is compiled directly in the kernel binary, no loading of extra code from disk etc. Some projects like #include <os> like to sell the idea that you're building your app + the OS as library, but it's merely a marketing thing to make look like the APP is in the center and everything else is built around it. Technically, it's the opposite: the app is the final piece of code that must be integrated in a whole "ecosystem". Anyway, both definitions are acceptable, I just wanted to share a different perspective on the same thing.
About your second point, let me say that unikernels are generally way simpler than classic OSs. Indeed, if you start writing an OS from scratch there be always a point when you can run some arbitrary C code from the kernel, but cannot load external applications yet. That would be an unikernel already. If you never go in the direction of adding syscalls & loading apps, but add features as plain functions, that would be it. Therefore, if you are intrigued by unikernels, go for it as your first OS, as it would be way simpler to implement than a classic UNIX-like OS