Hacker News new | ask | show | jobs
by dist1ll 54 days ago
Unikernels simply redraw abstraction boundaries. You can still use libraries and third-party code to implement common primitives. In fact, that's exactly what many unikernel frameworks give you (unikraft, hermit, mirage)
1 comments

Are their abstraction boundaries protected by virtual memory and syscall interface such the submodules of a program cannot corrupt parts of memory that belong to others? Can I restart subtasks without affecting others? A traditional OS gives me all of that with relatively minimal overhead.

With a capability-based microkernel you get to assign ownership and resources to a very granular level that increases robustness against crashes and protection against attacks to the core system policy. A unikernel can give all of that but I feel like then it will be worse to program against rather than a microkernel.

So overall I don't see any advantage of unikernels. They don't help you write more correct programs IMO and the performance gains are limited.

> such the submodules of a program cannot corrupt parts of memory that belong to others

IME you can eliminate tons of issues using language-based safety. That just wasn't possible before Rust without taking a perf hit. And you can still use vm in a unikernel for e.g. guard pages, read-only segments, demand paging etc.

I'd say the main advantage of the unikernel approach is the ability to be very intentional about where/how you introduce complexity. For a certain class of high-performance systems software, that has direct implications on reliability and performance.