C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

Table 11 Comparison of IEEE and Tandem Floating-Point Formats
Tandem doubleIEEE doubleTandem floatIEEE floatCharacteristic
64643232Total bits in format
91198Bits of exponent
54522223Bits of stored fraction
55532324Nominal precision,
including hidden bit
Active Backup Programming Functions
The term “fault tolerant” means that a single failure does not cause processing to stop. The C
run-time library enables you to write fault-tolerant programs using the active backup programming
model. Active backup programs are supported only in the Guardian environment.
The active backup programming model is the only method to write fault-tolerant programs in C.
Use of the Guardian CHECKMONITOR procedure to perform “passive” backup programming
does not provide true fault tolerance in C programs.
In active backup programming, processes run in pairs: a primary process that performs the tasks
of the underlying application, and a backup process that is ready to take over execution from the
primary process if the primary process or processor fails. Active backup programs have these
characteristics:
Active backup uses process pairs to achieve fault tolerance.
The primary process sends state information to the backup process. State information is
information about the run-time environment that is required for the backup process to take
over for the primary process.
The backup process receives state information from the primary process, detects a failed
primary process or CPU, and takes over execution.
An active backup program executes as a primary and backup process pair running the same
program file. The primary and backup processes perform interprocess communication. The primary
process sends critical data to the backup process. This critical data serves two purposes: to provide
sufficient information to enable the backup process to resume application processing (file state and
application state information), and to indicate to the backup process where it should logically
resume application processing (control state information).
The backup process receives messages from two sources. It receives critical information from the
primary process (state information), which it must record for future use in the event it must take over
processing from the primary process. It can also receive messages from the operating system
indicating that the primary process or processor has failed. If the primary process fails, the backup
process takes over processing at the logical point in the application indicated by the most recent
control state information received from the primary process, and it continues processing using the
most recent file state and application state information.
Table 12 lists the functions used to write active backup programs.
Table 12 C Functions for Active Backup Programming
UseFunction
Called by the primary process to create and initialize the backup process.__ns_start_backup()
Called by the backup process to open files that have already been opened
by the primary process.
__ns_backup_fopen()
Called by the primary process to obtain file state information.__ns_fget_file_state()
Called by the backup process to update file state information.__ns_fset_file_state()
76 Using the C Run-Time Library