GDSX Manual

Design and Development
Extended General Device Support (GDSX) Manual134303
2-30
Checkpointing
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-42). 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:
Each checkpoint record is structured as:
For example, to checkpoint a file, TSCODE uses the following record:
Word 0 23
Word 1 3
Word 2 Address of associated FCB
Words 3–10 FCB
Words 11–22 File name
Upon receiving this checkpoint message, brother compares the message with its FCB.
(The FCB is logically structured into two parts: noncheckpointed and checkpointed.
While the primary GDSX process actually passes the entire FCB to its backup, the
backup copies only the checkpointed portion to the appropriate location in the FCB
Word 0 Size of checkpoint block in words (n)
Words 1n-1 One or more checkpoint records
Word 0 Size of checkpoint record in words (m)
Word 1 Type of checkpoint record
Word 2 Address of entity being checkpointed
Words 3m-1 Checkpoint data