These <------------- 4 bytes -------------) .-- IPOINTER -- pointer to the first
o (0) I I I free element on the chain, or
zero, if the chain is empty. I NUM -- the number of elements on
4 (4) 1 the chain. I I I MAX -- the value in this werd is
8 (8) I the size of the largest free I element on the chain. I I FLAGS- I SKEY - I TCODE -I Unused
12(C) I Flag IStorage IFREETAB I I byte I key I code , L-- __________________________________ the follcving uses; POINTER This field points to the first element on this chain of free
elements. If there are no elements on this free chain, then
the POINTER field contains a zero. NUM This field contains the number of elements on this chain of
free elements. If there are no elements on this free chain,
then this field contains a zero. MAX This field is used for the purpose of avoiding searches which
will fail. It contains the size, in bytes, of the largest
element on the free chain. Thus, a search for an element of a
given size will not be made if that size exceeds the ftAX field. FLAGS The following flags are used:
FLCLN (X' 80') Clean-up flag -This flag is set if the chain must be cleaned up.
This is necessary in the following circumstances:
- If one of the two high-core chains contains a 4K page that is
pointed to by FREELOWE, then that page can be removed from the
chain, and FREELOVE can be increased.
- All completely non-allocated 4K pages are kept on the user
chain, by convention. Thus, if one of the nucleus chains
(low-core or high-core) contains a full page, then this page must be transferred to the corresponding user chain.
FLCLB (X'40') Clobbered flag -Set if the chain has been destroyed.
FL H
C (X ' 20 )
High-core chain -Set for both the nucleus and user high-core
chains. FLHU (X' 10') Nucleus chain -Set for both the low-core and high-core nucleus
chains. 2-102 IBM VM/370 System Logic and program Deter.ination--Volume 2
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
Previous Page Next Page