At the logical level, the user formulates his/her I/O requests in the application program using macros (GET, PUT, GETKY, STORE, PAM, etc.). When higher programming languages are used, the READ or WRITE statements are converted accordingly by the relevant runtime system.
The expansion of the macro contains an equivalent SVC call which, however, is not executed with every macro.
In the case of sequential input operations (GET), the access method (SAM, ISAM) provides the next virtual record from the input buffer into which the data block was physically read. The SVC call is executed only when there are no further records in the input buffer.
In the case of sequential output operations (PUT), the access method (SAM, ISAM) performs the SVC call only when there is no space left in the output buffer.
Before an update operation PUTX (ISAM) can be performed, the corresponding records must have been read (GET, GETKY). Only when the record length increases in the course of the update will the SVC call be executed.
If the called DMS access method discovers that a physical I/O operation is to be performed, the SVC call $EXCP (Execute Channel Program) or $XCPW (Execute Channel Program with Wait) is used to trigger the I/O operation. These calls are not immediately available to the user.
The time relations on the channel or disk side are identical for both calls; the only difference is the reaction of the calling program routine.
With the $XCPW call, the program run is interrupted (placed in the wait state from Q0 to Q4 by the system-internal PEND routine) and will not resume until the I/O operation has terminated.
With the $EXCP call, the program continues asynchronously to the processing of the I/O operation (performs other functions unrelated to the I/O operation). At a given time, it issues an explicit wait call. For the sake of simplicity, only the $XCPW call is presented in more detail below.
If the logical volume is occupied at the time of the $XCPW call (busy processing I/O operations for other users), a wait time is incurred in front of the volume. A higher volume workload causes a longer wait time (see section "Software service time").
When the PAV function is used, there are several device addresses (alias devices) available for each logical volume (base device). Concurrent I/O jobs can be processed via these, which prevents excessive delays.
As soon as the volume is free (or at least a free alias device is available), the operating system sends the instruction START SUBCHANNEL (SSCH) together with the “Operating-Request Block” (ORB), which contains a description of the possible access paths in the “Logical Path Mask”, to DCS.
If all access paths are occupied (which is very rare with multiple access paths), a corresponding wait time is incurred (function pending time: cf. the report group SERVICETIME of openSM2) before the I/O operation can be initiated. As a rule, the wait time for a free access path is so small as to be negligible.
Figure 3: Flowchart for a disk I/O operation: Read hit/read miss