Overlapping Input/Output Operations And Throughput Considerations





The 1130 system permits input/output devices to operate simultaneously; that is, to overlap their operation with other functions of the CPU. Overlapping I/O operations provides increased data throughput and more efficient utilization of the central processing unit.

This section will aid the programmer wishing to maximize I/O throughput in the 1130 system. A primary concern, however, is the possible loss of data if the capabilities of the system are saturated by overlapping too many operations. Loss of data can occur only on an 1130 system which has either a 1442, 1132, or synchronous communications adapter, and then only if too many I/O operations are overlapped with these devices.

The material provided here may be used by the programmer to calculate the maximum throughput for his system without loss of data.

Cycle-Stealing Concept

The cycle-stealing concept of the 1130 permits the CPU program to start an operation on an I/O device and then continue the mainline program while the I/O device is performing its operation. Each I/O device that operates in this manner takes (steals) a cycle from the CPU when it is needed.

The CPU is "tied up" only one cycle while a data character is being transferred. The frequency at which devices steal cycles depends on the type of device.

Since the CPU is much faster than any I/O device on the system, the CPU may be performing another function, such as arithmetic, at the same time an I/O operation is being performed. In fact, several I/O operations may be overlapped with each other and with other CPU functions. For example, the data transfer rate of a single disk storage drive is 27.8 us. per word. Thus, each disk storage drive read/write operation requires one CPU cycle (3.6 or 2.2 us.) out of each 27.8 us., leaving 25.6 or 24.2 us. of CPU time available for other functions. If two single disk storage drives are transferring data at the same time, then 23.4 or 20.6 us. is available for other CPU functions.

Direct Program Control (via Interrupt)

Direct program control applies to I/O devices that are totally dependent upon the CPU program. These devices interrupt the mainline program by requesting service. Once the service request is honored, the actual transfer of data also requires programmed commands. Servicing interrupt requests generally requires several CPU instructions (a subroutine). The system programmer must calculate the time of the I/O subroutines to determine the maximum data throughput (without data loss) of his system configuration. See IBM 1130 Subroutine Libraty, Order No. GC26-5929, for the execution times for IBM-supplied subroutines.

Conditions causing I/O interrupt requests are preserved in the device status word (DSW) of the I/O devices until the interrupt is accepted by the CPU.

The sequence of events after an interrupt request is received is:

  1. Instruction in progress is allowed to continue to completion.
  2. Interrupt request is accepted if higher level interrupt is not in progress.
  3. Branch to an appropriate interrupt subroutine to service the request.
  4. Housekeeping program routines must store all registers and linkage addresses to allow mainline program to continue after the interrupt is serviced.
  5. Examine the interrupt level status work (ILSW) to determine the interrupting device.
  6. Examine the DSW of the interrupting I/O device to determine the action required to service the request and reset the interrupt response bit in the DSW.
  7. Service the request and restore the necessary register and address information to resume the mainline program operation or to service other interrupts. Turn off the interrupt level with a BOSC instruction (a BSC instruction with a bit 9 set to 1).

Exposure to Loss of Data

Some direct program control devices and all non-buffered cycle-steal devices are time-dependent (require service within a specified time). Time-dependent devices are subject to losing data if not serviced within specified times. These times vary depending upon the device type and function being performed.

A significant factor that must be considered by the programmer is the priority levels of the devices in his system configuration and the times in which these devices must be serviced.

Device Priority

Overlapping I/O operations in a computing system requires that a priority sequence be established. In the 1130 system, the priority levels for both cycle-steal and interrupt are established for each device that can be attached to the system.


Cycle-Steal Priority

A cycle-steal request may be honored at the end of any core storage cycle. Cycle stealing allows an external device to intervene during the processing of a CPU operation and use one or more core storage cycles in order to communicate directly with CPU core storage. At the completion of the cycle-steal operation, CPU operation is resumed at the point where the cycle-steal request occurred.

