Opentopia Directory Encyclopedia Tools

XNU

Encyclopedia : X : XN : XNU : XNU



 

XNU is the name of the kernel that Apple acquired and developed for use in the Mac OS X operating system and released as open source as part of the Darwin operating system. XNU is an acronym for X is Not Unix.[#endnote_Acronym]

Originally developed by NeXT for the NEXTSTEP operating system, XNU was a hybrid kernel combining version 2.5 of the Mach kernel developed at Carnegie Mellon University with components from 4.3BSD and an object-oriented API for writing drivers called Driver Kit.

After the acquisition of NeXT by Apple, the Mach component was upgraded to 3.0, the BSD components were upgraded with code from the FreeBSD project and the Driver Kit was replaced with a C++ API for writing drivers called I/O Kit.

Kernel design

Like some other modern kernels, XNU is a hybrid, containing features of both monolithic and microkernels, attempting to make the best use of both technologies, such as the message passing capability of microkernels enabling larger portions of the OS to benefit from protected memory, as well as retaining the speed of monolithic kernels for certain critical tasks.

Mach was originally conceived as a simple, extensible microkernel. As such, it is able to run the core of an operating system as a separated process, which allows a great flexibility (one could run several operating systems in parallel above the Mach core), but this reduces performance because of the translations between Mach and the different codebases. With Mac OS X, since the behavior of the system is known in advance, BSD functionalities were built into the core with Mach. The result is a combination of the assets of Mach and BSD.

Mach

The core of the XNU kernel, Mach, provides kernel threads, processes, pre-emptive multitasking, message-passing (used in inter-process communication), protected memory, virtual memory management, very soft real-time support, kernel debugging support, and console I/O. The Mach component also allows the OS to host binaries for multiple distinct CPU architectures within a single file (such as x86 and PowerPC) due to its use of the Mach-O binary format.

BSD

The BSD portion of the kernel provides the POSIX API (BSD system calls), the Unix process model atop Mach tasks, basic security policies, user and group ids, permissions, the network stack, the virtual file system code (including a filesystem independent journalling layer), cryptographic framework, System V IPC, and some of the locking primitives.

I/O Kit

This is the device driver framework, written in a subset of C++. Due to its object-oriented design, device drivers can be written more quickly while using less code; features common to any class of driver are provided within the framework itself. The I/O Kit is multi-threaded, SMP 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.

Protecting shared resources

In order to run safely on multiprocessor machines, access to shared resources (files, data structures etc.) must be serialized so that threads or processes do not attempt to modify the same resource at the same time. Atomic operations, spinlocks, critical sections, mutexes, and serializing tokens are all possible methods that can be used to prevent concurrent access. Like both Linux and FreeBSD 5, XNU, as of Mac OS X 10.4 and Darwin 8.0, employs a fine-grained mutex model to achieve higher performance on multiprocessor systems.

Supported processors

Currently, XNU runs on x86 (Intel and AMD) based computers, as well as PowerPC based machines, both single processor and SMP models.

References

  1.  

External links

Mac OS X
Applications
Activity Monitor · Address Book · AirPort Admin Utility · Audio MIDI Setup · Automator · Bluetooth File Exchange · BOMArchiveHelper · Calculator · Chess · Classic · ColorSync Utility · Console · Crash Reporter · Dashboard · Dictionary · DigitalColor Meter · Directory Access · DiskImageMounter · Disk Utility · DVD Player · Exposé · Finder · Font Book · Grab · Grapher · Help Viewer · iCal · iChat · Image Capture · Installer · Internet Connect · iSync · Keychain Access · Mail · Migration Assistant · NetInfo Manager · Network Utility · ODBC Administrator · Photo Booth · Preview · Printer Setup Utility · QuickTime Player · Safari · Script Editor · Sherlock · Software Update · Stickies · System Preferences · System Profiler · Terminal · TextEdit · VoiceOver · X11
Developer
AU Lab · CHUD Tools · Core Image Fun House · FileMerge · Help Indexer · Icon Composer · Interface Builder · PackageMaker · Pixie · Property List Editor · Quartz Composer · Repeat After Me · USB Prober · Xcode
Mac OS X Server
AppleShare IP Migration · Fibre Channel Utility · Gateway Setup Assistant · Open Directory · MySQL Manager · QuickTime Broadcaster · QuickTime Streaming Server · RAID Admin · Server Admin · Workgroup Manager · Xgrid
Technology
AppleScript · Aqua · Audio Units · Bonjour · Boot Camp · Carbon · Cocoa · Core Audio · Core Data · Core Image · Core Video · Darwin · Exposé · Keychain · OpenGL · plist · Quartz · QuickTime · Rosetta · Smart folder · Spotlight · WebKit · XNU

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.


Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: