<s>
Doors	O
is	O
an	O
inter-process	B-Operating_System
communication	I-Operating_System
facility	O
for	O
Unix	B-Application
computer	O
systems	O
.	O
</s>
<s>
Doors	O
were	O
developed	O
by	O
Sun	O
Microsystems	O
as	O
a	O
core	O
part	O
of	O
the	O
Spring	B-Application
operating	I-Application
system	I-Application
,	O
then	O
added	O
to	O
Solaris	B-Application
in	O
version	O
2.5	O
as	O
an	O
undocumented	O
internal	O
interface	O
.	O
</s>
<s>
They	O
became	O
a	O
documented	O
feature	O
in	O
Solaris	B-Application
2.6	O
.	O
</s>
<s>
Recent	O
versions	O
of	O
Solaris	B-Application
use	O
Doors	O
in	O
many	O
places	O
,	O
including	O
nscd	O
(	O
the	O
name	B-Protocol
service	I-Protocol
cache	O
daemon	O
)	O
and	O
syslog	B-Protocol
.	O
</s>
<s>
A	O
Linux	B-Application
port	O
of	O
Doors	O
was	O
released	O
in	O
2003	O
,	O
but	O
is	O
only	O
available	O
for	O
version	O
2.4.18	O
.	O
</s>
<s>
The	O
Doors	O
subsystem	O
is	O
implemented	O
as	O
a	O
user-space	B-Operating_System
library	O
with	O
some	O
kernel	B-Operating_System
support	O
,	O
and	O
relies	O
heavily	O
on	O
threads	B-Operating_System
.	O
</s>
<s>
It	O
is	O
designed	O
for	O
low	O
overhead	O
,	O
and	O
the	O
Solaris	B-Application
implementation	O
uses	O
some	O
assembly	O
code	O
for	O
maximum	O
efficiency	O
.	O
</s>
<s>
Doors	O
are	O
created	O
by	O
server	O
processes	O
(	O
which	O
must	O
use	O
threads	B-Operating_System
)	O
and	O
called	O
by	O
client	O
processes	O
.	O
</s>
<s>
Unlike	O
most	O
remote	B-Operating_System
procedure	I-Operating_System
call	I-Operating_System
systems	O
,	O
each	O
door	O
has	O
only	O
one	O
server	O
procedure	O
.	O
</s>
<s>
The	O
ls	B-Application
-l	O
command	O
will	O
then	O
show	O
the	O
file	O
with	O
a	O
'	O
type	O
 '	O
of	O
"	O
D	O
"	O
(	O
not	O
to	O
be	O
confused	O
with	O
"	O
d	O
"	O
for	O
a	O
directory	O
)	O
—	O
for	O
example	O
:	O
</s>
<s>
Clients	O
use	O
door_call( )	O
to	O
invoke	O
the	O
door	O
's	O
server	O
procedure	O
,	O
passing	O
a	O
contiguous	O
region	O
of	O
memory	O
and	O
a	O
list	O
of	O
file	B-Application
descriptors	I-Application
as	O
arguments	O
,	O
and	O
getting	O
back	O
another	O
contiguous	O
region	O
and	O
list	O
of	O
file	B-Application
descriptors	I-Application
.	O
</s>
<s>
Usually	O
,	O
two	O
C	B-Language
structs	O
will	O
be	O
defined	O
,	O
one	O
for	O
the	O
input	O
data	O
and	O
one	O
for	O
the	O
output	O
data	O
.	O
</s>
<s>
(	O
Alternatively	O
,	O
tagged	B-Language
unions	I-Language
may	O
be	O
used	O
,	O
allowing	O
a	O
door	O
procedure	O
to	O
provide	O
multiple	O
actions	O
in	O
much	O
the	O
same	O
way	O
as	O
the	O
ioctl	B-Operating_System
system	O
call	O
.	O
)	O
</s>
<s>
Every	O
file	B-Application
descriptor	I-Application
is	O
accompanied	O
by	O
a	O
flags	O
word	O
.	O
</s>
<s>
The	O
DOOR_RELEASE	O
flag	O
requests	O
that	O
a	O
file	B-Application
descriptor	I-Application
be	O
closed	O
in	O
the	O
sending	O
process	O
after	O
being	O
duplicated	O
in	O
the	O
receiving	O
process	O
.	O
</s>
<s>
If	O
a	O
file	B-Application
descriptor	I-Application
that	O
refers	O
to	O
a	O
door	O
is	O
sent	O
,	O
the	O
system	O
records	O
the	O
properties	O
of	O
that	O
door	O
in	O
the	O
flags	O
word	O
.	O
</s>
<s>
Such	O
a	O
door	O
would	O
typically	O
take	O
a	O
tagged	B-Language
union	I-Language
as	O
input	O
data	O
with	O
each	O
tag	O
value	O
denoting	O
a	O
different	O
method	B-Language
.	O
</s>
<s>
The	O
Doors	O
library	O
normally	O
creates	O
and	O
manages	O
a	O
pool	O
of	O
threads	B-Operating_System
in	O
the	O
server	O
process	O
to	O
handle	O
calls	O
,	O
but	O
it	O
is	O
possible	O
to	O
override	O
this	O
behavior	O
.	O
</s>
<s>
The	O
Doors	O
system	O
does	O
not	O
provide	O
any	O
form	O
of	O
synchronization	O
,	O
but	O
servers	O
can	O
use	O
the	O
normal	O
thread-level	O
synchronization	O
primitives	O
.	O
</s>
<s>
Doors	O
can	O
be	O
used	O
to	O
synchronize	O
access	O
to	O
shared	B-Operating_System
memory	I-Operating_System
segments	O
,	O
allowing	O
single-copy	O
data	O
transfer	O
.	O
</s>
