OSI/FTAM Programming Guide
NonStop FTAM Programming
HP NonStop OSI/FTAM Programming Guide—528612-001
3-10
Wait and Nowait Modes
•
No more than one call to an FTM procedure that causes I/O operations (see
Table 4-1 on page 4-2)
You can call Guardian file-system procedures while you wait for an FTM procedure or
APS procedure to complete.
Canceling Nowait Operations
You can cancel a pending nowait operation by calling the MFM_CANCELREQ_
procedure for the associated CEPI. Using the MFM_CANCELREQ_ procedure is
similar to using the Guardian procedure CANCELREQ.
The MFM_CANCELREQ_ procedure defaults to the oldest outstanding operation. You
can also specify exactly which I/O operation to cancel by using the tag parameter. If
you do specify a tag and the tag has more than one operation pending completion, the
oldest operation with that tag is cancelled.
Using Wait Mode or Nowait Mode
Although writing an application in nowait mode is more complex than writing an
application in wait mode, nowait mode can be more efficient when your program must
perform multiple I/O operations concurrently. If your application has established more
than one association, for example, and wishes to handle FTAM services on each
concurrently, nowait mode allows you to proceed with an activity on one association
while an I/O operation on another association is completing. Even if your application is
handling only one association, nowait mode is useful because it allows you to manage
local file access via Guardian file-system procedure calls until the FTM or APS
procedure has completed.
In general, using nowait mode requires less elapsed time for your application than wait
mode. In wait mode, there are delays because an application waits for each physical
I/O operation to complete. A program in wait mode that handles three FTAM
associations must wait for the I/O operation on each association to complete serially,
while a nowait program can allow the I/O operation on the three associations to
proceed concurrently.
Tag Parameter
The tag parameter is an optional parameter that you can use in FTAM nowait
applications to match nowait I/O requests with completions. If there are multiple I/O
requests outstanding in your application, the tag indicates which I/O request is
complete. An advantage of using the tag parameter over the filenum parameter of
the MFM_AWAITIOX_ procedure is that using tag isolates the specific procedure that
has completed. The filenum parameter identifies the association in which an I/O
request is complete, but does not identify the individual request.
Note. Use the MFM_CANCELREQ_ procedure to cancel a nowait operation initiated by FTM
and APS procedure calls only. Use the Guardian CANCELREQ procedure to cancel Guardian
file-system requests.










