April 1, 1981
with a subcode of X'OC', it can verify that a loadable copy of the
discontiguous shared segment exists on a CP-owned volume. This DIAGNOSE code is called the FINDSYS function. FINDSYS returns the starting
address of the segment. The virtual machine should compare the starting
address of the segment to its own ending address; if the segment does
not oveclay existing storage, it can be loaded.
A LOADSYS function is provided by the CP DIAGNOSE code X'64' and
subcodes X'OO' and X'04'. The section "Diagnose Instruction in a Virtual Machine" contains a complete description of the Diagnose codes
used in the discontiguous saved segment interface. If you want CMS to
load the named segment in nonshared mode, you may do -so by issuing the CMS command: SET NONSHARE segment name
before eMS attaches the named segment. If the segment is loaded in
nonshared mode you can test and debug it usinq the CP TRACE, STORE, and ADSTOP commands and the CMS DEBUG subcommands BREAK and STORE. When eMS loads a named segment in shared mode, it issues the CP DIAGNOSE code X'64' with subcode X'OO'. CMS also issues the same code
with subcode X'04' to load the named segment in nonshared mode. When a discontiguous saved segment is loaded (or attached) to a
virtual machine, CP expands its segment table entries for that virtual
machine to reflect the highest address of the virtual machine. When a named segment is successfully loaded, all of its storage is
addressable by the virtual machine. For example, when CMS attaches a
named segment, it can execute the routines contained in that segment.
All of the commands that are executable for CMS are also executable for
the attached named segment, with the following exceptions: The response for the CP QUERY VIRTUAL STORAGE command does not
reflect the storage occupied by the named segment. If you execute a command that alters storage (such as STORE), you are
given a nonshared copy of the named segment. When the named segment is no longer needed, it can be detached. The CP DIAGNOSE code X'64' subcode X'08', is called the PURGESYS function;
it detaches named segments. When a named segment is detached, its
storage is no longer addressable by the virtual machine and CP updates
its segment tables. The entries for segments beyond the original
virtual machine size are deleted and the associated real storage is
released. Shared Segment Protection
Installations may optionally protect or not protect shared segments. When segments are protected, CP ensures that a virtual machine does not
access a shared segment that another virtual machine has modified. When segments are not protected, CP does not provide this capability.
If a victual machine modifies an unprotected shared segment, other
virtual machines sharing the segment may be affected by the
modification. Therefore, before running without shared segment pcotection, ensure that none of the virtual machines modify shared
segments. 140 IBM VM/370 System Programmer's Guida
Page of GC20-1807-7 As Updated April 1, 1981 by TNL GN25-0829 Shared segments modified by the CP commands TRACE, ADSTOP, or STORE are handled differently by CP. In this case, CP gives exclusive use of
the modified segment to the virtual machine that modified it. CP provides an unmodified copy of the segment for other virtual machines.
The VM/370 default is to protect shared segments. To turn off
segment protection, use the NAMESYS macro instruction. This macro
instruction can also turn on segment protection. Instructions for using
the NAMESYS macro instruction are in the section "The NAMESYS Macro for Saved System." When segment protection is on, CP protects segments in the following
way. Before dispatching a virtual machine, CP determines if the current
virtual machine altered any pages within the shared segments. If a page
was altered, CP sends a message to the current virtual machine to
identify the altered page, makes the altered page inaccessible, and
stops the current virtual machine by placing it into console fUnction mode. CP then dispatches another virtual machine. To resume execution
on the virtual machine that CP stopped, the operator of that machine
must issue the class G BEGIN command.
To make an altered page inaccessible, CP frees the storage the page
occupied. Later, when a virtual machine references the page, CP brings
a fresh copy of the page into storage. Shared segment protection supports: The virtual machine assist feature and Extended Control-Program
support for named shared systems. The execution of all options of the CP STORE command in shared
segments, including branch and instruction tracing. The execution of the CP STORE and ADSTOP commands in shared segments. The execution of the STORE and BREAK subcommands of the eMS DEBUG command.
CP's handling of storage keys includes the following: No distinction is made between shared and non$hared systems for
storage key fetch instruction simulation, DISPLAY command execution,
and page key handling. A mask in control register 6 prevents the ISK (insert storage key)
and SSK (set storage key) instructions from being handled by the VMA feature. This is necessary because VMA updates the key on SSK instructions (including the SWPTABLE fields), but the new value is
not detected by the hardware change bft monitoring. CP does not permit a user of shared systems to set storage keys via
the Set Storage Key (SSK) instruction. Thus, one user cannot prevent
other users from accessing shared storage. I/O activity into shared segments is monitored by
translators. A channel protection error occurs if a
attempts to read data into a shared segment.
channel program
virtual machine Part 2. Control Program (CP) 1ij1
Previous Page Next Page