A special external interrupt, code 1'4001' notifies a virtual machine
of a pending Virtual Machine Communication Facility request. The XINTBLOK for this interrupt is set up with an XINTSORT field of
I'7FFFFFFF', the lowest priority. System Support FREE STORAGE MANAGEMENT During its execution, CP occasionally requires small blocks of storage
that are used for the duration of a task. CP obtains this storage from the free storage area. The free storage area is divided into various
size subpools. The requester informs the free storage manager of the
size of the block required and the smallest available subpool that
fulfills the request is allocated to the requester. When the block is
no longer needed, the requester informs the free storage manager and CP returns the block to free storage.
If the request for free storage cannot be fulfilled, the free storage
aanager requests the teaporary use of a page of storage from the dynaBic
paging area. If a page is obtained, the page is chained to the free
storage area and used for that purpose until it is no longer needed and
subsequently returned to the dynamic paging area.
If the request for a page cannot be fulfilled; the requester waits until free storage becomes available. STORAGE PROTECTION VM/370 provides both fetch and store protection for real storage. The
contents of real storage are protected froa destruction or misuse caused
by erroneous or unauthorized storing of fetching by the program. Storage is protected from improper storing or from both improper storing
and fetching, but not from improper fetching alone. When the processor accesses storage, and protection applies, the
protection key of the current PSW is used as the co.parand. The
protection key of the processor is bit positions 8-11 of the PSi. If the processor access is prohibited because of
violation, the operation is suppressed or terminated,
interruption for a protection exception takes place.
a protection
and a program When the reference is made to a channel, and protection applies, the
protection key associated with the I/O operation is used as the comparand. The protection key for an I/O operation is in bit positions 0-3 of the CAW and is recorded in bit positions 0-3 of the CSi stored as
a result of an I/O operation. If channel access is prohibited, the CSi stored as a result of the operation indicates a protection-check
condition. When a storage access is prohibited because of a store protection
violation, the contents of the protected location remain unchanged. If
a fetch protection violation occurs, the protected information is not
loaded into an addressable register, moved to another storage location,
or provided to an I/O device. CP Introduction 1-77
To use fetch protection, a virtual machine must execute the set
storage key (SSK) instruction referring to the data areas to be
protected, with the fetch protect bit in the key. VM/370 subsequently:
1. Checks for a fetch protection violation when handling privileged
and nonprivileged instructions.
2. Saves and restores the fetch protection bit (in the virtual storage
key) when writing and recovering virtual machine pages froB the
paging device.
3. Checks for a fetch protection violation on a write CCW (except for
spooling or console devices).
A special case of storage protection occurs when the CMS nucleus
resides in a protected shared segment. The CMS nucleus may be protected
and still be shared by many CftS users. After a virtual machine has used
a protected shared segment, the pages are checked for changes. If any
pages have been changed, the user gets placed in console function mode after error :essage DMKVKA U 56W. the changed page is
returned to CP free storage. EXECUTING THE PAGEIBLE CONTROL PROGRAM Calls to pageable routines are recognized at execution time by the SVC 8
linkage manager in DMKSYC. For every SVC 8, the called address (in the
caller's GPR15) is tested to see if it is within the resident nucleus.
If it is less than DMKCPEND and greater than DMKSLC, the called
routine's base address is placed in GPR12 and control is passed to the
called routine in the normal way. However, if the called address is
above DftKCPEND or below DMKSLC, the linkage manager issues a TRIIS macro, requesting the paging manager to locate and, if necessary,
page-in the called routine. The TRANS is issued with LOCK option.
Thus, the lock count associated with the called routine's real page
indicates the responsibility count of the module. • When the module is called, the count is incremented. • When the routine exits via SVC 12, the count is decremented. When the count reaches zero, the pageable routine is unlocked and is
eligible to b-e paged out of the system. However, because all CP
pageable modules are reenterable, the page is never swapped out, but
when the page is stolen, it is placed directly on the free page list.
Because unlocked pageable routines participate in the paging process
in a manner similar to user virtual storage pages, the least recently
used approximation used by page selection tends to make highly used
control program routines, even when not locked, remain resident. The
called routine is locked into real storage until it exits. Thus, it can
request asynchronously scheduled function, such as I/O or timer interrupts, as long as it dynamically establishes the interruption
return address for the requested operation and does not give up control
via an EXIT macro prior to receiving the requested interruption.
Addressability for the module, while it is executing, is guaranteed
because the CALL linkage loads the real address of the paged module into
GPR12 (the module base register) prior to passing control. If all
addressing is done in a base/displacement form, the fact that the Bodule is executing at an address different from that at which it was loaded is
not apparent. llthough part of CP is pageable, it never runs in
relocate mode. Thus, the processor is not degraded by the DIT feature
being active, and no problems occur because of handling disabled page
faults.
1-78 IBM Y8/370 System Logic and Problem Determination--Voluae 1
Previous Page Next Page