A running kernel contains numerous drivers that do not reside in the xnu code base but have their own Darwin packages. Darwin xnu package consists of about million lines of code, of which half could be categorized under BSD and a third under Mach, form the low-level foundation of OS X. The sources for Darwin (version 2.0) under the Apple Public Source License (APSL) was classified as a free software license by the Free Software Foundation (FSF). The rest of the packages are provided under their respective licenses, such as the GNU General Public License (GPL), the BSD License, the Carnegie Mellon University License and so on. There are about 350 packages in Darwin 8.6 (PPC) for Mac OS X 10.4.6. Darwin does not include the proprietary components that are integrated as parts of OS X, i.e. the Aqua, Carbon, Cocoa, OpenGL, Quartz and QuickTime, etc. Although it lacks the visual technologies of OS X, it supports graphical X11 Window System. We can divide Mac OS X kernel into the following components:
- Mach - the service layer
- BSD - the primary system programming interface provider
- I/O Kit - the runtime environment for drivers
- libkern - an in-kernel library
- libsa - an in-kernel library that is normally used only during the system startup
- Platform Expert - the hardware abstraction module (platform-specific)
- Kernel Extensions - various I/O Kit families, the majority of loadable device drivers, and some non-I/O Kit extensions.