Guardian Programmer's Guide

Table Of Contents
Fault-Tolerant Programming in C
Guardian Programmer’s Guide 421922-014
27 - 30
Comparison of Active Backup and Passive Backup
Table 27-1. Differences Between C Active Backup and TAL Passive
Backup (page 1 of 2)
To Perform This Task
An Active Backup
Program Does This
A Passive Backup
Program Does This
Start backup process Primary calls __ns_start_backup. Primary calls
PR
OCESS_CREATE_.
Establish
co
mmunication
between primary and
backup processes
Primary opens backup, and
backup opens $RECEIVE.
Protocol is application-specific,
im
plemented with Guardian read
and write routines.
Backup calls
CHE
CKMONITOR; primary
calls CHECK* routines.
Protocol defined by the
various CHECK* routines.
Monitor primary CPU
by
backup process
Backup calls MONITORCPUS;
backup is explicitly coded to check
for failure messages.
Backup calls
MONITORCPUS.
CHECKMONITOR checks for
failure messages.
Monitor backup CPU
by
primary process
Primary can call
PROCESS_GETPAIRINFO_ or
read messages from $RECEIVE
or check for failures when
communicating with backup.
Same as active backup
(explicit code needed).
Backup open files for
t
he backup process
Primary calls
__ns_fget_file_open_state, sends
open state to backup. Backup
calls __ns_backup_fopen.
Primary calls
FILE_OPEN_CHKPT_.
Retrieve file state
inf
ormation and send it
to backup
Primary calls __ns_fget_file_state
and writes state information to
backup.
Primary calls
CHECKPOINT[MANY][X].
Set file state in the
b
ackup process
Backup calls __ns_fset_file_state
after receiving file state info from
primary.
Done automatically while
backup is running in
CHECKMONITOR.
Define continuation
po
ints
Primary sends control state
information to backup.
Continuation point defined by
location of most recent
CHECKPOINT[MANY][X]
call.