8 ms·
So are the cases of "hybrid" kernels a victory for microkernel side of the debate, or the monolithic side? Neither iOS/OS X or NT manage to get the robustness,
by zurn 11y ago
So are the cases of "hybrid" kernels a victory for microkernel side of the debate, or the monolithic side?
Neither iOS/OS X or NT manage to get the robustness, security or compartmentalization advantages of microkernels. I guess they get modularity and dynamic loading, but so does Linux. So Linux, X and NT are all mongrels, with iOS/OS X having microkernel roots and Linux having monolithic roots, and NT being a ground-up designed mongrel.
- pjmlp 11y agoI love how Windows hate runs in HN. Both Mac OS X/iOS get it partially, by having kernel level RPC to communicate between modules and having moved a great part of their driver infrastructure to user space. Let me know when your graphic card crashes don't require a reboot any longer on GNU/Linux.
- zurn 11y agoNo Windows hate intended, I called all of them mongrels. So is there a the mechanism in OS X and/or Windows that prevents a graphics card hardware or driver from corrupting OS state and enables robust reset of card and driver? Or if it's a 90% solution, it significantly better because of some microkernelesque features missing from Linux?
- pjmlp 11y agoYes, since Windows Vista, Microsoft kind of returned to the original NT model and introduced User-Mode Driver Framework (UMDF), which is requirement for graphics drivers. Thus moving them out again from the kernel. https://msdn.microsoft.com/en-us/library/windows/hardware/dn384105%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/hardware/dn... https://msdn.microsoft.com/en-us/library/windows/hardware/ff570114%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/hardware/ff... A driver crash will just force it to be reloaded. Likewise using kernel level RPC adds extra validation layers via the data marshaling than a simple function call would do. As for OS X, only drivers for disks, network controllers, and keyboards are required on the kernel and use mostly Mach calls, not BSD ones. Anything else can be exposed via so called nubs to user space. https://developer.apple.com/library/mac/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/ArchitectOverview/ArchitectOverview.html#//apple_ref/doc/uid/TP0000013-TPXREF107 https://developer.apple.com/library/mac/documentation/Device... https://developer.apple.com/library/mac/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/ArchitectOverview/ArchitectOverview.html#//apple_ref/doc/uid/TP0000013-BEHEGHEG https://developer.apple.com/library/mac/documentation/Device...
- zurn 11y agoThanks. I didn't see explanations of the graphics driver restart in those MSDN links, but I found one here: https://msdn.microsoft.com/en-us/library/windows/hardware/ff570087(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/hardware/ff... And third party articles: https://www.blackhat.com/docs/us-14/materials/us-14-vanSprundel-Windows-Kernel-Graphics-Driver-Attack-Surface.pdf https://www.blackhat.com/docs/us-14/materials/us-14-vanSprun... http://bsodtutorials.blogspot.fi/2013/12/timeout-detection-and-recovery-stop.html http://bsodtutorials.blogspot.fi/2013/12/timeout-detection-a... So there's a user-space part to the GPU driver and a kernel-space part, much like on Linux. For the recovery functionality it sounds like the graphics card's kernel-side GPU driver just registers a callback that is used by Windows when it thinks the GPU or driver is stuck, but there aren't any special arrangements to make this robust against the driver corrupting OS state or other hardware. Same kind of mechanism could be implemented in Linux. I'll save those OS X links for later when I have time to look into that one!
- pjmlp 11y agoOf course one could eventually migrate Linux to an hybrid kernel, but the will to do so isn't there. Specially since it requires a stable kernel ABI.
- hga 11y agoIt's my opinion that the lack of a stable kernel device driver ABI is a large part of Linux's success, and whatever the reason, under its current management that's not going to change (that management being of course another reason it's so successful). Although depending on how bad systemd is in the wild, a sufficient critical mass for a stable device driver ABI just might be come to be.
- zurn 11y agoI'm not sure we are on the same page. I attempted to explain how the functionality in question is not related to kernel architecture differences, and that Windows is unable to implement the function reliably.
- hga 11y agoI love how Windows hate runs in HN. Indeed; we were greatly hopeful for it in the days of too many proprietary UNIX(TM) versions, and it began very well, but in truth it started going downhill after the 1st Service Pack for NT 3.51, and was indeed a "mongrel" in the decade of NT4/2000/XP when the graphics driver was moved into the kernel (per pjmlp's comment in this subthread about it being moved back out with Vista, and given how much people avoided Vista for unrelated reasons, you could add another 3 years until Windows 7).
- pjmlp 11y agoYet Microsoft, Google and Apple are the only companies trying to do some kind of OS research nowadays. The remaining ones have reduced themselves to copying those proprietary UNIX(TM) features into GNU/Linux.
- hga 11y agoWell, perhaps only those 3 of the big names in that domain (is IBM completely out of the game?), but e.g. General Dynamics is the commercial player for seL4.
- pjmlp 11y agoI was only thinking about the mainstream. As far as I am aware, IBM is mostly busy making GNU/Linux run on their mainframes. Aix has lots of cool features, but it is still a fairly typical UNIX. OS/400 kernel is quite cool, using bytecodes as executable format with a kernel level JIT and being object based. But there is very little more to innovate, most likely. I left out General Dynamics, only because I didn't thought of them while writing.
- AnimalMuppet 11y ago> As far as I am aware, IBM is mostly busy making GNU/Linux run on their mainframes. I don't think that's right. IBM's main (no pun intended) mainframe OS is zOS, which is derived from OS/390. Linux can run on those mainframes (maybe on top of zOS, I'm not sure), but Linux is not the primary OS for IBM mainframes. And I don't think that IBM is letting zOS stand still while all the effort goes into Linux.
- krylon 11y ago> Let me know when your graphic card crashes don't require a reboot any longer on GNU/Linux. On the one hand, yes, that would be nice. On the other hand, I have been using GNU/Linux on my desktops for about fifteen years, and I have only seen a handful of kernel panics during that time. And most of those I strongly suspect being caused by faulty hardware. I remember the X server freezing on a few occasions, but that can indeed be restarted without a reboot, and the last time I saw that happen was years ago, back in the bad old days when people had to edit xorg.conf...