When processing an add or update record command, the Adabas nucleus may need to allocate an additional extent to any of the following file components:
address converter
normal index
upper index
Data Storage
This document describes the rules used for the allocation.
The size of the address converter is initially defined by the MAXISN parameter in the ADALOD utility. The actual highest expected ISN is slightly higher because the address converter is stored in entire blocks. For example:
If RABNSIZE=3, MAXISN=5000 on a model 3380 with 668 entries per block (2004/3) results in 8 blocks. The highest ISN expected (before further expansion) is therefore 5343 (668 * 8 - 1).
If RABNSIZE=4, MAXISN=5000 on a model 3380 with 501 entries per block (2004/4) results in 10 blocks. The highest ISN expected is therefore 5009 (501 * 10 - 1).
If the Adabas nucleus requires an additional extent for a file when executing N1 commands, the allocation routine attempts to locate a new extent of 25% of the current size:
If an unused extent between 25% and 28% can be found using the free space table (FST), that space is taken immediately;
If only longer extents are available in the FST, a new extent of exactly 25% is taken;
If only smaller extents are available in the FST, the longest available extent is taken;
If an additional AC extent is required, and the maximum has already been assigned, Adabas will return an appropriate response code to the calling program;
If a file has the attribute "one AC extent only" (e.g., if the file is an expanded file), an attempt to allocate a second AC extent will cause a response code.
For the purpose of allocating a new extent, the following formulas are used:
where
B | number of blocks currently allocated. |
E | highest ISN expected. |
U | highest ISN currently allocated. |
If an extent found in the FST is contiguous with the end of a previous extent, it is allocated for a maximum of Z blocks.
If no such extent can be found in the FST
but an extent between Z and 9 * Z/8 is found, it is allocated.
but an extent with more than 9 * Z/8 blocks is found, then a new extent is allocated with exactly Z blocks.
the longest extent in the FST is allocated as the new extent.
Additionally, if the MAXNI, MAXUI, or MAXDS parameter is specified for the current file, the nucleus allocates no more than the specified maximum number of blocks for the NI, UI, or DS, respectively.