command chaining is specified or when command
retry is performed. Whether or not multiplexing oc­
curs between blocks depends on the state of the
block-multiplexing control bit, the design of the I/O device, and, on some models, whether the subchan­
nel is shared or nonshared.
The mUltiplexing capability of a block-multiplexer
channel is under control of the block multiplexing
control bit, bit 0 of control register O. When this bit
is zero, multiplexing is inhibited, and when it is one,
multiplexing is allowed.
Whether a block-multiplexer channel executes an I/O operation with multiplexing inhibited or allowed
is determined by the state of the block multiplexing
control bit at the time the operation is initiated by
ST ART I/O or START I/O FAST RELEASE and
applies to that operation until the involved sub chan­
nel becomes available.
Both byte-multiplexer and block-multiplexer
channels vary in the number of subchannels they
contain. When multiplexing, they can sustain concur­
rently one I/O operation per subchannel, provided
that the total load on the channel does not exceed its
capacity. Each subchannel appears to the program as
an independent selector channel, except in those
aspects of communication that pertain to the physi­
cal channel (for example, individual subchannels on
a multiplexer channel are not distinguished as such
by the TEST CHANNEL instruction or by the
masks controlling I/O interruptions from the chan­
nel). When a multiplexer channel is not servicing an I/O device, it monitors its devices for data and for
interruption conditions.
When a multiplexer channel is transferring data in
burst mode, the sub channel associated with the burst
operation monopolizes the data-transfer facilities of
the channel. Other subchannels on the multiplexer
channel cannot respond to requests from devices
until the burst is completed.
Subchannels on a multiplexer channel may be
either nonshared or shared.
A sub channel is referred to as nonshared if it is
associated and can be used only with a single I/O device. A nonshared sub channel is used with devices
that do not have any restrictions on the concurrency
of channel program operations, such as the IBM
3211 Printer Modell or one drive of a 3330 Disk
Storage.
A subchannel is referred to as shared if data
transfer to or from a set of devices implies the use of
the same subchannel. Only one device associated
with a shared subchannel may be involved in data
transmission at a time. Shared subchannels are used
with devices, such as magnetic tape units or some
disk-access mechanisms, that share a control unit.
For such devices, the sharing of the subchannel does
not restrict the concurrency of I/O operations since
the control unit permits only one device to be in­
volved in a data-transfer operation at a time. I/O devices may share a control unit without necessarily
sharing a sub channel. For example, each transmis­
sion line attached to the IBM 2702 Transmission
Control is assigned a nonshared subchannel, al­
though all of the transmission lines share the com­
mon control unit.
Programming Note
A block-multiplexer channel can be made to operate
as a selector channel by the appropriate setting of
the block multiplexing control bit. However, since a
block-multiplexer channel inherently can interleave
the execution of multiple I/O operations and since
the state of the block multiplexing control bit can be
changed at any time, it is possible to have one or
more operations that permit multiplexing and an
operation that inhibits multiplexing being executed
simultaneously by a channel.
Therefore, to ensure complete compatibility with
selector channel operation, all operational sub chan­
nels on the block-multiplexer channel must be avail­
able or operating with multiplexing inhibited when
the use of that channel as a selector channel is be­
gun. All subsequent operations should then be initi­
ated with the block multiplexing control bit inhibit­
ing mUltiplexing.
System Operation
Input/ output operations are initiated and controlled
by information with three types of formats: instruc­
tions, channel command words (CCWs), and orders.
Instructions are decoded by the CPU and are part of
the CPU program. CCWs are decoded and executed
by the channels and I/O devices, and initiate I/O operations, such as reading and writing. One or more
CCWs arranged for sequential execution form a
channel program. Both instructions and CCWs are
fetched from main storage and their formats are
common for all types of I/O devices, although the
modifier bits in the command code of a CCW may
specify device-dependent conditions for the execu­
tion of an operation at the device.
Functions peculiar to a device, such as rewinding
tape or positioning the access mechanism on a disk
drive, are specified by orders. Orders are decoded
and executed by I/O devices. The control informa­
tion specifying an order may appear in the modifier
bits of a control-CCW command code, may be trans­
ferred to the device as data during a control or write
operation, or may be made available to the device by
other means.
Input/Output Operations 189
The CPU program initiates I/O operations with
the instruction START I/O or START I/O FAST RELEASE. These instructions identify the channel
and device and cause the channel to fetch the chan­
nel address word ( CAW) from a fixed location in
main storage. The CAW contains the protection key
and designates the location in main storage from
which the channel subsequently fetches the first
CCW. The CCW specifies the command to be execu­
ted and the storage area, if any, to be used. When the CAW has been fetched, some channels
consider the execution of START I/O FAST RE­ LEASE complete. The results of the execution of
the instruction to that point are indicated by setting
the condition code in the program status word (PSW) and, under certain conditions, by storing
pertinent information in the channel status word (CSW). If the channel is not operating in burst mode and
if the sub channel associated with the addressed I/O device is available, the channel attempts to select the
device by sending the address of the device to all
controll units attached to the channel. A control unit
that reGognizes the address connects itself logically
to the channel and responds to its selection by re­
turning the address of the selected device. The chan­
nel subsequently sends the command code part of
the CCW over the interface, and the device responds
with a status byte indicating whether it can execute
the command.
At this time, the execution of START I/O and of ST ART I/O FAST RELEASE, if not previously
considered complete, is completed. The results of
the attempt to initiate the execution of the command
are indicated by setting the condition code in the PSW and, under certain conditions, by storing perti­
nent information in the CSW. If the operation is initiated at the device and its
execution involves transfer of data, the subchannel is
set up to respond to service requests from the device
and assumes further control of the operation. In the
case of operations that do not require any data to be
transferred to or from the device, the device may
signal the end of the operation immediately on re­
ceipt of the command code.
An ][/0 operation may involve transfer of data to
one storage area, designated by a single CCW, or to
a number of noncontiguous storage areas. In the
latter case, generally a list of CCWs is used for exe­
cution of the I/O operation, each CCW designating a
contiguous storage area, and the CCWs are said to
be coupled by data chaining. Data chaining is speci­
fied by a flag in the CCW and causes the channel to
fetch another CCW upon the exhaustion or filling of
the storage area designated by the current CCW. 190 System/370 Principles of Operation
The storage area designated by a CCW fetched on
data chaining pertains to theU 0 operation already
in progress at the I/O device, and the I/O device is
not notified when a new CCW is fetched. Provision
is made in the CCW format for the programmer to
specify that, when the CCW is decoded, the channel
request an I/O interruption as soon as possible,
thereby notifying the CPU program that chaining
has progressed to a particular CCW in the channel
program.
To complement the dynamic address translation
facility available in the CPU, which can make data
stored in more than one noncontiguous page of main
storage appear as one storage area, channel indirect
data addressing is available. A flag in the CCW spec­
ifies that an indirect-data-address list is to be used to
designate the storage areas for that CCW. Each time
the boundary of a 2,048-byte block of storage is
reached, the list is referenced to determine the next
block of storage to be used. By extending the stor­
age addressing capabilities of the channel, channel
indirect data addressing permits essentially the same
CCW sequences to be used for a program running
with dynamic address translation in the CPU that
would be used if it were operating with equivalent
contiguous real storage.
The concluding of an I/O operation normally is
indicated by two conditions: channel end and device
end. The channel-end condition indicates that the I/O device has received or provided all data associ­
ated with the operation and no longer needs channel
facilities. The device-end signal indicates that the I/O device has concluded execution of the opera­
tion. The device-end condition can occur concur­
rently with the channel-end condition or later.
Operations that keep the control unit busy after
releasing channel facilities may, under certain condi­
tions, cause a third type of signal. This signal, called
control unit end, may occur only concurrently with
or after channel end and indicates that the control
unit has become available for initiation of another
operation.
The conditions signaling the concluding of an I/O operation can be brought to the attention of the
program by I/O interruptions or, when the CPU is
disabled for I/O interruptions from the channel, by
programmed interrogation of the I/O device. In
either case, these conditions cause storing of the CSW, which contains additional information con­
cerning the execution of the operation. At the time
the channel-end condition is generated, the channel
identifies to the program the last CCW used and
provides its residual byte count, thus indicating the
extent of main storage used. Both the channel and
the device can provide indications of unusual condi-
Previous Page Next Page