XNU is a hybrid kernel, containing features of both monolithic kernels and microkernels, attempting to make the best use of both technologies, such as the message passing ability of microkernels enabling greater modularity and larger portions of the OS to benefit from memory protection, and retaining the speed of monolithic kernels for some critical tasks. As of 2007, XNU runs on ARM, IA-32, and x86-64 processors, both one processor and symmetric multiprocessing models. PowerPC support is removed as of version 10; i.e., Mac OS X 10.6.
Mach
The basis of the XNU kernel is a heavily modified Open Software Foundation Mach kernel 7.3. As such, it is able to run the core of an operating system as separated processes, which allows a great flexibility, but this often reduces performance because of time-consuming kernel/user mode context switches and overhead stemming from mapping or copying messages between the address spaces of the kernel and that of the service daemons. With macOS, the designers have attempted to streamline some tasks and thus BSD functions were built into the core with Mach. The result is a heavily modified OSFMK 7.3 kernel, Apple licensed OSFMK 7.3, which is a microkernel, from the OSF. OSFMK 7.3 includes applicable code from the University of UtahMach 4 kernel and from the many Mach 3.0 variants forked from the original Carnegie Mellon University Mach 3.0 microkernel.
XNU in Mac OS X Snow Leopard, v10.6, comes in two varieties, a 32-bit version called K32 and a 64-bit version called K64. K32 can run 64-bit applications in userland. What was new in Mac OS X 10.6 was the ability to run XNU in 64-bit kernel space. K32 was the default kernel for 10.6 Server when used on all machines except Mac Pro and Xserve models from 2008 onwards and can run 64-bit applications. K64 has several benefits compared to K32:
Can manage more than 32 GB RAM, as the memory map would consume a disproportionately large area of the 32-bit kernel space.
Cache buffer sizes can be larger than what the 32-bit kernel space allows, potentially increasing I/O performance.
Performance is increased when using high-performance networking devices or multiple graphics processing units, as the kernel can map all of the devices in 64-bit space even if several have very large direct memory access buffers.
Booting while holding down 6 and 4 forces the machine to boot K64 on machines supporting 64-bit kernels. K64 will run 32-bit applications but it will not run 32-bit kernel extensions, so these must be ported to K64 to be able to load. XNU in Mac OS X Lion, v10.7, and later only provides a 64-bit kernel.
I/O Kit
I/O Kit is the device driver framework, written in a subset of C++ based on Embedded C++. Using its object-oriented design, features common to any class of driver are provided within the framework, helping device drivers be written in less time and code. The I/O Kit is multi-threaded, symmetric multiprocessing -safe, and allows for hot-pluggable devices and automatic, dynamic device configuration. Many drivers can be written to run from user space, which further enhances the stability of the system. If a user-space driver crashes, it will not crash the kernel. However, if a kernel-space driver crashes it will crash the kernel. Examples of kernel-space drivers include disk adapter and network adapter drivers, graphics drivers, drivers for Universal Serial Bus and FireWirehost controllers, and drivers for virtual machine software such as VirtualBox, Parallels Desktop for Mac, and VMware Fusion.