CHAPTER 13. INPUT/OUTPUT OPERATIONS Attachment of Input/Output Devices •••••••••••••••••••.•.•• 13-2
Input/Output Devices ..•••••••••••.••••••••••••••••••••.. 13-2 Control Units ...•..••••.••••••••••••••••••••••••••••••.• 13-3 Channel s .•.•....•.•.•.•••••••.••••••••••.••••••••••••••. 13-3
Modes of Operation .•••••••.•••••.•••••••••.••••.•••••. 13-4
Types of Channels .....•.•••.•...•••.•••••.•.•.•••••••• 13-4 I/O-System Operation •..•••.•.•••.•••••••.••••••••.••.... 13-5 Compati bi 1 i ty of Operati on •••.••.••••.•.•••••.•.•.••••.. 13-7 Control of Input/Output Devices .•.••••••••••..••••••..•••. 13-8
Input/Output Device Addressing ...•...•••...••.•.•.••..•. 13-8 States of the Input/Output System •.••.••..•............. 13-9
Resetting of the Input/Output System ••••.•••••••••..•••• 13-12 I/O-System Reset ••...•.•..•.•...•••••••••••••••••.•••• 13-12 I/O Selective Reset .•..............•••...••••••••..•.. 13-12
Effect of Reset on a Working Device •••....•.••........ 13-12
Reset Upon Malfunction •••.•••...•••••••••••••••••••.•. 13-12 Condition Code ..••......•••••.•.•.••••••••.••.••••.•..•. 13-12
Instruction Formats .........•.•••.•••••.••••••.••••..•.. 13-15
Instructions ....•.............•..•.•••••..•..•.•.•.....• 13-15 CLEAR CHANNEL •........••.•..•••....•.••..•..•.••••.•.•.. 13-16 CLEAR I/O ..............••.•.•.•....•.•••.•••.•••••..••.. 13-17
HAL T DEVICE ..•.•...••.••.•••...•••••••••••••..•.••.••••. 13-19
HALT I/O ....•...........••..•..••...•••••••.......••.... 13-23 RESUME I/O ••....•....•••....•.••••..••••.•••.•••...•.... 13-26 START I/O •...•.•..•...•••.•••••••••.•••••••••.•••..•..•. 13-27 START I/O FAST RELEASE .••••..•••..•••••••••••.•.••.••••• 13-27 STORE CHANNEL 10 ..........••.•....••••....•••..•....•... 13-32 TEST CHANNEL ••.•.......•.••...•..•.•••••••.•.•.•........ 13-33 TEST I/O ..............••••..•••.••.••..•••••••••...•.... 13-34
Input/Output-Instruction-Exception Handling •••••••..•••. 13-36
Execution of Input/Output Operations •..••.••.•••..•...•••• 13-37
Blocki ng of Data .....•.•.•••.•.•.•.•••••..••......••••.. 13-37
Channel-Address Word ...•••••.•.••••••••••••••••••••••... 13-37 Channel-Command Word .•••••••.•••.•••••••••••••••••.••••• 13-38 Command Code ..........•.•.••...•..••.•••...•••.•••••••.• 13-39
Designation of Storage Area ••..•.•...•••.•••.•••.•.•••.. 13-39 Chaining •....•.......••••••••.••...•••••••.•.•.•••••.••• 13-40 Data Chaining ••....•.•••.•.•.•.••••••••••••..••..•••.• 13-42 Command Chaining ......•..•...•••.•.••.••.•..••••.•.••• 13-43
Skipping ...•.............•.•...•.....•.....•••••.•...... 13-43
Program-Controlled Interruption ...••••••.••••..•.•..•.•• 13-44 Channel Indirect Data Addressing .•..••••••.•.•••••••.••. 13-45
Addressing Using the 24-Bit IDAW ..••••.••••••••••.••.• 13-45
Addressing Using the 31-Bit IDAW ..••••.....••.••.•.•.. 13-46 Suspension of Channel-Program Execution ••••••••••••••.•. 13-46 Commands .•.••••.••...•.•••••••.••••••••••••••.••••.••.•. 13-48
Write ..•.••...•••.•..•••.•••.•.••.••••••••••••••••••.. 13-49
Read .•••.•...•.....•.•••••••••..•••••••..•••••.•.....• 13-49
Read Backward •••.•.•••••.•.••••••.••••••••.•••••.••..• 13-50 Control •••••.••..•••••••••••••••.••••••.•••••••••••••• 13-50 Sense ..••.•..••......••••.••••••.•••••••••.•.••••••.•• 13-51 Sense 10 ..•...•......•.•..••.••..•••••••••.•••.••..... 13-52
Transfer in Channel .••••••.•.•••••.•.•.•••••...••••••• 13-53 Command Retry .•..••••.••••••••.•••••••.•••••••••.••••••• 13-53 Conclusion of Input/Output Operations •••••.••••••••••••••• 13-54
Types of Conclusion •.•..••••••••.••••••••••••••.•••••••• 13-54 Conclusion at Operation Initiation ••.•••••••••.••••••• 13-55
Immediate Operations •.•.•••••••••••••••••••••••••••••• 13-55 Conclusion of Data Transfer •••..••••.••••••••••••••••• 13-56
Termination by HALT I/O or HALT DEVICE •••••••••••••••• 13-57
Termination by CLEAR I/O ..•••••••••••••••••••••••••••• 13-59
Termination by CLEAR CHANNEL •••••••••••••••••••••••••• 13-59
Termination Due to Equipment Malfunction •••••••••••••• 13-59
Input/Output Interruptions •••••••••••••••••••••••••••••• 13-60 Interruption Conditions ••••••••••••••••••••••••••••••• 13-60 Channel-Available Interruption •••••••••••••••••••••••• 13-61
Priority of Interruptions ••••••••••••••••••••••••••••••• 13-62
Interruption Action ••••••••••••••••••••••••••••••••••• 13-62 Chapter 13. Input/Output Operations 13-1
Channel-status Word ••••••••••••••••••••••••••••••••••••• 13-62 Unit Status .•••.•••.••..••••.••••••••.•.•••••••••••.•••• 13-63
Attention .•...•••••.•...•••.•••••••••••••••••••••.•.•• 13-64
Status Modifier .•..••.•..•.•..••.••.•..•.••••••.•...•. 13-64 Control-Unit End •••.•.•.••.••••••••••••••••••••••.•••. 13-64
Busy .....•.•....•.......••••.•.••••.••.••••.•••••.•••• 13-65
Channel End •......•...•..••••••.•.•..••••••••••••••.•. 13-67
Device End ........•.....••......•••..•••••••.••...•••. 13-67 Un it Check ....•.....•...••.•••.••...•••..••••...•••.•• 13-68 Unit Exception •.•...•..•...••.•••.•..•.•.•.•••.••.•••. 13-69
Channel Status ...•..•.•.•..•..•••••.•.•••••••••••••••••. 13-70 Program-Controlled Interruption .................•.•... 13-70 Incorrect length ...........•....•......•.....•..•.•.•. 13-70 Program Check ......••.•.••.•••••..•....•.••.••.••.•••. 13-70 Protection Check •.......•...••....•..•.••••••.•..••.•. 13-71 Channel-Data Check ......••....•.••....•••...•..••.•.•. 13-71
Channel-Control Check ............••.•.••............•. 13-72
Interface-Control Check ••......•.•••...••.•.••..•.•••. 13-72 Chaining Check ......•....•.•...••.•.•..••..••••.•.•••. 13-72
Contents of Channel-Status Word •..•.....•..••.••........ 13-72
Information Provided by Channel-Status Word .•.•....... 13-73
Subchannel Key ............•....•..•...•••••••...•••.•. 13-73
Suspended Indication •....•••....•.•.•..•.••.•••.•••.•. 13-74
logout Pending •.......•....••.........••...•.••.••.••. 13-74
Deferred Condition Code .....................•......•.• 13-74 CCW Address ..•........•..•.•...••.....•.••.•.•..••.... 13-75 Count ......••...•.•......••••........•..•••••.•..•...• 13-77
Status ....•...••.•...•••.•.•.•.•...•.•..••.••.••••••.• 13-78
Channel logout ....•...........•..................•....•... 13-80 I/O-Communication Area ..••.•..•••....•.••.....•..•..•.•..• 13-80 The transfer of information to or from
main storage, other than to or from the
central processing unit or by means of
the direct control path, is referred to
as an input or output operation. An
input/output (I/O) operation involves
the use of an I/O device. Input/output
devices perform I/O operations under
control of control units, which are
attached to the central processing unit (CPU) by means of channels.
This chapter describes the programmed
control of I/O devices by the channels
and by the CPU. Formats are defined for
the various types of lID control infor­
mation. The formats apply to all I/O operations and are independent of the
type of I/O device, its speed, and its
mode of operation.
The formats described include provisions
for functions applicable only to some
I/O-device types, such as erasing a gap
on a magnetic-tape unit. The way in
which a device makes use of the format
is defined in the System library (Sl)
publication for the particular device.
Almost all storage references for I/O operations are references to absolute
storage. Throughout this chapter, unless indicated otherwise, "storage"
means absolute storage, and "address"
means absolute address. The terms "I/O
address," "channel address," and "device
address" are never abbreviated to
"address" in this publication.
13-2 System/370 Principles of Operation
ATTACHMENT OF INPUT/OUTPUT DEVICES INPUT/OUTPUT DEVICES
Input/output devices provide external
storage and a means of communication
between data-processing systems or
between a system and its environment.
Input/output devices include such equip­
ment as card readers, card punches,
magnetic-tape units, direct-access­
storage devices (disks and drums),
display units, typewriter-keyboard
devices, printers, teleprocessing
devices, and sensor-based equipment.
Most types of I/O devices, such as prin­
ters, card equipment, or tape devices,
deal directly with external media, and
these devices are physically distin­
guishable and identifiable. Other types
consist only of electronic equipment and
do not directly handle physical record­
ing media. The channel-to-channel
adapter, for example, provides a
channel-to-channel data-transfer path,
and the data never reaches a physical
recording medium outside main storage.
Similarly, a communications controller
handles transmission of information
between the data-processing system and a
remote station, and its input and output
are signals on a transmission line. An
I/O device may be physically distinct
equipment, or it may time-share equip­
ment with other I/O devices.
Previous Page Next Page