Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a long time *nix hobbyist user, I can't help but notice how containerization is starting to essentially provide microkernel-like os design patterns using the more mature Linux kernel instead of starting from scratch. I'm curious what everyone thinks about whether the containerization approach, at its best, like with projects like rancherOS (I'm guessing), can compete with a the theoretical strengths of a microkernel?



Absolutely not.

They have nothing in common.

You're still running a monolithic kernel with all drivers and subsystems running in kernel space. The only thing OS-level virtualization like containers gives you here is that a limited amount of subsystems can be multiplexed into independent logical domains (all still running a full OS instance, mind you) on a single host.

You don't get any of the reliability or flexibility gains.

Actual examples of microkernel patterns in Linux are, and I quote from my Hurd cross-toolchain article [1]:

   It’s also worth noting that several more recent
   developments in Linux like kdbus (which was called 
   “neutered Mach IPC” by Neal Walfield), the “tinification”
   effort [http://tiny.wiki.kernel.org], FUSE, NSUSE, the
   MADV_USERFAULT flag in madvise(2), kmscon and other 
   userland VT subsystems, have demonstrated that there is
   in fact user demand for microkernel-like features in
   Linux, whether people realize this directly or not. It
   is not unthinkable to conceive of Linux (particularly
   with systemd) growing into a hybrid kernel approach with
   certain low-level subsystems adequately usable from a
   user context.
Again, these are all highly limited. But that is the direction Linux is mostly heading -- a bad hybrid kernel.

[1] http://blog.darknedgy.net/technology/2015/07/25/0/


Yeah, they're slowly reinventing microkernel concepts in a pretty heavy-weight way. However, don't discount the recent efforts in containerization. They might not be learning the main lesson but they're certainly copying (and benefiting from) pieces of it. Maybe they'll get there one day. ;)


The smugness of this comment is unwarranted. Linux became a practical OS which runs everything from toasters to spaceships. The 'obvious superiority' of microkernels has failed to be borne out since their inception way back when it was first written. And the success of small parts of the idea within Linux does not implicitly prove that the idea is actually practical or performant as imagined.

Implementation details are everything and not always solvable.


The obvious superiority of microkernels is seen in the invisible ubiquity of QNX and L4 throughout the industry. There's probably more L4 deployments than Linux, in hardware like baseband processors.

The most common OS then is probably not Linux, but TRON. It's real-time, but I'm not sure if it's a u-kernel. Nonetheless, RTOS in general is well served by u-kernels.


Supporting your point, OK Labs claimed years ago their OKL4 microkernel had hit a billion units in phone market. Mainly for baseband isolation and legacy code (eg brew). So, it's exceeded Linux servers and slowly catching up to Android esp as it runs it virtualized.

And Samsung Galaxies use INTEGRITY Multivisor for Knox. Blackberry plus automotive often do QNX. Apple does a hybrid with Mach and wants a real one. A lot of design moving one way in particular. ;)


Apple does a hybrid with Mach and wants a real one.

I know that XNU is based on a chimera between OSF Mach and FreeBSD, but I'm pretty sure most practical u-kernel gains are lost in this process. They do have the basic resources like tasks, threads, VM and IPC with its system of port rights checking, but it's mostly leveraged as a convenient abstraction at best. I don't think OS X even supports per-application default memory managers, does it?

However, what you said about "wants a real one" really piqued my interest. Is it true Apple is researching pure microkernel designs for their products? That sounds great, do share some links.


Yeah, that and some basic functions are all they use it for. A write up way back indicated they though Mach was a mistake. So, the alternatives were a better microkernel or full monolithic. One unofficial project tried to port it to L4. Not sure what Apple's stance is under Tim Cook, though.


DOS did something similar back in the day and a desktop was even built on it. Windows was later the most widely deployed OS with billions of lines of COBOL powering much backend processing. Would you similarly say their architectural superiority is proven by the number of users or platforms?

Those of us who push microkernels do it because they were proven in practice (esp in embedded) for over a decade. Linus's complaints didn't pan out. MINIX 3 achieved in a few years better reliability than Windows or Linux had in nearly their first decade. Driver isolation had a lot to do with that. Anyone worrying about performance should look at the Playbook vs iPad demo they did a while back showcasing QNX microkernel.

Linus was repeatedly warned [1], was smug as heck in replies, his OS is now adopting microkernel-like techniques, and so I call it as he would. More humble than he would, actually. ;)

[1] http://www.cs.vu.nl/~ast/reliable-os/




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: