be purged under conditions additional to those for
which purging is mandatory.
States of Translation-Table Entries
The effects of any manipulation of the contents of a
table entry by the program and the recording of its
contents in the TLB depend on whether the entry is
valid, on whether the entry is attached, and on
whether the entry is active.
The valid state denotes that the segment or page
associated with the table entry is available. An entry
is valid when the segment-invalid bit or page-invalid
bit in the entry is zero. A segment-translation or
page-translation exception is recognized when an at­
tempt is made to use an invalid table entry for trans­
lation.
The attached state denotes that the CPU can
attempt to use the table entry for implicit address
translation and hence depends on the state of the
CPU as specified by the PSW, control register 1, and
bit positions 8-12 of control register o.
A segment-table entry is attached to a CPU when
all of the following three conditions are met: The current PSW specifies the translation mode. The entry is within the segment table designated
by control register 1. With the segment size currently specified in
control register 0, the entry can be designated
by a logical address.
The PSW is considered to specify the translation
mode when bit 5 is one and the EC mode is speci­
fied, regardless of whether the contents of any other
PSW fields are due to cause an exception to be rec­
ognized.
A page-table entry is attached to a CPU when it
is within the page table designated by the page-table
address and page-table length either in an attached
and valid segment-table entry or in a TLB copy of
an attached segment-table entry and by the page­
size specification in control register O. The active state denotes that the table entry may
remain recorded in the TLB.
A table entry becomes active when it is made
both valid and attached or after the TLB is purged
with the table entry both valid and attached. A table
entry ceases being active when the TLB is purged.
Although all entries become inactive during a purge
of the TLB, entries that are both valid and attached
become active at the completion of the purge. The segment size controls how many segment-table
entries can be referred to for translation. Both the
page size and segment size control selection of page-
Page of GA22-7000-4 Revised September 1, 1975
By TNL: GN22-0498
table entries and hence may affect whether or not an
entry is attached.
Although a table entry becomes active when it is
made both valid and attached, it need not remain
valid and attached to remain active. For example, an
attached table entry remains active when the I bit is
set to one, and a valid table entry remains active
when it is made unattached.
Use of the Translation-Lookaside Buffer
A segment-table entry or a page-table entry may be
placed in the TLB only when the entry is attached
and the I bit in the entry is zero. The entry may be
placed in the TLB as soon as it becomes attached
and valid.
Information from a TLB copy of a segment-table
entry may be used for implicit address translation
only when the TLB entry was formed using informa­
tion that was fetched from storage as an attached
and valid segment-table entry, only when that real
storage location is selected as a segment-table entry
during the translation process, and only when the
table entry is attached at the time of the selection.
Information from a TLB copy of a page-table
entry may be used for implicit address translation
only when the TLB entry was formed using informa­
tion that was fetched from storage as an attached
and valid page-table entry, only when that real stor­
age location is selected as a page-table entry during
the translation process and the table entry is attached
at the time of selection, and only when the
page size at the time of forming the TLB copy was
the same as the current page size.
The operand address of LOAD REAL AD­
DRESS is translated without the use of the TLB
contents. Translation in this case is performed by the
use of the designated tables in main storage.
All information in the TLB is necessarily cleared
only by execution of PURGE TLB, SET PREFIX,
or CPU reset.
Programming No entries can be placed in the TLB in the BC mode
or when translation is not specified, because the
table entries at this time are not attached. In particu­
lar, translation of the operand address of LOAD REAL ADDRESS, with translation suppressed, does
not cause entries to be placed in the TLB.
Conversely, when translation is specified, infor­
mation may be loaded into the TLB from all
translation-table entries that could be used for ad­
dress translation, given the current designation of
page size, segment size, segment-table address, and
segment-table length. The loading of the TLB does
not depend on whether the entry is used for transla-
Dynamic Address Translation 65
Page ofGA22-7000-4 Revised September 1, 1975
By TNL: GN22-0498
tion as part of the execution of the current instruc­
tion, and such loading can occur when the wait state
is spedfied. Similarly, information from a segment­
table or page-table entry having a format error may
be re(!orded in the TLB.
More than one copy of a table entry may exist in
the TLB. For example, some implementations may
cause a copy of a valid table entry to be placed in
the TLB for each segment-table address by which
the entry becomes attached, and some implementa­
tions may cause a valid page-table entry to be placed
in the TLB for each attached and valid segment­
table entry by which the page-table entry is desig­
nated.
Modification of Translation Tables
When an inactive, attached, and invalid table entry is
made valid, the change takes effect immediately.
Similarly, when an inactive, unattached, and valid
page-table entry is made attached by making an
inactive, attached, and invalid segment-table entry
valid, the change takes effect immediately.
However, since the exceptions associated with
dynamic address translation may be established by a
pretest for operand accessibility that is performed as
part of the initiation of the execution of the instruc­
tion, :a segment-translation or 'page-translation ex­
ception may be indicated on the basis of the state of
the table entry at the start of the execution of an
instruction. Consequently, a segment-translation or
page-translation exception may be indicated when a
table entry is invalid at the start of execution even if
the instruction would have validated the table entry
it uses and the table entry would have appeared valid
if the instruction were considered to process the
operands one byte at a time. See the section
"Recognition of Access Exceptions" in the chapter
"Interruptions" for the recognition of dynamic­
addre:ss-translation exceptions for the interruptible
instructions.
A ehange to an active table entry may take effect
for implicit translation any time from the instant of
the change through the completion of the following
purging of the TLB. Wh.en an active table entry is changed, either to
another value suitable for translation, or to a value
that prohibits its use for translation, any subsequent
attempt to use the entry for implicit address transla­
tion before the TLB is purged may yield unpredicta­
ble The use of the new value may begin be­
tween instructions or during execution of an instruc­
tion, including the instruction that caused the
change. Moreover, until the TLB is purged, the TLB
may eontain both the old and the new values, and it
is unpredictable whether the old or new value is se-
66 System/370 Principles of Operation
lected for a particular access. If the use of the new
value of the entry causes an exception, the exception
mayor may not cause an interruption to occur, and
if an interruption does occur, the instruction execu­
tion may be terminated even though the exception
would normally cause suppression or nullification.
Manipulation of attached table entries may cause
spurious table-entry values to be recorded in a TLB.
For example, if changes are made piecemeal, modifi­
cation of a valid attached entry may cause a partially
updated entry to be recorded, and, if an intermediate
value is introduced in the process of the change, a
supposedly invalid entry may temporarily appear
valid and may be recorded in the TLB. Such an in­
termediate value may be introduced if the change is
made by an 110 operation that is retried, or if an
intermediate value is introduced during the execution
of a single instruction.
When LOAD CONTROL changes the segment
size, page size, segment-table address, or segment­
table length, the values of these fields at the start of
the operation are in effect for the duration of the
operation.
The relation between the states of table entries
and their use is summarized in the table "Use of
Translation Tables." PTogranrnmdog When an instruction, such as MOVE (MVC),
changes an attached table entry, including a change
that makes the entry invalid, and subsequently uses
the entry for implicit translation, a changed entry is
being used without a prior purging of the TLB, and
the associated unpredictability of result values and
of exception indication applies.
All modifications to translation tables by the pro­
gram should consider the effect of the TLB on the
use of the tables in main storage and the possible
effects of intermediate result values and of piece­
meal changes. The following rules are recommended
for changing translation tables. If these rules are
observed, translation is performed as if the table
entries from main storage were always used for the
translation process.
1. An entry must not be changed, other than
changing the low-order bit of a page-table en­
try, while it is being used by any CPU. 2. When any change is made to a table entry,
other than a change to the low-order bit of a
page-table entry, each CPU in which the entry
is active must issue PURGE TLB after the
change occurs and prior to the use of the entry
for implicit address translation by that CPU.
Previous Page Next Page