FLPA (X'OS') Page available -This flag is set if
available on the chain. Note that this
there is no such page available.
there is a full
flag may be set
4K page
even if SKEY This one-byte field contains the storage key assigned to storage
on this chain. TCODE This ene-byte field contains the FREETAB table code for storage on
this chain.
Each element on the free chain has the following format:
<------------- 4 bytes -------------) r-- I POINTER --pointer to the next 0(0) I element in the free chain I 1------------------------------------ I SIZE -- size of this free
4 (4) element, in bytes
Remainder of this free element When the user issues a variable length GETMAIN, the control program
reserves 6 1/2 pages for usage; this is a designed and set value.
If the user wants more space, fer example, fer more directories, be
should free (from the high end of storage) some of the variable area. As indicated in the illustration above, the POINTER field points to
the next element in the chain, or contains the value zero if there is no
next element. The SIZE field contains the size of this element, in
bytes.
All elements within a given chain are chained together in order of
descending stcrage address. This is done for two reasons:
1. Because the allocation search is satisfied by the first free
element that is large enough, the allocated elements are grouped
together at the top of the storage area, and prevent storage
fragmentation. This is particularly important for high-storage
free storage allocations, because it is desirable to keep FREELOWE as high as possible.
2. If free storage does become somewhat the search causes
as few page faults as possible.
As a matter of convention, completely nonallccated 4K pages are kept on the user chain rather than the nucleus chain. This is because
requests for large blocks of storage are made, most of the time, from
user storage rather than from nucleus storage. Nucleus requests need to
break up a full page less frequently than user requests. Method of operation and Program Organization 2-103
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
Previous Page Next Page