IBM 1130 User Manual page 661

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

To summarize, a typical program has been seg-
mented in several different ways, and the probable
effect of each way on performance has been dis-
cussed. The purpose has not been to illustrate that·
LINKs are better than LOCALs, or that LOCALs
are better than SOCALs, or any other hard and fast
rule.
The purpose has been to illustrate that the
options must be chosen wisely, not blindly. The
easiest way, letting the CLB do it with SOCALs,
mayor may not be the best in terms of performan,ce.
The next easiest way -- LOCALs -- mayor may not
be best. The only way to determine which is best
is to :lraw a flowchart of the type shown and to
tailor the overlay option to the program.
You can generalize ::;omewhat, with some
common -s ens e do's and don'ts:
1. DON'T worry about the performance of a
program that runs for only a few minutes, or that
is used only occasionally. Concentrate your efforts
on the long-running, everyday jobs.
2. DON'T place an overlay, or cause one to be
placed, within a loop that reads from the disk.
For
example, take the problem discussed above, where
you have a loop of the type:
Read disk record
Compare disk key to sought-for key
If
not equal, repeat
SOCAL level 2 will overlay the Disk
I/o
package
,required for the Disk READ) and the Arithmetic
package (required for the subtraction within the IF
statement parentheses). Furthermore, the disk
READ command requires the disk arm to move away
Section
Subsections
Page
90
20
I
20
03
from the SOCAL disk area. This repetitive disk arm
movement may have a disastrous effect on the
running time of the program.
If
you place a LOCAL subroutine within this loop,
it will have the same effect as if the CLB had in-
cluded a SOCAL.
3. DON'T LOCALize subprograms that are
always used, unless it is absolutely necessary to
get the program into core storage. DO LOCALize
subprograms that are the exception rather than the
rule (error messages, new page headings, initial-
ization, final totals, unusual payroll deductions,
etc. ).
4. DO minimize the amount of coding between
DISK I/O commands.
This, in turn, will minimize
the chance of an overlay (SOCAL or LOCAL) which
will require that the disk arm move from the data
area to the overlay area and back again.
5. Also, DON'T LOCALize a subprogram that is
called between two disk statements.
For example,
suppose a program has the following sequence:
DISK
I/o
CALL SUB
DISK
I/o
In this case SUB should not be made LOCAL, since
it will force excessive disk arm movement.
6. DO plan for problems with performance --
either a program too large for core or a program
that does not run as fast as it might. Keep the
scope (and therefore the size) of each program
modest; program as a series of LINKs; design the
exception routines as subprograms; etc.

Advertisement

Table of Contents
loading

Table of Contents