Availability Guide for Application Design

Availability Through Process-Pairs and Monitors
Availability Guide for Application Design525637-004
7-10
Takeover by the Passive Backup
If the processor in which the primary process is running fails, then the operating
system on that processor has no way of informing the backup process that the primary
process is deleted. The backup process must therefore monitor the primary process’s
processor by listening for system messages that indicate loss of the primary’s
processor or the inability to communicate with it. The backup process must call the
MONITORCPUS procedure to receive Processor Down messages for the appropriate
processor.
If the CHECKMONITOR procedure receives either a Process Deletion message or a
message indicating that the primary processor is no longer available, it starts to
takeover and the backup process becomes the primary process.
Takeover by the Passive Backup
Takeover is necessary in either of the following circumstances:
The primary process stops or traps.
The processor in which the primary process is running fails.
On takeover, the backup process must resume application processing and, at the
appropriate time, start a new backup process.
To take over application processing, the CHECKMONITOR procedure switches the
role of the backup process to that of the primary process and returns using:
The established restart point, if any
The checkpointed critical data
The checkpointed file-open and file-synchronization information
Restart Point
The restart point depends on whether the primary process issued a restart checkpoint.
Using the saved stack marker information, the new primary process starts executing on
return from the CHECKPOINT, CHECKPOINTMANY, CHECKPOINTX, or
CHECKPOINTMANYX procedure that last saved its own stack marker. If no such
restart checkpoint was received, the backup process simply returns from
CHECKMONITOR and continues executing.
Data State
The context of the new primary process includes the data state saved by the most
recent restart checkpoint (if there was one), and any subsequent changes made by
nonrestart checkpoints, and checkpointed file-open and file-synchronization
information.
File-Open and File-Synchronization Information
The necessary files have already been opened in the backup by the CHECKMONITOR
procedure in a way that allows the opened device or process to relate the backup open