Share to: share facebook share twitter share wa share telegram print page

Overlay (programming)

Schematic

In a general computing sense, overlaying means "the process of transferring a block of program code or other data into main memory, replacing what is already stored".[1] Overlaying is a programming method that allows programs to be larger than the computer's main memory.[2] An embedded system would normally use overlays because of the limitation of physical memory, which is internal memory for a system-on-chip, and the lack of virtual memory facilities.

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.[b] Sibling segments, those at the same depth level, share the same memory, called overlay region[c] or destination region. An overlay manager, either part of the operating system or part of the overlay program, loads the required overlay from external memory into its destination region when it is needed; this may be automatic or via explicit code. Often linkers provide support for overlays.[3]

Example

The following example shows the control statements that instruct the OS/360 Linkage Editor to link an overlay program containing a single region, indented to show structure (segment names are arbitrary):

 INCLUDE SYSLIB(MOD1)
 INCLUDE SYSLIB(MOD2)
 OVERLAY A
   INCLUDE SYSLIB(MOD3)
     OVERLAY AA
       INCLUDE SYSLIB(MOD4)
       INCLUDE SYSLIB(MOD5)
     OVERLAY AB
        INCLUDE SYSLIB(MOD6)
 OVERLAY B
    INCLUDE SYSLIB(MOD7)
                       +--------------+
                       | Root Segment |
                       | MOD1, MOD2   |
                       +--------------+
                               |
                    +----------+----------+
                    |                     |
             +-------------+       +-------------+
             |  Overlay A  |       |  Overlay B  |
             |  MOD3       |       |  MOD7       |
             +-------------+       +-------------+
                    |
           +--------+--------+
           |                 |
    +-------------+   +-------------+
    | Overlay AA  |   | Overlay AB  |
    | MOD4, MOD5  |   | MOD6        |
    +-------------+   +-------------+

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. A developer on such a platform can design a program as if the memory constraint does not exist unless the program's working set exceeds the available physical memory. Most importantly, the architect can focus on the problem being solved without the added design difficulty of forcing the processing into steps constrained by the overlay size. Thus, the designer can use higher-level programming languages that do not allow the programmer much control over size (e.g. Java, C++, Smalltalk).

Still, overlays remain useful in embedded systems.[4] Some low-cost processors used in embedded systems do not provide a memory management unit (MMU). In addition many embedded systems are real-time systems and overlays provide more determinate response-time than paging. For example, the Space Shuttle Primary Avionics System Software (PASS) uses programmed overlays.[5]

Even on platforms with virtual memory, software components such as codecs may be decoupled to the point where they can be loaded in and out as needed.

Historical use

IBM introduced the concept of a chain job[6] 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[7] in IBSYS/IBJOB, including a tree structure and automatic loading of links as part of CALL processing.

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 SVC routines, using 1024-byte SVC transient areas.

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.[2]

"Several DOS linkers in the 1980s supported [overlays] in a form nearly identical to that used 25 years earlier on mainframe computers."[4][8] Binary files containing memory overlays had de facto standard extensions .OVL[8] or .OVR[9] (but also used numerical file extensions like .000, .001, etc. for subsequent files[10]). This file type was used among others by WordStar[11] (consisting of the main executable WS.COM and the overlay modules WSMSGS.OVR, WSOVLY1.OVR, MAILMERGE.OVR and SPELSTAR.OVR, where the "fat" overlay files were even binary identical in their ports for CP/M-86 and MS-DOS[12]), dBase,[13] and the Enable DOS office automation software package from Enable Software. Borland's Turbo Pascal[14][15] and the GFA BASIC compiler were able to produce .OVL files.

See also

Notes

  1. ^ This has nothing to do with the term region in MVT storage management.
  2. ^ In OS/360 and successors, there may be multiple regions[a] each containing a complete overlay tree.
  3. ^ The nomenclature varies depending on the system, e.g., in OS/360 region refers to an entire overlay tree.

