Shared Segment Protection
When the named segment is no longer needed, it can be detached. The CP DIAGNOSE code X'64' subcode X'0008', is called the PURGESYS function; it
detaches named segments. 'Nhen 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.
Installations may optionally protect or not protect shared segments. When seg­
ments are protected, CP ensures that a virtual machine does not access a shared
segment that another virtual machine has modified. When segments are not pro­
tected, CP does not provide this service.
If a virtual machine modifies an unprotected shared segment, other virtual
machines sharing the segment may be affected by the modification. Therefore,
before running without shared segment protection, ensure that none of the virtual
machines modify shared segments.
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/SP 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 Systems". 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 func­
tion 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 CMS DEBUG
command. CP's handling of storage keys includes the following:
Generating Saved Systems 79
Virtual Machine Operation No distinction is made between shared and nonshared 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 nec­
essary because VMA updates the key on SSK instructions (including the SWPTABLE fields), but the new value is not detected by the hardware change
bit 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. 110 activity into shared segments is monitored by channel program translators. A
channel protection error occurs if a virtual machine attempts to read data into a
shared segment.
The STCP command may be used to alter shared segments. When the STCP command is used to alter shared segments, the change is reflected to all users of the
shared segments; the altered shared system is not assigned to the user issuing the STCP command. Whenever the STCP command is issued for a shared segment,
storage is updated and the page that changed is written to the paging volume, thus
reflecting the change to all users of the shared segment.
If you issue a STORE, ADSTOP, or TRACE command that alters a storage
location within a shared segment, you receive the following message:
DMKVMA181E SHARED COPY SYSTEM name REPLACED WITH NON-SHARED COPY Execution continues in your virtual machine; however, you are now executing your
own copy of the shared system in nonshared mode. The nonshared system you are
executing includes the change you just made; all other users of the shared system
continue to execute in shared mode and are not affected by your change.
If you alter a shared page by any means other than the TRACE, ADSTOP, or STORE command, you receive the following message:
DMKVMA456W CP ENTERED; name SHARED PAGE hexloc ALTERED
You must enter the BEGIN command to continue execution. The altered page is
returned to free storage by CP, and you may continue with an unaltered system in
shared mode.
If you issue an STCP command that alters the storage of a shared segment, storage
is altered and the page altered is written to the paging volume. All users, including
you, remain in shared mode and the change becomes part of the shared system. If
operations overlap and you issue a STCP command for a shared page that is about
to be assigned to a particular user as nonshared (because he just altered it), you
receive the following message:
DMKCDS161E SHARED PAGE hexloc ALTERED BY userid
You should check that you issued the STCP command correctly and then wait until
the fresh copy of the saved system is loaded before reissuing the STCP command. 80 VM/SP System Programmer's Guide
Previous Page Next Page