The other situations which cause shadow table invalidation arise from the simulation of privileged instructions in DBKPRV. Flags are set in
the VMBLOK whenever the virtual machine loads either control register 0 or 1, and DBKPRV calls DMKVATAB to perform whatever maintenance is
required. When control register 1 is loaded by the virtual machine, DBKVATAB must re-copy the virtual segment table into first-level storage
and invalidate the entire shadow segment table. ihen control register 0 is loaded, DMKVATAB examines the relocation-architecture control bits to
determine if they have changed, (such that the format of the virtual
page and segment tables no longer matches that of the shadow tables). If
the format has not changed, the shadow tables are left intact;
otherwise, all of the shadow tables must be returned to free storage and
another set, in the new format, must be allocated and initialized. The
same actions can result from modifying the control registers via the CP console functions, in which case DMKVATAB is called from DBKCDB. The
privileged operation, PTLB, also causes the virtual segment tables to be
re-copied and all of the shadow page tables to be invalidated because
the shadow tables are the logical equivalent of the translation
look-aside buffer. DMKPRV provides virtual interrogation of the reference and change
bits in the virtual storage keys, which involve the privileged 15K, SSK, and RRB. The privileged instruction LRA is simulated via DMKVATLA, which searches the virtual page and segment
tables to translate a third-level storage address to a second-level
storage address, returning a condition code indicator to DBKPRV, or
forcing an interruption if the tables are incorrectly formatted. Most error situations that occur in the virtual machine are handled
by means of the extended program interruptions associated with the real
address translation hardware. Whenever a virtual relocating machine loads control registers 0 or 1 with an invalid value, D8KVAT releases
all of the shadow tables exactly as if the hardware controls had
changed. The shadow control registers are set valid, with the shadow
segment table re-allocated at a minimum size and all segments marked unavailable. Flag bits are set in the VBBLOK to indicate that the
shadow tables are artificially valid, and DBKV1TSX reflects a
translation specification exception to the virtual machine as soon as it
is dispatched. While it is possible for the virtual machine to enter an
interruption loop (if the new PSi is also a translate mode PSi), the
cited process prevents the occurrence of a disabled loop within CP, which would result if the virtual machine is never dispatched.
FREE STORAGE MANAGEMENT DMKFRE is responsible for the management of free storage, and CP uses it
to obtain free storage for I/O tasks, CCW strings, various I/O buffers,
etc. It is used, in fact, for practically all such applications except
real channel, control unit, and device blocks, and the CORTABLE.
Block sizes of 30 doublewords or less, constituting about 99 per cent
of all calls for free storage, are grouped into 10 subpool sizes (3
doublewords each), and are handled by LIFO (push-down stack) logic.
Blocks of greater than 30 double words are strung off a chained list in
the classic manner. 1-120 IBM V!/370 Systel Logic and Problem Deteraination--VoluBe 1
When sub pools are exhausted, saall blocks are generally obtained fro.
the first larger block at the end of available free storage. Large
blocks, on the other hand, are obtained from the high-nuabered end of
the last larger block. This procedure tends to keep the volatile small subpool blocks separated from the large blocks, soae of which stay in
storage for much longer periods of time; thus, undue fragmenting of
available storage is avoided. D8KFRE initially starts without any subpool blocks. They are
obtained fro. D8KFREE and returned to D8KFRET on a demand basis.
The various cases of calls to D8KFREE for obtaining free storage, or
to D8KFRET for returning it, for subpool sizes and large sizes, are
handled as follows: Subpool Available: If a call for a subpool is aade and a block of the
suitable size is available, the block found is detached from the chain,
the chain patched to the next subpool block of the sa.e size (if any),
and the given block returned to the caller.
Subpool Not If a block of suitable si2e is not available when
a call to D8KFREE is made for a sub pool, the chained list of free
storage is searched for a block of equal or larger size. The first block
of larger or equal storage is used to satisfy the call (an equal-size
block taking priority), except that blocks within the dyna.ic paging
area are avoided if at all possible. If no equal or larger block is
found, all the subpool blocks currently not in use are returned to the
.ain free storage chain, and then the free storage chain is again
searched for a block large enough to satisfy the call. If there still is
no block large enough to satisfy the request, then D8KPTRFR is called to
obtain anotber page frame of storage fro. the dynamic paging area, and
the process is repeated to obtain the needed block.
If a call to D8KFREE is made for a block larger than 30 doublewords, the
chained list of free storage is searched for a block of equal or larg.er
size. If-an equal-size block is found, it is detached fro. the chain and
given to the caller. If at least one larger block is found, the desired
block size is split off the high-numbered end of the last larger block
found, and given to the caller. If no equal or larger block is found, D8KPTRFR is called to obtain another page frame of storage from the dynamic paging area, and the above process is repeated (as necessary) to obtain the needed block.
If a subpool block is given back via a call to DftKFRET, the block is
attached to the appropriate subpool chain on a LIFO (push-down stack)
basis, and return is .ade to the caller. If, however, the block was in a page within the dynamic paging area, the block is returned to the
regular free storage chain instead.
CP Introduction 1-121
Previous Page Next Page