a location in the corresponding storage
block is referred to either for storing
or for fetching of information. Change Bit The change bit, bit 6, is set to one each time information is
stored at a location in the correspond­
ing storage block.
Storage keys are not part of addressable
storage. Provided that the storage-key
4K-byte-block facility is not installed,
a storage key is associated with each
2K-byte block of storage. The entire
storage key is set by SET STORAGE KEY and inspected by INSERT STORAGE KEY. Additionally, the instruction RESET
REFERENCE BIT provides a means of
inspecting the reference and change bits
and of setting the reference bit to
zero. Bits 0-4 of the storage key are
inspected by the INSERT VIRTUAL STORAGE KEY instruction. The contents of the
storage key are unpredictable during and
after the execution of the usability
test of the TEST BLOCK instruction. STORAGE-KEY 4K-BYTE-BLOCK FACILITY
Depending on whether the storage-key
4K-byte-block facility is installed, one
or two storage keys are associated with each 4K-byte block of storage that is in
the configuration. The storage-key­
exception control is also provided as
part of this facility.
storage Keys with Storage-Key
4K-Byte-Block Facility Not Installed
When the storage-key 4K-byte-block
facility is not installed, two keys are
associated with the block, and the block is called a double-key 4K-byte block.
In a double-key 4K-byte block, one key is associated with the first 2K-byte
block and one with the second 2K-byte
block. The keys are referred to as the
low-order and high-order keys, just as
the two 2K-byte blocks are referred to
as the low-order and high-order 2K-byte
blocks. The instructions INSERT STORAGE KEY, RESET REFERENCE BIT, and SET STOR­ AGE KEY designate a 2K-byte block and
operate on the high-order or low-order
key, whichever is addressed. The
instructions INSERT STORAGE KEY EXTENDED, RESET REFERENCE BIT EXTENDED,
and SET STORAGE KEY EXTENDED designate a 4K-byte block and operate on both the
high-order and low-order keys.
Storage Keys with Storage-Key
4K-Byte-Block Facility Installed
When the storage-key 4K-byte-block
facility is installed, only one key is associated with a 4K-byte block, and it
is called a single-key 4K-byte block.
In a single-key 4K-byte block, the
single key is associated with both
2K-byte blocks. The instructions INSERT STORAGE KEY EXTENDED. RESET REFERENCE
BIT EXTENDED, and SET STORAGE KEY EXTENDED operate on the single key of the block. The action taken when the
instructions INSERT STORAGE KEY, RESET
REFERENCE BIT, and SET STORAGE KEY are executed depends upon the setting of the
storage-key-exception control, bit 7 of
control register O. Storage-Key-Exception Control
When the storage-key 4K-byte-block
facility is installed, bit 7 of control
register 0, the storage-key-exception­
control bit, controls the execution of
the instructions INSERT STORAGE KEY, RESET REFERENCE BIT, and SET STORAGE KEY. If the bit is zero, a special­
operation exception is recognized. If
the bit is one, the operation is
performed on the single key associated with the 4K-byte block.
When the storage-key 4K-byte-block
facility is not installed, a storage key
is associated with each 2K-byte block,
and bit 7 of control register 0 is
ignored. STORAGE-KEY-INSTRUCTION EXTENSIONS The storage-key-instruction-extension
facility includes the three instructions
INSERT STORAGE KEY EXTENDED, RESET
REFERENCE BIT EXTENDED, and SET STORAGE KEY EXTENDED. These instructions
provide operations similar to those of
INSERT STORAGE KEY, RESET REFERENCE BIT,
and SET STORAGE KEY, except that they
operate on both single-key and double­
key 4K-byte blocks without reference to the state of the storage-key-exception­
control bit and provide a 31-bit real
address. PROTECTION Three protection facilities are provided
to protect the contents of main storage
from destruction or misuse by programs
that contain errors or are unauthorized:
key-controlled protection, segment
protection, and low-address protection.
Chapter 3. Storage 3-7
The protection facilities are applied
independentlY; access to main storage is
only permitted when none of the facili­
ties prohibit the access.
Key-controlled protection affords
protection against improper storing or against both improper storing and fetch­ ing, but not against improper fetching
alone. KEY-CONTROLLED PROTECTION When key-controlled protection applies
to a storage access, a store is permit­
ted only when the storage key matches
the access key associated with the
request for storage access; a fetch is
permitted when the keys match or when
Conditions Is
the fetch-protection bit of the storage
key is zero.
The keys are said to match when the four
access-control bits of the storage key
are equal to the access key, or when the
access key is zero.
The protection action is summarized in
the figure "Summary of Protection Action." When the access to storage is initiated
by the CPU and key-controlled protection
applies, the PSW key is the access key,
except that, for the second operand of
MOVE WITH KEY and MOVE TO PRIMARY and
the first operand of MOVE TO SECONDARY, the access key is specified in a general
register. The PSW key occupies bit
positions 8-11 of the current PSW. Access to
Storage Permitted? Fetch-Protection Bit of
Storage Key Key Relation Fetch Store 0 f<latch Yes Yes 0 Mismatch Yes No 1 Match Yes Yes
1 Mismatch No No EXElanation:
Match The four access-control bits of the storage
key are equal to the access key, or the access
key i s zero. Yes Access i s permitted. No Access is not permitted. On fetching, the
information is not made available to the
program; on storing, the contents of the
storage location are not changed.
Summary of Protection Action
3-8 System/370 Principles of Operation
Previous Page Next Page