The following example (see
Figure 1),
demonstrates how buffers are scheduled for direct access. Assume the
following:
- Two strings
- Three-level index structure as shown
- Three data buffers (one for each string, and one for splits)
- Four index buffers (one for highest level of index, one for second
level, and one for each string)
Figure 1. Scheduling
Buffers for Direct Access
The following requests happen.
Request 1. A control interval from CA2 is
requested by string 1.
- The highest level index set, IS1, is read into an index buffer.
IS1 remains in this buffer for all requests.
- IS1 points to IS2, that is read into a second index buffer.
- IS2 points to the sequence set, SS2, that is read into an index
buffer for string 1.
- SS2 points to a control interval in CA2. This control interval
is read into a data buffer for string 1.
Request 2. A control interval from CA3 is
requested by string 2.
- IS1 and IS2 remain in their respective buffers.
- SS3 is read into an index buffer for string 2.
- SS3 points to a control interval in CA3. This control interval
is read into a data buffer for string 2.
Request 3. The first control interval in
CA6 is requested by string 1.
- IS1 remains in its buffer.
- Since IS1 now points to IS3, IS3 is read into the second index
buffer, replacing IS2.
- SS6 is read into an index buffer for string 1.
- SS6 points to the first control interval in CA6. This control
interval is read into a data buffer for string 1.
Request 4. The first control interval in
CA6 is now requested by string 2.
- IS1 and IS3 remain in their respective buffers.
- SS6 is read into an index buffer for string 2.
- SS6 points to the first control interval in CA6. This control
interval is read into a data buffer for string 2.
- If the string 1 request for this control interval was a GET for
update, the control interval would be held in exclusive control, and
string 2 would not be able to access it.
Suggested number of buffers for direct processing:
Index buffers
Minimum = STRNO
Maximum = Number of Index Set Records + STRNO
Data buffers
STRNO + 1