CPU cycle-steal level 0 — Single Disk Storage (in the CPU)

CPU cycle-steal level 1 — SAC/2250 (see the multiplex levels below)

CPU cycle-steal level 2 — 1132 Printer

CPU cycle-steal level 3 — 2501 Card Reader

Cycle-steal level 1 is subdivided by the channel multiplexer (when the 1133 is attached to SAC) as follows:

Multiplex level 0 — 2310 Disk Storage, drive 1 or 2311 Disk Storage Drive, drive 1

Multiplex level 1 — 2310 Disk Storage, drive 2 or 2311 Disk Storage Drive, drive 2

Multiplex level 2 — 2310 Disk Storage, drive 3

Multiplex level 3 — 2310 Disk Storage, drive 4

Multiplex level 4 — Reserved (RPQ)

Multiplex level 5 — Reserved (RPQ)

Multiplex level 6 — SAC II/2250

Multiplex level 7 — 1403 Printer

Multiplex level 9 — Reserved

Multiplex level 10 — Reserved

Multiplex level 11 — Reserved (RPQ)

The preceding assignments are given in consideration of expansion for the user who may wish to expand his system at a later date. The cycle-steal levels listed as "Reserved (RPQ)" are for RPQ (Request for Price Quotation from IBM) activity.

Interrupt Priority

Interrupts are caused by a request for service from an I/O device or by the termination of an I/O operation. The interrupt facility provides an automatic branch (to one of core storage locations 8—13) from the normal program sequence in order to react to an external request or conditon.

At the completion of any program instruction, any pending interrupt requests are serviced if no higher level interrupt is in progress.

Interrupts are assigned priority levels to allow the most efficient use of all attached I/O devices in the system.

Level   Device
0   1442 Card Read Punch (column read, punch)
1   1132 Printer, synchronous communications adapter
2   Disk storage, storage access channel (SAC)
3   1627 Plotter, SAC, 2250 Display Unit, or System/7
4   1442 (operation complete), keyboard, console printer;
1134 Paper Tape Reader, 1055 Paper Tape Punch,
2501 CardReader, 1403 Printer, 1231 Optical Mark
Page Reader, SAC
5   Console (program stop switch and interrupt run), SAC

Service Request Limitations

The I/O devices in the 1130 system are subject to loss of data or extremely reduced throughput if service request, either cycle-steal or interrupt, is not honored within times given next. (Refer to Figure 79 for a summary of service request times.)

Cycle-Steal Devices

Single Disk Storage Drives require one CPU cycle every 27.8 us. while an XIO initiate read/write operation is in progress. The end of operation interrupt request may wait indefinitely without losing data but should be completely serviced within 500 us. to gain maximum throughput. The disk storage drives are assigned to the highest cycle-steal priority levels in the system because of their fast data transfer rate.

2311 Disk Storage Drives require one CPU cycle every 16 us. while an XIO initiate read/write operation is in progress. The end of operation interrupt request may wait indefinitely without losing data but should be completely serviced within 0.25 ms. to gain maximum throughput. The disk storage drives are assigned to the highest cycle-steal priority levels in the system because of their fast data transfer rate.

1403 Printer requests one CPU cycle every 11 us. (model 7) or every 18 us. (model 6) while an XIO initiate write is in progress. However, the 1403 is fully buffered and is not subject to losing data if its request remains unhonored. In fact, the 1403 is designed to prevent it from interfering with time-dependent devices on lower priority levels.

The programmer does not need to consider the 1403 regarding loss of data but should consider it regarding throughput.

In order to maintain 340 lines per minute with model 6, the space command (XIO control) must be issued within 117 ms following the transfer complete interrupt. Also, the print complete interrupt must be serviced and the buffer loaded for the next print line within 32 ms (the time required to space one line). If the 1403 received all of its cycle-steal requests without interference, 3 ms would be required to load the model 6 buffer. Therefore, approximately 29 ms is available to service the print complete interrupt.

