<s>
Vanguard	B-Operating_System
is	O
a	O
discontinued	O
experimental	O
microkernel	B-Operating_System
developed	O
at	O
Apple	O
Computer	O
,	O
in	O
the	O
research-oriented	O
Apple	O
Advanced	O
Technology	O
Group	O
(	O
ATG	O
)	O
in	O
the	O
early	O
1990s	O
.	O
</s>
<s>
Based	O
on	O
the	O
V-System	B-Operating_System
,	O
Vanguard	B-Operating_System
introduced	O
standardized	O
object	O
identifiers	O
and	O
a	O
unique	O
message	O
chaining	O
system	O
for	O
improved	O
performance	O
.	O
</s>
<s>
Vanguard	B-Operating_System
was	O
not	O
used	O
in	O
any	O
of	O
Apple	O
's	O
commercial	O
products	O
.	O
</s>
<s>
Vanguard	B-Operating_System
was	O
generally	O
very	O
similar	O
to	O
the	O
V-System	B-Operating_System
,	O
but	O
added	O
support	O
for	O
true	O
object-oriented	B-Language
programming	I-Language
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
This	O
meant	O
that	O
kernel	B-Operating_System
and	O
server	B-Application
interfaces	B-Application
were	O
exported	O
as	O
objects	O
,	O
which	O
could	O
be	O
inherited	B-Language
and	O
extended	O
in	O
new	O
code	O
.	O
</s>
<s>
For	O
example	O
,	O
Vanguard	B-Operating_System
had	O
an	O
input/output	B-General_Concept
(	O
I/O	B-General_Concept
)	O
class	O
which	O
was	O
supported	O
by	O
several	O
different	O
servers	O
,	O
for	O
example	O
,	O
networking	O
and	O
file	B-Application
servers	I-Application
,	O
which	O
new	O
applications	O
could	O
interact	O
with	O
by	O
importing	O
the	O
I/O	B-General_Concept
interface	I-General_Concept
and	O
calling	O
methods	O
.	O
</s>
<s>
A	O
key	O
concept	O
to	O
almost	O
all	O
microkernels	B-Operating_System
is	O
to	O
break	O
down	O
one	O
larger	O
kernel	B-Operating_System
into	O
a	O
set	O
of	O
communicating	O
servers	O
.	O
</s>
<s>
For	O
example	O
,	O
one	O
server	B-Application
can	O
be	O
given	O
control	O
of	O
the	O
networking	O
hardware	O
,	O
while	O
another	O
has	O
the	O
task	O
of	O
managing	O
the	O
hard	B-Device
disk	I-Device
drives	I-Device
.	O
</s>
<s>
Another	O
server	B-Application
would	O
handle	O
the	O
file	B-Application
system	I-Application
,	O
calling	O
both	O
of	O
these	O
lower-level	O
servers	O
.	O
</s>
<s>
User	O
applications	O
ask	O
for	O
services	O
by	O
sending	O
messages	O
to	O
these	O
servers	O
,	O
using	O
some	O
form	O
of	O
inter-process	B-Operating_System
communications	I-Operating_System
(	O
IPC	O
)	O
,	O
in	O
contrast	O
to	O
asking	O
the	O
kernel	B-Operating_System
to	O
do	O
this	O
work	O
via	O
a	O
system	B-Operating_System
call	I-Operating_System
(	O
syscall	B-Operating_System
)	O
or	O
trap	B-Application
.	O
</s>
<s>
Under	O
V	B-Operating_System
the	O
IPC	O
system	O
appears	O
to	O
be	O
conceptually	O
modeled	O
on	O
remote	B-Operating_System
procedure	I-Operating_System
calls	I-Operating_System
(	O
RPC	O
)	O
from	O
the	O
client	B-Protocol
application	I-Protocol
's	O
perspective	O
.	O
</s>
<s>
The	O
client	B-Protocol
imported	O
an	O
interface	B-Application
definition	O
file	O
containing	O
information	O
about	O
the	O
calls	O
supported	O
by	O
the	O
kernel	B-Operating_System
,	O
or	O
other	O
applications	O
,	O
and	O
then	O
used	O
this	O
definition	O
to	O
package	O
up	O
requests	O
.	O
</s>
<s>
When	O
called	O
,	O
the	O
kernel	B-Operating_System
would	O
immediately	O
take	O
over	O
,	O
examine	O
the	O
results	O
,	O
and	O
pass	O
the	O
information	O
off	O
to	O
the	O
right	O
handler	O
,	O
potentially	O
within	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
Any	O
results	O
were	O
then	O
handed	O
back	O
through	O
the	O
kernel	B-Operating_System
to	O
the	O
client	B-Protocol
.	O
</s>
<s>
In	O
general	O
terms	O
,	O
the	O
operation	O
of	O
the	O
system	O
as	O
it	O
appears	O
to	O
the	O
client	B-Protocol
application	I-Protocol
is	O
very	O
similar	O
to	O
working	O
with	O
a	O
normal	O
monolithic	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
Although	O
the	O
results	O
passed	O
back	O
might	O
come	O
from	O
a	O
third	O
party	O
handler	O
,	O
this	O
was	O
essentially	O
invisible	O
to	O
the	O
client	B-Protocol
.	O
</s>
<s>
Servers	O
handling	O
these	O
requests	O
operated	O
in	O
a	O
similar	O
fashion	O
to	O
the	O
clients	O
,	O
opening	O
connections	O
with	O
the	O
kernel	B-Operating_System
to	O
pass	O
data	O
.	O
</s>
<s>
In	O
contrast	O
,	O
most	O
microkernel	B-Operating_System
systems	O
are	O
based	O
on	O
a	O
model	O
of	O
asynchronous	O
communications	O
,	O
instead	O
of	O
synchronous	O
procedure	O
calls	O
.	O
</s>
<s>
The	O
canonical	O
microkernel	B-Operating_System
system	O
,	O
Mach	B-Operating_System
,	O
modeled	O
messages	O
as	O
I/O	B-General_Concept
,	O
which	O
has	O
several	O
important	O
side-effects	O
.	O
</s>
<s>
Primary	O
among	O
these	O
is	O
that	O
the	O
normal	O
task	O
schedulers	O
under	O
Unix-like	B-Operating_System
systems	I-Operating_System
will	O
normally	O
block	O
a	O
client	B-Protocol
that	O
is	O
waiting	O
on	O
an	O
I/O	B-General_Concept
request	O
,	O
so	O
in	O
this	O
way	O
the	O
actions	O
of	O
pausing	O
and	O
restarting	O
applications	O
waiting	O
on	O
messages	O
was	O
already	O
built	O
into	O
the	O
underlying	O
system	O
.	O
</s>
<s>
Under	O
the	O
V-System	B-Operating_System
model	O
,	O
the	O
message	B-Architecture
passing	I-Architecture
overhead	O
is	O
reduced	O
because	O
the	O
process	O
scheduler	O
does	O
not	O
need	O
to	O
be	O
consulted	O
,	O
there	O
is	O
no	O
question	O
as	O
to	O
what	O
should	O
next	O
be	O
run	O
,	O
which	O
is	O
the	O
server	B-Application
being	O
called	O
.	O
</s>
<s>
The	O
downside	O
to	O
the	O
V	B-Operating_System
approach	O
is	O
that	O
it	O
requires	O
more	O
work	O
for	O
the	O
server	B-Application
if	O
the	O
response	O
may	O
take	O
some	O
time	O
to	O
process	O
.	O
</s>
<s>
One	O
major	O
addition	O
to	O
the	O
IPC	O
system	O
under	O
Vanguard	B-Operating_System
,	O
in	O
contrast	O
to	O
V	B-Operating_System
,	O
was	O
the	O
concept	O
of	O
message	O
chains	O
,	O
allowing	O
one	O
message	O
to	O
be	O
sent	O
between	O
several	O
interacting	O
servers	O
in	O
one	O
round-trip	O
.	O
</s>
<s>
Consider	O
the	O
case	O
where	O
a	O
client	B-Protocol
application	I-Protocol
must	O
read	O
a	O
file	O
.	O
</s>
<s>
Normally	O
this	O
would	O
require	O
one	O
message	O
to	O
the	O
kernel	B-Operating_System
to	O
find	O
the	O
file	B-Application
server	I-Application
,	O
then	O
three	O
more	O
messages	O
to	O
the	O
file	B-Application
server	I-Application
:	O
one	O
to	O
resolve	O
the	O
file	O
name	O
into	O
an	O
object	O
id	O
,	O
another	O
to	O
open	O
that	O
id	O
,	O
then	O
finally	O
another	O
to	O
read	O
the	O
file	O
.	O
</s>
<s>
Using	O
Vanguard	B-Operating_System
's	O
chaining	O
,	O
one	O
message	O
could	O
be	O
constructed	O
by	O
the	O
client	B-Protocol
that	O
contained	O
all	O
of	O
these	O
requests	O
.	O
</s>
<s>
The	O
message	O
would	O
be	O
sent	O
to	O
the	O
kernel	B-Operating_System
,	O
and	O
then	O
passed	O
off	O
to	O
the	O
file	B-Application
server	I-Application
which	O
would	O
handle	O
all	O
three	O
requests	O
before	O
finally	O
returning	O
data	O
.	O
</s>
<s>
Much	O
of	O
the	O
performance	O
problem	O
normally	O
associated	O
with	O
microkernel	B-Operating_System
systems	O
are	O
due	O
to	O
the	O
context	B-Operating_System
switches	I-Operating_System
as	O
messages	O
are	O
passed	O
back	O
and	O
forth	O
between	O
applications	O
.	O
</s>
<s>
In	O
the	O
example	O
above	O
running	O
on	O
a	O
V	B-Operating_System
system	O
,	O
there	O
would	O
have	O
to	O
be	O
a	O
total	O
of	O
eight	O
context	B-Operating_System
switches	I-Operating_System
;	O
two	O
for	O
each	O
request	O
as	O
the	O
client	B-Protocol
switched	O
to	O
and	O
from	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
In	O
Vanguard	B-Operating_System
using	O
a	O
chain	O
would	O
reduce	O
this	O
to	O
only	O
three	O
switches	O
;	O
one	O
out	O
of	O
the	O
client	B-Protocol
into	O
the	O
kernel	B-Operating_System
,	O
another	O
from	O
the	O
kernel	B-Operating_System
to	O
the	O
file	B-Application
server	I-Application
,	O
and	O
finally	O
from	O
the	O
server	B-Application
back	O
to	O
the	O
client	B-Protocol
.	O
</s>
<s>
In	O
some	O
cases	O
the	O
overhead	O
of	O
a	O
context	B-Operating_System
switch	I-Operating_System
is	O
greater	O
than	O
the	O
time	O
it	O
takes	O
to	O
actually	O
run	O
the	O
request	O
,	O
so	O
Vanguard	B-Operating_System
's	O
chaining	O
mechanism	O
could	O
result	O
in	O
real-world	O
performance	O
improvements	O
.	O
</s>
<s>
V	B-Operating_System
had	O
also	O
introduced	O
a	O
simple	O
distributed	O
name	O
service	O
.	O
</s>
<s>
The	O
service	O
stored	O
well	O
known	O
character	O
names	O
representing	O
various	O
objects	O
in	O
a	O
distributed	O
V	B-Operating_System
system	O
,	O
for	O
example	O
,	O
2nd	O
floor	O
laser	O
printer	O
.	O
</s>
<s>
Applications	O
could	O
ask	O
the	O
name	B-Protocol
server	I-Protocol
for	O
objects	O
by	O
name	O
,	O
and	O
would	O
be	O
handed	O
back	O
an	O
identifier	O
that	O
would	O
allow	O
them	O
to	O
interact	O
with	O
that	O
object	O
.	O
</s>
<s>
The	O
name	O
service	O
was	O
not	O
a	O
separate	O
server	B-Application
,	O
and	O
was	O
managed	O
by	O
code	O
in	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
Contrast	O
this	O
with	O
the	O
full	O
name	B-Protocol
server	I-Protocol
under	O
the	O
operating	B-General_Concept
system	I-General_Concept
Spring	B-Application
,	O
which	O
not	O
only	O
knew	O
about	O
objects	O
inside	O
the	O
system	O
,	O
but	O
was	O
also	O
used	O
by	O
other	O
servers	O
on	O
the	O
system	O
to	O
translate	O
their	O
private	O
names	O
,	O
for	O
example	O
,	O
file	O
names	O
and	O
IP	O
addresses	O
.	O
</s>
<s>
Under	O
the	O
V-System	B-Operating_System
,	O
objects	O
in	O
servers	O
were	O
referred	O
to	O
via	O
an	O
ad	O
hoc	O
private	B-Application
key	I-Application
of	O
some	O
sort	O
,	O
say	O
a	O
32-bit	O
integer	O
.	O
</s>
<s>
For	O
example	O
,	O
an	O
application	O
might	O
ask	O
the	O
kernel	B-Operating_System
for	O
the	O
file	B-Application
system	I-Application
and	O
be	O
handed	O
a	O
32-bit	O
key	O
representing	O
a	O
program	O
id	O
,	O
and	O
then	O
use	O
that	O
key	O
to	O
send	O
a	O
message	O
to	O
the	O
file	B-Application
system	I-Application
asking	O
it	O
to	O
open	O
the	O
file	O
my	O
addresses	O
,	O
which	O
would	O
result	O
in	O
a	O
64-bit	B-Device
key	O
being	O
handed	O
back	O
.	O
</s>
<s>
This	O
sort	O
of	O
name	O
resolving	O
was	O
so	O
common	O
under	O
V	B-Operating_System
that	O
the	O
authors	O
decided	O
to	O
make	O
these	O
keys	O
first-class	O
citizens	O
under	O
Vanguard	B-Operating_System
.	O
</s>
<s>
Instead	O
of	O
using	O
whatever	O
object	O
ID	O
's	O
the	O
servers	O
just	O
happened	O
to	O
use	O
,	O
under	O
Vanguard	B-Operating_System
all	O
servers	O
were	O
expected	O
to	O
understand	O
and	O
return	O
a	O
globally	O
unique	O
128-bit	O
key	O
,	O
the	O
first	O
64-bits	B-Device
containing	O
a	O
server	B-Application
identifier	O
,	O
the	O
second	O
identifying	O
an	O
object	O
in	O
that	O
server	B-Application
.	O
</s>
<s>
The	O
server	B-Application
id	O
was	O
maintained	O
in	O
the	O
kernel	B-Operating_System
,	O
allowing	O
it	O
to	O
hand	O
off	O
the	O
message	O
over	O
the	O
network	O
if	O
the	O
server	B-Application
being	O
referenced	O
was	O
on	O
a	O
remote	O
machine	O
.	O
</s>
<s>
To	O
the	O
client	B-Protocol
this	O
was	O
invisible	O
.	O
</s>
