Content deleted Content added
Matthiaspaul (talk | contribs) better links |
Matthiaspaul (talk | contribs) improved refs |
||
Line 1:
{{Distinguish|Overload (programming)|Exec (system call)|Overlapping code|Shared code}}
{{Use dmy dates|date=July 2019|cs1-dates=y}}
{{Use list-defined references|date=July 2022}}
In a general computing sense, '''overlaying''' means "the process of transferring a [[Block (data storage)|block]] of program code or other data into [[main memory]], replacing what is already stored".<ref name="
==Usage==
Constructing an overlay program involves manually dividing a program into self-contained [[object code]] blocks called '''overlays''' or '''links''', generally laid out in a [[tree structure]].{{efn|In [[OS/360 and successors]], there may be multiple ''regions''{{efn|This has nothing to do with the term ''region'' in [[OS/360 and successors#MVT|MVT]] storage management.}} each containing a complete overlay tree.}} ''Sibling'' segments, those at the same depth level, share the same memory, called ''overlay region''{{efn|The nomenclature varies depending on the system, e.g., in [[OS/360]] ''region'' refers to an entire overlay tree.}} or ''destination region''.
==Example==
Line 21 ⟶ 22:
INCLUDE SYSLIB(MOD7)
</pre>
<pre>
+--------------+
Line 42:
+-------------+ +-------------+
</pre>
These statements define a tree consisting of the permanently resident segment, called the ''root'', and two overlays A and B which will be loaded following the end of MOD2.
▲These statements define a tree consisting of the permanently resident segment, called the ''root'', and two overlays A and B which will be loaded following the end of MOD2. Overlay A itself consists of two overlay segments, AA, and AB. At execution time overlays A and B will both utilize the same memory locations; AA and AB will both utilize the same locations following the end of MOD3.
All the segments between the root and a given overlay segment are called a ''path''.
==Applications==
{{As of|2015}}, most business applications are intended to run on platforms with [[virtual memory]].
Still, overlays remain useful in embedded systems.<ref name="
Even on platforms with virtual memory, [[Software componentry|software components]] such as [[codec]]s may be [[Coupling (computer science)#Low coupling|decoupled]] to the point where they can be [[Library (computing)#Dynamic loading|loaded in and out as needed]].
==Historical use==
IBM introduced the concept of a ''chain job''
in FORTRAN II,
The program had to explicitly call the CHAIN subroutine to load a new link,
and the new link replaced all of the old link's storage except for the Fortran COMMON area.
IBM introduced more general overlay handling<ref name="IBM_1963_IBJOB"/>
In OS/360, IBM extended the overlay facility of IBLDR by allowing an overlay program to have independent overlay regions, each with its own overlay tree. OS/360 also had a simpler overlay system for transient [[Supervisor call|SVC]] routines, using 1024-byte SVC transient areas.
<!-- Need information on other vendors here. -->
In the [[home computer]] era overlays were popular because the operating system and many of the computer systems it ran on lacked virtual memory and had very little RAM by current standards: the original [[IBM PC]] had between 16K and 64K, depending on configuration. Overlays were a popular technique in [[Commodore BASIC]] to load graphics screens.<ref name="
"Several DOS linkers in the 1980s supported [overlays] in a form nearly identical to that used 25 years earlier on mainframe computers."<ref name="
== See also ==
Line 101 ⟶ 80:
==References==
{{reflist|refs=
<ref name="
<ref name="
<ref name="GNULink_2008">{{cite web |title=The GNU Linker documentation: Overlay Description |date=2008-06-03 |url=http://sourceware.org/binutils/docs/ld/Overlay-Description.html |access-date=2022-07-10 |url-status=live |archive-url=https://web.archive.org/web/20220623060507/https://sourceware.org/binutils/docs/ld/Overlay-Description.html |archive-date=2022-06-23}}</ref>
<ref name="Levine_2000">{{cite book |title=Linkers & Loaders |author-last=Levine |author-first=John R. |author-link=John R. Levine |date=2000 |publisher=[[Morgan Kaufmann Publishers]] |isbn=1-55860-496-0 |page=177 |url=http://linker.iecc.com/ |access-date=2022-07-10 |url-status=live |archive-url=https://web.archive.org/web/20220406090302/https://linker.iecc.com/ |archive-date=2022-04-06}} [http://www.iecc.com/linker/<!-- https://web.archive.org/web/20220705125042/https://www.iecc.com/linker/ -->]</ref>
<ref name="
<ref name="IBM_1963_FORTRAN">{{cite manual |title=IBM 7090/7094 Programming Systems – FORTRAN II Programming |id=C28-6054-4 |date=August 1963 |work=Systems Reference Library |publisher=[[IBM Corporation]] |pages=34–35 |section=Chapter 12 The Chain Job |section-url=http://bitsavers.org/pdf/ibm/7090/C28-6054-4_7090_FORTRANII.pdf#page=34 |url=http://bitsavers.org/pdf/ibm/7090/C28-6054-4_7090_FORTRANII.pdf |access-date=2022-07-10 |url-status=live |archive-url=https://web.archive.org/web/20220315144942/http://bitsavers.org/pdf/ibm/7090/C28-6054-4_7090_FORTRANII.pdf |archive-date=2022-03-15}}</ref>
<ref name="IBM_1963_IBJOB">{{cite manual |title=IBM 7090/7094 Programming Systems – IBJOB Processor – Overlay feature of IBLDR |id=Form C28-6331 File No. 7090-27 |edition=1 |date=May 1963 |work=Systems Reference Library |publisher=[[IBM Corporation]] |url=http://bitsavers.org/pdf/ibm/7090/C28-6331_IBLDR_overlay_1963.pdf |access-date=2021-12-26 |url-status=live |archive-url=https://web.archive.org/web/20220315161341/http://bitsavers.org/pdf/ibm/7090/C28-6331_IBLDR_overlay_1963.pdf |archive-date=2022-03-15}} (8 pages)</ref>
}}
==
* {{cite book
▲* {{cite book |publisher=[[IBM Corporation]] |title=IBM OS Linkage Editor and Loader |id=GC28-6538 |version=Release 21 |date=March 1972 |orig-year=January 1972 |pages=244 |url=http://www.bitsavers.org/pdf/ibm/360/os/R21.0_Mar72/GC28-6538-9_OS_Linkage_Editor_and_Loader_Release_21_Jan72.pdf}}
[[Category:Virtual memory]]
|