References

  1. ^ "Oxford Dictionaries". 2015-11-26. Archived from the original on 2022-07-10. Retrieved 2022-07-10.
  2. ^ a b Butterfield, James "Jim", ed. (June 1986). "Part 4: Overlaying". Loading And Linking Commodore Programs. p. 74. Archived from the original on 2022-07-10. Retrieved 2022-07-10. This lets you run programs which are, in effect, much larger than the amount of memory in your computer. {{cite book}}: |magazine= ignored (help)
  3. ^ a b Levine, John R. (2000). Linkers & Loaders. Morgan Kaufmann Publishers. p. 177. ISBN 1-55860-496-0. Archived from the original on 2022-04-06. Retrieved 2022-07-10. [2]
  4. ^ National Research Council (November 1993) [June 1993]. An Assessment of Space Shuttle Flight Software Development Processes (2 ed.). Washington, DC, USA: National Academy of Sciences, The National Academies Press. doi:10.17226/2222. hdl:2060/19930019745. ISBN 978-0-309-04880-4. LCCN 93-84549. Retrieved 2012-10-29. (208 pages)
  5. ^ "Chapter 12: The Chain Job" (PDF). IBM 7090/7094 Programming Systems – FORTRAN II Programming (PDF). Poughkeepsie, New York, USA: IBM Corporation. August 1963. pp. 34–35. Form C28-6054-4 File No. 7090-25. Archived (PDF) from the original on 2022-03-15. Retrieved 2022-07-10. {{cite book}}: |work= ignored (help) (52 pages)
  6. ^ IBM 7090/7094 Programming Systems – IBJOB Processor – Overlay feature of IBLDR (PDF) (1 ed.). Poughkeepsie, New York, USA: IBM Corporation. May 1963. Form C28-6331 File No. 7090-27. Archived (PDF) from the original on 2022-03-15. Retrieved 2021-12-26. {{cite book}}: |work= ignored (help) (8 pages)
  7. ^ a b Elliott, John C. (2012-06-05) [2000-01-02]. "PRL file format". seasip.info. Archived from the original on 2020-01-26. Retrieved 2020-01-26. […] A PRL file is a relocatable binary file, used by MP/M and CP/M Plus for various modules other than .COM files. The file format is also used for FID files on the Amstrad PCW. There are several file formats which use versions of PRL: SPR (System PRL), RSP (Resident System Process). LINK-80 can also produce OVL (overlay) files, which have a PRL header but are not relocatable. GSX drivers are in PRL format; so are Resident System Extensions (.RSX). […] [3]
  8. ^ Dohmen, Norbert (1990). "Platz schaffen durch Überlagern - Overlay-Strukturen in Turbo Pascal". mc (in German). Vol. 90, no. 12. pp. 124–130. Archived from the original on 2022-08-04. Retrieved 2022-08-04. [4]
  9. ^ Gavin, Bruce. "Create Program Overlays". In Pearson, Dave (ed.). Turbo Pascal - Norton Guide. v3. p. 149. Archived from the original on 2022-08-04. Retrieved 2022-08-04.
  10. ^ Mabbett, Alan (1985). Getting started with WordStar, MailMerge + SpellStar. Cambridge University Press. ISBN 0-521-31805-X.
  11. ^ Necasek, Michal (2018-01-30) [2018-01-28, 2018-01-26]. "WordStar Again". OS/2 Museum. Archived from the original on 2019-07-28. Retrieved 2019-07-28. […] The reason to suspect such difference is that version 3.2x also supported CP/M-86 (the overlays are identical between DOS and CP/M-86, only the main executable is different) […] the .OVR files are 100% identical between DOS and CP/M-86, with a flag (clearly shown in the WordStar 3.20 manual) switching between them at runtime […] the OS interface in WordStar is quite narrow and well abstracted […] the WordStar 3.2x overlays are 100% identical between the DOS and CP/M-86 versions. There is a runtime switch which chooses between calling INT 21h (DOS) and INT E0h (CP/M-86). WS.COM is not the same between DOS and CP/M-86, although it's probably not very different either. […]
  12. ^ Sidnam-Wright, Liz; Stevens, Brad, eds. (1990-07-31). "Ashton-Tate ships dBASE IV Version 1.1" (PDF). Torrance, California, USA: Ashton Tate. p. 2-2-2. Archived from the original (PDF) on 2017-04-04. Retrieved 2014-02-13. Version 1.1 has a new dynamic Memory Management System (dMMS) that handles overlays more efficiently: the product requires less memory, which results in more applications space availability. […] The product's lower memory requirements of only 450K of RAM provide improved network support because supplemental hardware memory is no longer required to support networks. […] By speeding up areas of dBASE IV that are overlay-dependent, the new dMMS improves performance when working at the Control Center and in programs that use menus and windows. (5 pages)
  13. ^ Herschel, Rudolf; Dieterich, Ernst-Wolfgang (2000). Turbo Pascal 7.0 (in German) (2 ed.). R. Oldenbourg Verlag [de]. p. 249. ISBN 3-486-25499-5.
  14. ^ Eßer, Hans-Georg (June 2009). "Chapter 6. Speicherverwaltung und Dateisysteme - Teil 5: Nicht-zusammenhängende Speicherzuordnung". Betriebssysteme I (PDF) (in German). Munich, Germany: Hochschule München. Archived (PDF) from the original on 2022-05-08. Retrieved 2014-02-13. (9 pages)

