3 ms·
XNU uses a heavily modified Mach 3.0, which is a microkernel, but it doesn't use it as a microkernel, and never has. In XNU, things like file systems, graphics
by lobster_johnson 9y ago
XNU uses a heavily modified Mach 3.0, which is a microkernel, but it doesn't use it as a microkernel, and never has.
In XNU, things like file systems, graphics and device drivers are all running in kernel mode, in the same address space as the kernel. The Windows kernel has the same design -- it's designed as a microkernel, with separate modules internally that communicate via a form of IPC, but everything is running in one process (as opposed to a real microkernel architecture where file systems etc. are userland processes).
With XNU, Apple forked Mach 3.0 and have been making a lot of changes to it over the years, even though Mach itself has progressed since then. On the other hand, XNU inherited Mach's high syscall overhead (considerably higher than Linux), and to my knowledge Apple has moved a lot of stuff into ordinary syscalls rather than Mach messages to remove this overhead.
Edit: Interestingly, around the time before Leopard, when Darwin was still a thing, there was a research project called Darbat [1] that tried to supplant parts of Mach with L4, a more modern microkernel, and actually run XNU as a userland process on top of it. Unfortunately, nothing came of that project.
[1] https://arstechnica.com/staff/2006/06/4407/ https://arstechnica.com/staff/2006/06/4407/
- bpye 9y agoWindows has made some effort to split components into user space from Vista onwards, they introduced the User Mode Driver Framework allowing for some drivers to be written in user space [1], it doesn't give access to all of the functionality in the Kernel Mode Driver Framework (KMDF) though [2]. [1] https://en.wikipedia.org/wiki/User-Mode_Driver_Framework https://en.wikipedia.org/wiki/User-Mode_Driver_Framework [2] https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/comparing-umdf-2-0-functionality-to-kmdf https://docs.microsoft.com/en-us/windows-hardware/drivers/wd...