<s>
Mach	B-Operating_System
(	O
)	O
is	O
a	O
kernel	B-Operating_System
developed	O
at	O
Carnegie	O
Mellon	O
University	O
by	O
Richard	O
Rashid	O
and	O
Avie	O
Tevanian	O
to	O
support	O
operating	B-General_Concept
system	I-General_Concept
research	O
,	O
primarily	O
distributed	B-Architecture
and	O
parallel	B-Operating_System
computing	I-Operating_System
.	O
</s>
<s>
Mach	B-Operating_System
is	O
often	O
considered	O
one	O
of	O
the	O
earliest	O
examples	O
of	O
a	O
microkernel	B-Operating_System
.	O
</s>
<s>
However	O
,	O
not	O
all	O
versions	O
of	O
Mach	B-Operating_System
are	O
microkernels	B-Operating_System
.	O
</s>
<s>
Mach	B-Operating_System
's	O
derivatives	O
are	O
the	O
basis	O
of	O
the	O
operating	B-Operating_System
system	I-Operating_System
kernel	I-Operating_System
in	O
GNU	B-Application
Hurd	I-Application
and	O
of	O
Apple	O
's	O
XNU	B-Operating_System
kernel	I-Operating_System
used	O
in	O
macOS	B-Application
,	O
iOS	B-Application
,	O
iPadOS	B-Operating_System
,	O
tvOS	B-Operating_System
,	O
and	O
watchOS	B-Device
.	O
</s>
<s>
The	O
project	O
at	O
Carnegie	O
Mellon	O
ran	O
from	O
1985	O
to	O
1994	O
,	O
ending	O
with	O
Mach	B-Operating_System
3.0	I-Operating_System
,	O
which	O
is	O
a	O
true	O
microkernel	B-Operating_System
.	O
</s>
<s>
Mach	B-Operating_System
was	O
developed	O
as	O
a	O
replacement	O
for	O
the	O
kernel	B-Operating_System
in	O
the	O
BSD	B-Operating_System
version	O
of	O
Unix	B-Application
,	O
so	O
no	O
new	O
operating	B-General_Concept
system	I-General_Concept
would	O
have	O
to	O
be	O
designed	O
around	O
it	O
.	O
</s>
<s>
Mach	B-Operating_System
and	O
its	O
derivatives	O
exist	O
within	O
a	O
number	O
of	O
commercial	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
These	O
include	O
all	O
using	O
the	O
XNU	B-Operating_System
operating	B-Operating_System
system	I-Operating_System
kernel	I-Operating_System
which	O
incorporates	O
an	O
earlier	O
non-microkernel	O
Mach	B-Operating_System
as	O
a	O
major	O
component	O
.	O
</s>
<s>
The	O
Mach	B-Operating_System
virtual	B-Architecture
memory	I-Architecture
management	O
system	O
was	O
also	O
adopted	O
in	O
4.4BSD	O
by	O
the	O
BSD	B-Operating_System
developers	O
at	O
CSRG	B-Operating_System
,	O
and	O
appears	O
in	O
modern	O
BSD-derived	O
Unix	B-Application
systems	I-Application
such	O
as	O
FreeBSD	B-Operating_System
.	O
</s>
<s>
Mach	B-Operating_System
is	O
the	O
logical	O
successor	O
to	O
Carnegie	O
Mellon	O
's	O
Accent	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
The	O
lead	O
developer	O
on	O
the	O
Mach	B-Operating_System
project	O
,	O
Richard	O
Rashid	O
,	O
has	O
been	O
working	O
at	O
Microsoft	O
since	O
1991	O
;	O
he	O
founded	O
the	O
Microsoft	O
Research	O
division	O
.	O
</s>
<s>
Another	O
of	O
the	O
original	O
Mach	B-Operating_System
developers	O
,	O
Avie	O
Tevanian	O
,	O
was	O
formerly	O
head	O
of	O
software	O
at	O
NeXT	O
,	O
then	O
Chief	O
Software	O
Technology	O
Officer	O
at	O
Apple	O
Inc	O
.	O
until	O
March	O
2006	O
.	O
</s>
<s>
The	O
developers	O
had	O
to	O
bike	O
to	O
lunch	O
through	O
rainy	O
Pittsburgh	O
's	O
mud	O
puddles	O
,	O
and	O
Tevanian	O
joked	O
the	O
word	O
"	O
muck	O
"	O
could	O
form	O
a	O
backronym	O
for	O
their	O
Multi-User	O
(	O
or	O
Multiprocessor	B-Operating_System
Universal	O
)	O
Communication	O
Kernel	B-Operating_System
.	O
</s>
<s>
Italian	O
CMU	O
engineer	O
later	O
asked	O
project	O
leader	O
Rick	O
Rashid	O
about	O
the	O
project	O
's	O
current	O
title	O
and	O
received	O
"	O
MUCK	O
"	O
as	O
the	O
answer	O
,	O
though	O
not	O
spelled	O
out	O
but	O
just	O
pronounced	O
:	O
which	O
he	O
,	O
according	O
to	O
the	O
Italian	O
alphabet	O
,	O
wrote	O
like	O
Mach	B-Operating_System
.	O
</s>
<s>
Rashid	O
liked	O
Giuse	O
's	O
spelling	O
"	O
Mach	B-Operating_System
"	O
so	O
much	O
that	O
it	O
prevailed	O
.	O
</s>
<s>
A	O
key	O
concept	O
in	O
the	O
original	O
Unix	B-Application
operating	I-Application
system	I-Application
was	O
the	O
idea	O
of	O
a	O
pipe	B-Operating_System
.	O
</s>
<s>
A	O
pipe	B-Operating_System
was	O
an	O
abstraction	B-Application
that	O
allowed	O
data	O
to	O
be	O
moved	O
as	O
an	O
unstructured	O
stream	O
of	O
bytes	O
from	O
program	O
to	O
program	O
.	O
</s>
<s>
Using	O
pipes	B-Operating_System
,	O
users	O
(	O
or	O
programmers	O
)	O
could	O
link	O
together	O
multiple	O
programs	O
to	O
complete	O
tasks	O
,	O
feeding	O
data	O
through	O
several	O
small	O
programs	O
in	O
turn	O
.	O
</s>
<s>
This	O
contrasted	O
with	O
typical	O
operating	B-General_Concept
systems	I-General_Concept
of	O
the	O
era	O
,	O
which	O
required	O
a	O
single	O
large	O
program	O
that	O
could	O
handle	O
the	O
entire	O
task	B-General_Concept
,	O
or	O
alternately	O
,	O
used	O
files	O
to	O
pass	O
data	O
,	O
which	O
was	O
resource	O
expensive	O
and	O
time-consuming	O
.	O
</s>
<s>
Pipes	B-Operating_System
were	O
built	O
on	O
the	O
underlying	O
input/output	B-General_Concept
system	O
.	O
</s>
<s>
For	O
instance	O
,	O
a	O
printer	B-Application
driver	I-Application
might	O
send	O
a	O
line	O
of	O
text	O
to	O
a	O
line	O
printer	O
and	O
then	O
have	O
nothing	O
to	O
do	O
until	O
the	O
printer	O
completed	O
printing	O
that	O
line	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
the	O
driver	O
would	O
indicate	O
that	O
it	O
was	O
blocked	O
,	O
and	O
the	O
operating	B-General_Concept
system	I-General_Concept
would	O
allow	O
some	O
other	O
program	O
to	O
run	O
until	O
the	O
printer	O
indicated	O
it	O
was	O
ready	O
for	O
more	O
data	O
.	O
</s>
<s>
In	O
the	O
pipes	B-Operating_System
system	O
the	O
limited	O
resource	O
was	O
memory	O
,	O
and	O
when	O
one	O
program	O
filled	O
the	O
memory	O
assigned	O
to	O
the	O
pipe	B-Operating_System
,	O
it	O
would	O
naturally	O
block	O
.	O
</s>
<s>
Normally	O
this	O
would	O
cause	O
the	O
consuming	O
program	O
to	O
run	O
,	O
emptying	O
the	O
pipe	B-Operating_System
again	O
.	O
</s>
<s>
In	O
contrast	O
to	O
a	O
file	O
,	O
where	O
the	O
entire	O
file	O
has	O
to	O
be	O
read	O
or	O
written	O
before	O
the	O
next	O
program	O
can	O
use	O
it	O
,	O
pipes	B-Operating_System
made	O
the	O
movement	O
of	O
data	O
across	O
multiple	O
programs	O
occur	O
in	O
a	O
piecemeal	O
fashion	O
without	O
any	O
programmer	O
intervention	O
.	O
</s>
<s>
However	O
,	O
implementing	O
pipes	B-Operating_System
in	O
memory	O
buffers	O
forced	O
data	O
to	O
be	O
copied	O
from	O
program	O
to	O
program	O
,	O
a	O
time-consuming	O
and	O
resource	O
intensive	O
operation	O
.	O
</s>
<s>
This	O
made	O
the	O
pipe	B-Operating_System
concept	O
unsuitable	O
for	O
tasks	O
where	O
quick	O
turnaround	O
or	O
low	O
latency	O
was	O
needed	O
,	O
such	O
as	O
in	O
most	O
device	B-Application
drivers	I-Application
.	O
</s>
<s>
The	O
operating	B-General_Concept
system	I-General_Concept
's	O
kernel	B-Operating_System
and	O
most	O
core	O
functionality	O
was	O
instead	O
written	O
in	O
a	O
single	O
large	O
program	O
.	O
</s>
<s>
When	O
new	O
functionality	O
,	O
such	O
as	O
computer	B-Architecture
networking	I-Architecture
,	O
was	O
added	O
to	O
the	O
operating	B-General_Concept
system	I-General_Concept
,	O
the	O
size	O
and	O
complexity	O
of	O
the	O
kernel	B-Operating_System
grew	O
,	O
too	O
.	O
</s>
<s>
Unix	B-Operating_System
pipes	I-Operating_System
offered	O
a	O
conceptual	O
system	O
that	O
could	O
be	O
used	O
to	O
build	O
arbitrarily	O
complex	O
solutions	O
out	O
of	O
small	O
interacting	O
programs	O
.	O
</s>
<s>
These	O
qualities	O
are	O
even	O
more	O
valuable	O
for	O
device	B-Application
drivers	I-Application
,	O
where	O
small	O
size	O
and	O
bug-free	O
performance	O
are	O
extremely	O
important	O
.	O
</s>
<s>
There	O
was	O
a	O
strong	O
desire	O
to	O
model	O
the	O
kernel	B-Operating_System
itself	O
on	O
the	O
same	O
basis	O
of	O
small	O
interacting	O
programs	O
.	O
</s>
<s>
One	O
of	O
the	O
first	O
systems	O
to	O
use	O
a	O
pipe-like	O
system	O
underpinning	O
the	O
operating	B-General_Concept
system	I-General_Concept
was	O
the	O
Aleph	B-Operating_System
kernel	I-Operating_System
developed	O
at	O
the	O
University	O
of	O
Rochester	O
.	O
</s>
<s>
This	O
introduced	O
the	O
concept	O
of	O
ports	O
,	O
which	O
were	O
essentially	O
a	O
shared	B-Operating_System
memory	I-Operating_System
implementation	O
.	O
</s>
<s>
In	O
Aleph	O
,	O
the	O
kernel	B-Operating_System
itself	O
was	O
reduced	O
to	O
providing	O
access	O
to	O
the	O
hardware	O
,	O
including	O
memory	O
and	O
the	O
ports	O
,	O
while	O
conventional	O
programs	O
using	O
the	O
ports	O
system	O
implemented	O
all	O
behavior	O
,	O
from	O
device	B-Application
drivers	I-Application
to	O
user	O
programs	O
.	O
</s>
<s>
This	O
concept	O
greatly	O
reduced	O
the	O
size	O
of	O
the	O
kernel	B-Operating_System
,	O
and	O
allowed	O
users	O
to	O
experiment	O
with	O
different	O
drivers	O
simply	O
by	O
loading	O
them	O
and	O
connecting	O
them	O
together	O
at	O
runtime	O
.	O
</s>
<s>
This	O
greatly	O
eased	O
the	O
problems	O
when	O
developing	O
new	O
operating	B-General_Concept
system	I-General_Concept
code	O
,	O
which	O
otherwise	O
generally	O
required	O
the	O
machine	O
to	O
be	O
restarted	O
.	O
</s>
<s>
The	O
general	O
concept	O
of	O
a	O
small	O
kernel	B-Operating_System
and	O
external	O
drivers	O
became	O
known	O
as	O
a	O
microkernel	B-Operating_System
.	O
</s>
<s>
Aleph	O
was	O
implemented	O
on	O
Data	B-Device
General	I-Device
Eclipse	I-Device
minicomputers	O
and	O
was	O
tightly	O
bound	O
to	O
them	O
.	O
</s>
<s>
Nevertheless	O
,	O
Aleph	O
proved	O
that	O
the	O
basic	O
system	O
was	O
sound	O
,	O
and	O
went	O
on	O
to	O
demonstrate	O
computer	B-Architecture
clustering	I-Architecture
by	O
copying	O
the	O
memory	O
over	O
an	O
early	O
Ethernet	O
interface	O
.	O
</s>
<s>
Around	O
this	O
time	O
a	O
new	O
generation	O
of	O
central	O
processors	O
(	O
CPUs	O
)	O
were	O
coming	O
to	O
market	O
,	O
offering	O
32-bit	O
address	O
spaces	O
and	O
(	O
initially	O
optional	O
)	O
support	O
for	O
a	O
memory	B-General_Concept
management	I-General_Concept
unit	I-General_Concept
(	O
MMU	O
)	O
.	O
</s>
<s>
The	O
MMU	O
handled	O
the	O
instructions	O
needed	O
to	O
implement	O
a	O
virtual	B-Architecture
memory	I-Architecture
system	O
by	O
keeping	O
track	O
of	O
which	O
pages	O
of	O
memory	O
were	O
in	O
use	O
by	O
various	O
programs	O
.	O
</s>
<s>
This	O
offered	O
a	O
new	O
solution	O
to	O
the	O
port	B-Protocol
concept	O
,	O
using	O
the	O
copy	B-Language
on	I-Language
write	I-Language
mechanism	O
provided	O
by	O
the	O
virtual	B-Architecture
memory	I-Architecture
system	O
.	O
</s>
<s>
This	O
system	O
would	O
implement	O
the	O
interprocess	B-Operating_System
communications	I-Operating_System
system	O
with	O
dramatically	O
higher	O
performance	O
.	O
</s>
<s>
This	O
concept	O
was	O
picked	O
up	O
at	O
Carnegie-Mellon	O
,	O
who	O
adapted	O
Aleph	O
for	O
the	O
PERQ	B-Device
workstation	I-Device
and	O
implemented	O
it	O
using	O
copy-on-write	B-Language
.	O
</s>
<s>
The	O
port	B-Protocol
was	O
successful	O
,	O
but	O
the	O
resulting	O
Accent	B-Operating_System
kernel	I-Operating_System
was	O
of	O
limited	O
practical	O
use	O
because	O
it	O
did	O
not	O
run	O
existing	O
software	O
.	O
</s>
<s>
Moreover	O
,	O
Accent	B-Operating_System
was	O
as	O
tightly	O
tied	O
to	O
PERQ	B-Device
as	O
Aleph	O
was	O
to	O
the	O
Eclipse	O
.	O
</s>
<s>
The	O
major	O
change	O
between	O
these	O
experimental	O
kernels	B-Operating_System
and	O
Mach	B-Operating_System
was	O
the	O
decision	O
to	O
make	O
a	O
version	O
of	O
the	O
existing	O
4.2BSD	O
kernel	B-Operating_System
re-implemented	O
on	O
the	O
Accent	B-Operating_System
message-passing	O
concepts	O
.	O
</s>
<s>
Such	O
a	O
kernel	B-Operating_System
would	O
be	O
binary	O
compatible	O
with	O
existing	O
BSD	B-Operating_System
software	O
,	O
making	O
the	O
system	O
immediately	O
useful	O
for	O
everyday	O
use	O
while	O
still	O
being	O
a	O
useful	O
experimental	O
platform	O
.	O
</s>
<s>
Additionally	O
,	O
the	O
new	O
kernel	B-Operating_System
would	O
be	O
designed	O
from	O
the	O
start	O
to	O
support	O
multiple	O
processor	O
architectures	O
,	O
even	O
allowing	O
heterogeneous	O
clusters	O
to	O
be	O
constructed	O
.	O
</s>
<s>
In	O
order	O
to	O
bring	O
the	O
system	O
up	O
as	O
quickly	O
as	O
possible	O
,	O
the	O
system	O
would	O
be	O
implemented	O
by	O
starting	O
with	O
the	O
existing	O
BSD	B-Operating_System
code	O
,	O
and	O
re-implementing	O
it	O
bit	O
by	O
bit	O
as	O
inter-process	O
communication-based	O
(	O
IPC-based	O
)	O
programs	O
.	O
</s>
<s>
Thus	O
Mach	B-Operating_System
would	O
begin	O
as	O
a	O
monolithic	O
system	O
similar	O
to	O
existing	O
UNIX	B-Application
systems	I-Application
,	O
and	O
evolve	O
more	O
toward	O
the	O
microkernel	B-Operating_System
concept	O
over	O
time	O
.	O
</s>
<s>
Mach	B-Operating_System
started	O
largely	O
being	O
an	O
effort	O
to	O
produce	O
a	O
cleanly	O
defined	O
,	O
UNIX-based	O
,	O
highly	O
portable	O
Accent	B-Operating_System
.	O
</s>
<s>
a	O
"	O
port	B-Protocol
"	O
is	O
a	O
protected	O
message	B-Operating_System
queue	I-Operating_System
for	O
communication	O
between	O
tasks	O
;	O
tasks	O
own	O
send	O
rights	O
(	O
permissions	O
)	O
and	O
receive	O
rights	O
to	O
each	O
port	B-Protocol
.	O
</s>
<s>
Mach	B-Operating_System
developed	O
on	O
Accent	B-Operating_System
's	O
IPC	O
concepts	O
,	O
but	O
made	O
the	O
system	O
much	O
more	O
UNIX-like	O
in	O
nature	O
,	O
even	O
able	O
to	O
run	O
UNIX	B-Application
programs	O
with	O
little	O
or	O
no	O
modification	O
.	O
</s>
<s>
To	O
do	O
this	O
,	O
Mach	B-Operating_System
introduced	O
the	O
concept	O
of	O
a	O
port	B-Protocol
,	O
representing	O
each	O
endpoint	O
of	O
a	O
two-way	O
IPC	O
.	O
</s>
<s>
Ports	O
had	O
security	O
and	O
rights	O
like	O
files	O
under	O
UNIX	B-Application
,	O
allowing	O
a	O
very	O
UNIX-like	O
model	O
of	O
protection	O
to	O
be	O
applied	O
to	O
them	O
.	O
</s>
<s>
Additionally	O
,	O
Mach	B-Operating_System
allowed	O
any	O
program	O
to	O
handle	O
privileges	O
that	O
would	O
normally	O
be	O
given	O
to	O
the	O
operating	B-General_Concept
system	I-General_Concept
only	O
,	O
in	O
order	O
to	O
allow	O
user	B-Operating_System
space	I-Operating_System
programs	O
to	O
handle	O
things	O
like	O
interacting	O
with	O
hardware	O
.	O
</s>
<s>
Under	O
Mach	B-Operating_System
,	O
and	O
like	O
UNIX	B-Application
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
again	O
becomes	O
primarily	O
a	O
collection	O
of	O
utilities	O
.	O
</s>
<s>
As	O
with	O
UNIX	B-Application
,	O
Mach	B-Operating_System
keeps	O
the	O
concept	O
of	O
a	O
driver	O
for	O
handling	O
the	O
hardware	O
.	O
</s>
<s>
Therefore	O
,	O
all	O
the	O
drivers	O
for	O
the	O
present	O
hardware	O
have	O
to	O
be	O
included	O
in	O
the	O
microkernel	B-Operating_System
.	O
</s>
<s>
Other	O
architectures	O
based	O
on	O
Hardware	B-Operating_System
Abstraction	I-Operating_System
Layer	I-Operating_System
or	O
exokernels	B-Operating_System
could	O
move	O
the	O
drivers	O
out	O
of	O
the	O
microkernel	B-Operating_System
.	O
</s>
<s>
The	O
main	O
difference	O
with	O
UNIX	B-Application
is	O
that	O
instead	O
of	O
utilities	O
handling	O
files	O
,	O
they	O
can	O
handle	O
any	O
"	O
task	B-General_Concept
"	O
.	O
</s>
<s>
More	O
operating	B-General_Concept
system	I-General_Concept
code	O
was	O
moved	O
out	O
of	O
the	O
kernel	B-Operating_System
and	O
into	O
user	B-Operating_System
space	I-Operating_System
,	O
resulting	O
in	O
a	O
much	O
smaller	O
kernel	B-Operating_System
and	O
the	O
rise	O
of	O
the	O
term	O
microkernel	B-Operating_System
.	O
</s>
<s>
Unlike	O
traditional	O
systems	O
,	O
under	O
Mach	B-Operating_System
a	O
process	O
,	O
or	O
"	O
task	B-General_Concept
"	O
,	O
can	O
consist	O
of	O
a	O
number	O
of	O
threads	B-Operating_System
.	O
</s>
<s>
While	O
this	O
is	O
common	O
in	O
modern	O
systems	O
,	O
Mach	B-Operating_System
was	O
the	O
first	O
system	O
to	O
define	O
tasks	O
and	O
threads	B-Operating_System
in	O
this	O
way	O
.	O
</s>
<s>
The	O
kernel	B-Operating_System
's	O
job	O
was	O
reduced	O
from	O
essentially	O
being	O
the	O
operating	B-General_Concept
system	I-General_Concept
to	O
maintaining	O
the	O
"	O
utilities	O
"	O
and	O
scheduling	O
their	O
access	O
to	O
hardware	O
.	O
</s>
<s>
The	O
existence	O
of	O
ports	O
and	O
the	O
use	O
of	O
IPC	O
is	O
perhaps	O
the	O
most	O
fundamental	O
difference	O
between	O
Mach	B-Operating_System
and	O
traditional	O
kernels	B-Operating_System
.	O
</s>
<s>
Under	O
UNIX	B-Application
,	O
calling	O
the	O
kernel	B-Operating_System
consists	O
of	O
an	O
operation	O
named	O
a	O
system	B-Operating_System
call	I-Operating_System
or	O
trap	B-Application
.	O
</s>
<s>
The	O
program	O
uses	O
a	O
library	B-Library
to	O
place	O
data	O
in	O
a	O
well	O
known	O
location	O
in	O
memory	O
and	O
then	O
causes	O
a	O
fault	B-Application
,	O
a	O
type	O
of	O
error	O
.	O
</s>
<s>
When	O
a	O
system	O
is	O
first	O
started	O
,	O
its	O
kernel	B-Operating_System
is	O
set	O
up	O
to	O
be	O
the	O
"	O
handler	O
"	O
of	O
all	O
faults	O
;	O
thus	O
,	O
when	O
a	O
program	O
causes	O
a	O
fault	B-Application
,	O
the	O
kernel	B-Operating_System
takes	O
over	O
,	O
examines	O
the	O
information	O
passed	O
to	O
it	O
,	O
and	O
then	O
carries	O
out	O
the	O
instructions	O
.	O
</s>
<s>
Under	O
Mach	B-Operating_System
,	O
the	O
IPC	O
system	O
was	O
used	O
for	O
this	O
role	O
instead	O
.	O
</s>
<s>
In	O
order	O
to	O
call	O
system	O
functionality	O
,	O
a	O
program	O
would	O
ask	O
the	O
kernel	B-Operating_System
for	O
access	O
to	O
a	O
port	B-Protocol
,	O
then	O
use	O
the	O
IPC	O
system	O
to	O
send	O
messages	O
to	O
that	O
port	B-Protocol
.	O
</s>
<s>
Although	O
sending	O
a	O
message	O
requires	O
a	O
system	B-Operating_System
call	I-Operating_System
,	O
just	O
as	O
a	O
request	O
for	O
system	O
functionality	O
on	O
other	O
systems	O
requires	O
a	O
system	B-Operating_System
call	I-Operating_System
,	O
under	O
Mach	B-Operating_System
sending	O
the	O
message	O
is	O
pretty	O
much	O
all	O
the	O
kernel	B-Operating_System
does	O
;	O
handling	O
the	O
actual	O
request	O
would	O
be	O
up	O
to	O
some	O
other	O
program	O
.	O
</s>
<s>
Thread	B-Operating_System
and	O
concurrency	O
support	O
benefited	O
by	O
message	O
passing	O
with	O
IPC	O
mechanisms	O
since	O
tasks	O
now	O
consisted	O
of	O
multiple	O
code	O
threads	B-Operating_System
which	O
Mach	B-Operating_System
could	O
freeze	O
and	O
unfreeze	O
during	O
message	O
handling	O
.	O
</s>
<s>
This	O
allowed	O
the	O
system	O
to	O
be	O
distributed	B-Architecture
over	O
multiple	O
processors	O
,	O
either	O
using	O
shared	B-Operating_System
memory	I-Operating_System
directly	O
as	O
in	O
most	O
Mach	B-Operating_System
messages	O
,	O
or	O
by	O
adding	O
code	O
to	O
copy	O
the	O
message	O
to	O
another	O
processor	O
if	O
needed	O
.	O
</s>
<s>
In	O
a	O
traditional	O
kernel	B-Operating_System
this	O
is	O
difficult	O
to	O
implement	O
;	O
the	O
system	O
has	O
to	O
be	O
sure	O
that	O
different	O
programs	O
do	O
not	O
try	O
to	O
write	O
to	O
the	O
same	O
memory	O
from	O
different	O
processors	O
.	O
</s>
<s>
However	O
,	O
Mach	B-Operating_System
ports	O
,	O
its	O
process	O
for	O
memory	O
access	O
,	O
make	O
this	O
well	O
defined	O
and	O
easy	O
to	O
implement	O
,	O
and	O
were	O
made	O
a	O
first-class	O
citizen	O
in	O
that	O
system	O
.	O
</s>
<s>
Like	O
its	O
predecessor	O
,	O
Accent	B-Operating_System
,	O
Mach	B-Operating_System
used	O
a	O
single	O
shared-memory	B-Operating_System
mechanism	O
for	O
physically	O
passing	O
the	O
message	O
from	O
one	O
program	O
to	O
another	O
.	O
</s>
<s>
Physically	O
copying	O
the	O
message	O
would	O
be	O
too	O
slow	O
,	O
so	O
Mach	B-Operating_System
relies	O
on	O
the	O
machine	O
's	O
memory	B-General_Concept
management	I-General_Concept
unit	I-General_Concept
(	O
MMU	O
)	O
to	O
quickly	O
map	O
the	O
data	O
from	O
one	O
program	O
to	O
another	O
.	O
</s>
<s>
Only	O
if	O
the	O
data	O
is	O
written	O
to	O
would	O
it	O
have	O
to	O
be	O
physically	O
copied	O
,	O
a	O
process	O
called	O
"	O
copy-on-write	B-Language
"	O
.	O
</s>
<s>
Messages	O
were	O
also	O
checked	O
for	O
validity	O
by	O
the	O
kernel	B-Operating_System
,	O
to	O
avoid	O
bad	O
data	O
crashing	O
one	O
of	O
the	O
many	O
programs	O
making	O
up	O
the	O
system	O
.	O
</s>
<s>
Ports	O
were	O
deliberately	O
modeled	O
on	O
the	O
UNIX	B-Application
file	O
system	O
concepts	O
.	O
</s>
<s>
With	O
a	O
monokernel	B-Operating_System
a	O
bug	O
in	O
new	O
code	O
would	O
take	O
down	O
the	O
entire	O
machine	O
and	O
require	O
a	O
reboot	O
,	O
whereas	O
under	O
Mach	B-Operating_System
this	O
would	O
require	O
only	O
that	O
the	O
program	O
be	O
restarted	O
.	O
</s>
<s>
Since	O
the	O
operating	B-General_Concept
system	I-General_Concept
was	O
simply	O
a	O
collection	O
of	O
programs	O
,	O
they	O
could	O
add	O
or	O
remove	O
parts	O
by	O
simply	O
running	O
or	O
killing	O
them	O
as	O
they	O
would	O
any	O
other	O
program	O
.	O
</s>
<s>
Finally	O
,	O
under	O
Mach	B-Operating_System
,	O
all	O
of	O
these	O
features	O
were	O
deliberately	O
designed	O
to	O
be	O
extremely	O
platform	O
neutral	O
.	O
</s>
<s>
To	O
quote	O
one	O
text	O
on	O
Mach	B-Operating_System
:	O
</s>
<s>
Unlike	O
UNIX	B-Application
,	O
which	O
was	O
developed	O
without	O
regard	O
for	O
multiprocessing	B-Operating_System
,	O
Mach	B-Operating_System
incorporates	O
multiprocessing	B-Operating_System
support	O
throughout	O
.	O
</s>
<s>
Its	O
multiprocessing	B-Operating_System
support	O
is	O
also	O
exceedingly	O
flexible	O
,	O
ranging	O
from	O
shared	B-Operating_System
memory	I-Operating_System
systems	O
to	O
systems	O
with	O
no	O
memory	O
shared	O
between	O
processors	O
.	O
</s>
<s>
Mach	B-Operating_System
is	O
designed	O
to	O
run	O
on	O
computer	O
systems	O
ranging	O
from	O
one	O
to	O
thousands	O
of	O
processors	O
.	O
</s>
<s>
In	O
addition	O
,	O
Mach	B-Operating_System
is	O
easily	O
ported	O
to	O
many	O
varied	O
computer	O
architectures	O
.	O
</s>
<s>
A	O
key	O
goal	O
of	O
Mach	B-Operating_System
is	O
to	O
be	O
a	O
distributed	B-Architecture
system	I-Architecture
capable	O
of	O
functioning	O
on	O
heterogeneous	O
hardware	O
.	O
</s>
<s>
Under	O
UNIX	B-Application
this	O
problem	O
was	O
solved	O
over	O
time	O
as	O
programmers	O
agreed	O
on	O
a	O
number	O
of	O
"	O
well	O
known	O
"	O
locations	O
in	O
the	O
file	O
system	O
to	O
serve	O
various	O
duties	O
.	O
</s>
<s>
While	O
this	O
same	O
approach	O
worked	O
for	O
Mach	B-Operating_System
's	O
ports	O
as	O
well	O
,	O
under	O
Mach	B-Operating_System
the	O
operating	B-General_Concept
system	I-General_Concept
was	O
assumed	O
to	O
be	O
much	O
more	O
fluid	O
,	O
with	O
ports	O
appearing	O
and	O
disappearing	O
all	O
the	O
time	O
.	O
</s>
<s>
Mach	B-Operating_System
was	O
initially	O
hosted	O
as	O
additional	O
code	O
written	O
directly	O
into	O
the	O
existing	O
4.2BSD	O
kernel	B-Operating_System
,	O
allowing	O
the	O
team	O
to	O
work	O
on	O
the	O
system	O
long	O
before	O
it	O
was	O
complete	O
.	O
</s>
<s>
Work	O
started	O
with	O
the	O
already	O
functional	O
Accent	B-Operating_System
IPC/port	O
system	O
,	O
and	O
moved	O
on	O
to	O
the	O
other	O
key	O
portions	O
of	O
the	O
OS	O
:	O
tasks	O
,	O
threads	B-Operating_System
,	O
and	O
virtual	B-Architecture
memory	I-Architecture
.	O
</s>
<s>
As	O
portions	O
were	O
completed	O
various	O
parts	O
of	O
the	O
BSD	B-Operating_System
system	O
were	O
re-written	O
to	O
call	O
into	O
Mach	B-Operating_System
,	O
and	O
a	O
change	O
to	O
4.3BSD	O
was	O
also	O
made	O
during	O
this	O
process	O
.	O
</s>
<s>
By	O
1986	O
the	O
system	O
was	O
complete	O
to	O
the	O
point	O
of	O
being	O
able	O
to	O
run	O
on	O
its	O
own	O
on	O
the	O
DEC	B-Device
VAX	I-Device
.	O
</s>
<s>
Although	O
doing	O
little	O
of	O
practical	O
value	O
,	O
the	O
goal	O
of	O
making	O
a	O
microkernel	B-Operating_System
was	O
realized	O
.	O
</s>
<s>
This	O
was	O
soon	O
followed	O
by	O
versions	O
on	O
the	O
IBM	B-Device
RT	I-Device
PC	I-Device
and	O
for	O
Sun	O
Microsystems	O
68030-based	O
workstations	O
,	O
proving	O
the	O
system	O
's	O
portability	O
.	O
</s>
<s>
By	O
1987	O
the	O
list	O
included	O
the	O
Encore	O
Multimax	O
and	O
Sequent	O
Balance	O
machines	O
,	O
testing	O
Mach	B-Operating_System
's	O
ability	O
to	O
run	O
on	O
multiprocessor	B-Operating_System
systems	O
.	O
</s>
<s>
Throughout	O
this	O
time	O
the	O
promise	O
of	O
a	O
"	O
true	O
"	O
microkernel	B-Operating_System
was	O
not	O
yet	O
being	O
delivered	O
.	O
</s>
<s>
These	O
early	O
Mach	B-Operating_System
versions	O
included	O
the	O
majority	O
of	O
4.3BSD	O
in	O
the	O
kernel	B-Operating_System
,	O
a	O
system	O
known	O
as	O
POE	O
Server	O
,	O
resulting	O
in	O
a	O
kernel	B-Operating_System
that	O
was	O
actually	O
larger	O
than	O
the	O
UNIX	B-Application
it	O
was	O
based	O
on	O
.	O
</s>
<s>
The	O
idea	O
,	O
however	O
,	O
was	O
to	O
move	O
the	O
UNIX	B-Application
layer	O
out	O
of	O
the	O
kernel	B-Operating_System
into	O
user-space	B-Operating_System
,	O
where	O
it	O
could	O
be	O
more	O
easily	O
worked	O
on	O
and	O
even	O
replaced	O
outright	O
.	O
</s>
<s>
Unwieldy	O
UNIX	B-Application
licensing	O
issues	O
were	O
also	O
plaguing	O
researchers	O
,	O
so	O
this	O
early	O
effort	O
to	O
provide	O
a	O
non-licensed	O
UNIX-like	O
system	O
environment	O
continued	O
to	O
find	O
use	O
,	O
well	O
into	O
the	O
further	O
development	O
of	O
Mach	B-Operating_System
.	O
</s>
<s>
The	O
resulting	O
Mach	B-Operating_System
3	O
was	O
released	O
in	O
1990	O
,	O
and	O
generated	O
intense	O
interest	O
.	O
</s>
<s>
A	O
small	O
team	O
had	O
built	O
Mach	B-Operating_System
and	O
ported	O
it	O
to	O
a	O
number	O
of	O
platforms	O
,	O
including	O
complex	O
multiprocessor	B-Operating_System
systems	O
which	O
were	O
causing	O
serious	O
problems	O
for	O
older-style	O
kernels	B-Operating_System
.	O
</s>
<s>
If	O
the	O
existing	O
system	O
could	O
be	O
ported	O
to	O
run	O
on	O
Mach	B-Operating_System
,	O
it	O
would	O
seem	O
it	O
would	O
then	O
be	O
easy	O
to	O
change	O
the	O
platform	O
underneath	O
.	O
</s>
<s>
Mach	B-Operating_System
received	O
a	O
major	O
boost	O
in	O
visibility	O
when	O
the	O
Open	B-Application
Software	I-Application
Foundation	I-Application
(	O
OSF	O
)	O
announced	O
they	O
would	O
be	O
hosting	O
future	O
versions	O
of	O
OSF/1	B-Operating_System
on	O
Mach	B-Operating_System
2.5	O
,	O
and	O
were	O
investigating	O
Mach	B-Operating_System
3	O
as	O
well	O
.	O
</s>
<s>
Mach	B-Operating_System
2.5	O
was	O
also	O
selected	O
for	O
the	O
NeXTSTEP	B-Application
system	O
and	O
a	O
number	O
of	O
commercial	O
multiprocessor	B-Operating_System
vendors	O
.	O
</s>
<s>
Mach	B-Operating_System
3	O
led	O
to	O
a	O
number	O
of	O
efforts	O
to	O
port	B-Protocol
other	O
operating	B-General_Concept
systems	I-General_Concept
parts	O
for	O
the	O
microkernel	B-Operating_System
,	O
including	O
IBM	O
's	O
Workplace	B-Operating_System
OS	I-Operating_System
and	O
several	O
efforts	O
by	O
Apple	O
to	O
build	O
a	O
cross-platform	O
version	O
of	O
the	O
classic	B-Application
Mac	I-Application
OS	I-Application
.	O
</s>
<s>
Mach	B-Operating_System
was	O
originally	O
intended	O
to	O
be	O
a	O
replacement	O
for	O
classical	O
monolithic	O
UNIX	B-Application
,	O
and	O
for	O
this	O
reason	O
contained	O
many	O
UNIX-like	O
ideas	O
.	O
</s>
<s>
For	O
instance	O
,	O
Mach	B-Operating_System
used	O
a	O
permissioning	O
and	O
security	O
system	O
patterned	O
on	O
UNIX	B-Application
's	O
file	O
system	O
.	O
</s>
<s>
Since	O
the	O
kernel	B-Operating_System
was	O
privileged	O
(	O
running	O
in	O
kernel-space	B-Operating_System
)	O
over	O
other	O
OS	O
servers	O
and	O
software	O
,	O
it	O
was	O
possible	O
for	O
malfunctioning	O
or	O
malicious	O
programs	O
to	O
send	O
it	O
commands	O
that	O
would	O
cause	O
damage	O
to	O
the	O
system	O
,	O
and	O
for	O
this	O
reason	O
the	O
kernel	B-Operating_System
checked	O
every	O
message	O
for	O
validity	O
.	O
</s>
<s>
Additionally	O
most	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
functionality	O
was	O
to	O
be	O
located	O
in	O
user-space	B-Operating_System
programs	O
,	O
so	O
this	O
meant	O
there	O
needed	O
to	O
be	O
some	O
way	O
for	O
the	O
kernel	B-Operating_System
to	O
grant	O
these	O
programs	O
additional	O
privileges	O
,	O
e.g.	O
</s>
<s>
Some	O
of	O
Mach	B-Operating_System
's	O
more	O
esoteric	O
features	O
were	O
also	O
based	O
on	O
this	O
same	O
IPC	O
mechanism	O
.	O
</s>
<s>
For	O
instance	O
,	O
Mach	B-Operating_System
was	O
able	O
to	O
support	O
multi-processor	B-Operating_System
machines	O
with	O
ease	O
.	O
</s>
<s>
In	O
a	O
traditional	O
kernel	B-Operating_System
extensive	O
work	O
needs	O
to	O
be	O
carried	O
out	O
to	O
make	O
it	O
reentrant	B-Operating_System
or	O
interruptible	O
,	O
as	O
programs	O
running	O
on	O
different	O
processors	O
could	O
call	O
into	O
the	O
kernel	B-Operating_System
at	O
the	O
same	O
time	O
.	O
</s>
<s>
Under	O
Mach	B-Operating_System
,	O
the	O
bits	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
are	O
isolated	O
in	O
servers	O
,	O
which	O
are	O
able	O
to	O
run	O
,	O
like	O
any	O
other	O
program	O
,	O
on	O
any	O
processor	O
.	O
</s>
<s>
Although	O
in	O
theory	O
the	O
Mach	B-Operating_System
kernel	I-Operating_System
would	O
also	O
have	O
to	O
be	O
reentrant	B-Operating_System
,	O
in	O
practice	O
this	O
is	O
not	O
an	O
issue	O
because	O
its	O
response	O
times	O
are	O
so	O
fast	O
it	O
can	O
simply	O
wait	O
and	O
serve	O
requests	O
in	O
turn	O
.	O
</s>
<s>
Mach	B-Operating_System
also	O
included	O
a	O
server	O
that	O
could	O
forward	O
messages	O
not	O
just	O
between	O
programs	O
,	O
but	O
even	O
over	O
the	O
network	O
,	O
which	O
was	O
an	O
area	O
of	O
intense	O
development	O
in	O
the	O
late	O
1980s	O
and	O
early	O
1990s	O
.	O
</s>
<s>
Benchmarks	O
on	O
1997	O
hardware	O
showed	O
that	O
Mach	O
3.0-based	O
UNIX	B-Application
single-server	O
implementations	O
were	O
about	O
50%	O
slower	O
than	O
native	O
UNIX	B-Application
.	O
</s>
<s>
The	O
rest	O
,	O
80%	O
of	O
the	O
time	O
being	O
spent	O
,	O
was	O
due	O
to	O
additional	O
tasks	O
the	O
kernel	B-Operating_System
was	O
running	O
on	O
the	O
messages	O
.	O
</s>
<s>
Primary	O
among	O
these	O
was	O
the	O
port	B-Protocol
rights	O
checking	O
and	O
message	O
validity	O
.	O
</s>
<s>
In	O
benchmarks	O
on	O
an	O
486DX-50	O
,	O
a	O
standard	O
UNIX	B-Application
system	I-Application
call	O
took	O
an	O
average	O
of	O
21μs	O
to	O
complete	O
,	O
while	O
the	O
equivalent	O
operation	O
with	O
Mach	B-Operating_System
IPC	O
averaged	O
114μs	O
.	O
</s>
<s>
Only	O
18μs	O
of	O
this	O
was	O
hardware	O
related	O
;	O
the	O
rest	O
was	O
the	O
Mach	B-Operating_System
kernel	I-Operating_System
running	O
various	O
routines	O
on	O
the	O
message	O
.	O
</s>
<s>
Given	O
a	O
syscall	B-Operating_System
that	O
does	O
nothing	O
,	O
a	O
full	O
round-trip	O
under	O
BSD	B-Operating_System
would	O
require	O
about	O
40μs	O
,	O
whereas	O
on	O
a	O
user-space	B-Operating_System
Mach	B-Operating_System
system	O
it	O
would	O
take	O
just	O
under	O
500μs	O
.	O
</s>
<s>
When	O
Mach	B-Operating_System
was	O
first	O
being	O
seriously	O
used	O
in	O
the	O
2.x	O
versions	O
,	O
performance	O
was	O
slower	O
than	O
traditional	O
monolithic	O
operating	B-General_Concept
systems	I-General_Concept
,	O
perhaps	O
as	O
much	O
as	O
25%	O
.	O
</s>
<s>
This	O
cost	O
was	O
not	O
considered	O
particularly	O
worrying	O
,	O
however	O
,	O
because	O
the	O
system	O
was	O
also	O
offering	O
multi-processor	B-Operating_System
support	O
and	O
easy	O
portability	O
.	O
</s>
<s>
When	O
Mach	B-Operating_System
3	O
attempted	O
to	O
move	O
most	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
into	O
user-space	B-Operating_System
,	O
the	O
overhead	O
became	O
higher	O
still	O
:	O
benchmarks	O
between	O
Mach	B-Operating_System
and	O
Ultrix	B-Operating_System
on	O
a	O
MIPS	B-Device
R3000	I-Device
showed	O
a	O
performance	O
hit	O
as	O
great	O
as	O
67%	O
on	O
some	O
workloads	O
.	O
</s>
<s>
For	O
example	O
,	O
getting	O
the	O
system	B-Operating_System
time	I-Operating_System
involves	O
an	O
IPC	O
call	O
to	O
the	O
user-space	B-Operating_System
server	O
maintaining	O
system	B-Operating_System
clock	I-Operating_System
.	O
</s>
<s>
The	O
caller	O
first	O
traps	B-Application
into	O
the	O
kernel	B-Operating_System
,	O
causing	O
a	O
context	O
switch	O
and	O
memory	O
mapping	O
.	O
</s>
<s>
The	O
kernel	B-Operating_System
then	O
checks	O
that	O
the	O
caller	O
has	O
required	O
access	O
rights	O
and	O
that	O
the	O
message	O
is	O
valid	O
.	O
</s>
<s>
If	O
it	O
is	O
,	O
there	O
is	O
another	O
context	O
switch	O
and	O
memory	O
mapping	O
to	O
complete	O
the	O
call	O
into	O
the	O
user-space	B-Operating_System
server	O
.	O
</s>
<s>
In	O
the	O
traditional	O
monolithic	O
operating	B-General_Concept
systems	I-General_Concept
the	O
authors	O
had	O
direct	O
experience	O
with	O
which	O
parts	O
of	O
the	O
kernel	B-Operating_System
called	O
which	O
others	O
,	O
allowing	O
them	O
to	O
fine-tune	O
their	O
pager	O
to	O
avoid	O
paging	O
out	O
code	O
that	O
was	O
about	O
to	O
be	O
used	O
.	O
</s>
<s>
Under	O
Mach	B-Operating_System
this	O
was	O
not	O
possible	O
because	O
the	O
kernel	B-Operating_System
had	O
no	O
real	O
idea	O
what	O
the	O
operating	B-General_Concept
system	I-General_Concept
consisted	O
of	O
.	O
</s>
<s>
Mach	B-Operating_System
3	O
attempted	O
to	O
address	O
this	O
problem	O
by	O
providing	O
a	O
simple	O
pager	O
,	O
relying	O
on	O
user-space	B-Operating_System
pagers	O
for	O
better	O
specialization	O
.	O
</s>
<s>
Other	O
performance	O
problems	O
were	O
related	O
to	O
Mach	B-Operating_System
's	O
support	O
for	O
multiprocessor	B-Operating_System
systems	O
.	O
</s>
<s>
This	O
meant	O
that	O
the	O
cost	O
of	O
accessing	O
memory	O
grew	O
tremendously	O
over	O
this	O
period	O
,	O
and	O
since	O
Mach	B-Operating_System
was	O
based	O
on	O
mapping	O
memory	O
around	O
between	O
programs	O
,	O
any	O
"	O
cache	O
miss	O
"	O
made	O
IPC	O
calls	O
slow	O
.	O
</s>
<s>
IPC	O
overhead	O
is	O
a	O
major	O
issue	O
for	O
Mach	B-Operating_System
3	O
systems	O
.	O
</s>
<s>
However	O
,	O
the	O
concept	O
of	O
a	O
multi-server	O
operating	B-General_Concept
system	I-General_Concept
is	O
still	O
promising	O
,	O
though	O
it	O
still	O
requires	O
some	O
research	O
.	O
</s>
<s>
Most	O
developers	O
instead	O
stuck	O
with	O
the	O
original	O
POE	O
concept	O
of	O
a	O
single	O
large	O
server	O
providing	O
the	O
operating	B-General_Concept
system	I-General_Concept
functionality	O
.	O
</s>
<s>
In	O
order	O
to	O
ease	O
development	O
,	O
they	O
allowed	O
the	O
operating	B-General_Concept
system	I-General_Concept
server	O
to	O
run	O
either	O
in	O
user-space	B-Operating_System
or	O
kernel-space	B-Operating_System
.	O
</s>
<s>
This	O
allowed	O
them	O
to	O
develop	O
in	O
user-space	B-Operating_System
and	O
have	O
all	O
the	O
advantages	O
of	O
the	O
original	O
Mach	B-Operating_System
idea	O
,	O
and	O
then	O
move	O
the	O
debugged	O
server	O
into	O
kernel-space	B-Operating_System
in	O
order	O
to	O
get	O
better	O
performance	O
.	O
</s>
<s>
Several	O
operating	B-General_Concept
systems	I-General_Concept
have	O
since	O
been	O
constructed	O
using	O
this	O
method	O
,	O
known	O
as	O
co-location	O
,	O
among	O
them	O
Lites	B-Operating_System
,	O
MkLinux	B-Application
,	O
OSF/1	B-Operating_System
,	O
and	O
NeXTSTEP/OPENSTEP/macOS	O
.	O
</s>
<s>
The	O
Chorus	B-Operating_System
microkernel	I-Operating_System
made	O
this	O
a	O
feature	O
of	O
the	O
basic	O
system	O
,	O
allowing	O
servers	O
to	O
be	O
raised	O
into	O
the	O
kernel	B-Operating_System
space	I-Operating_System
using	O
built-in	O
mechanisms	O
.	O
</s>
<s>
Mach	B-Operating_System
4	O
attempted	O
to	O
address	O
these	O
problems	O
,	O
this	O
time	O
with	O
a	O
more	O
radical	O
set	O
of	O
upgrades	O
.	O
</s>
<s>
In	O
particular	O
,	O
it	O
was	O
found	O
that	O
program	O
code	O
was	O
typically	O
not	O
writable	O
,	O
so	O
potential	O
hits	O
due	O
to	O
copy-on-write	B-Language
were	O
rare	O
.	O
</s>
<s>
Mach	B-Operating_System
4	O
also	O
introduced	O
built-in	O
co-location	O
primitives	O
,	O
making	O
it	O
a	O
part	O
of	O
the	O
kernel	B-Operating_System
itself	O
.	O
</s>
<s>
By	O
the	O
mid-1990s	O
,	O
work	O
on	O
microkernel	B-Operating_System
systems	O
was	O
largely	O
stagnant	O
,	O
although	O
the	O
market	O
had	B-Language
generally	I-Language
believed	I-Language
that	O
all	O
modern	O
operating	B-General_Concept
systems	I-General_Concept
would	O
be	O
microkernel	B-Operating_System
based	O
by	O
the	O
1990s	O
.	O
</s>
<s>
The	O
primary	O
remaining	O
widespread	O
uses	O
of	O
the	O
Mach	B-Operating_System
kernel	I-Operating_System
are	O
Apple	O
's	O
macOS	B-Application
and	O
its	O
sibling	O
iOS	B-Application
,	O
which	O
run	O
atop	O
a	O
heavily	O
modified	O
hybrid	B-Operating_System
Open	B-Application
Software	I-Application
Foundation	I-Application
Mach	B-Operating_System
Kernel	I-Operating_System
(	O
OSFMK	O
7.3	O
)	O
called	O
"	O
XNU	B-Operating_System
"	O
also	O
used	O
in	O
OSF/1	B-Operating_System
.	O
</s>
<s>
In	O
XNU	B-Operating_System
,	O
the	O
file	O
systems	O
,	O
networking	O
stacks	O
,	O
and	O
process	O
and	O
memory	O
management	O
functions	O
are	O
implemented	O
in	O
the	O
kernel	B-Operating_System
;	O
and	O
file	O
system	O
,	O
networking	O
,	O
and	O
some	O
process	O
and	O
memory	O
management	O
functions	O
are	O
invoked	O
from	O
user	B-Operating_System
mode	I-Operating_System
via	O
ordinary	O
system	B-Operating_System
calls	I-Operating_System
rather	O
than	O
message	O
passing	O
;	O
XNU	B-Operating_System
's	O
Mach	B-Operating_System
messages	O
are	O
used	O
for	O
communication	O
between	O
user-mode	O
processes	O
,	O
and	O
for	O
some	O
requests	O
from	O
user-mode	O
code	O
to	O
the	O
kernel	B-Operating_System
and	O
from	O
the	O
kernel	B-Operating_System
to	O
user-mode	O
servers	O
.	O
</s>
<s>
Recall	O
that	O
a	O
single-side	O
of	O
a	O
syscall	B-Operating_System
took	O
20μs	O
under	O
BSD	B-Operating_System
and	O
114μs	O
on	O
Mach	B-Operating_System
running	O
on	O
the	O
same	O
system	O
.	O
</s>
<s>
Of	O
the	O
114	O
,	O
11	O
were	O
due	O
to	O
the	O
context	O
switch	O
,	O
identical	O
to	O
BSD	B-Operating_System
.	O
</s>
<s>
An	O
additional	O
18	O
were	O
used	O
by	O
the	O
MMU	O
to	O
map	O
the	O
message	O
between	O
user-space	B-Operating_System
and	O
kernel	B-Operating_System
space	I-Operating_System
.	O
</s>
<s>
This	O
adds	O
up	O
to	O
only	O
29μs	O
,	O
longer	O
than	O
a	O
traditional	O
syscall	B-Operating_System
,	O
but	O
not	O
by	O
much	O
.	O
</s>
<s>
The	O
rest	O
,	O
the	O
majority	O
of	O
the	O
actual	O
problem	O
,	O
was	O
due	O
to	O
the	O
kernel	B-Operating_System
performing	O
tasks	O
such	O
as	O
checking	O
the	O
message	O
for	O
port	B-Protocol
access	O
rights	O
.	O
</s>
<s>
While	O
it	O
would	O
seem	O
this	O
is	O
an	O
important	O
security	O
concern	O
,	O
in	O
fact	O
,	O
it	O
only	O
makes	O
sense	O
in	O
a	O
UNIX-like	O
system	O
.	O
</s>
<s>
For	O
instance	O
,	O
a	O
single-user	O
operating	B-General_Concept
system	I-General_Concept
running	O
a	O
cell	O
phone	O
or	O
robot	B-Algorithm
might	O
not	O
need	O
any	O
of	O
these	O
features	O
,	O
and	O
this	O
is	O
exactly	O
the	O
sort	O
of	O
system	O
where	O
Mach	B-Operating_System
's	O
pick-and-choose	O
operating	B-General_Concept
system	I-General_Concept
would	O
be	O
most	O
valuable	O
.	O
</s>
<s>
Likewise	O
Mach	B-Operating_System
caused	O
problems	O
when	O
memory	O
had	O
been	O
moved	O
by	O
the	O
operating	B-General_Concept
system	I-General_Concept
,	O
another	O
task	B-General_Concept
that	O
only	O
really	O
makes	O
sense	O
if	O
the	O
system	O
has	O
more	O
than	O
one	O
address	O
space	O
.	O
</s>
<s>
DOS	B-Device
and	O
the	O
early	O
Mac	B-Application
OS	I-Application
have	O
a	O
single	B-Operating_System
large	I-Operating_System
address	I-Operating_System
space	I-Operating_System
shared	O
by	O
all	O
programs	O
,	O
so	O
under	O
these	O
systems	O
the	O
mapping	O
did	O
not	O
provide	O
any	O
benefits	O
.	O
</s>
<s>
These	O
realizations	O
led	O
to	O
a	O
series	O
of	O
second	O
generation	O
microkernels	B-Operating_System
,	O
which	O
further	O
reduced	O
the	O
complexity	O
of	O
the	O
system	O
and	O
placed	O
almost	O
all	O
functionality	O
in	O
the	O
user	B-Operating_System
space	I-Operating_System
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
L4	B-Operating_System
kernel	I-Operating_System
(	O
version	O
2	O
)	O
includes	O
only	O
seven	O
system	B-Operating_System
calls	I-Operating_System
and	O
uses	O
12k	O
of	O
memory	O
,	O
whereas	O
Mach	B-Operating_System
3	O
includes	O
about	O
140	O
functions	O
and	O
uses	O
about	O
330k	O
of	O
memory	O
.	O
</s>
<s>
IPC	O
calls	O
under	O
L4	B-Operating_System
on	O
a	O
486DX-50	O
take	O
only	O
5μs	O
,	O
faster	O
than	O
a	O
UNIX	B-Application
syscall	B-Operating_System
on	O
the	O
same	O
system	O
,	O
and	O
over	O
20	O
times	O
as	O
fast	O
as	O
Mach	B-Operating_System
.	O
</s>
<s>
Of	O
course	O
this	O
ignores	O
the	O
fact	O
that	O
L4	B-Operating_System
is	O
not	O
handling	O
permissioning	O
or	O
security	O
;	O
but	O
by	O
leaving	O
this	O
to	O
the	O
user-space	B-Operating_System
programs	O
,	O
they	O
can	O
select	O
as	O
much	O
or	O
as	O
little	O
overhead	O
as	O
they	O
require	O
.	O
</s>
<s>
The	O
potential	O
performance	O
gains	O
of	O
L4	B-Operating_System
are	O
tempered	O
by	O
the	O
fact	O
that	O
the	O
user-space	B-Operating_System
applications	O
will	O
often	O
have	O
to	O
provide	O
many	O
of	O
the	O
functions	O
formerly	O
supported	O
by	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
In	O
order	O
to	O
test	O
the	O
end-to-end	O
performance	O
,	O
MkLinux	B-Application
in	O
co-located	O
mode	O
was	O
compared	O
with	O
an	O
L4	B-Operating_System
port	B-Protocol
running	O
in	O
user-space	B-Operating_System
.	O
</s>
<s>
L4	B-Operating_System
added	O
about	O
5%	O
–	O
10%	O
overhead	O
,	O
compared	O
to	O
Mach	B-Operating_System
's	O
29%	O
.	O
</s>
<s>
The	O
following	O
is	O
a	O
list	O
of	O
operating	B-Operating_System
system	I-Operating_System
kernels	I-Operating_System
derived	O
from	O
Mach	B-Operating_System
and	O
operating	B-General_Concept
systems	I-General_Concept
with	O
kernels	B-Operating_System
derived	O
from	O
Mach	B-Operating_System
:	O
</s>
