H06.15 Release Version Update Compendium

2 Operating System
Enhancements to OSS Thread-Aware I/O Operations
The H06.15 RVU introduces new thread-aware APIs for OSS regular files:
spt_fcntlz( )
spt_ftruncate64z( )
spt_fsyncz( )
spt_ftruncatez( )
spt_readvz( )
spt_readz( )
spt_writevz( )
spt_writez( )
For OSS regular files, these new APIs block only the calling thread instead of the process if they
must wait for an I/O operation to complete, thus improving the throughput of multithreaded
applications.
In addition, these new APIs support thread-aware applications by serializing I/O operations on
an open regular file:
spt_closez( )
spt_fstat64z( )
spt_fstatz( )
spt_lseek64z( )
spt_lseekz( )
For OSS non-regular files, the following new APIs perform the same as the similarly named
spt_*x API:
spt_closez( )
spt_fcntlz( )
spt_readvz( )
spt_readz( )
spt_writevz( )
spt_writez( )
In addition, a new system process, the OSS server process (OSP) server named $ZSPnn, runs in
each processor (nn indicates the processor number). This server process manages resources for
thread-aware file I/O operations on OSS regular files without blocking threaded client applications
from running other threads. The OSP servers also allow those shared OSS resources to be released
without requiring involvement of the client application when thread-aware I/O operations
complete.
The spt_*z functions are an extension to the UNIX 98 specification. These interfaces conform to
IEEE Std 1003.1c-1995, POSIX System Application Program Interface with the following exceptions:
The use of the header file spthread.h is an HP exception to the POSIX standard.
When a signal arrives during a call, these functions, instead of returning an EINTR error to
the application, the function retries the I/O operation, except in this case: If fork() is called
by a signal handler that is running on a thread performing a call to one of these functions,
the function call in the child process returns EINTR to the application:
spt_readz()
spt_writez()
spt_readvz()
Enhancements to OSS Thread-Aware I/O Operations 11