To clarify the relationships between the UNITSIZE, UNITS, and GAP
parameters, this information contains three examples of defining a
reference pattern. So that you can compare the three examples with
what the system does without information from REFPAT, the following
REFPAT invocation approximates the system's normal paging operation:
REFPAT INSTALL,PSTART=. . .,PEND=. . .,UNITSIZE=4096,GAP=0,UNITS=1
Each time the system takes a page fault, it brings in 4096 bytes,
the system's reference unit. It brings in one reference unit at a
time.
Example 1: The program processes
an array in a consistently forward direction from one reference unit
to the next. The processing of each element is fairly simple. The
program runs during the peak hours and many programs compete for processor
time and central storage. A reasonable value to choose for the number
of bytes to be brought into central storage on a page fault might
be 80000 bytes (around 20 pages). A logical grouping of bytes (the
UNITSIZE parameter) is 4000 bytes. The following REFPAT macro communicates
this pattern to the system:
REFPAT INSTALL,PSTART=FIRSTB,PEND=LASTB,UNITSIZE=4000,GAP=0,UNITS=20
Example 2: The program performs the
same process as in the first example, except the program references
few elements on each page. The program runs during the night hours
when contention for the processor and for central storage is light.
In this case, a reasonable value to choose for the number of bytes
to come into central storage on a page fault might be 200000 bytes
(around 50 pages). UNITSIZE can be 4000 bytes and UNITS can be 500.
The following REFPAT macro communicates this pattern:
REFPAT INSTALL,PSTART=FIRSTB,PEND=LASTB,UNITSIZE=4000,GAP=0,UNITS=500
Example 3: The program references
in a consistently forward direction through the same large array as
in the second example. The pattern of reference includes a gap. The
program references 8192 bytes, then skips the next 4096 bytes, references
the next 8192 bytes, skips the next 4096 bytes, and so forth throughout
the array. The program chooses to bring in data eight pages at a
time. Because of the size of the gap and the placement of reference
units and gaps on page boundaries, the system does not bring in the
data in the gaps. The following illustration shows this reference
pattern:
The following REFPAT macro reflects this reference pattern:
REFPAT INSTALL,PSTART=FIRSTB,PEND=LASTB,UNITSIZE=8192,GAP=4096,UNITS=4
where the system is to bring into central storage 32768 (4×8192)
bytes on a page fault.