XNU

XNU

Infobox_Software
name = XNU kernel

caption =
developer = Apple Inc.
latest_release_version =
latest_release_date =
operating_system = Darwin & Mac OS X
genre = Kernel
kernel_type = Hybrid
license = Apple Public Source License 2.0
working_state = In production / development
website = http://kernel.macosforge.org/

XNU is the computer operating system kernel that Apple Inc. acquired and developed for use in the Mac OS X operating system and released as free and open source software as part of the Darwin operating system. "XNU" is an acronym for "X is Not Unix" [cite web | year=2005 | url=http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/glossary/chapter_998_section_1.html#//apple_ref/doc/uid/TP40002859-DontLinkElementID_38 | title=Porting UNIX/Linux Applications to Mac OS X: Glossary | publisher=Apple Computer | accessdate=2005-12-13]

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 Apple acquired NeXT, 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 greater modularity and larger portions of the OS to benefit from protected memory, as well as retaining the speed of monolithic kernels for certain critical tasks.

Currently, XNU runs on ARM [ [http://www.engadget.com/2007/07/01/iphone-processor-found-620mhz-arm/ iPhone processor found: 620MHz ARM CPU] (2007-07-01 accessdate|2008-01-06] , x86, x86-64 and PowerPC based processors, both single processor and SMP models.

Mach

The core of the XNU kernel, Mach, was originally conceived as a simple microkernel. As such, it is able to run the core of an operating system as separated processes, which allows a great flexibility (one could run several operating systems in parallel above the Mach core), but this often reduced performance because of time consuming kernel/user mode context switches and overhead stemming from mapping or copying messages between the address spaces of the microkernel and that of the service daemons. With Mac OS X, the designers have attempted to streamline certain tasks and thus BSD functionalities were built into the core with Mach. The result is a combination of Mach and a classical BSD kernel, with some advantages and disadvantages of both.

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 Berkeley Software Distribution (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), Network File System (NFS), cryptographic framework, UNIX System V inter-process communication (IPC), Audit subsystem, Mandatory Access Control and some of the locking primitives. The BSD code present in XNU came from the FreeBSD kernel, although much of it has been significantly modified, code sharing still occurs between Apple and the FreeBSD Project Fact|date=May 2007 Dubious|date=March 2008.

I/O Kit

I/O Kit is the device driver framework, written in a subset of C++. Using its object-oriented design, features common to any class of driver are provided within the framework itself, helping device drivers be written more quickly and using less code. The I/O Kit is multi-threaded, Symmetric multiprocessing (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. However, if a kernel-space driver crashes it will crash the kernel. Examples include Parallels, EyeTV and the Apple USB driver.

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, mutual exclusions ("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.Fact|date=July 2008

References

External links

* [http://www.kernelthread.com/mac/osx/arch_xnu.html XNU: The Kernel] - an overview of the components of XNU on kernelthread.com
* [http://chaosradio.ccc.de/24c3_m4v_2303.html Inside the Mac OS X Kernel] - 'This talk intends to clear up the confusion by presenting details of the Mac OS X kernel'


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • XNU — kernel Desarrollador Apple Inc. http://kernel.macosforge.org/ Información general Género Núcleo híbrido …   Wikipedia Español

  • XNU — Basisdaten Entwickler Apple Inc. Abstammung FreeBSD Mach ⌊ XNU Kernel hybrid …   Deutsch Wikipedia

  • Xnu — est le nom du noyau des systèmes Darwin et Mac OS X. C est un acronyme récursif de « XNU s Not Unix ». C est un noyau enrichi hybride, basé sur le micro noyau Mach, et utilisant le noyau BSD en tant que service du système d exploitation …   Wikipédia en Français

  • Xnu — (X is Not Unix)[1] ist der Name des Kernels, der im Open Source Betriebssystem Darwin verwendet wird. Darwin bildet die Grundlage von Apples Betriebssystem Mac OS X. Kernel Design XNU ist ein hybrider Kernel, bestehend aus Teilen des Mach 3.0… …   Deutsch Wikipedia

  • XNU — Ядро XNU Тип Ядро ОС Разработчик NeXT, Apple Операционная система ОС Darwin, Apple iOS, Mac OS X Лицензия Apple Public Source License 2.0 Сайт …   Википедия

  • XNU — Architecture hybride : XNU XNU est le nom du noyau des systèmes Darwin et Mac OS X. L’acronyme signifie « X is Not Unix »[1]. C est un noyau enrichi hybride, bas …   Wikipédia en Français

  • XNU's not unix — XNU XNU est le nom du noyau des systèmes Darwin et Mac OS X. C est un acronyme récursif de « XNU s Not Unix ». C est un noyau enrichi hybride, basé sur le micro noyau Mach, et utilisant le noyau BSD en tant que service du système d… …   Wikipédia en Français

  • XNU — Nouna, Burkina Faso (Regional » Airport Codes) …   Abbreviations dictionary

  • XNU — abbr. Exclude Non Unique …   Dictionary of abbreviations

  • Comparison of operating system kernels — A kernel is the core component of every computer operating system. While kernels are highly technical in nature, and may be hidden from the user under many layers of software and applications, they do have distinguishing or characteristic… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”