Previous Table of Contents Next


An I/O device consists of two parts, one containing most of the electronics, called the I/O controller, and one containing the physical device itself, such as a disk drive. The job of an I/O controller is to control its device and to handle bus access for it. For example, when a program wants data from a disk, it gives a command to the disk controller, which then issues seeks and other commands to the drive. In a simple computer such as a PC, a single bus exists to connect the processor, memory, and I/O adapters. When some or all of the I/O controller electronics are packaged on a card in the PC, it is usually called an I/O adapter. The I/O adapter’s job is to convert the unique interface of the specific device to a standard bus interface supplied by the PC. Thus, a PC will have a display adapter, a printer adapter, and so on for each unique device. Any electronics packaged with the device is still called a controller.

The single bus in the PC that connects the processor and memory is often called a local bus, and it runs at the same clock frequency as the processor (or some submultiple of that clock frequency). Until recently, the I/O adapters of most PCs were also directly attached to the local bus. This bus is used not only by the I/O controllers, but also by the processor for fetching instructions and data.

When the processor and an I/O adapter want to use the local bus at the same time, a chip called the bus arbiter decides who goes next. Usually, the I/O adapter is given preference because disks and other moving devices cannot be stopped, and forcing them to wait could result in lost data. When no I/O device is running, the processor is free to use all the local bus cycles for itself. When an I/O device is running, however, that device will request and be granted the bus whenever it needs it. This process, called cycle stealing, slows down the computer.

A newer trend for PCs is to provide a separate bus that is isolated from the processor but still has access to the main memory. A memory bus controller is used to attach the separate bus to the local bus and the memory. This memory bus controller still competes for cycles on the local bus, but now multiple devices can be attached to the separate bus. An advantage of this separate bus is that it has its own clock that runs at a fixed speed independent of the processor. This enables lower-cost device attachments that can run with any speed processor. Probably the most popular of these separate buses is the Peripheral Component Interconnect (PCI) bus. The clock rate for the PCI bus is set at 33 MHz, with higher speeds planned. Note that some LAN components and hard-disk interfaces, such as the Small Computer System Interface (SCSI), sometimes still attach directly to the local bus.

An I/O adapter card provides the electronics to interface an I/O device to the PCI bus. Up to 16 adapter cards can be plugged into a PCI bus. The PCI standard defines the type of connector used and the size and shape of the card. This is usually called the PCI form factor.

The I/O structure just described for a PC may not be acceptable for a larger computer that performs many I/O operations. Large systems usually need multiple buses, and some way to offload the processing from the main processor is also desirable. One approach is to use a channel, which is a specialized computer built alongside the main processor. The I/O buses are attached directly to the channel rather than to the processor.

A channel has it own instruction set designed specifically to communicate with the bus-attached I/O adapters and to transfer data between the I/O device and the memory. A channel receives programs (called channel programs) to run from the main processor. These channel programs can be run by the channel concurrently with other programs running in the main processor. Thus, there is little interference between the two processing units. When the channel is finished with its program, it interrupts the main processor to get more work.

The two basic types of channels are selector channels and multiplexer channels. A selector channel is designed to support high-speed devices, such as disks, and it can handle the data transfer from only one device at a time. On the other hand, a multiplexer channel can handle data transfers from multiple low-speed devices, such as terminals, by interleaving the data from each device on the bus. The amount of data interleaved for each device can be a single byte or a block of bytes. Multiplexer channels are classified as byte-multiplexer channels or block-multiplexer channels. A System/370 supported both of these channel types.

The System/38 had a channel similar in many ways to a System/370 channel. This channel was a throwback to the original design, where a group of engineers thought they were actually building a System/370. But unlike the System/370, which supported multiple-selector and multiplexer channels, the System/38 had only one channel. For those readers who are purists, the System/38 channel could be described as a block-multiplexer channel, operating in a fixed-burst mode.

The I/O adapters used for the actual device control in the System/38 were fairly shallow, meaning most of the intelligence to perform I/O operations was back in the channel. The System/34 and the System/36, which had no channels, used intelligent processors to control their I/O devices. The System/34 used different I/O processor designs for different devices. The System/36 standardized on the Control Storage Processor (CSP) that I described in Chapter 3 for most of its I/O processors. Thus, a System/36 could have a disk adapter, a workstation adapter, and a communications line adapter, each with its own separate CSP. A large System/36 could have several of these CSPs for I/O. Some readers will remember that these adapters were called controllers in System/36 terminology. Because they were packaged on cards under the covers, I am using the more current terminology and calling them adapters.

The AS/400 eliminated the channel of the System/38 and instead uses one or more I/O buses with intelligent processors attached. Most of the I/O processing is performed in these intelligent IOPs. This structure is different from either the System/36 or the System/38, although it is much closer to the System/36.

The SPD bus and the IOP architecture also provide some intrinsic serviceability and error-isolation features that allow the AS/400 to limit the scope of device, IOP, and I/O bus failures. The AS/400 can tolerate I/O failures that many other systems do not — for example, a PC or a Unix workstation commonly takes down the entire system with a machine check for a similar I/O failure.


Previous Table of Contents Next

Copyright © NEWS/400 Books