DMSFRE METHOD OF OPERATION A description of the algorithms which allocate and release blocks
follows. The descriptions are based on the assumption that neither AREA=LOW nor AREA=HIGH was specified in the macro call. If
either was specified, then the algorithm must be appropriately modified. ALLOCATING When DMSFREE with TYPE=USER (the default) Is-Cilled; the following steps are taken to satisfy the request. As
soon as one of the steps succeeds, then processing can terminate. DMSFRE: 1. Searches low-storage user chain for a block of the required size.
2. Searches the high-storage user chain for a block of the required
size.
3. Extends high-storage user storage downward into the user program
area, modifying FREELOWE in the process.
4. For fixed requests, there is nothing more to try. For variable
requests, DMSFRE puts all available storage in the user program area onto the high-storage user chain, and then allocates the
largest block available on either the high-storage user chain or
the low-storage user chain. The allocated block is not
satisfactory, if it is not larger then the minimum requested size. ALLOCATING NUCLEUS FREE When DftSFREE with called;--the-following--steps are taken in an attempt
request, until one succeeds. DMSFREE: TYPE=NOCLEUS to satisfy
is
the
1. Searches the low-storage nucleus chain for a block of the required
size.
2. Gets free pages from low-storage user chain, if any are available,
and removes them to the low-storage nucleus chain.
3. Searches the high-storage nucleus chain for a block of the required
size.
4. Gets free pages from the high-storage user chain, if they are available, and removes them to the highstorage nucleus chain.
5. Extends high-storage nucleus storage downward into the user program area, modifying FREELOWE in the process.
6. For fixed requests, there is nothing more to try. For variable
requests, DMSFRE puts all available pages from the user chains and
the user program area onto the nucleus chains, and allocates the
largest block available on either the low-storage nucleus chains or
the high-storage nucleus chains. When DMSFRET is called, the clock teing released is
placed on the appropriate chain. At that point, the cleanup operation
is performed, if necessary, to advance FREELOVE, or to move pages from the nucleus chain to the corresponding user chain. Similar cleanup operations are performed, when necessary, after calls
to DMSFREE, as well.
2-104 IBM VM/370 System Logic and Program Determination--Volume 2
RELATIVE EFFICIENCY OF REQUESTS The types of DMSFREE request in decreasing order of efficiency, are as
follows:
1. User fixed storage requests, any size. 2. Nucleus fixed storage requests, for small blocks (less than one
page in size).
3. Nucleus fixed storage request, for large blocks.
4. User variable storage requests.
efficient than fixed requests, if
can be allocated.)
(Variable requests are no less
the maximum block size requested
5. Fixed variable storaae requests. if the maxi.um block size
requested cannot be allocated. . RELEASING ALLOCATED STORAGE STORAGE ALLOCATED BY Storage allocated by the GET!II! macro released-In any of the following ways: A specific block of such storage may be released by means of the FREEMAIN macro instruction. The STRINIT macro instruction releases all storage allocated by any
previous GETftAIN requests. Almost all CMS commands call the STRINIT routine. Thus, executing almost any CMS command causes all GET!!IN storage to be released. STORAGE ALLOCATED BY DMSFREE: Storage allocated by the D!SPREE macro Instruction-may-be released-In either of the following ways: ! specific block of such storage May be released by .eans of DMSFRET macro instruction. Whenever any user routine or eMS DMSABN is entered), and the ABEND
invoked, all DMSFREE storage
automatically.
command abends (so that the routine
recovery facility of the syste. is
with TYPE=USER is released
Except in the case of ABEND recovery, storage allocated by the DftSFREE .acro is never released automatically by the system. Thus, storage
allocated by means of this macro instruction should always be released
explicitly by .eans of the DMSFRET macro instruction. . DMSFRE SERVICE ROUTINES The system uses the DMSFRES macro instruction to request certain free
storage management services. The options and their meanings are as
follows: INIT1--DMSINS calls this option to
initialization routine, to allow free
invoke the first free storage
storage requests to access the CMS Method of Operation and Program Organization 2-105
Previous Page Next Page