The shadow segment table is constructed in first-level storage and
initialized to indicate that all segments are unavailable. Flags are
aaintained in the VMBLOK to indicate that the shadow tables exist. DMKVATMD also constructs the shadow control registers 0 and 1. Shadow control register 0 contains the external interruption mask bits used by CP, mixed with the hardware controls and enabling bits from virtual
control register o. Shadow control register 1 contains the segment
table origin address of the shadow segment table. When the virtual machine is operating in virtual translate mode, CP loads the shadow control registers into the real control registers and
dispatches the user. The immediate result of attempting to execute an
instruction is a segment exception, intercepted by DMKPRG and passed to DMKVATSI. DMKVATSI exaaines the virtual segment table in second-level
storage. If the virtual segment is not available, the segment exception
interruption is reflected to the virtual machine. If the virtual
segment is marked available# then DMKV1TSI: Allocates one full segment of shadow page table, in the format specified by virtual control register o. Sets all of the page table entries to indicate page not in storage. Barks the segment available in the shadow segment table. Redispatches the virtual machine via DMKDSP. Once again, the i.mediate result is an interruption, which is a
paging exception and control is passed to DMKVATPI. DMKVATPI references
the virtual page table in second-level storage to determine if the
virtual page is available. If the virtual page is not available, the
paging interruption is reflected to the virtual machine. However, if
the virtual page is marked in storage, the virtual page table entry
determines which page of second-level storage is being referenced by the
third-level storage address provided.. DftKVATPI next determines if t'bat
page of second-level storage is resident in first-level storage at that
tiae. If so, the appropriate entry in the shadow page table is filled
in and marked in storage. If not, the required page is brought into
first-level storage via DMKPTRAN and the shadow page table filled in as
above.
As the virtual machine continues execution, aore shadow tables are
filled in or allocated as the third-level storage locations are
referenced. Whenever a new segment is referenced, another segment of
shadow page tables is allocated. Whenever a new page is referenced, the
appropriate shadow page table entry is validated, etc. No changes are made in the shadow tables if the virtual aachine leaves translate mode (usually via an interruption), unless it also leaves extended control
aode. Dropping out of BC mode is the signal for CP to release all of the
shadow page and segment tables and the copy of the virtual segment
table.
There are soae situations that require invalidating all of the shadow
tables constructed by CP or even releasing and reallocating thea. Whenever DftKPTR swaps out a page that belongs to a virtual relocating
aachine, it sets a bit in the VMBLOK indicating that all of the shadow
page tables .ust be invalidated. Invalidation of all of the tables is required since CP does not know which third-level storage pages map into
the second-level page that is being swapped out. The actual
invalidation is handled by D!KVATAB, called fro. DMKDSP when the virtual
aachine is on the verge of being dispatched. CP Introduction 1-119
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
Previous Page Next Page