Availability Guide for Application Design

Availability Through Process-Pairs and Monitors
Availability Guide for Application Design525637-004
7-21
C and C++
should be written using pTAL; existing TAL applications can be easily migrated to
pTAL (refer to the TNS/R Native Application Migration Guide).
Both pTAL and TAL offer complete control of all process resources: memory, open
files, trap handling, and so on. In addition, there are no restrictions on directly invoking
Guardian procedures from pTAL or TAL.
For more information about invoking system routines from TAL, refer to the TAL
Programmer’s Guide. For more information about using pTAL, refer to the pTAL
Reference Manual and the pTAL Guidelines for TAL Programmers manual.
C and C++
You can write programs that run as NonStop process pairs with active backups using
the HP NonStop C and C
++
compiler. This ANSI compiler, along with enhancements in
the Common Run-Time Environment (CRE), provides full support for the active backup
model.
HP also supports the passive backup model in C and C++, with the restriction that
applications using the checkpoint functions should not use the active backup
extensions to the CRE. Also, such applications cannot use functions such as
printf() and sprintf() that depend on temporary data areas within the CRE or
functions that depend on the content of hidden global areas.
For information about invoking system routines from C or C+
+
, refer to the
C/C++ Programmer’s Guide.
Native Mode COBOL, COBOL85, and FORTRAN
COBOL85 and FORTRAN support the passive backup process-pair model with the
following restrictions:
You cannot issue nonrestart checkpoints.
You cannot issue multiple nowait I/O requests.
You cannot create a backup process while waiting for I/O to finish.
You cannot perform processing while waiting for I/O to finish.
You cannot have control over internal storage mapping.
Native mode COBOL, COBOL85, and FORTRAN do not support process pairs that
use the active-backup model. Native mode COBOL does not currently support process
pairs that use the passive-backup model.
The run-time libraries for COBOL85 and FORTRAN contain the additional support
necessary to make process-pair programming possible. The initializer routine performs
all necessary startup functions for running as a process pair. The receive file handlers
read messages from $RECEIVE and check for process deletion or processor failure.
The ability to create a backup process and perform restart checkpointing operations is
provided by the STARTBACKUP and CHECKPOINT verbs (in COBOL85) or
statements (in FORTRAN).