Further reading

  • IBM OS Linkage Editor and Loader - Program Numbers 360S-ED-510, 360S-ED-521, 360S-LD-547 (PDF). Release 21 (10 ed.). White Plains, New York, USA: IBM Corporation. March 1972 [January 1972]. Order No. GC28-6538-9, File No. S360-31. Archived (PDF) from the original on 2022-07-10. {{cite book}}: |work= ignored (help) (2+244+4 pages)
  • Groeber, Marcus; Di Geronimo, Jr., Edward "Ed"; Paul, Matthias R. (2002-03-02) [2002-02-24]. "GEOS/NDO info for RBIL62?". Newsgroupcomp.os.geos.programmer. Archived from the original on 2019-04-20. Retrieved 2019-04-20. […] The reason Geos needs 16 interrupts is because the scheme is used to convert inter-segment ("far") function calls into interrupts, without changing the size of the code. The reason this is done so that "something" (the kernel) can hook itself into every inter-segment call made by a Geos application and make sure that the proper code segments are loaded from virtual memory and locked down. In DOS terms, this would be comparable to an overlay loader, but one that can be added without requiring explicit support from the compiler or the application. What happens is something like this: […] 1. The real mode compiler generates an instruction like this: CALL <segment>:<offset> -> 9A <offlow><offhigh><seglow><seghigh> with <seglow><seghigh> normally being defined as an address that must be fixed up at load time depending on the address where the code has been placed. […] 2. The Geos linker turns this into something else: INT 8xh -> CD 8x […] DB <seghigh>,<offlow>,<offhigh> […] Note that this is again five bytes, so it can be fixed up "in place". Now the problem is that an interrupt requires two bytes, while a CALL FAR instruction only needs one. As a result, the 32-bit vector (<seg><ofs>) must be compressed into 24 bits. […] This is achieved by two things: First, the <seg> address is encoded as a "handle" to the segment, whose lowest nibble is always zero. This saves four bits. In addition […] the remaining four bits go into the low nibble of the interrupt vector, thus creating anything from INT 80h to 8Fh. […] The interrupt handler for all those vectors is the same. It will "unpack" the address from the three-and-a-half byte notation, look up the absolute address of the segment, and forward the call, after having done its virtual memory loading thing... Return from the call will also pass through the corresponding unlocking code. […] The low nibble of the interrupt vector (80h–8Fh) holds bit 4 through 7 of the segment handle. Bit 0 to 3 of a segment handle are (by definition of a Geos handle) always 0. […] all Geos API run through the "overlay" scheme […]: when a Geos application is loaded into memory, the loader will automatically replace calls to functions in the system libraries by the corresponding INT-based calls. Anyway, these are not constant, but depend on the handle assigned to the library's code segment. […] Geos was originally intended to be converted to protected mode very early on […], with real mode only being a "legacy option" […] almost every single line of assembly code is ready for it […]

