Overlay (programming)

From Wikipedia for FEVERv2
Jump to navigation Jump to search

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". Overlay (programming)_sentence_0

Overlaying is a programming method that allows programs to be larger than the computer's main memory. Overlay (programming)_sentence_1

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. Overlay (programming)_sentence_2

Usage Overlay (programming)_section_0

Constructing an overlay program involves manually dividing a program into self-contained object code blocks called overlays laid out in a tree structure. Overlay (programming)_sentence_3

Sibling segments, those at the same depth level, share the same memory, called overlay region or destination region. Overlay (programming)_sentence_4

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. Overlay (programming)_sentence_5

Often linkers provide support for overlays. Overlay (programming)_sentence_6

Example Overlay (programming)_section_1

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

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 (programming)_sentence_8

Overlay A itself consists of two overlay segments, AA, and AB. Overlay (programming)_sentence_9

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. Overlay (programming)_sentence_10

All the segments between the root and a given overlay segment are called a path. Overlay (programming)_sentence_11

Applications Overlay (programming)_section_2

As of 2015, most business applications are intended to run on platforms with virtual memory. Overlay (programming)_sentence_12

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. Overlay (programming)_sentence_13

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. Overlay (programming)_sentence_14

Thus, the designer can use higher-level programming languages that do not allow the programmer much control over size (e.g. Java, C++, Smalltalk). Overlay (programming)_sentence_15

Still, overlays remain useful in embedded systems. Overlay (programming)_sentence_16

Some low-cost processors used in embedded systems do not provide a memory management unit (MMU). Overlay (programming)_sentence_17

In addition many embedded systems are real-time systems and overlays provide more determinate response-time than paging. Overlay (programming)_sentence_18

For example, the Space Shuttle Primary Avionics System Software (PASS) uses programmed overlays. Overlay (programming)_sentence_19

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. Overlay (programming)_sentence_20

Historical use Overlay (programming)_section_3

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. Overlay (programming)_sentence_21

Overlays were a popular technique in Commodore BASIC to load graphics screens. Overlay (programming)_sentence_22

In order to detect when an overlay was already loaded, a flag variable could be used. Overlay (programming)_sentence_23

"Several DOS linkers in the 1980s supported [overlays] in a form nearly identical to that used 25 years earlier on mainframe computers." Overlay (programming)_sentence_24

containing memory overlays had a de facto standard extension, .OVL. Overlay (programming)_sentence_25

This file type was used among others by WordStar, dBase, and the Enable DOS office automation software package from Enable Software, Inc.. Overlay (programming)_sentence_26

The GFA BASIC compiler was able to produce .OVL files. Overlay (programming)_sentence_27

See also Overlay (programming)_section_4

Overlay (programming)_unordered_list_0

Credits to the contents of this page go to the authors of the corresponding Wikipedia page: en.wikipedia.org/wiki/Overlay (programming).