<s>
In	O
a	O
general	O
computing	O
sense	O
,	O
overlaying	O
means	O
"	O
the	O
process	O
of	O
transferring	O
a	O
block	B-General_Concept
of	O
program	O
code	O
or	O
other	O
data	O
into	O
main	O
memory	O
,	O
replacing	O
what	O
is	O
already	O
stored	O
"	O
.	O
</s>
<s>
Overlaying	O
is	O
a	O
programming	B-General_Concept
method	O
that	O
allows	O
programs	O
to	O
be	O
larger	O
than	O
the	O
computer	O
's	O
main	O
memory	O
.	O
</s>
<s>
An	O
embedded	B-Architecture
system	I-Architecture
would	O
normally	O
use	O
overlays	B-General_Concept
because	O
of	O
the	O
limitation	O
of	O
physical	O
memory	O
,	O
which	O
is	O
internal	O
memory	O
for	O
a	O
system-on-chip	B-Architecture
,	O
and	O
the	O
lack	O
of	O
virtual	B-Architecture
memory	I-Architecture
facilities	O
.	O
</s>
<s>
Constructing	O
an	O
overlay	B-General_Concept
program	I-General_Concept
involves	O
manually	O
dividing	O
a	O
program	O
into	O
self-contained	O
object	B-Language
code	I-Language
blocks	O
called	O
overlays	B-General_Concept
or	O
links	O
,	O
generally	O
laid	O
out	O
in	O
a	O
tree	B-Data_Structure
structure	I-Data_Structure
.	O
</s>
<s>
Sibling	O
segments	O
,	O
those	O
at	O
the	O
same	O
depth	O
level	O
,	O
share	O
the	O
same	O
memory	O
,	O
called	O
overlay	B-General_Concept
region	I-General_Concept
or	O
destination	O
region	O
.	O
</s>
<s>
An	O
overlay	B-General_Concept
manager	I-General_Concept
,	O
either	O
part	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
or	O
part	O
of	O
the	O
overlay	B-General_Concept
program	I-General_Concept
,	O
loads	O
the	O
required	O
overlay	B-General_Concept
from	O
external	O
memory	O
into	O
its	O
destination	O
region	O
when	O
it	O
is	O
needed	O
;	O
this	O
may	O
be	O
automatic	O
or	O
via	O
explicit	O
code	O
.	O
</s>
<s>
Often	O
linkers	B-Application
provide	O
support	O
for	O
overlays	B-General_Concept
.	O
</s>
<s>
The	O
following	O
example	O
shows	O
the	O
control	O
statements	O
that	O
instruct	O
the	O
OS/360	B-Application
Linkage	O
Editor	O
to	O
link	O
an	O
overlay	B-General_Concept
program	I-General_Concept
containing	O
a	O
single	O
region	O
,	O
indented	O
to	O
show	O
structure	O
(	O
segment	O
names	O
are	O
arbitrary	O
)	O
:	O
</s>
<s>
These	O
statements	O
define	O
a	O
tree	O
consisting	O
of	O
the	O
permanently	O
resident	O
segment	O
,	O
called	O
the	O
root	O
,	O
and	O
two	O
overlays	B-General_Concept
A	O
and	O
B	O
which	O
will	O
be	O
loaded	O
following	O
the	O
end	O
of	O
MOD2	O
.	O
</s>
<s>
Overlay	B-General_Concept
A	O
itself	O
consists	O
of	O
two	O
overlay	B-General_Concept
segments	O
,	O
AA	O
,	O
and	O
AB	O
.	O
</s>
<s>
At	O
execution	B-Library
time	I-Library
overlays	B-General_Concept
A	O
and	O
B	O
will	O
both	O
utilize	O
the	O
same	O
memory	O
locations	O
;	O
AA	O
and	O
AB	O
will	O
both	O
utilize	O
the	O
same	O
locations	O
following	O
the	O
end	O
of	O
MOD3	O
.	O
</s>
<s>
All	O
the	O
segments	O
between	O
the	O
root	O
and	O
a	O
given	O
overlay	B-General_Concept
segment	O
are	O
called	O
a	O
path	O
.	O
</s>
<s>
,	O
most	O
business	O
applications	O
are	O
intended	O
to	O
run	O
on	O
platforms	O
with	O
virtual	B-Architecture
memory	I-Architecture
.	O
</s>
<s>
A	O
developer	O
on	O
such	O
a	O
platform	O
can	O
design	O
a	O
program	O
as	O
if	O
the	O
memory	O
constraint	O
does	O
not	O
exist	O
unless	O
the	O
program	O
's	O
working	B-General_Concept
set	I-General_Concept
exceeds	O
the	O
available	O
physical	O
memory	O
.	O
</s>
<s>
Most	O
importantly	O
,	O
the	O
architect	O
can	O
focus	O
on	O
the	O
problem	O
being	O
solved	O
without	O
the	O
added	O
design	O
difficulty	O
of	O
forcing	O
the	O
processing	O
into	O
steps	O
constrained	O
by	O
the	O
overlay	B-General_Concept
size	O
.	O
</s>
<s>
Thus	O
,	O
the	O
designer	O
can	O
use	O
higher-level	O
programming	B-General_Concept
languages	O
that	O
do	O
not	O
allow	O
the	O
programmer	O
much	O
control	O
over	O
size	O
(	O
e.g.	O
</s>
<s>
Java	B-Language
,	O
C++	B-Language
,	O
Smalltalk	B-Application
)	O
.	O
</s>
<s>
Still	O
,	O
overlays	B-General_Concept
remain	O
useful	O
in	O
embedded	B-Architecture
systems	I-Architecture
.	O
</s>
<s>
Some	O
low-cost	O
processors	O
used	O
in	O
embedded	B-Architecture
systems	I-Architecture
do	O
not	O
provide	O
a	O
memory	B-General_Concept
management	I-General_Concept
unit	I-General_Concept
(	O
MMU	O
)	O
.	O
</s>
<s>
In	O
addition	O
many	O
embedded	B-Architecture
systems	I-Architecture
are	O
real-time	B-General_Concept
systems	I-General_Concept
and	O
overlays	B-General_Concept
provide	O
more	O
determinate	O
response-time	O
than	O
paging	B-Architecture
.	O
</s>
<s>
For	O
example	O
,	O
the	O
Space	O
Shuttle	O
Primary	O
Avionics	O
System	O
Software	O
(	O
PASS	O
)	O
uses	O
programmed	O
overlays	B-General_Concept
.	O
</s>
<s>
Even	O
on	O
platforms	O
with	O
virtual	B-Architecture
memory	I-Architecture
,	O
software	B-Architecture
components	I-Architecture
such	O
as	O
codecs	B-General_Concept
may	O
be	O
decoupled	O
to	O
the	O
point	O
where	O
they	O
can	O
be	O
loaded	O
in	O
and	O
out	O
as	O
needed	O
.	O
</s>
<s>
IBM	O
introduced	O
more	O
general	O
overlay	B-General_Concept
handling	O
in	O
IBSYS/IBJOB	B-Operating_System
,	O
including	O
a	O
tree	B-Data_Structure
structure	I-Data_Structure
and	O
automatic	O
loading	O
of	O
links	O
as	O
part	O
of	O
CALL	O
processing	O
.	O
</s>
<s>
In	O
OS/360	B-Application
,	O
IBM	O
extended	O
the	O
overlay	B-General_Concept
facility	O
of	O
IBLDR	O
by	O
allowing	O
an	O
overlay	B-General_Concept
program	I-General_Concept
to	O
have	O
independent	O
overlay	B-General_Concept
regions	I-General_Concept
,	O
each	O
with	O
its	O
own	O
overlay	B-General_Concept
tree	O
.	O
</s>
<s>
OS/360	B-Application
also	O
had	O
a	O
simpler	O
overlay	B-General_Concept
system	I-General_Concept
for	O
transient	O
SVC	B-Operating_System
routines	O
,	O
using	O
1024-byte	O
SVC	B-Operating_System
transient	O
areas	O
.	O
</s>
<s>
In	O
the	O
home	O
computer	O
era	O
overlays	B-General_Concept
were	O
popular	O
because	O
the	O
operating	B-General_Concept
system	I-General_Concept
and	O
many	O
of	O
the	O
computer	O
systems	O
it	O
ran	O
on	O
lacked	O
virtual	B-Architecture
memory	I-Architecture
and	O
had	O
very	O
little	O
RAM	O
by	O
current	O
standards	O
:	O
the	O
original	O
IBM	B-Device
PC	I-Device
had	O
between	O
16K	O
and	O
64K	O
,	O
depending	O
on	O
configuration	O
.	O
</s>
<s>
Overlays	B-General_Concept
were	O
a	O
popular	O
technique	O
in	O
Commodore	B-Language
BASIC	I-Language
to	O
load	O
graphics	O
screens	O
.	O
</s>
<s>
"	O
Several	O
DOS	B-Device
linkers	B-Application
in	O
the	O
1980s	O
supported	O
 [ overlays ] 	O
