IBM System/370 145 Manual page 101

Hide thumbs Also See for System/370 145:
Table of Contents

Advertisement

series of logical processing phases, each of which contains a
relati vely small number of act,i ve pages.
The objective of packaging
code within pages is to group active code together to avoid crossing
page boundaries in such a way that more real storage than is really
necessary is required to contain the active pages of a logical
phase.
In order to cause references to active instructions and data to be
localized, the following general rules should be applied to
programs:
1. A program should consist of a series of sequentially executed
logical phases or--in System/370programming terminology--a
series of subroutines or subprograms.
The mainline of the
program should contain the most frequently used subroutines in
the sequence of most probable use, so that processing proceeds
sequentially, with calls being made to the infrequently used
SUbroutines, such as exception and error routines.
This
structure contrasts with one in which the mainline consists of a
series of calls to subroutines.
Frequently used subroutines
should, be located near each other.
Infrequently used subroutines
that tend to be used at the same time whenever they are executed
should be located near each other also.
2. The data most frequently us·ed by a subroutine should be defined
together so that i t is plac1ed within the same page, or group of
pages, instead of scattered among several pages.
If possible,
the data should be placed next to the subroutine so that part or
all of the data is contained within a page that contains active
subroutine instructions (unless the routine is to be written so
that i t is not modified during its execution).
This eliminates
references to more pages than are actually required,to contain
the data and tends to keep 1the pages with frequently referenced
data in real storage.
3. Data that is to be used by several subroutines of a program
(either in series or in parallel by concurrently executing
subtasks) should be defined together in an area'that can be
referenced by each subroutiltle.
4. A data field should be initialized as close as possible to the
time i t will be used to avoid a page-out and a page-in between
initialization and first
us~e
of the data field.
5. Structures of data, such as arrays, should
be
defined in virtual
storage in the sequence in 'lI1hich they will be referenced, or
referenced by the program in the sequence in which a high-level
language stores them (by ,rOl' or by column for arrays, for
example) •
6. subroutines shOUld be packaqed within pages when possible.
For
example" avoid starting a
1
~)OO-byte
subroutine in the middle of a
2K page so that i t crosses a page boundary and requires two page
frames instead of one when it is active.
Subroutines that are
smaller than page size shouJLd be packaged together to require the
fewest number of pages, with frequently used subroutines placed
in the same page when possible.
This applies to large groups of
data as well.
The linkage
E~ditor
supplied with OS/VS 1 and OS/VS2
has new control statements t:.hat can be used t.o cause CSECTS and
COMMON areas to be aligned on page boundaries, and to indicate
the order in which CSECTS
al~e
placed in the load module.
This
linkage editor facility can be used with certain high-level
language programs that contain multiple CSECTS (such as PL/I and
ANS COBOL) as well as with
l~ssembler
Language programs ..
A Guide to the IBM System/310 Mode]. 145
91

Advertisement

Table of Contents
loading

Table of Contents