Guardian Programmer's Guide

Table Of Contents
Fault-Tolerant Programming in C
Guardian Programmer’s Guide 421922-014
27 - 15
Updating File State Information
Updating File State Information
During application processing, I/O operations might be performed. At certain points in
the program, the primary process must obtain file state information and send it to the
backup. File state information includes file pointers and file synchronization
information. File buffers are not included in the file state; they are included in the
application state.
Synchronizing File Operations
File synchronization information is used by the server to determine whether an
operation by a backup process after a failure of its primary process is a new operation
or a retry of an operation just performed by the primary process. The information
allows the server to ensure that no write operation is duplicated when a backup
process takes over from its primary process. File synchronization information is
contained in a file’s sync block, which can be sent to the backup process at the update
Figure 27-4. Using Switch Statement to Determine the Continuation Point
VST135.VSD