In order to maintain 210 lines per minute with model 6, the space command (XIO control) must be issued within 187 ms following the transfer complete interrupt. Also, the print complete interrupt must be serviced and the buffer loaded for the next print line within 72 ms (the time required to space one line). If the 1403 received all of its cycle-steal requests without interference, 3 ms would be required to load the model 6 buffer. Therefore, approximately 69 ms is available to service the print complete interrupt.

 
Device Time allowable to service I/O request without data loss Time allowable to service I/O request to maintain rated speed Time allowable to service end of operation interrupt to maintain rated speed Frequency of request
Interrupt Cycle-steal Interrupt Cycle-steal I/O Interrupt I/O Cycle-steal End Operation Interrupt
Single Disk Storage
Drives
- 27.8 usec - 27.8 usec 500 usec - 27.8 usec 9 ms
2311 Disk Storage
Drives
- 16 usec   16 usec 6.25 ms   16 usec 12.5 ms
1403 Printer Model 6 (340 lpm) - - - 3 ms out of 32 ms 29 ms - 18 usec 176 ms
1403 Printer Model 6 (210 lpm) - - - 3 ms out of 72 ms 69 ms - 18 usec 285 ms
1403 Printer Model 7 - - - 2 ms out of 19.9 ms 17 ms - 11 usec 100 ms
1132 Printer Model 1 1.5 ms 16 consecutive cycles within 300 usec 1.5 ms 16 consecutive cycles within 300 usec   11.2 ms 16 cycles every 11.2 ms -
1132 Printer Model 2 22.2 ms* 16 cycles every 22.2 ms*
2501 Card Reader Model A1 - 466 usec - 466 usec 18.3 ms - 482 usec 100 ms
2501 Card Reader Model A2 466 usec - 466 usec - 3.0 ms - 482 usec 60 ms
2250 Display Unit - -   -        
1442-6 Card Punch 300 usec - 300 usec - 25 ms 12.5 ms - 1216 ms
1442-5/7 Card Punch 300 usec - 300 usec - 25 ms 6.25 - 663 ms
1442-6 Card Read 800 usec - 800 usec - 35 ms 2.5 ms - 200 ms
1442-7 Card Read 700 isec - 700 isec - 25 ms 1.87 ms   150 ms
SCA (8-bit, 2400 baud) 3.3 ms - 3.3 ms - 200 ms (depends on line turn-around) 3.3 ms - Depends on number of characters per record
1231 OMPR - - 13.2 ms - 130 ms 13.2 ms - 2000 ms
1134 Paper Tape Reader - - 500 usec - 16 ms 16.7 ms - 16.7 ms
1055 Paper Tape - - 8 ms - 8 ms 66.7 ms - 66.7 ms

*See description under "Cycle Steal Devices"

Figure 79. Table of I/O Timing Requirements

In order to maintain 600 lines per minute with the model 7, the space command must be issued within 72 ms following the transfer complete interrupt. Also, the print complete interrupt must be serviced and the buffer loaded for the next print line within 19.9 ms. The model 7 takes about 2 ms to load the buffer. Therefore, approximately 17.9 ms is available to service the print complete interrupt.

Note: If the space command is not issued until after the print complete interrupt has occurred, the 1403 will not maintain rated speed.

1132 Printer operates in both the cycle-steal mode and the direct program control (interrupt) mode. The 1132 requires 16 consecutive CPU cycles within 300 us. following a read emitter instruction. The 1132 Model 1 also requests an interrupt (direct program control) every 11.2 ms. This request must be honored within 1.5 ms. The 1132 Model 2 presents interrupt requests every 22.2 ms except:

  1. When the read emitter instruction reveals that the next character to be printed is X, the next interrupt request is presented in 11.2 ms.
  2. When the read emitter instruction reveals that the next character to be printed is Z, the next interrupt request is presented in 33.3 ms.

Any of these interrupt requests should be honored within 1.5 ms.

