Guardian Programmer's Guide

Table Of Contents
Using Nowait Input/Output
Guardian Programmer’s Guide 421922-014
4 - 5
Applying Multiple Nowait Operations on a Single File
Applying Multiple Nowait Operations on a
Single File
Files other than disk files allow multiple I/O operations to run concurrently. Figure 4-2
shows several I/O operations executing concurrently against the same file. This file
must be opened specifically to allow concurrent I/O operations.
To permit multiple operations on the same file to run concurrently, you must open the
file with the nowait parameter set to the maximum number of concurrent I/Os that you
will permit against that file.
Once several concurrent I/O operations have started, you can require that operations
finish in the order in which they started, or you can allow them to finish in any order.
SETMODE function 30 determines which of these alternatives you use. The way you
distinguish between operations depends on which option you choose.
To force I/O operations to finish in the order in which you start them, you make no
call to SETMODE function 30 or you set the parameter-1 parameter to 0 before
calling SETMODE function 30. The first call to AWAITIO[X] completes the oldest
outstanding operation, the second call completes the second oldest, and so on.
To allow completions to occur in any order, you must call SETMODE function 30
with bit 15 of the parameter-1 parameter set to 1.
Figure 4-2. Multiple Concurrent Operations on One File
VST021.VSD