z/OS MVS Program Management: User's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Design of an overlay program

z/OS MVS Program Management: User's Guide and Reference
SA23-1393-00

The structure of an overlay module depends on the relationships among the control sections within the module. Two control sections do not have to be in storage at the same time to overlay each other. Such control sections are independent; they do not reference each other either directly or indirectly. Independent control sections can be assigned the same load addresses and are loaded only when referenced. For example, control sections that handle error conditions or unusual data can be used infrequently and need not occupy storage unless in use.

Control sections are grouped into segments. A segment is the smallest functional unit (one or more control sections) that can be loaded as one logical entity during execution. The control sections required all the time are grouped into a special segment called the root segment. This segment remains in storage throughout execution of an overlay program.

When a particular segment is executed, any segments between it and the root segment must also be in storage. This is a path. A reference from one segment to another segment lower in a path is a downward reference; the segment contains a reference to another segment farther from the root segment (see Control section dependency). Conversely, a reference from one segment to another segment higher in a path (closer to the root segment) is an upward reference.

A downward reference might cause overlay because the necessary segment might not yet be in virtual storage. An upward reference does not cause overlay because all segments between a segment and the root segment must be present in storage.

Several paths sometimes need the same control sections. This problem can be solved by placing the control sections in another region. In an overlay structure, a region is a contiguous area of virtual storage within which segments can be loaded independently of paths in other regions. An overlay program can be designed in single or multiple regions.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014