GDSX (Extended General Device Support) Manual
Design and Development
Extended General Device Support (GDSX) Manual—529931-001
2-31
Checkpointing
running and that checkpointing of significant events is required. The backup task then
proceeds to bring brother up-to-date. (This process is similar to that involved in
reviving a mirrored volume.) The backup task makes a pass through the primary’s
data structures, including all the control blocks, checkpointing them to the backup.
When the backup task has completed its work, it sets the global variable
backup^process^flag to one and checkpoints it to brother. This signals brother that it is
now a consistent backup and is capable of takeover if necessary. The backup task in
the primary GDSX process then calls USER^BACKUP, giving users the opportunity to
checkpoint their own global data (declared in a named or private global data block).
An example of USER^BACKUP that checkpoints data input at a terminal is given in
USER^BACKUP on page 9-10. In the example, obtaining the checkpoint semaphore
is not necessary, because TSCODE is not checkpointing and no user task exists.
Also, calling DO^CP is not necessary, because after exiting USER^BACKUP a DO^CP
is done automatically by the backup task.
The USER^BACKUP procedure is only called once in the lifecycle of a GDSX process.
Checkpointing
USCODE cannot use normal Guardian checkpointing. The following TSCODE-
supported procedures can be used:
•
GET^CPSEM. This procedure is used to acquire the checkpoint semaphore.
•
Q^CP[X]. This procedure is used to queue data to be checkpointed in the
checkpoint buffer.
•
^CHECKPOINT. This procedure acquires the checkpoint semaphore, queues the
task stack image and TCB (and all allocated memory pool buffers for a type 2
checkpoint), sends data to the backup process, releases the checkpoint
semaphore, and establishes a restart point for the task.
•
DO^CP. This procedure sends data to the backup process.
•
PUT^CPSEM. This procedure is used to release the checkpoint semaphore.
See Section 8, “Service Routines,” for detailed explanations of these procedures.
Within the extended segment used for control structures, the primary GDSX process
allocates a checkpoint buffer of length MAXCPSIZE (see GDSX Configuration
Parameters on page 2-46). This buffer is used to assemble checkpoint messages.
Access to this buffer and brother is controlled by the checkpoint semaphore cpsem.
Records sent to brother generally represent logical checkpoint requests instead of
physical checkpoints as when using the Guardian library checkpointing facility.
Each block sent to brother has the general format:
Word 0 Size of checkpoint block in words (n)
Words 1–n-1 One or more checkpoint records