logout-pending bit and
control-check bit, which
ones. No channel logout
with this status.
the channel­
are set to
is associated
When the TIO function is used to clear
an interruption condition signaling
conclusion of an I/O operation at the
subchannel and the channel has not yet
accepted the condition from the device,
the function causes the device to be
selected and the interruption condition
in the device to be cleared. During certain I/O operations, some types of
devices cannot provide their current
status in response to TEST I/O. Some
magnetic-tape control units, for
example, are in such a state when they
have provided channel end and are
executing the backspace-file operation.
When TEST I/O is issued to a control
unit in such a state, the unit-status
field of the CSW has the busy and
status-modifier bits set to ones, with zeros in the other CSW fields. The
interruption condition in the device and
in the subchannel is not cleared. On some types of devices, the device
never provides its current status in
response to TEST I/O, and an inter­
ruption condition can be cleared only by
permitting an I/O interruption, by
I/O-system reset, or by I/O selective
reset. When TEST I/O is issued to such
a device, the unit-status field has the
status-modifier bit set to one, with
zeros in the other CSW fields. The
interruption condition in the device and
in the subchannel, if any, is not
cleared.
However, by the time the channel assigns
the highest priority for interruptions
to a condition associated with an opera­
tion at the subchannel, the channel has
accepted the status from the device and
cleared the corresponding condition at
the device. Some channels accept and
clear an interruption condition signal­
ing the conclusion of an I/O operation
at the subchannel from the device before
it is assigned the highest priority for
interruptions. Other channels may
accept and clear any type of inter­
ruption condition from the device prior
to assigning it the highest priority for
interruptions. The acceptance of an
interruption condition from a device
causes the associated subchannel to
enter the interruption-pending state.
When the channel recognizes an inter­
ruption condition signaling the
conclusion of an I/O operation at the
subchannel, the associated subchannel
enters the interruption-pending state
even when the interruption condition has
not yet been accepted from the device.
When the TIO function is addressed to a
device for which the channel has already
accepted the interruption condition, the
device is not selected, and the condi­
tion in the subchannel is cleared
regardless of the type of device and its
present state. The CSW contains unit
status and other information associated
with the interruption condition. On the byte-multiplexer channel, the TIO function causes the addressed device to
be selected only after the channel has
serviced all outstanding requests for
data transfer for previously initiated
operations.
Program Exceptions:
Privileged operation
Resulting Condition Code: o Available
1 CSW stored
2 Channel or subchannel busy
3 Not operational
The condition code set by the TIO func­
tion for all possible states of the I/O system is shown in the figure "Condition Codes Set by TEST I/O." See the section
"States of the Input/Output System" in
this chapter for a detailed definition
of the A, I, W, and N states. Chapter 13. Input/Output Operations 13-35
A I Channel 2
A A N
Subchannel Z 2 Z A N A N CU/ Device 0 3 0 3
A Available
I Interruption pending = Interruption pending for a device other than the one
addressed In = Interruption pending for the addressed device W Working = Working with a device other than the one addressed wn = Working with the addressed device
N Not operational * CSW stored In the W*Inx state, either condition code 1 may be set with the CSW stored, or condition code 2 may be set, depending on the
channel and the activity in the channel.
Note: Underscored condition codes pertain to situations that can OCCUr only on the multiplexer channel.
Condition Codes Set by TEST I/O Programming Notes
1. Disabling the CPU for I/O inter­
ruptions provides the program with
a means of controlling the priority
of I/O interruptions selectively by
channels. The priority of devices
attached on a channel cannot be
controlled by the program. The
instruction TEST I/O in some cases
permits the program to clear inter­
ruption conditions selectively by I/O device.
2. When a CSW is stored by the TIO function, the interface-control­
check and channel-control-check
indications may be due to an inter­
ruption condition already existing
in the channel or may be due to an
interruption condition created by
the TIO function. Similarly, the
unit-check bit set to one with the
channel-end, control-unit-end, or
device-end bits set to zeros may be
due to a situation created by the
preceding operation, the I/O device
being not ready, or an equipment
error detected during the execution
of TEST I/O. The instruction TEST I/O cannot be used to clear an
interruption condition due to the PCI flag while the subchannel is
working.
3. The use of a TEST I/O loop on a
multiplexer channel to retrieve
ending status for a channel program
should, in general, be avoided.
TEST I/O loops may be used to
return ending status to a sense
command when that command was
initiated by a START I/O that
13-36 System/370 Principles of Operation
received condition code O. TEST I/O loops under other conditions
may result in hang conditions.
4. In some models, the use of a
disabled-TIO-Ioop procedure to
detect the completion of an I/O operation initiated by SIOF may
cause a deadlock condition. The
deadlock occurs if SIOF is issued
to a subchannel for which start­
I/O-fast queuing is provided, and
conditions are such that a pending I/O interruption must be cleared
before the pending I/O operation
can be initiated by the channel.
This is another example where a
disabled TIO loop does not work
reliably. INPUT/OUTPUT-INSTRUCTION-EXCEPTION HANDLING
Before the channel is signaled to
execute an I/O instruction, the instruc­
tion is tested for validity by the CpU. Exceptional situations detected at this
time cause a program interruption.
The following exception causes a program
interruption:
Privileged Operation: An I/O instruc­
tion is encountered when the CPU is in
the problem state. The instruction is
suppressed before the channel has been
signaled to execute it. The CSW, the
condition code in the PSW, and the state
of the addressed subchannel and I/O device are not affected by the attempt
Previous Page Next Page