2501 Card Reader requires one CPU cycle every 466 us. while an XIO initiate read operation is in progress. The end operation interrupt request may wait indefinitely without losing data but should be serviced within 18.3 ms (model Al) or 3.0 ms (model A2) to maintain rated speed.

2250 Display Unit is designed to prevent interference with the 1442, 1132, 2501, or synchronous communications adapter by inhibiting cycle-steal request by the 2250 while these devices are being serviced. In effect, this inhibiting causes the 2250 to be on a priority level lower than any device except the 1403. Because the 2250 is not subject to losing data (actually, the brilliance of the screen could fade on a 3.6-us, system), it may be overlapped with any or all devices in the system.

The time demand from the 1131 CPU varies depending on the mode (character or vector), the number of characters displayed on the screen, the actual characters displayed, and the state of the CPU (wait or processing). The greatest time demand (CPU in the wait state) could be almost every CPU cycle. The least time demand could be about two CPU cycles every 25 ms.

The average interference with CPU processing is:

For 3.6 us. core storage
character mode 80% of CPU cycles; vector mode 20% of CPU cycles
For 2.2 us. core storage
character mode 66% of CPU cycles; vector mode 18% of CPU cycles
Program Control Devices

1442 Card Punch requires the punch interrupt request be serviced within 300 us. (model 5, 6, and 7) to prevent loss of data. The end operation interrupt should be serviced within 25 ms to obtain rated speed.

1442 Card Read requires the read interrupt request be serviced within 800 us. (model 6) or 700 us. (model 7) to prevent loss of data. The end operation interrupt must be serviced within 35 ms (model 6) or 25 ms (model 7) to obtain rated speed.

Synchronous Communications Adapter operates at one of several transmission speeds. The time between character transfer interrupts depends on the speed selected by the speed selection switch and the number of bits per character. The times between characters (interrupts) for the various combinations of bit speed and character size are shown in the following chart:

Baud versus character size timing chart

Data may be lost if the SCA read request is not honored within the times shown. If the 1130 is transmitting, data will not be lost but fill characters will be automatically inserted, thus reducing actual effective baud rate.

1231 Optical Mark Page Reader requests a read response interrupt each time the one-character buffer in the attachment is loaded. If the request is honored within 13.2 ms, the requests occur every 13.2 ms until the entire data sheet has been read. However, the 1231 has a sonic delay-line buffer capable of storing all characters from a single data sheet. Therefore, data will not be lost if the read response interrupt request remains unhonored longer than 13.2 ms.

To maintain the rated throughput of 2,000 data sheets per hour, the 1231 read response interrupt request should be honored within 13.2 ms, and the read start command (XIO control with bit 13 on) for the next data sheet should be issued within 130 ms after the first read response interrupt has been serviced. The programmer must be aware of the possibility of a read error causing a data sheet to be selected and the operation terminated before all characters have been read and transferred to core storage. If data from data sheets is directly related to the previous sheets (and assuming the previous sheet has been read correctly), then the read start must not be issued until after the operation complete interrupt has occurred and the error indicators have been tested.

The 1231 is on interrupt level 4 and will not impact the throughput of other devices on the system.

1134 Paper Tape Reader requests a read response 500 us. after a feed command. A read command should be given to accept the character stored in the paper tape attachment buffer before the next feed command is issued. The continuous read rate is 16.7 ms per character. A feed command must be issued 16 ms after the response interrupt to maintain rated speed. The 1134 is not subject to losing data unless two feed commands are issued consecutively. The 1134 is on interrupt level 4 and will not impact the speed of the other devices on the system.

1055 Paper Tape Punch requests a punch response interrupt every 66.7 ms if punching continuously and should be serviced within 8 ms following the interrupt request to maintain rated speed. The 1055 is on interrupt level 4 and will not impact the speed of other devices on the system.



But wait, there's MORE...

And there's LESS...

And there's the rest