<s>
XNU	B-Operating_System
is	O
the	O
computer	B-General_Concept
operating	I-General_Concept
system	I-General_Concept
(	O
OS	O
)	O
kernel	B-Operating_System
developed	O
at	O
Apple	O
Inc	O
.	O
since	O
December	O
1996	O
for	O
use	O
in	O
the	O
Mac	B-Device
OS	I-Device
X	I-Device
(	O
now	O
macOS	B-Application
)	O
operating	B-General_Concept
system	I-General_Concept
and	O
released	O
as	O
free	B-License
and	I-License
open-source	I-License
software	I-License
as	O
part	O
of	O
the	O
Darwin	B-Operating_System
OS	I-Operating_System
,	O
which	O
in	O
addition	O
to	O
macOS	B-Application
is	O
also	O
the	O
basis	O
for	O
the	O
Apple	O
TV	O
Software	O
,	O
iOS	B-Application
,	O
iPadOS	B-Operating_System
,	O
watchOS	B-Device
,	O
and	O
tvOS	B-Operating_System
OSes	O
.	O
</s>
<s>
XNU	B-Operating_System
is	O
an	O
abbreviation	O
of	O
X	B-Operating_System
is	I-Operating_System
Not	I-Operating_System
Unix	I-Operating_System
.	O
</s>
<s>
Originally	O
developed	O
by	O
NeXT	O
for	O
the	O
NeXTSTEP	B-Application
operating	B-General_Concept
system	I-General_Concept
,	O
XNU	B-Operating_System
was	O
a	O
hybrid	B-Operating_System
kernel	I-Operating_System
derived	O
from	O
version	O
2.5	O
of	O
the	O
Mach	B-Operating_System
kernel	I-Operating_System
developed	O
at	O
Carnegie	O
Mellon	O
University	O
,	O
which	O
incorporated	O
the	O
bulk	O
of	O
the	O
4.3BSD	O
kernel	B-Operating_System
modified	O
to	O
run	O
atop	O
Mach	B-Operating_System
primitives	O
,	O
along	O
with	O
an	O
application	B-Application
programming	I-Application
interface	I-Application
(	O
API	B-Application
)	O
in	O
Objective-C	B-Language
for	O
writing	O
drivers	O
named	O
Driver	O
Kit	O
.	O
</s>
<s>
After	O
Apple	O
acquired	O
NeXT	O
,	O
the	O
kernel	B-Operating_System
was	O
updated	O
with	O
code	O
derived	O
from	O
OSFMK	O
7.3	O
from	O
OSF	B-Application
,	O
and	O
the	O
FreeBSD	B-Operating_System
project	I-Operating_System
,	O
and	O
the	O
Driver	O
Kit	O
was	O
replaced	O
with	O
a	O
C++	B-Language
API	B-Application
for	O
writing	O
drivers	O
named	O
I/O	O
Kit	O
.	O
</s>
<s>
XNU	B-Operating_System
is	O
a	O
hybrid	B-Operating_System
kernel	I-Operating_System
,	O
containing	O
features	O
of	O
both	O
monolithic	B-Operating_System
kernels	I-Operating_System
and	O
microkernels	B-Operating_System
,	O
attempting	O
to	O
make	O
the	O
best	O
use	O
of	O
both	O
technologies	O
,	O
such	O
as	O
the	O
message	B-Architecture
passing	I-Architecture
ability	O
of	O
microkernels	B-Operating_System
enabling	O
greater	O
modularity	O
and	O
larger	O
portions	O
of	O
the	O
OS	O
to	O
benefit	O
from	O
memory	B-General_Concept
protection	I-General_Concept
,	O
and	O
retaining	O
the	O
speed	O
of	O
monolithic	B-Operating_System
kernels	I-Operating_System
for	O
some	O
critical	O
tasks	O
.	O
</s>
<s>
,	O
XNU	B-Operating_System
runs	O
on	O
ARM64	B-Architecture
and	O
x86-64	B-Device
processors	O
,	O
both	O
one	O
processor	O
and	O
symmetric	B-Operating_System
multiprocessing	I-Operating_System
(	O
SMP	O
)	O
models	O
.	O
</s>
<s>
PowerPC	B-Architecture
support	O
was	O
removed	O
as	O
of	O
the	O
version	O
in	O
Mac	B-Device
OS	I-Device
X	I-Device
10.6	I-Device
.	O
</s>
<s>
Support	O
for	O
IA-32	B-Device
was	O
removed	O
as	O
of	O
the	O
version	O
in	O
Mac	B-Application
OS	I-Application
X	I-Application
10.7	I-Application
;	O
support	O
for	O
32-bit	O
ARM	O
was	O
removed	O
as	O
of	O
the	O
version	O
in	O
.	O
</s>
<s>
The	O
basis	O
of	O
the	O
XNU	B-Operating_System
kernel	I-Operating_System
is	O
a	O
heavily	O
modified	O
(	O
hybrid	B-Operating_System
)	O
Open	B-Application
Software	I-Application
Foundation	I-Application
Mach	B-Operating_System
kernel	I-Operating_System
(	O
OSFMK	O
)	O
7.3	O
.	O
</s>
<s>
As	O
such	O
,	O
it	O
is	O
able	O
to	O
run	O
the	O
core	O
of	O
an	O
operating	B-General_Concept
system	I-General_Concept
as	O
separated	O
processes	O
,	O
which	O
allows	O
a	O
great	O
flexibility	O
(	O
it	O
could	O
run	O
several	O
operating	B-General_Concept
systems	I-General_Concept
in	O
parallel	O
above	O
the	O
Mach	B-Operating_System
core	O
)	O
,	O
but	O
this	O
often	O
reduces	O
performance	O
because	O
of	O
time-consuming	O
kernel/user	O
mode	O
context	O
switches	O
and	O
overhead	O
stemming	O
from	O
mapping	O
or	O
copying	O
messages	O
between	O
the	O
address	O
spaces	O
of	O
the	O
kernel	B-Operating_System
and	O
that	O
of	O
the	O
service	O
daemons	O
.	O
</s>
<s>
With	O
macOS	B-Application
,	O
the	O
designers	O
have	O
attempted	O
to	O
streamline	O
some	O
tasks	O
and	O
thus	O
BSD	B-Operating_System
functions	O
were	O
built	O
into	O
the	O
core	O
with	O
Mach	B-Operating_System
.	O
</s>
<s>
The	O
result	O
is	O
a	O
heavily	O
modified	O
(	O
hybrid	B-Operating_System
)	O
OSFMK	O
7.3	O
kernel	B-Operating_System
,	O
Apple	O
licensed	O
OSFMK	O
7.3	O
,	O
which	O
is	O
a	O
microkernel	B-Operating_System
,	O
from	O
the	O
OSF	B-Application
.	O
</s>
<s>
OSFMK	O
7.3	O
includes	O
applicable	O
code	O
from	O
the	O
University	O
of	O
Utah	O
Mach	B-Operating_System
4	O
kernel	B-Operating_System
and	O
from	O
the	O
many	O
Mach	B-Operating_System
3.0	I-Operating_System
variants	O
forked	B-Application
from	O
the	O
original	O
Carnegie	O
Mellon	O
University	O
Mach	B-Operating_System
3.0	I-Operating_System
microkernel	B-Operating_System
.	O
</s>
<s>
The	O
Berkeley	B-Operating_System
Software	I-Operating_System
Distribution	I-Operating_System
(	O
BSD	B-Operating_System
)	O
part	O
of	O
the	O
kernel	B-Operating_System
provides	O
the	O
Portable	O
Operating	B-General_Concept
System	I-General_Concept
Interface	O
(	O
POSIX	O
)	O
application	B-Application
programming	I-Application
interface	I-Application
(	O
API	B-Application
,	O
BSD	B-Operating_System
system	O
calls	O
)	O
,	O
the	O
Unix	B-Application
process	O
model	O
atop	O
Mach	B-Operating_System
tasks	O
,	O
basic	O
security	O
policies	O
,	O
user	O
and	O
group	O
ids	O
,	O
permissions	O
,	O
the	O
network	B-Protocol
protocol	I-Protocol
stack	I-Protocol
(	O
protocols	O
)	O
,	O
the	O
virtual	B-Application
file	I-Application
system	I-Application
code	O
(	O
including	O
a	O
file	B-Application
system	I-Application
independent	O
journaling	B-Application
layer	O
)	O
,	O
several	O
local	O
file	B-Application
systems	I-Application
such	O
as	O
Hierarchical	B-Application
File	I-Application
System	I-Application
(	O
HFS	B-Application
,	O
HFS	B-Application
Plus	I-Application
(	O
HFS+	B-Application
)	O
)	O
and	O
Apple	B-Application
File	I-Application
System	I-Application
(	O
APFS	B-Application
)	O
,	O
the	O
Network	B-Protocol
File	I-Protocol
System	I-Protocol
(	O
NFS	O
)	O
client	O
and	O
server	O
,	O
cryptographic	O
framework	O
,	O
UNIX	B-Operating_System
System	I-Operating_System
V	I-Operating_System
inter-process	B-Operating_System
communication	I-Operating_System
(	O
IPC	O
)	O
,	O
audit	O
subsystem	O
,	O
mandatory	O
access	O
control	O
,	O
and	O
some	O
of	O
the	O
locking	O
primitives	O
.	O
</s>
<s>
The	O
BSD	B-Operating_System
code	O
present	O
in	O
XNU	B-Operating_System
has	O
been	O
most	O
recently	O
synchronised	O
with	O
that	O
from	O
the	O
FreeBSD	B-Operating_System
kernel	B-Operating_System
.	O
</s>
<s>
Although	O
much	O
of	O
it	O
has	O
been	O
significantly	O
modified	O
,	O
code	O
sharing	O
still	O
occurs	O
between	O
Apple	O
and	O
the	O
FreeBSD	B-Operating_System
Project	I-Operating_System
.	O
</s>
<s>
XNU	B-Operating_System
in	O
Mac	B-Device
OS	I-Device
X	I-Device
Snow	I-Device
Leopard	I-Device
,	O
v10.6	O
,	O
(	O
Darwin	B-Operating_System
version	O
10	O
)	O
comes	O
in	O
two	O
varieties	O
,	O
a	O
32-bit	O
version	O
called	O
K32	O
and	O
a	O
64-bit	B-Device
version	O
called	O
K64	O
.	O
</s>
<s>
K32	O
can	O
run	O
64-bit	B-Device
applications	O
in	O
userland	O
.	O
</s>
<s>
What	O
was	O
new	O
in	O
Mac	B-Device
OS	I-Device
X	I-Device
10.6	I-Device
was	O
the	O
ability	O
to	O
run	O
XNU	B-Operating_System
in	O
64-bit	B-Device
kernel	B-Operating_System
space	I-Operating_System
.	O
</s>
<s>
K32	O
was	O
the	O
default	O
kernel	B-Operating_System
for	O
10.6	B-Device
Server	O
when	O
used	O
on	O
all	O
machines	O
except	O
Mac	B-Device
Pro	I-Device
and	O
Xserve	B-Device
models	O
from	O
2008	O
onwards	O
and	O
can	O
run	O
64-bit	B-Device
applications	O
.	O
</s>
<s>
Can	O
manage	O
more	O
than	O
32GB	O
RAM	O
,	O
as	O
the	O
memory	O
map	O
would	O
consume	O
a	O
disproportionately	O
large	O
area	O
of	O
the	O
32-bit	O
kernel	B-Operating_System
space	I-Operating_System
.	O
</s>
<s>
Cache	O
buffer	O
sizes	O
can	O
be	O
larger	O
than	O
what	O
the	O
32-bit	O
kernel	B-Operating_System
space	I-Operating_System
allows	O
,	O
potentially	O
increasing	O
I/O	O
performance	O
.	O
</s>
<s>
Performance	O
is	O
increased	O
when	O
using	O
high-performance	O
networking	O
devices	O
or	O
multiple	O
graphics	B-Architecture
processing	I-Architecture
units	I-Architecture
(	O
GPUs	B-Architecture
)	O
,	O
as	O
the	O
kernel	B-Operating_System
can	O
map	O
all	O
of	O
the	O
devices	O
in	O
64-bit	B-Device
space	O
even	O
if	O
several	O
have	O
very	O
large	O
direct	B-General_Concept
memory	I-General_Concept
access	I-General_Concept
(	O
DMA	O
)	O
buffers	O
.	O
</s>
<s>
Booting	O
while	O
holding	O
down	O
6	O
and	O
4	O
forces	O
the	O
machine	O
to	O
boot	O
K64	O
on	O
machines	O
supporting	O
64-bit	B-Device
kernels	B-Operating_System
.	O
</s>
<s>
K64	O
will	O
run	O
32-bit	O
applications	O
but	O
it	O
will	O
not	O
run	O
32-bit	O
kernel	B-Application
extensions	I-Application
(	O
KEXTs	B-Application
)	O
,	O
so	O
these	O
must	O
be	O
ported	O
to	O
K64	O
to	O
be	O
able	O
to	O
load	O
.	O
</s>
<s>
XNU	B-Operating_System
in	O
OS	B-Operating_System
X	I-Operating_System
Mountain	I-Operating_System
Lion	I-Operating_System
,	O
v10.8	O
,	O
and	O
later	O
only	O
provides	O
a	O
64-bit	B-Device
kernel	B-Operating_System
.	O
</s>
<s>
I/O	O
Kit	O
is	O
the	O
device	B-Application
driver	I-Application
framework	O
,	O
written	O
in	O
a	O
subset	O
of	O
C++	B-Language
based	O
on	O
Embedded	B-Language
C++	I-Language
.	O
</s>
<s>
Using	O
its	O
object-oriented	B-Language
design	O
,	O
features	O
common	O
to	O
any	O
class	O
of	O
driver	O
are	O
provided	O
within	O
the	O
framework	O
,	O
helping	O
device	B-Application
drivers	I-Application
be	O
written	O
in	O
less	O
time	O
and	O
code	O
.	O
</s>
<s>
The	O
I/O	O
Kit	O
is	O
multi-threaded	O
,	O
symmetric	B-Operating_System
multiprocessing	I-Operating_System
(	O
SMP	O
)	O
-safe	O
,	O
and	O
allows	O
for	O
hot-pluggable	O
devices	O
and	O
automatic	O
,	O
dynamic	O
device	O
configuration	O
.	O
</s>
<s>
Many	O
drivers	O
can	O
be	O
written	O
to	O
run	O
from	O
user	B-Operating_System
space	I-Operating_System
,	O
which	O
further	O
enhances	O
the	O
stability	O
of	O
the	O
system	O
.	O
</s>
<s>
If	O
a	O
user-space	B-Operating_System
driver	O
crashes	O
,	O
it	O
will	O
not	O
crash	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
However	O
,	O
if	O
a	O
kernel-space	B-Operating_System
driver	O
crashes	O
it	O
will	O
crash	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
Examples	O
of	O
kernel-space	B-Operating_System
drivers	O
include	O
disk	O
adapter	O
and	O
network	O
adapter	O
drivers	O
,	O
graphics	O
drivers	O
,	O
drivers	O
for	O
Universal	O
Serial	O
Bus	O
(	O
USB	B-Protocol
)	O
and	O
FireWire	B-Protocol
host	O
controllers	O
,	O
and	O
drivers	O
for	O
virtual	B-Architecture
machine	I-Architecture
software	O
such	O
as	O
VirtualBox	B-Operating_System
,	O
Parallels	B-Language
Desktop	I-Language
for	I-Language
Mac	I-Language
,	O
and	O
VMware	B-Operating_System
Fusion	I-Operating_System
.	O
</s>
