In This Article
What is Channel I/O (Input/Output)?
The I/O channel is considered to be an extension of the Direct Memory Access or DMA concept since it usually has direct admittance to the main memory.
Its primary functions involve carrying out I/O instructions. In addition to that, it also helps in controlling I/O operations based on the instructions received from the Central Processing unit or the CPU of the computer.
- The I/O channel in a computer typically executes I/O instructions and it is actually an expansion of the Direct Memory Access concept.
- Having direct entry to the main memory, these channels control all I/O operations depending on the specific instructions received from the CPU which includes data input and output. The I/O channel also facilitates bootstrapping of a system.
- There are different types of these channels such as simplex channels and duplex channels, each of which has several other subdivisions.
- Data is transferred through these channels in two particular ways namely, serial mode and parallel mode.
Understanding Channel I/O (Input/Output)
A computer needs to communicate between different components in it and for that it needs to transfer data through the I/O channel.
This channel is also referred to as input channel simply and it helps in communicating data between the memory and the I/O to the CPU or any other computer peripheral.
A special purpose processor is used on I/O channels for executing I/O instructions.
This helps it to have total control over all I/O operations.
However, this processor does not perform the I/O instructions itself but simply initiates and instructs the I/O channel about the I/O transfer.
The processor, however, also helps in the execution process of a program in the memory.
Such programs specify different things such as:
- Device or devices
- Area or areas of memory and
- Error condition actions.
Apart from these fundamental aspects of the I/O channel, there are also a lot of other important things to know about it as a user.
In the world of computing, channel I/O signifies the high-performance input/output architecture.
This is incorporated in a variety of forms on a wide range of computer architectures.
However, it is especially useful for the mainframe computers.
In the earlier days, such channels were usually used in the customized devices and were named differently as well such as:
- I/O processor
- I/O controller
- I/O channel
- I/O synchronizer
- Channel I/O or
- DMA controller.
The communication between the CPU and all other peripheral devices is achieved through the electrical cables.
These cables transfer both control information and data to and from the peripheral devices and the computer.
Signals are also received and transferred through a cable that connects the CPU and the online devices.
This line or cable in particular offers a conduit for the signal to travel, which is simply called the channel.
A computer needs to perform a wide range of I/O tasks that may be very complex.
It needs to apply some kind of logic to the process as well as on the data itself in order to change the format as well as do other types of similar jobs.
Ideally, it is the CPU that handles this logical aspect of data transmission and that is perhaps the simplest way to go about it.
However, the I/O devices are comparatively slow and therefore a lot of time of the CPU is wasted during the process since it has to wait for the data to be transmitted from the device.
This specific condition is called ‘I/O bound’.
The I/O channel architecture averts this issue by processing a few or all of the I/O tasks without the help from the CPU.
This is done by delegating the job to dedicated logic.
The I/O channels are self-contained with enough logic as well as working storage to be able to handle several I/O tasks.
Quite a few of these channels are very flexible and powerful enough to be used as a separate computer on their own and also can be interpreted as a type of coprocessor such as the 7909 Data Channel on an IBM 7090 or an IBM 7094.
However, all I/O channels are not as powerful and efficient. There may be a few on some systems that may use the registers or memory addressable by the CPU as their working storage.
On the other hand, there may be a few others in which the working storage may be present in the hardware of the channel itself.
Usually, the channels and the external peripheral devices have standard interfaces between them and the multiple channels have the ability to operate in tandem.
In order to handle the I/O tasks, the CPU may send a comparatively small channel program or assign a block of storage to the channel.
The controller as well as the channel can handle such tasks, in several instances, without needing any further involvement from the CPU to complete them.
However, there are exceptions to it.
For example, those channel programs that use PCIs or Program Controlled Interrupts to help demand paging, program loading, or other necessary system tasks cannot do it.
An I/O channel was used for the first time with IBM 709 vacuum tube mainframe in 1957 in which the first channel controller was Model 766 Data Synchronizer.
The IBM 7090 was its transistorized successor and had 2 to 8 channels of 6 bits and a multiplexor with the ability to handle up to 8 channels just as 7090 and 7094 could.
IBM typically used data channel commands and also allowed command chaining on some of its computers but other vendors utilized channels that could deal with only single records.
However, there were also several other systems available that used more advanced I/O architectures.
Typically, whether it was the selector channel, byte multiplexer channel or the block multiplexer channel, all these were larger and bulkier in the IBM systems.
This is when the Amdahl Corporation came up with a completely different hardware implementation.
They typically used a single internal unit, which was referred to as the C-Unit.
Apart from IBM, there were also a few other non-IBM commercial channel systems used in several mainframe designs such as:
- The UNIVAC 490
- The CDC 1604
- The Burroughs B5000
- The UNIVAC 1107 and
- The GE 635.
Since then, using the channel systems and controllers has become a norm for most of the mainframe designs.
However, later on, the channels were incorporated as on-board processors that were located in the same box as the CPU.
These were therefore referred to as Channel Processors.
In modern computers, the channels come in the shape of bus mastering peripheral devices such as the PCI Direct Memory Access devices.
The underlying principle of these devices is the same as that of the original channel controllers such as:
- Off-loading transfer
- Context switching and
- Interrupts from the main CPU.
As for the NeXT computers, the channel controllers are even smaller in size and are designed just like a single chip but have several channels on them.
Ideally, each of the C-Units could support as many as 16 channels with the same hardware for all of them.
When two internal C-Units are used, it could support as many as 32 channels in all but each of these units worked independently.
The C-Units used a process called the Shifting Channel State Processor method, which employed a special Finite State Machine or FSM.
The C-units can read the entire status of the subsequent channel in priority sequence as well as the I/O channel in-tags of it.
It performs all the necessary actions that are defined by the in-tags and the last stage of the channels.
The functions of the C-Unit include:
- Reading the data or writing it to the main storage
- Interrupting the operating system program if it is specified in the Program Control Interrupt flag of the channel program and
- Storing the next state of the channel and setting the I/O Channel out-tags.
It is only after the completion of all these tasks, the C-Unit moves on to the following lower priority channel.
Preemption, in some cases, is also possible with enough FIFO or First In, First Out storage space provided in the C-Unit for all channels.
It also allows easy reconfiguration of the selector, byte multiplexer, or the block multiplexer channel according to the choice of the user with the help of the maintenance console commands without any major restrictions.
In addition to that, it also offered other options such as:
- Two-byte interface
- Data In, Data Out
- Channel to Channel Adapters or CCAs in Amdahl and CTCA or CTCs in IBM-speak and
- High-performance IBM channels.
Moreover, in the Amdahl C-Units, a channel could be of any type, selector, byte multiplexor, or block multiplexor and it did not need setting aside channels 0 and 4 for the byte multiplexers as it is needed in some of the IBM models.
With all these features and functionalities, the C-Units are considered to be the real game changers which forced other vendors such as IBM to redesign their mainframes to offer more flexibility and capability in their channels.
Through these channels, as said earlier, both data and signals for monitoring are sent out and all these channels are collectively called the I/O channels.
The different purposes for which these I/O channels can be used include:
- Data input
- Data output and
- Data input and output.
This typically depends on whether the peripheral devices are designed for handling data input only, data output only or both data input and output.
There are different types of I/O channels.
These channels can be divided into two broader categories such as:
- Simplex channels and
- Duplex channels.
These channels perform simple operations such as communicating in only one specific direction, such as a radio.
This means that if a device, such as a terminal, is connected to such a type of a circuit, it will be either able to receive data or send data, but not do both at the same time.
It is for this particular reason the simplex channels are not used extensively because it needs an additional return path as well.
This path is usually required for different purposes such as:
- Sending/receiving acknowledgment
- Sending/receiving information or
- Sending/receiving error signals.
A duplex channel, on the other hand, is just the opposite of simplex channels.
In these channels there are dual paths or lines in every cable connection for transferring data.
One of these paths is dedicated for sending the signals and the other is exclusive for receiving data.
The working process of the duplex channels is pretty similar to the telephones.
Typically, the duplex channels come in two variants, namely:
- Half duplex and
- Full duplex.
The half duplex channels are able to transmit and receive signals only in a single direction at a time, just like the CB or Citizens’ Band radio transmissions.
However, it is needed to make sure that the line is idle or clear before a transmission is started.
On the other hand, the full duplex channels allow sending and receiving data in both directions like in the telephones.
Based on these two major categories and their operations, the I/O channels can be further differentiated as:
- Selector channels that control data transfer in several high-speed devices but are committed to only one device. In this channel, each of the devices is managed by an I/O module or controller.
- Multiplexer channels, which are actually DMA controllers dedicated to manage several devices at the same time. The unique aspect of these channels is that they can make block transfers for multiple devices at once.
Moreover, in the multiplexer channels, there are two different types of multiplexers used such as:
- Byte Multiplexer – This is used for the devices that operate at a low speed. They send and receive characters and also convolve bytes from different devices.
- Block Multiplexer – This is used for devices operating at high speed and typically sends and receives blocks of characters. It also interlaces blocks of bytes from a number of devices.
The type of channels typically differs depending on a number of varying parameters such as:
- The way they connect peripheral devices with the storage buffers
- Their number and
- The type of simultaneous I/O operations supported.
For example, much different from the above types in nomenclature and functionality, according to the Universal Automatic Computer or UNIVAC terminology, a channel may be of two different types, namely:
- An Internally Specified Index or ISI where only one single device and buffer is active at a time and
- An Externally Specified Index or ESI in which the device itself selects which particular buffer it should use.
Data Transmission Processes
Through the channel, data may be sent out in either of the two following ways:
- Serial mode or
- Parallel mode.
In the serial mode of data transmission, there are only three wires needed basically for different purposes such as:
- One wire is required to transmit the data
- One wire is required to receive the data and
- One wire is required to ground.
The data through these wires are typically sent or received in bits in a serial fashion, one after the other.
Such mode of transmission of data is more desirable when the computer systems are connected with external peripherals over a long distance as it is done in the remote terminals.
Transmitting data in the parallel mode is a bit different and complicated than the serial mode.
This is because it needs transferring all of the data bits at one time in a byte.
This is why it is also called the Batch Mode of data transmission. Therefore, it needs a lot more wires.
Usually, there are 9 to 10 wires required for such type of data transmission, all of these going between the different peripheral devices and the computer.
The purposes of all these wires are as follows:
- Seven or eight of these lines are required for the data bits
- One or two wires are called the handshake lines and
- One wire is required to ground.
Here the lines dedicated for the data bits may transmit data that may be made up of anything such as:
- A number
- A letter or
- A special character.
The handshaking line however sends the information signals for communicating back and forth between the computer and the peripheral devices.
The computer systems that utilize channel I/O to deal with all input/output functions typically come with unique hardware components that allow them to do it independently without the help of the CPU of the system.
There is only a single machine instruction in the inventory of the CPU of a computer system that usually uses channel I/O for input and output.
This particular machine instruction is actually used to send the input/output commands as channel programs to the special I/O hardware.
After that, the I/O does the rest of the job without any interference from the CPU till an event occurs that needs a notification from the operating system.
It is at this point the I/O hardware indicates an interrupt to the CPU.
Typically, an I/O channel is a separate hardware component which helps in coordinating all input and output to a set of devices or controllers.
This, as most people think is to be, is certainly not a medium of communication merely.
Instead, irrespective of its name, this refers to a programmable device.
This specific device handles all the details of I/O operations to be carried out according to the list or the channel program.
One or more devices or controllers may be supported by each channel but each of them is able to direct the program to only one of all of the connected devices.
The channel program holds the list of commands for the channel, controller and the devices to which the program has to be directed.
The operating system actually prepares the full list of channel commands and when it is done it carries out a particular I/O machine instruction.
This in turn initiates the channel program. It is only then that the channel takes control over the I/O operations and retains it till all of these are completed.
The channel programs can be very complex and may include tasks such as conditional branching within a channel program or testing data.
However, it is very flexible which allows freeing the CPU from specific overheads such as:
- Starting the I/O operations
- Managing them and
- Monitoring every single I/O operation.
The special channel hardware, being dedicated to I/O can now perform the I/O operations much more efficiently than the CPU and that too completely in parallel with it.
Therefore, the channel I/O is very much like the Direct Memory Access or DMA, as said earlier, of the microcomputers but is only more advanced and complex.
Typically, on a large mainframe computer system, the CPU is one of the numerous powerful hardware apparatus that work in parallel.
The special input/output hardware or controllers handle the input-output operations exclusively.
These controllers are actually connected to the hardware channels which are, in turn, also devoted to input and output operations.
There may be several I/O processors and CPUs but, on the whole, the architecture maximizes the I/O performance without lowering the performance level of the CPU.
Since these architectures can handle a large number of real-world and heavy business applications for the mainframe systems, the eventual output is very high.
This distinguishes the mainframe systems from the other types of computers.
The channel is designed hierarchically or like a tree and is a parallel data connection that makes the entire I/O subsystem much more organized.
Channel Command Words
Sometimes, special instructions may be given to the I/O channel processor.
This is called the Channel Command Word, commonly denoted as CCW. In fact, this is a Finite State Machine.
The CCW initiates an I/O operation on a device that is attached to the particular channel. It can be any type of operations such as:
- Write or
Ideally, all I/O needs to use the CCWs because all devices are attached by the channels and it is the on-system architecture that implements the channel I/O.
The operating system however organizes the Channel Command Words into the channel programs.
Still, any other I/O subroutine can initiate it such as a utility program or separate software such as the Test and Diagnostic program.
Also, with the use of the ‘Transfer in Channel’ CCW and the ‘Status Modifier’ channel tag, more dynamic and programmable capability can be accomplished within the channel programs even if it comes with limited branching ability.
The CCWs in an IBM machine are typically chained to create a channel program.
The bits in the Channel Command Words indicate the specific location in the working storage that holds the specific CCW that is a piece of the equivalent channel program.
The channel program usually carries out sequential CCWs till an exception occurs.
Command chaining typically informs the channel that the following Channel Command Word comes with a new command.
On the other hand, data chaining signifies that the next CCW holds the address of the supplementary data for the similar command.
This allows scatter-reading or gather-writing which refers to the process of writing to or reading from parts of a record from multiple data areas in the working storage.
A channel program refers to the series of Channel Command Words that are carried out by the channel I/O subsystem and the consequent architectures.
Execution of a channel program is signaled by the operating system with an SSCH or Start Sub Channel instruction sent to the I/O channel subsystem.
This, in turn, frees the CPU, which can now proceed with other non-I/O operations until an interruption occurs when the I/O operations are completed.
With their working process, the channel I/O offers significant economies in the input and output operations.
During operation, the channel programs can adjust the operations depending on the data read.
The channel programs can be different for blocked records or unblocked records.
For example, as for the unblocked records, or for one record in each block, the channel program will read a record in a disk that is identified by the recorded key.
Here, the preferred value of the key as well as the track holding the record is known.
The track will be searched by the device control unit to identify the requested record. In such situations, the channel program would be as follows:
SEEK <cylinder/head number>
SEARCH KEY EQUAL <key value>
TIC *-8 Back to search if not equal
READ DATA <buffer>.
Here, TIC signifies the Transfer in the Channel, which helps the channel program to go to the SEARCH command till it comes up against a record with the corresponding key or the last part of the track.
Assuming that the record with the similar key is encountered, the DASD or the Direct Access Storage Device controller will incorporate Status Modifier in the channel status.
This will help the channel program to pass over the TIC Channel Command Word.
This means that the channel will carry out the READ command without the channel program needing to branch out.
However, for blocked records or where there is more than one record in each block, the recorded key needs to be similar to the highest key contained in that particular block.
Also, it is required to ensure that the record is in perfect key sequence.
In such situations, the following channel program will be used:
SEEK <cylinder/head number>
SEARCH KEY HIGH OR EQUAL <key value>
TIC *-8 Back to search if not high or equal
READ DATA <buffer>.
Now, if the dataset is assigned in tracks and it does not need to find the requested record to reach to the end of the track, the channel program will terminate and it will return a ‘no record found’ status indication.
On the other hand, if the dataset is assigned in cylinders, the same thing will happen when the end of the cylinder is reached.
However, in some cases, the software of the system is allowed to update the track or cylinder number and re-drive the I/O operation but not interrupt the application program.
In most of the systems the channel programs work by using physical or real addresses.
However, in some cases, the channel programs can be developed by using virtual addresses as well.
In such cases, the channel programs are required to be translated before they are executed and this is done by the operating system.
Apart from that, the Input Output Supervisor or IOS has a special function to perform for that particular purpose and fast fix the pages that are intended by the OS Supervisor in a really short time.
The pages that contain the data to be used by the I/O channels during operation are typically locked in the real memory.
This process is called fixing the pages.
The channel program is copied and every virtual address is replaced by real addresses before the commencement of the actual I/O operation.
When the entire operation is completed, these pages are unfixed once again.
Typically, the process of page fixing and unfixing is quite CPU expensive and therefore long-term page fixing is done quite often in order to decrease the CPU cost. Virtual memory, in particular, is often fixed for the entire life of an application instead of fixing and unfixing them after every I/O operation.
However, an alternative to long-term page fixing is to move the entire application along with all the data buffers, to a chosen area in the main memory of the system.
The application can be then marked as non-swappable.
Booting with Channel I/O
Bootstrapping of a system or Initial Program Load (IPL) is facilitated by the I/O channels.
However, a part of this process is done by the CPU with the implied SIO or Start I/O instruction, which is an implied Channel Address Word or CAW, and an implied CCW is also used with a Read IPL opcode, both at the same location.
Here command chaining is implicit and therefore the implied CCW falls through to the extension of the channel program at other locations if any of the CCWs is a TIC.
To boot a system, the implied Read IPL CCW reads the initial block of the chosen IPL device.
The channel further carries on with the further CCWs and loads the first part of the system loading software somewhere else in the main storage.
When, at the end of the IPL, the first double word containing a PSW is found, the CPU executes the bootstrap loader or IPL Text read.
This text, in turn, locates the operating system and transfers control. Any further initialization that may be required is then initiated under normal OS operation.
However, when an IPL is attempted from a device that is not initialized with such a text, the system will enter into a wait state.
This wait state may be placed by the Direct Access Storage Device or the DASD.
So, now, after reading the entire article you must be well aware of all the details of channel I/O which includes its design, history, description, working process and lots more.
With such comprehensive knowledge now you know what actually happens when you use the I/O devices.