Read other articles:

Sporting event delegationMexico at the2022 World GamesIOC codeMEXNOCMexican Olympic Committeein Birmingham, United States7 July 2022 (2022-07-07) – 17 July 2022 (2022-07-17)Competitors78 (29 men and 49 women) in 15 sportsMedalsRanked 16th Gold 5 Silver 2 Bronze 5 Total 12 World Games appearances19811985198919931997200120052009201320172022 Mexico competed at the 2022 World Games held in Birmingham, United States from 7 to 17 July 2022.[1] Ath…

Sycamore Valley RanchWahana permainan Neverland Ranch difoto pada Agustus 2008Lokasi5225 Figueroa Mountain Road, Los Olivos, California, Amerika SerikatKoordinat34°44′28″N 120°05′30″W / 34.74107°N 120.09158°W / 34.74107; -120.09158Koordinat: 34°44′28″N 120°05′30″W / 34.74107°N 120.09158°W / 34.74107; -120.09158PemilikLahan Michael Jackson dan Colony CapitalLuas area2.700 ekar (1.100 ha)Situs webwww.sycamorevalley.c…

2012 American television drama series DallasGenreDrama, soap operaCreated byDavid JacobsBased onDallasby David JacobsDeveloped byCynthia CidreStarringJosh HendersonJesse MetcalfeJordana BrewsterJulie GonzaloBrenda StrongPatrick DuffyLinda GrayLarry HagmanMitch PileggiEmma BellKuno BeckerJuan Pablo Di PaceComposersRob CairnsJerrold Immel(original theme)Country of originUnited StatesNo. of seasons3No. of episodes40 (list of episodes)ProductionExecutive producersCynthia CidreBruce RasmussenMichael …

Escape PlanSutradaraMikael HåfströmProduser Mark Canton Randall Emmett Remington Chase Robbie Brenner Kevin King-Templeton Stepan Martirosyan Kelly Dennis Brandon Grimes SkenarioMiles ChapmanArnell JeskoCeritaMiles ChapmanPemeran Sylvester Stallone Arnold Schwarzenegger Jim Caviezel 50 Cent Sam Neill Faran Tahir Vinnie Jones Vincent D'Onofrio Caitriona Balfe Amy Ryan Penata musikAlex HeffesSinematograferBrendan GalvinPenyuntingElliot GreenbergPerusahaanproduksiAtmosphere EntertainmentEmm…

قاعة مشاهير الدوري الإنجليزي الممتاز معلومات عامة نوع المبنى قاعة مشاهير الرياضات الاحترافية الدولة  إنجلترا سنة التأسيس 2021 المدير ريتشارد ماسترز الموقع الإلكتروني الموقع الرسمي تعديل مصدري - تعديل   آلان شيرر وتييري هنري، أول لاعبين يتم إدخالهم. قاعة مشاهير الدوري ا…

Kompleks Peluncuran 48Kompleks Peluncuran 48 seperti yang terlihat dari International Space Station Pada Mei 2020Situs peluncuranKennedy Space CenterNama pendekLC-48OperatorNASAJumlah landasan1 (2 direncanakan)StatusKonstruksi diselesaikan Kompleks Peluncuran 48 (Bahasa Inggris: Launch Complex 48, disingkat LC-48) adalah situs peluncuran multi-pengguna yang digunakan untuk meluncurkan peluncur kecil dan wahana antariksa. Kompleks Peluncuran ini terletak di selatan Kompleks Peluncuran 39A dan uta…

