gtpc3m1p | Concepts and Structures |
Pool file storage is managed through pool directories. There is a pool directory for each of the different types of pools as determined by the following attributes:
An example of a pool type is small short-term (SSTx) (see Pool Record Types). The same pool type can exist on different logical device types. Separate pool directories exist for each pool type on each logical device type.
For efficiency purposes, within a pool directory, the TPF system maintains a single bit for each pool record that indicates the availability status of the associated pool record. The relative position of the bit within a pool directory determines the ordinal number within a pool type of that record, as shown in Figure 38. This combination of pool type and ordinal number is a pool record reference.
When file storage is requested, the get file storage macro service routine scans the directory of a relevant pool type for an available pool record (indicated by a 1). When matched, the relative position number in the directory is used as an ordinal number and the pool record is marked as dispensed (meaning not available) by setting the bit indicator to zero. This act is known as dispensing a pool record. The pool record reference to the available pool record is returned to the application that issued the get file storage macro request in a file address reference word (FARW) of its ECB.
This pool record reference is converted to a physical address by the find and file macro service routines.
The return file pool address (RELFC) macro service routine reverses the availability bit of a pool record in a pool directory. In the case of a release, (return) the pool record reference is converted into the relative bit position in the pool directory.
A pool directory is usually so large that it requires multiple data records to contain all of the pool record bits. These records cannot all be held in main storage during online execution. This requires a cycling of directories from file storage to main storage and back to file storage. This mechanism is described in more detail in Directory Reordering.