Overlay (programming)

Overlay (programming)

In a general computing sense, overlaying means "replacement of a block of stored instructions or data with another"[1] Overlaying is a programming method that allows programs to be larger than the computer's main memory. 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.

Contents

Usage

The method assumes dividing a program into self-contained object code blocks called overlays. The size of an overlay is limited according to memory constraints. The place in memory where an overlay is loaded is called an overlay region or destination region. Although the idea is to reuse the same block of main memory, multiple region systems could be defined. The regions can be different sizes. An overlay manager, possibly part of the operating system, will load the required overlay from external memory into its destination region in order to be used. Some linkers provide support for overlays.[2]

Overlay programming requires the program designer to be very aware of the size of each part of the program. This means using programming languages or assemblers that allow the designer or architect control over the size of the program and more importantly, the size of the overlay. This constraint adds many design difficulties that do not exist with virtual memory.

As of 2007, 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 popular in embedded systems because many cannot use virtual memory. Many embedded systems are real-time systems. When a program enters a part that has been paged out, the virtual memory may not respond in time, causing a real-time computing system to miss deadlines. The delay of loading an overlay is more predictable. In addition, paging hardware is not without cost, and in many embedded systems sold in millions of units, the reduction in manufacturing costs from simpler hardware outweighs the extra cost of programmer time.[citation needed] 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.

PC/MS DOS

In the DOS era, overlays were popular because the operating system and many of the computer systems it ran on lacked virtual memory. Originally, PCs even lacked hard drives, so the only storage available for paging out virtual memory would have been 5-1/4" double-density floppy disk. IBM never sold a hard disk for the original IBM PC model 5150, for example, and the base model PC didn't even have a floppy disk drive and relied on cassette storage and BASIC in ROM. (Few of these diskless model 5150 PCs were actually sold.)

Early PCs also had very little RAM by current standards; while a double sided double density 5¼" floppy disk held 360K, the RAM in PCs as they came from the factory between 1981 and 1985 was rarely significantly more than that; most of those PCs shipped with 64K, 128K, 256K, or perhaps 384K of system RAM. The original PC had between 16K and 64K depending on configuration. If one chose to add RAM to one's system, conventional RAM maxed out at 640K. Adding more memory beyond the 640K of "conventional memory" required resorting to extension standards like EMS (expanded memory) and XMS (extended memory). (XMS was impossible before the introduction of the 80286 CPU, ca. 1983.) The memory added using these methods was installed on ISA expansion cards and was slower to access than conventional RAM, because it had to be copied into and out of a "page frame" in the lower 1 MB address space in order for its contents to be used under DOS (or used at all with a pre-286 CPU). It was in these times of very limited RAM that the overlay originated.[3] For DOS, the binary files containing memory overlays had a defacto standard extension, .OVL. This file type was used among others by WordStar and dBase.

The GFA BASIC compiler was able to produce .OVL files.

References

See also


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Overlay — may refer to: Overlay architecture, term used to describe ‘event architecture’ and relates to the temporary elements that supplement existing buildings and infrastructure to enable the operation of major sporting events or festivals. Overlay… …   Wikipedia

  • Overlay (operating system) — For the division of a single program to reduce memory requirements, see Overlay (programming). In operating systems, an overlay is when a process replaces itself with the code of another program. On Unix like systems, this is accomplished with… …   Wikipedia

  • Structured programming — can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. It is most famous for removing or reducing reliance on the GOTO statement.Historically, several different structuring techniques or… …   Wikipedia

  • Map Overlay and Statistical System — The Map Overlay and Statistical System (MOSS), is a GIS software technology. Development of MOSS began in late 1977 and was first deployed for use in 1979. MOSS represents a very early public domain, open source GIS development predating the… …   Wikipedia

  • Charm (programming language) — Charm Paradigm(s) Structured programming Appeared in 1996 Designed by P. Nowosad Influenced by RTL/2, C, Pascal OS RISC OS …   Wikipedia

  • Dynamic drive overlay — (DDO, also referred to as: software translation driver) is a software technique to extend a system BIOS that does not support logical block addressing (LBA) to access drives larger than 504 MiB. The technology was continued with similar… …   Wikipedia

  • OVL — may refer to: Open Verification Library Overlay (programming) OVL (file format) This disambiguation page lists articles associated with the same title. If an internal link led you here, you …   Wikipedia

  • Closed captioning — Jack Foley created the CC in a TV symbol while senior graphic designer at WGBH. Closed captioning is the process of displaying text on a television, video screen or other visual display to provide additional or interpretive information to… …   Wikipedia

  • DirectShow — Logo of the DirectX Media SDK – the first time DirectShow was distributed under its current name.[citation needed] DirectShow (sometimes abbreviated as DS or DShow), codename Quartz, is a multimedia framework and API produced by Microsoft for… …   Wikipedia

  • Geographic information system — GIS redirects here. For other uses, see GIS (disambiguation). A geographic information system, geographical information science, or geospatial information studies is a system designed to capture, store, manipulate, analyze, manage, and present… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”