APEC beralih ke halaman ini. Untuk pertemuan APEC terkini, lihat APEC Papua Nugini 2018. Untuk kegunaan lain, lihat APEC (disambiguasi). Asia-Pacific Economic Cooperation (APEC)Kerja Sama Ekonomi Asia-PasifikNegara anggota APEC ditampilkan dalam warna hijau.Kantor pusat SingapuraTipePertemuan ekonomiKeanggotaan21 anggota  Australia Brunei Kanada Chili Tiongkok Republik Tiongkok[1] Hong Kong Indonesia Jepang Korea Selatan Malaysi…

Former U.S. House district Missouri's 16th congressional districtObsolete districtCreated1900Eliminated1930Years active1903-1933 MO-16 redirects here. The term may also refer to Missouri Route 16. The 16th congressional district of Missouri was a congressional district for the United States House of Representatives in Missouri from 1903 to 1933. List of members representing the district Member Party Years Congress Electoral history District created March 4, 1903 J. Robert Lamar(Houston) Democrat…

يورغن بيبينبورغ معلومات شخصية الميلاد 10 يونيو 1941 (العمر 82 سنة)ألمانيا  الطول 177 سنتيمتر  مركز اللعب مهاجم الجنسية ألمانيا ألمانيا الشرقية  مسيرة الشباب سنوات فريق 0000–1963 Traktor Franzburg المسيرة الاحترافية1 سنوات فريق م. (هـ.) 1963–1971 فرانكفورت 1971–1975 فرانكفورت 236 (123) مجموع 236 (123…

Pour les articles homonymes, voir Mars. Mars Dieu de la mythologie romaine Mars cuirassé, figurine en bronze, IIe – IIIe siècle. Caractéristiques Nom latin MarsMāursMarmar Fonction principale Dieu de la guerre Fonction secondaire Dieu des bergers Associé(s) Ultio Équivalent(s) par syncrétisme Arès, Laran Culte Temple(s) Capitole, Campus Martius Famille Père Jupiter Mère Junon Fratrie Vulcain, Juventas, Lucine, Minerve • Enfant(s) Antéros, Eros, Harmonie, Romulus et Rémus…

Scottish politician (born 1960) For other people named Eric Joyce, see Eric Joyce (disambiguation). Eric JoyceJoyce in 2010Shadow Minister for Northern IrelandIn office21 June 2010 – 18 November 2010LeaderEd MilibandSucceeded byStephen PoundMember of Parliament for FalkirkFalkirk West (2000–2005)In office21 December 2000 – 30 March 2015Preceded byDennis CanavanSucceeded byJohn McNally Personal detailsBornEric Stuart Joyce (1960-10-13) 13 October 1960 (age 63)Perth, S…

MSA British Touring Car Championship 2014 British Touring Car Championship Previous 2013 Next 2015 2014 ToCA Support series:2014 British Formula Ford Championship2014 Ginetta Junior Championship2014 Ginetta GT4 Supercup2014 Porsche Carrera Cup GB2014 Renault Clio Cup UK Colin Turkington, the 2014 Drivers' Champion The 2014 Dunlop[1] MSA British Touring Car Championship was a multi-event motor racing championship for production-based touring cars held across England and Scotland. The cham…

Radio station in Grand Island, NebraskaKRGI-FMGrand Island, NebraskaBroadcast areaGrand Island-KearneyFrequency96.5 MHz (HD Radio)BrandingCountry 96.5ProgrammingFormatNew countrySubchannelsHD2: La Gran D (Regional Mexican)HD3: KMTY simulcast (Active rock)HD4: 103.5 The Legend (Classic country)AffiliationsABC Radio , Premiere Radio NetworksOwnershipOwnerLegacy Communications, LLCHistoryFirst air dateOctober 30, 1975Technical informationFacility ID32381ClassC1ERP100,000 wattsHAAT128 meters (420…

Conquistador Pedro de Alvarado memimpin upaya awal penaklukan Guatemala.[1] Penaklukan Maya oleh Spanyol adalah sebuah konflik pada kolonisasi Amerika oleh Spanyol, dimana para conquistador Spanyol dan para sekutu mereka secara bertahap memasukkan wilayah negara-negara Maya Pasca-Klasik Akhir ke dalam Kewalirajaan kolonian Spanyol Baru. Maya menduduki wilayah yang sekarang masuk negara-negara modern Meksiko, Guatemala, Belize, Honduras dan El Salvador; penaklukan dimulai pada awal abad k…

Formalized form of dance A publicity photo for the premiere of Tchaikovsky's ballet The Sleeping Beauty (1890). Ballet is a formalized dance form with its origins in the Italian Renaissance courts of 15th and 16th centuries. Ballet spread from Italy to France with the help of Catherine de' Medici, where ballet developed even further under her aristocratic influence. An early example of Catherine's development of ballet is through 'Le Paradis d' Amour', a piece of work presented at the wedding of…

VendeuvrecomuneVendeuvre – Veduta LocalizzazioneStato Francia Regione Normandia Dipartimento Calvados ArrondissementCaen CantoneLivarot TerritorioCoordinate48°59′N 0°05′W / 48.983333°N 0.083333°W48.983333; -0.083333 (Vendeuvre)Coordinate: 48°59′N 0°05′W / 48.983333°N 0.083333°W48.983333; -0.083333 (Vendeuvre) Superficie26,22 km² Abitanti764[1] (2009) Densità29,14 ab./km² Altre informazioniCod. postale14170 Fuso o…

Fortified tower house in Ireland O'Dea CastleO'Day CastleLocation3 miles (5 km) south of Corofin, County Clare, IrelandCoordinates52°54′41″N 9°3′59″W / 52.91139°N 9.06639°W / 52.91139; -9.06639Built1470–90Location of O'Dea Castle in Ireland O'Day Castle, also known as Dysert O'Dea Castle, is an Irish fortified tower house, loosely described as a castle[1] at Dysert O'Dea (Irish: Dísert, meaning hermitage), the former O'Dea clan stronghold, 5 ki…

Retable de la cathédrale de Barcelone. Le retable (du latin retro tabula altaris : en arrière d'autel) est une construction verticale qui porte des décors sculptés, parfois peints, en arrière de la table d'autel d'un édifice religieux (église, chapelle). L'étymologie du mot français est la même que celle du mot espagnol retablo, alors que les termes italiens sont pala d'altare, et dossale, plus génériques. Orné de représentations historiées ou figurées, le retable peut être…

Chronologies Données clés 2006 2007 2008  2009  2010 2011 2012Décennies :1970 1980 1990  2000  2010 2020 2030Siècles :XIXe XXe  XXIe  XXIIe XXIIIeMillénaires :Ier IIe  IIIe  Chronologies géographiques Afrique Afrique du Sud, Algérie, Angola, Bénin, Botswana, Burkina Faso, Burundi, Cameroun, Cap-Vert, République centrafricaine, Comores, République du Congo, République démocratique du Congo, Côte d'Ivoire, Djibouti, Égypte, Éryt…

此條目之中立性有争议。其內容、語調可能帶有明顯的個人觀點或地方色彩。 (2011年6月)加上此模板的編輯者需在討論頁說明此文中立性有爭議的原因,以便讓各編輯者討論和改善。在編輯之前請務必察看讨论页。 格奥尔基·季米特洛夫保加利亚共产党中央委员会总书记任期1948年8月—1949年7月2日前任自己(第一书记)继任维尔科·契尔文科夫保加利亚共产党中央委员会第一书…

Kembali kehalaman sebelumnya