real values as follows: RSK=O for each page of the shared segment, RSK=F for all other pages, and RPK=F, always, for the real PSi. The SSK instruction is ignored, except to save the key value in a table in case
the virtual machine later does anISK to get it back.
For theCMS saved system, the RSKs and RPK are initialized as before, but resetting the virtual keys has the following effects:
• If the virtual machine uses anSSK instruction to reset a VSK, CP does the following: If the new VSK is nonzero, CP resets the RSK to
the value of theVSK; if the new VSK is zero, CP resets RSK to F. • If the virtual machine uses a LPSi (or other) instruction to reset
theVPK, CP does the following: If the new VPK is zero, CP resets the RPK to the value of the VPK; if the new VPK is zero, CP resets RPK to
F.• If the VPK=O and
differently. In
program to store
storage key. But
unless theRPK of
the RPK=F, storage protection may be handled
a real machine, aPSi key of 0 would allow the
into any storage location, no what the
underCP, the program gets a protection violation,
the page happens to be F.
Because of this, thereis extra code in the CP program check handling
routine.Whenever a protection violation occurs, CP checks to see if
the following conditions hold:
The virtual machine running is the savedCMS system, running
with a sharedsegment. The VPK = O. The virtual machine is operating as though its PSi key is O. The RSK of the page into which the store was attempted is
nonzero, and different from theRPK. If anyone of these three conditions fails to hold, then the
protection viclation is reflectedback to the virtual machine.
If all three of these conditions hold, then theRPK (the real
protectionkey in the real PSW) is reset to the RSK of the page into
which the storewas attempted. Q! In CMS, this works as
storage in protectkey F (RSK = VSK =
key E(RSK = VSK = E).
follows:CMS keeps its system
F), and user storage in protectWhen the CMS supervisor is running, it runs in PSi key 0 (VPK = 0, RPK = F), so that CMS gets a protection violation the first time it
tries to store into user storage(VSK = RSK = E). At that point, CP changes the RPK to E, and lets the virtual machine re-execute the
instruction which caused the protection violation. There is not another
protection violation until the supervisor goes back to storing into
system-protected storage.Q! £MS: There are several coding restrictions which must
be imposed onCMS if it is to run as a saved system.
The first and most obvious one is thatCftS may never modify segment
1, the shared segment, which runs with aRSK of C, although the VSK = F.
A less obvious,
never modify with
but just as important, restriction, is thateMS may a single machine instruction (except MVeL) a section CMS Method of Operation and Program Organization 2-109
the virtual machine later does an
For the
• If the virtual machine uses an
the value of the
the
F.
differently. In
program to store
storage key. But
unless the
the RPK=F, storage protection may be handled
a real machine, a
into any storage location, no
under
the page happens to be F.
Because of this, there
routine.
the following conditions hold:
The virtual machine running is the saved
with a shared
nonzero, and different from the
protection viclation is reflected
If all three of these conditions hold, then the
protection
which the store
storage in protect
key E
follows:
F), and user storage in protect
tries to store into user storage
instruction which caused the protection violation. There is not another
protection violation until the supervisor goes back to storing into
system-protected storage.
be imposed on
The first and most obvious one is that
1, the shared segment, which runs with a
A less obvious,
never modify with
but just as important, restriction, is that