When no gap exists, the system brings into central storage all
the pages that contain the data in the range you specify on REFPAT.
When there is a gap, the answer depends on the size of the gap, the
size of the reference unit, and the alignment of reference units and
gaps on page boundaries. The following examples illustrate those
factors.
Example 1: The following illustration
shows the 1024-by-1024 array of eight-byte elements, where the program
references the first 20 elements in each row and skips over the next
1004 elements. The reference pattern, therefore, includes a reference
unit of 160 bytes and a gap of 8032 bytes. The reference units begin
on every other page boundary.
Figure 1. Illustration
of a Reference Pattern with a Gap
Every other page of the data does not come into central storage;
those pages contain only the "skipped over" data.
Example 2: The reference pattern
includes a reference unit of 4800 bytes and a gap of 3392 bytes. The
example assumes that the area to be referenced starts on a page boundary.
Because each page contains data that the program references, the
system brings in all pages.
Example 3: The area to be referenced does
not begin on a page boundary. The reference pattern includes a reference
unit of 2000 bytes and a gap of 5000 bytes. Because the reference
pattern includes a gap, the first byte of the reference pattern must
begin a reference unit, as the following illustration shows:
Because the gap is larger than 4095 bytes, some pages do not come
into central storage. Notice that the system does not bring in the
fifth page.
Summary of how the size of the gap affects the
pages the system brings into central storage:
- If the gap is less than 4096 bytes, the system has to bring into
central storage all pages of the array. (See Example 2.)
- If the gap is greater than 4095 bytes and less than 8192, the
system might not have to bring in certain pages. Pages that contain
only data in the gap are not brought in. (See Examples 1 and 3.)
- If the gap is greater than 8191 bytes, the system definitely does
not have to bring in certain pages that contain the gap.