6 ms·
After being integrated into XNU through the OSFMK kernel, it's not microkernel anymore.
by self_awareness 7y ago
After being integrated into XNU through the OSFMK kernel, it's not microkernel anymore.
- pjmlp 7y agoIt will become one again with the new user space drivers being introduced in Catalina. As announced at WWDC, it will be a progressive transition, for every new driver model being supported as user space driver, the related kernel space APIs will be automatically deprecated and removed in the following OS release the year after.
- valleyer 7y agoThat still leaves lots of functionality in the kernel, most notably the BSD code (which implements Unix syscalls). So even with the new userspace driver support, most people would not consider xnu a microkernel.
- pjmlp 7y agoIt will be very hard to be a monolithic kernel without any sort of kernel space drivers. Also many BSD syscalls have been deprecated along the years, including POSIX features like networking stack, now replaced by Objective-C APIs. I would advise spending some time reading "Mac OS X Internals: A Systems Approach" and "Mac OS X and iOS Internals" books, to learn that having everything on kernel space alone, doesn't rewrite the original microkernel code into a huge monolith.
- tambourine_man 7y agoHave they solved the performance issue in any way?
- pjmlp 7y agoQNX, L4 and Minix 3 have solved it ages ago. Even current macOS variants do plenty of message passing and sandboxing. From the iOS games and real time audio apps, it appears fast enough to me.
- rurban 7y agoBut they are fundamentally different. They have no mailboxes in the server, they just pass the messages through to the right client after some capabilities check. Mach and Hurd on the other hand store the messages in the kernel, priorities them and handles all mailbox messages, without ever losing one. This proved to be the wrong approach.
- pjmlp 7y agoSeems to work alright for consumer media in real time, something that monolithic Linux has real issues with.
- seabrookmx 7y agoI think that just goes to show that when it comes to consumer media, there's probably more important layers in the stack that should be the focus of optimizations. Lack of hardware acceleration, and the general clunkiness of X windows make Linux crappy in this regard for example. I _still_ get screen tearing in Ubuntu 18.04 if I don't run Wayland, which I don't because it breaks some apps I use.
- rurban 7y agoFor consumer media it's even more important to drop late or lost messages. Just like with its transport protocol RTP or UDP. A microkernel is much, much simplier than those protocols.
- favorited 7y agoAre all drivers going to be userspace in Catalina, or just the user-installed kernel extensions? I just assumed Apple's OS drivers would still be in kernelspace.
- pjmlp 7y agoApple stated that would apply to everyone, as you can check from WWDC videos.
- nineteen999 7y agoMaybe I'm wrong, but I always thought that the "classic" description of a microkernel was one that implemented not only device drivers, but filesystem drivers and possibly other key components in userspace (memory manager?) as well. At least that is how I remember MINIX 1.0 as described in the Tanenbaum book. I appreciate there is a lot of grey area with microkernels, and a lot of hybrid designs these days, since as was the case with Mach/XNU/Windows NT, "pure" microkernel designs have often shown less than optimal performance due to additional context switching.
- pjmlp 7y agoCatalina is only the start of a long term roadmap, so no not all drivers are userspace on Catalina, just the first set of them.
- atombender 7y agoIncluding file systems, graphics and networking? That sounds like it would require a redesign of Mach, similar to what the L4 family had to do, or what Google is doing with Fuchsia.
- monocasa 7y agoNetworking - as in from the packet queues down, yes. I could see the IP stack making its way into its own process (or more likely they'll try and see that the perf is terrible). Of they do that, they'll probably push SSL into the same stack. Graphics - I don't see much changing, but to be fair it's pretty nice already. The part in kernel space for the most part just controls the GPU's MMU, the meat of the driver runs in user space for speed reasons as shared libraries in the processes that are making GPU calls. It's sort of exokernel like if you squint hard enough. Filesystems - will probably be hybrid. I don't see APFS leaving kernel space, or anything your root partition would be on, but NFS, exFat, NTFS? Yeah.
- pjmlp 7y agoThat is what they mentioned at WWDC yes. Networking is part of the first wave by the way. Networking kernel drivers are now deprecated as you can easily read about here. https://developer.apple.com/documentation/macos_release_notes/macos_catalina_10_15_beta_7_release_notes https://developer.apple.com/documentation/macos_release_note...