<s>
Descriptors	B-Data_Structure
are	O
an	O
architectural	O
feature	O
of	O
Burroughs	B-Device
large	I-Device
systems	I-Device
,	O
including	O
the	O
current	O
(	O
as	O
of	O
2006	O
)	O
Unisys	O
Clearpath/MCP	O
systems	O
.	O
</s>
<s>
Apart	O
from	O
being	O
stack	B-General_Concept
-	O
and	O
tag-based	B-Architecture
,	O
a	O
notable	O
architectural	O
feature	O
of	O
these	O
systems	O
is	O
that	O
it	O
is	O
descriptor-based	O
.	O
</s>
<s>
Descriptors	B-Data_Structure
are	O
the	O
means	O
of	O
having	O
data	O
that	O
does	O
not	O
reside	O
on	O
the	O
stack	B-General_Concept
as	O
for	O
arrays	B-Data_Structure
and	O
objects	B-Language
.	O
</s>
<s>
Descriptors	B-Data_Structure
are	O
also	O
used	O
for	O
string	O
data	O
as	O
in	O
compilers	B-Language
and	O
commercial	O
applications	B-Application
.	O
</s>
<s>
Descriptors	B-Data_Structure
describe	O
storage	O
areas	O
,	O
I/O	O
requests	O
and	O
I/O	O
results	O
.	O
</s>
<s>
Program	O
and	O
data	B-Data_Structure
descriptors	I-Data_Structure
have	O
a	O
bit	O
called	O
the	O
"	O
presence	O
bit	O
"	O
or	O
"	O
p-bit	O
"	O
;	O
it	O
indicates	O
whether	O
the	O
object	O
referred	O
to	O
by	O
the	O
descriptor	O
is	O
currently	O
in	O
memory	O
or	O
in	O
secondary	O
storage	O
.	O
</s>
<s>
This	O
bit	O
is	O
used	O
to	O
implements	O
virtual	B-Architecture
memory	I-Architecture
.	O
</s>
<s>
Virtual	B-Architecture
memory	I-Architecture
was	O
originally	O
developed	O
for	O
the	O
Atlas	B-Device
project	O
at	O
the	O
University	O
of	O
Manchester	O
in	O
the	O
late	O
1950s	O
.	O
</s>
<s>
Keen	O
to	O
see	O
this	O
used	O
in	O
commercial	O
applications	B-Application
,	O
they	O
invited	O
engineers	O
from	O
several	O
computer	O
companies	O
to	O
a	O
seminar	O
,	O
including	O
those	O
from	O
Burroughs	O
and	O
IBM	O
.	O
</s>
<s>
The	O
B5000	O
,	O
released	O
in	O
1961	O
,	O
was	O
the	O
first	O
commercial	O
computer	O
to	O
provide	O
virtual	B-Architecture
memory	I-Architecture
.	O
</s>
<s>
In	O
the	O
mid-1960s	O
,	O
other	O
vendors	O
,	O
including	O
IBM	O
,	O
RCA	O
,	O
and	O
General	O
Electric	O
developed	O
machines	O
that	O
supported	O
virtual	B-Architecture
memory	I-Architecture
,	O
with	O
operating	O
systems	O
oriented	O
towards	O
time-sharing	O
;	O
IBM	O
did	O
n't	O
support	O
virtual	B-Architecture
memory	I-Architecture
in	O
machines	O
intended	O
for	O
general	O
data	O
processing	O
use	O
until	O
1972	O
.	O
</s>
<s>
If	O
the	O
p-bit	O
is	O
0	O
,	O
the	O
data	O
block	O
is	O
not	O
present	O
and	O
an	O
interrupt	B-Application
(	O
p-bit	O
interrupt	B-Application
)	O
is	O
raised	O
and	O
MCP	B-Application
code	O
entered	O
to	O
make	O
the	O
block	O
present	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
if	O
the	O
address	O
field	O
is	O
0	O
,	O
the	O
data	O
block	O
has	O
not	O
been	O
allocated	O
(	O
init	O
p-bit	O
)	O
and	O
the	O
MCP	B-Application
searches	O
for	O
a	O
free	O
block	O
the	O
size	O
of	O
which	O
is	O
given	O
in	O
the	O
length	O
field	O
.	O
</s>
<s>
The	O
last	O
p-bit	O
scenario	O
is	O
when	O
the	O
p-bit	O
is	O
0	O
,	O
indicating	O
that	O
the	O
data	O
is	O
not	O
in	O
memory	O
,	O
but	O
the	O
address	O
is	O
non-zero	O
,	O
indicating	O
that	O
the	O
data	O
has	O
been	O
allocated	O
and	O
in	O
this	O
case	O
the	O
address	O
represents	O
a	O
disk	O
address	O
in	O
the	O
virtual	B-Architecture
memory	I-Architecture
area	O
on	O
disk	O
.	O
</s>
<s>
In	O
this	O
case	O
a	O
p-bit	O
interrupt	B-Application
is	O
raised	O
and	O
it	O
is	O
noted	O
as	O
an	O
"	O
other	O
"	O
p-bit	O
.	O
</s>
<s>
Data	B-Data_Structure
descriptors	I-Data_Structure
contain	O
a	O
15-bit	O
storage	O
address	O
and	O
a	O
10-bit	O
size	O
,	O
as	O
do	O
most	O
I/O	O
descriptors	B-Data_Structure
.	O
</s>
<s>
Program	O
descriptors	B-Data_Structure
and	O
External	O
Result	O
descriptors	B-Data_Structure
have	O
a	O
15-bit	O
address	O
but	O
no	O
size	O
field	O
.	O
</s>
<s>
Program	O
descriptors	B-Data_Structure
are	O
used	O
to	O
define	O
program	O
segments	O
.	O
</s>
<s>
Either	O
an	O
Operand	O
Call	O
or	O
a	O
Descriptor	O
call	O
that	O
refers	O
to	O
a	O
Program	O
Descriptor	O
will	O
cause	O
a	O
subroutine	O
call	O
if	O
the	O
presence	O
bit	O
is	O
1	O
,	O
otherwise	O
it	O
will	O
cause	O
a	O
presence	O
interrupt	B-Application
.	O
</s>
<s>
Data	B-Data_Structure
Descriptors	I-Data_Structure
refer	O
either	O
to	O
a	O
block	O
of	O
data	O
present	O
in	O
memory	O
(	O
P	O
=	O
1	O
)	O
or	O
to	O
a	O
block	O
of	O
data	O
that	O
must	O
be	O
read	O
into	O
memory	O
(	O
P	O
=	O
0	O
)	O
,	O
Depending	O
on	O
the	O
value	O
of	O
the	O
Presence	O
bit	O
.	O
</s>
<s>
Either	O
an	O
Operand	O
Call	O
or	O
a	O
Descriptor	O
call	O
that	O
refers	O
to	O
a	O
Data	B-Data_Structure
Descriptor	I-Data_Structure
will	O
check	O
the	O
presence	O
bit	O
and	O
the	O
size	O
field	O
;	O
if	O
the	O
presence	O
bit	O
is	O
0	O
then	O
a	O
presence	O
interrupt	B-Application
will	O
occur	O
;	O
if	O
the	O
size	O
field	O
is	O
nonzero	O
then	O
the	O
second	O
word	O
on	O
the	O
stack	B-General_Concept
must	O
be	O
within	O
range	O
or	O
an	O
index	O
interrupt	B-Application
will	O
occur	O
.	O
</s>
<s>
Descriptors	B-Data_Structure
describe	O
data	O
blocks	O
.	O
</s>
<s>
In	O
ALGOL	B-Language
,	O
the	O
bounds	O
of	O
an	O
array	O
are	O
completely	O
dynamic	O
,	O
can	O
be	O
taken	O
from	O
values	O
computed	O
at	O
run	O
time	O
,	O
unlike	O
in	O
Pascal	B-Application
where	O
the	O
size	O
of	O
arrays	B-Data_Structure
is	O
fixed	O
at	O
compile	B-Language
time	O
.	O
</s>
<s>
This	O
is	O
the	O
main	O
weakness	O
of	O
Pascal	B-Application
as	O
defined	O
in	O
its	O
standard	O
,	O
but	O
which	O
has	O
been	O
removed	O
in	O
many	O
commercial	O
implementations	O
of	O
Pascal	B-Application
,	O
notably	O
the	O
Burroughs	O
implementations	O
(	O
both	O
the	O
University	O
of	O
Tasmania	O
version	O
by	O
Arthur	O
Sale	O
and	O
Roy	O
Freak	O
,	O
and	O
the	O
implementation	O
on	O
Burroughs	O
Slice	O
by	O
Matt	O
Miller	O
et	O
al	O
.	O
)	O
</s>
<s>
In	O
a	O
program	O
in	O
the	O
Burroughs	O
environment	O
,	O
an	O
array	O
is	O
not	O
allocated	O
when	O
it	O
is	O
declared	O
,	O
but	O
only	O
when	O
it	O
is	O
touched	O
for	O
the	O
first	O
time	O
–	O
thus	O
arrays	B-Data_Structure
can	O
be	O
declared	O
and	O
the	O
overhead	O
of	O
allocating	O
them	O
avoided	O
if	O
they	O
are	O
not	O
used	O
.	O
</s>
<s>
Also	O
,	O
low-level	O
memory	O
allocation	O
system	O
calls	O
such	O
as	O
the	O
malloc	B-Language
class	O
of	O
calls	O
of	O
C	B-Language
and	O
Unix	B-Application
are	O
not	O
needed	O
–	O
arrays	B-Data_Structure
are	O
automatically	O
allocated	O
as	O
used	O
.	O
</s>
<s>
This	O
saves	O
the	O
programmer	O
the	O
great	O
burden	O
of	O
filling	O
programs	O
with	O
the	O
error-prone	O
activity	O
of	O
memory	O
management	O
,	O
which	O
is	O
crucial	O
in	O
mainframe	B-Architecture
applications	B-Application
.	O
</s>
<s>
When	O
porting	O
programs	O
in	O
lower-level	O
languages	O
such	O
as	O
C	B-Language
,	O
the	O
C	B-Language
memory	O
structure	O
is	O
dealt	O
with	O
by	O
doing	O
its	O
own	O
memory	O
allocation	O
within	O
a	O
large	O
allocated	O
B5000	O
block	O
–	O
thus	O
the	O
security	O
of	O
the	O
rest	O
of	O
the	O
B5000	O
system	O
cannot	O
be	O
compromised	B-General_Concept
by	O
errant	O
C	B-Language
programs	I-Language
.	O
</s>
<s>
In	O
fact	O
,	O
many	O
buffer	B-General_Concept
overruns	I-General_Concept
in	O
apparently	O
otherwise	O
correctly	O
running	O
C	B-Language
programs	I-Language
have	O
been	O
caught	O
when	O
ported	O
to	O
the	O
B5000	O
architecture	O
.	O
</s>
<s>
C	B-Language
,	O
like	O
Pascal	B-Application
,	O
was	O
also	O
implemented	O
using	O
the	O
Slice	O
compiler	B-Language
system	O
(	O
which	O
,	O
like	O
LLVM	B-Application
,	O
uses	O
a	O
common	O
code	O
generator	O
and	O
optimizer	O
for	O
all	O
languages	O
)	O
.	O
</s>
<s>
The	O
C	B-Language
compiler	B-Language
,	O
run-time	O
system	O
,	O
POSIX	O
interfaces	O
,	O
as	O
well	O
as	O
a	O
port	O
of	O
many	O
Unix	B-Application
tools	O
was	O
done	O
by	O
Steve	O
Bartels	O
.	O
</s>
<s>
An	O
Eiffel	B-Language
compiler	B-Language
was	O
also	O
developed	O
using	O
Slice	O
.	O
</s>
<s>
For	O
object-oriented	B-Language
programs	O
which	O
require	O
more	O
dynamic	O
creation	O
of	O
objects	B-Language
than	O
the	O
B5000	O
architecture	O
,	O
objects	B-Language
are	O
best	O
allocated	O
within	O
a	O
single	O
B5000	O
block	O
.	O
</s>
<s>
Such	O
object	O
allocation	O
is	O
higher	O
level	O
than	O
C	B-Language
's	O
malloc	B-Language
and	O
is	O
best	O
implemented	O
with	O
a	O
modern	O
efficient	O
garbage	B-General_Concept
collector	I-General_Concept
.	O
</s>
<s>
The	O
address	O
field	O
in	O
the	O
B5000	O
is	O
only	O
15	O
bits	O
,	O
which	O
means	O
that	O
only	O
32K	O
words	O
(	O
192KB	O
)	O
of	O
memory	O
can	O
be	O
addressed	O
by	O
descriptors	B-Data_Structure
.	O
</s>
<s>
Both	O
solutions	O
can	O
even	O
be	O
combined	O
,	O
but	O
eventually	O
the	O
MCP	B-Application
memory	O
requirements	O
and	O
program	O
data	O
sharing	O
requirements	O
outgrew	O
the	O
maximum	O
size	O
of	O
the	O
address	O
spaces	O
itself	O
.	O
</s>
<s>
This	O
architecture	O
was	O
named	O
ASD	O
(	O
Advanced	O
Segment	O
Descriptors	B-Data_Structure
)	O
memory	O
.	O
</s>
<s>
Another	O
significant	O
advantage	O
was	O
realized	O
for	O
virtual	B-Architecture
memory	I-Architecture
.	O
</s>
<s>
In	O
the	O
B5000	O
design	O
,	O
if	O
a	O
data	O
block	O
were	O
rolled	O
out	O
,	O
all	O
descriptors	B-Data_Structure
referencing	O
that	O
block	O
needed	O
to	O
be	O
found	O
in	O
order	O
to	O
update	O
the	O
presence	O
bit	O
and	O
address	O
.	O
</s>
<s>
Also	O
the	O
MCP	B-Application
can	O
move	O
blocks	O
around	O
in	O
memory	O
for	O
compaction	O
and	O
only	O
needs	O
to	O
change	O
the	O
address	O
in	O
the	O
master	O
descriptor	O
.	O
</s>
<s>
A	O
difference	O
between	O
the	O
B5000	O
and	O
most	O
other	O
systems	O
is	O
that	O
other	O
systems	O
mainly	O
used	O
paged	O
virtual	B-Architecture
memory	I-Architecture
,	O
that	O
is	O
pages	O
are	O
swapped	O
out	O
in	O
fixed-sized	O
chunks	O
regardless	O
of	O
the	O
structure	O
of	O
the	O
information	O
in	O
them	O
.	O
</s>
<s>
B5000	O
virtual	B-Architecture
memory	I-Architecture
works	O
with	O
varying-size	O
segments	O
as	O
described	O
by	O
the	O
descriptors	B-Data_Structure
.	O
</s>
<s>
It	O
chooses	O
code	O
segments	O
first	O
,	O
since	O
these	O
cannot	O
change	O
and	O
can	O
be	O
reloaded	O
from	O
the	O
original	O
in	O
the	O
code	O
file	O
,	O
so	O
do	O
not	O
need	O
writing	O
out	O
,	O
and	O
then	O
data	O
segments	O
which	O
are	O
written	O
out	O
to	O
the	O
virtual	B-Architecture
memory	I-Architecture
file	O
.	O
</s>
<s>
P-bit	O
interrupts	B-Application
are	O
also	O
useful	O
to	O
measure	O
system	O
performance	O
.	O
</s>
<s>
Reloading	O
blocks	O
from	O
virtual	B-Architecture
memory	I-Architecture
on	O
disk	O
can	O
significantly	O
degrade	O
system	O
performance	O
and	O
is	O
not	O
the	O
fault	O
of	O
any	O
specific	O
task	O
.	O
</s>
<s>
Thus	O
the	O
Burroughs	B-Device
large	I-Device
systems	I-Device
architecture	O
helps	O
optimization	O
of	O
both	O
individual	O
tasks	O
and	O
the	O
system	O
as	O
a	O
whole	O
.	O
</s>
<s>
The	O
last	O
and	O
maybe	O
most	O
important	O
point	O
to	O
note	O
about	O
descriptors	B-Data_Structure
is	O
how	O
they	O
affect	O
the	O
complementary	O
notions	O
of	O
system	O
security	O
and	O
program	O
correctness	O
.	O
</s>
<s>
One	O
of	O
the	O
best	O
tools	O
a	O
hacker	O
has	O
to	O
compromise	O
operating	O
systems	O
of	O
today	O
is	O
the	O
buffer	B-General_Concept
overflow	I-General_Concept
.	O
</s>
<s>
C	B-Language
,	O
in	O
particular	O
,	O
uses	O
the	O
most	O
primitive	O
and	O
error-prone	O
way	O
to	O
mark	O
the	O
end	O
of	O
strings	O
,	O
using	O
a	O
null	O
byte	O
as	O
an	O
end-of-string	O
sentinel	O
in	O
the	O
data	O
stream	O
itself	O
.	O
</s>
<s>
Pointers	O
are	O
implemented	O
on	O
the	O
B5000	O
by	O
indexed	O
descriptors	B-Data_Structure
.	O
</s>
