6 ms·
Microkernel, huh? At least now we will have a chance to get some empirical evidence to resolve the famous Torvalds - Tanenbaum debacle. It's going to be interes
by juhanima 9y ago
Microkernel, huh? At least now we will have a chance to get some empirical evidence to resolve the famous Torvalds - Tanenbaum debacle. It's going to be interesting to see how Fuchsia pans out and in what kind of environments it can be used.
- _fq4v 9y agoYou have to be kidding right? Microkernels have been used in production for decades in situations where safety, accuracy, and robustness are key. QNX is a microkernel used in real-time systems to great avail and great stability. Unlike linux, it's the sort of kernel you could really trust to run important infrastructure, like automobiles, unmanned aircraft, high speed trains, and robotic surgery. Just because you don't consciously interact with them on a daily basis, does not mean they do not exist. My guess is that QNX and kernels like it are the reason you can take for granted such obvious things as your car braking correctly, your train not derailing, and your robot surgeon not crashing. In today's world, we're so used to software breaking that if it doesn't break, we oftentimes think it must not exist. But, there is a whole world of reliable software out there that can actually be trusted. You don't hear about it often, because they work so well.
- BurningCycles 9y agoWell, one of the things I hope we get to see with projects like Fuchsia and Redox is what the performance difference is against a monolithic kernel like Linux, if/when they have been well optimized.
- Karunamon 9y agoI don't think this will be a fair comparison, since most of Android's performance woes are at the feet of running on a JVM.
- pjmlp 9y agoART is a thing since Android 5.0 and it has become quite good. Even the parts written in straight C and C++ code have issues in performance woes on Android, as everyone that has wanted to do real time audio on Android painfully knows. The whole architecture has been a mess.
- bitmapbrother 9y agoSpeaking of performance issues and architecture messes, have you ever tried real time audio on Windows Phone? The absence of real time audio apps speaks volumes.
- pjmlp 9y agoI was missing your blind Google advocacy and Microsoft hate. Did they fired you? If you had any Android developer experience, you would surely know that Google had a few failed attempts at real time audio, needed help from Samsung to implement them, and the final API was C only, with devs asking for a C++ one, wich was later dumped on github as side project and isn't part of the official NDK APIs, but alas you don't.
- 0xFFC 9y ago>If you had any Android developer experience, you would surely know that Google had a few failed attempts at real time audio, needed help from Samsung to implement them, and the final API was C only, with devs asking for a C++ one, wich was later dumped on github as side project and isn't part of the official NDK APIs, but alas you don't. Would you mind to explain what happened completely? I am very curious about it. Thank you so much ;)
- pjmlp 9y agoSure. Originally Android only had the Java media APIs, with a quite complex state. https://developer.android.com/reference/android/media/MediaPlayer.html https://developer.android.com/reference/android/media/MediaP... Android 2.3 introduced OpenSL ES into the NDK and Android 4.0 got OpenMAX. All of them weren't up to the game of realtime audio due to the Android architecture. http://superpowered.com/androidaudiopathlatency http://superpowered.com/androidaudiopathlatency https://nsr.cse.buffalo.edu/wp-content/uploads/2016/10/rtdroid-sound-jtres16.pdf https://nsr.cse.buffalo.edu/wp-content/uploads/2016/10/rtdro... https://www.androidauthority.com/android-6-0-marshmallow-audio-latency-670727/ https://www.androidauthority.com/android-6-0-marshmallow-aud... There are plenty of other articles online when you search for audio issues on Android. There was even a Google IO 2013 talk about it. https://www.youtube.com/watch?v=d3kfEeMZ65c https://www.youtube.com/watch?v=d3kfEeMZ65c Meanwhile Samsung had customized their Android versions to properly support real time audio and offered an SDK for their handsets. http://developer.samsung.com/galaxy/professional-audio http://developer.samsung.com/galaxy/professional-audio At Google IO 2016 the problem was again discussed, with the Samsung team from Professional Audio being called on stage to discuss their collaboration. https://www.youtube.com/watch?v=F2ZDp-eNrh4 https://www.youtube.com/watch?v=F2ZDp-eNrh4 Finally last year at Google IO 2017, the new real time audio was announced, as C only lib. https://www.youtube.com/watch?v=C0BPXZIvG-Q https://www.youtube.com/watch?v=C0BPXZIvG-Q https://developer.android.com/ndk/guides/audio/index.html https://developer.android.com/ndk/guides/audio/index.html The announced C++ wrapper ended up being an external project on github, detached from the NDK, that you need to integrate yourself, without any guarantees how long Google will care to maintain it. Oh, to make things even better, it is already clear from Android P draft documentation that new audio APIs are on their way.
- IshKebab 9y agoYou can run native code on Fuchsia (and Android for that matter). It should be fairly trivial to do some benchmarks.
- juhanima 9y agoNot kidding, but granted, it would have been fair to say that we can now get more evidence. I knew about QNX, and Minix, Symbian and GNU Hurd are also microkernels. It's just that despite all the good arguments for 30+ years, microkernels somehow seem to have failed to reach their full potential. That's why it's going to be interesting to see how Fuchsia pans out, being written from the scratch with all the cumulated knowledge and experience. Not to mention Google's resources and talent pool.
- tathougies 9y agoLike most monolithic kernels, most microkernels have failed. Ultimately, kernel popularity is largely going to be a network effect. Linux is popular on servers because it is both free and popular; not really for any inherent technical merit. Windows is popular because no one loses their job for choosing Microsoft. On the other hand, there are several microkernel operating systems with notable features and significant, dedicated fan bases. For example, AmigaOS is well-known for its responsiveness, and despite not being in production for decades, still has a dedicated fan base. QNX is used in a lot of critical, performance-oriented workflows. OS X is a partial microkernel as well. Nevertheless, the only microkernel that has really failed is GNU/Hurd. Minix fulfilled what it set out to be (educational) and Symbian was successful enough on mobile.
- juhanima 9y agoGood points. Nevertheless, it's still puzzling why microkernels have done so poorly, despite them being superiour in theory. Almost all the ones mentioned here have waned into a curiosity or niche, and maybe also QNX starts to get a bit long in the tooth, having been released in 1982. OS X of course is another story, but also based on 1980's ideas with the Mach kernel. Which is why it's interesting to see another open-source contender to appear from a clean slate. If I remember right, Linus's main argument against Tanenbaum was that the overall state gets so dispersed between the various services that make up a full-fledged OS, that eventually a microkernel-based system just gets unpredictable or starts performing poorly. I think the discussion was inconclusive, although for me Linus's argument sounded intuitively convincing.
- naasking 9y ago> Microkernel, huh? At least now we will have a chance to get some empirical evidence to resolve the famous Torvalds - Tanenbaum debacle. They're generally used for different purposes, but if you mean number of deployed systems, then microkernels have won hands down. Firmware in nearly every device runs a microkernel like L4. Hypervisors like VMWare and Xen are also microkernels. Microkernels are everywhere, it's only the desktop that's still dominated by monoltihic kernels (Mac OS X's Xnu/Mach is not a microkernel).
- monocasa 9y agoXen's more of an exokernel, and AFAIK ESX is monolithic.
- naasking 9y agoAccording to wikipedia, Xen and ESX are both considered microkernels.
- monocasa 9y agoI mean, Xen is literally descended from exokernels. The whole point of an exokernel is to securely multiplex hardware with as few abstractions as possible (which makes for a pretty sweet hypervisor it turns out). It's original paravirtualized MMU is straight out of XOK and AEGIS. VMWare calls their system a microkernel (and so Wiki's rules therefore repeat that without other research), but the stack trace on the ESX wiki page pretty clearly shows a network card driver being called inside kernel context, so they have to be playing fast and loose with the term. From the outside it looks like earlier Vxworks; it's somehow a microkernel despite all of the code living in the same address space with no real permissions differences because it has multiple kernel threads and loadable modules. By that definition Linux is a microkernel too.
- naasking 9y ago> I mean, Xen is literally descended from exokernels. The whole point of an exokernel is to securely multiplex hardware with as few abstractions as possible Xen has far too much in-kernel code to be considered an exokernel. Linux on L4 had even less overhead than paravirtualized Xen. If exokernels truly efficiently multiplex the hardware in the most minimal manner possible, this wouldn't be possible. I can't comment on VMware beyond published documents since I'm not as familiar with it.
- jacksmith21006 9y agoThe Linux kernel is the most successful kernel ever create and Andrew said it would never become anything as not a true micro kernel. That is not enough emperical data?
- filleduchaos 9y agoMost successful kernel based on what exactly?
- kiriakasis 8y agoone point is rarely enough empirical data
- nickpsecurity 9y agoLook up the Blackberry Playbook vs iPad comparison they did a while back. Playbook was QNX-based. They were browsing with some games running IIRC. There wasn't any lag on the switches. Being a RTOS, it stayed responsive. The BeOS demo toward the end is similar where they fire up a load of 3D apps, videos, etc with the system gradually slowing but still handling the load. That was on mid-90's hardware. EROS was a capability-secure microkernel with persistence for saving or restoring running state of system. One thing they liked doing at demos was unplugging it during file transfers. After it restarted, the system would pick up where it left off. In security side, there's been a few security and separation kernels to never have a reported breach in the field. They passed 2-5 years of pentesting by evaluators, too, doing many times better than monolithic kernels in defects found. Also easier to mitigate covert channels or do formal verification since they're small enough to analyze to begin with.
- zokula 8y agoOne of those things is not like the others. BeOS did not have a microkernel.
- nickpsecurity 8y agoAll the reporting I've seen on it said it had a microkernel. I've included both the first thing from Google and my UNIX Alternatives List that has an in-depth link on BeOS. https://arstechnica.com/information-technology/2008/02/first-look-haiku-poetically-resurrects-beos/ https://arstechnica.com/information-technology/2008/02/first... https://news.ycombinator.com/item?id=10957020 https://news.ycombinator.com/item?id=10957020 It also had the kind of compile-time slowdowns one expects with a lot of context switches on older CPU's. So, what's your source that there's not a microkernel at the center?
- waddlesplash 8y agoBeOS absolutely did not have a microkernel; all the hardware drivers, filesystem interfaces, and lowest-level network protocols ran in ring 0.
- ryao 9y agoFor what it is worth, there are more microprocessors running microkernels than are running monolithic kernels. The Intel ME is running Minix. Your cell phone’s baseband is likely running L4. QNX is used in cars. The Xen microkernels is used on AWS. VMWare ESXi is also a microkernels. The list goes on. Linux is in places that have higher mindshare than the places that microkernels occupy. When was the last time you thought “I wonder how the hypervisor powering AWS is designed” or “I wonder how my cellphone’s baseband is designed”. The latter being a question that I wish people would ask.