in	O
a	O
form	O
nearly	O
identical	O
to	O
that	O
used	O
25	O
years	O
earlier	O
on	O
mainframe	O
computers.	O
"	O
</s>
<s>
Binary	O
files	O
containing	O
memory	O
overlays	B-General_Concept
had	O
de	O
facto	O
standard	O
extensions	O
.OVL	B-General_Concept
or	O
.OVR	B-General_Concept
(	O
but	O
also	O
used	O
numerical	O
file	O
extensions	O
like	O
.000	B-General_Concept
,	O
.001	B-General_Concept
,	O
etc	O
.	O
</s>
<s>
This	O
file	O
type	O
was	O
used	O
among	O
others	O
by	O
WordStar	B-Application
(	O
consisting	O
of	O
the	O
main	O
executable	O
WS.COM	O
and	O
the	O
overlay	B-General_Concept
modules	I-General_Concept
WSMSGS.OVR	O
,	O
WSOVLY1.OVR	O
,	O
MAILMERGE.OVR	O
and	O
SPELSTAR.OVR	O
,	O
where	O
the	O
"	O
fat	O
"	O
overlay	B-General_Concept
files	I-General_Concept
were	O
even	O
binary	O
identical	O
in	O
their	O
ports	O
for	O
CP/M	B-Operating_System
-86	I-Operating_System
and	O
MS-DOS	O
)	O
,	O
dBase	B-Application
,	O
and	O
the	O
Enable	O
DOS	B-Device
office	O
automation	O
software	O
package	O
from	O
Enable	O
Software	O
.	O
</s>
<s>
Borland	O
's	O
Turbo	B-Application
Pascal	I-Application
and	O
the	O
GFA	B-Device
BASIC	I-Device
compiler	O
were	O
able	O
to	O
produce	O
.OVL	B-General_Concept
files	O
.	O
</s>
