METHOD FOR BUMPLESS CHANGEOVER FROM ACTIVE UNITS TO BACK-UP UNITS IN COMPUTER EQUIPMENT AND A DEVICE FOR CARRYING OUT THE METHOD

Abstract: Method for bumpless changeover from active units to backup units in computer equipment and a computer equipment for carrying out the method. The central unit of a computer equipment has an active processor and an active memory as well as redundant units as backup units for the processor and/or the memory. Further, there are members for changeover from an active unit to a corresponding backup unit in the event of a fault in the active unit. The central unit has interrupt routines and carries out write and read operations against the peripheral units of the equipment. A bumpless changeover from an active unit to a backup unit is obtained by establishing rollback points (P₀-P₄) in the program execution by storing the processor state and the memory content in at least all hardware initiated interrupt routines. All operations against the peripheral units are logged after each rollback point. At a changeover (at P₁) to a backup unit, the program execution is returned to the last established rollback point (P₁). Thereafter the execution of the program is resumed without performing any operations against the peripheral units, whereby instead the result of read operations is fetched from log buffers while write operations are skipped, until all the logged operations have been repeated. Thereafter the execution is continued with performing operations against the peripheral units.

Description: The invention relates to a method for bumpless changeover from active units to backup units in computer equipment according to the precharacterising part of Claim 1. The invention also relates to computer equipment for carrying out the method. Such methods and computer equipment is particularly important for computerized process control which requires highly reliable operation of the control system. One method of increasing the reliability of a computer system is to introduce redundant components. Of special interest is the introduction of redundant components in the most vital part of the computer, the central unit. For this purpose and for switching in the components in a bumpless manner, i.e. without influencing the process control procedure, methods are required for establishing rollback points at short time intervals with a known state of the central unit, from which points the central unit can resume the program execution, and for handling interrupts and peripheral unit references. One known method is to double the central unit and to update the computer base in the redundant central unit at checkpoints. These are selected such that the redundant unit is able to take over the function of the active unit by starting the execution of the program at the last checkpoint. In order to obtain a bumpless changeover, the checkpoints have to be selected such that the information therein is consistent. In computer systems with cyclically executing programs without interrupt handling, it is possible to enter a checkpoint after each program cycle and handle peripheral unit references such that each input or output is referred to once per program cycle at the most. This solves the problem in a limited number of cases in which the program for process monitoring and control is built up of sequentially executing modules, which execute at the same priority level. This method is described in US-A-4,351,023. The background of the invention is the development of increasingly more complex computer systems for monitoring and control of industrial processes in real time. These are characterized in that they are capable of handling interruptions from the process and in that the user programs are built up of two or more cooperating program modules which, independently of each other, execute in parallel but asynchronously at different priority levels. The program structures are defined by the user on the basis of requirements of each individual installation and vary from one plant to another. The difficulty in establishing rollback points in these computer systems resides partly in defining checkpoints in the program in which all dynamic data variables are consistent with each other, partly in handling the interrupts which, of course, result in the program execution taking place along non-predetermined paths, and partly in handling the peripheral unit references such that the state of the peripheral units is not affected by a re-execution of the program from the last rollback point, which would, of course, cause disturbance of the controlled process. The invention aims to develop a method and means for carrying out the method for bumpless changeover from active units to backup units in computer equipment which method and means provide a general solution at the hardware and operating system level that which may be applied to all computer systems independently of the structure of the application program. To achieve this aim the invention suggests a method according to the introductory part of Claim 1, which is characterized by the features of the characterizing part of Claim 1. Further developments of the method are characterized by the features of the additional claims 2 to 8. Computer equipment to carry out the method is characterized by the features of Claim 9. Further developments of this computer equipment is characterized according to the invention by the features of the additional claims 10 to 13. The invention is particularly suitable in fault tolerant computer systems for process monitoring and process control in real time. The processors used in the invention are adapted for handling priority-based interrupt requests. The following terminology is used in the following description: By computer system is meant a complete computer with a central unit and input and output units of all kinds. By central unit is meant a complete central unit with one or more processors and one or more memories. By application program is meant that program which defines the task of the computer system. By operating system is meant that program which administers the central unit and its execution of the application program. By main program is meant that program, operating system + application program, which is required for carrying out the tasks of the computer system. By backup program is meant a background program which is possibly executed by backup processors. By primary units are meant active units in the central unit which take part in the execution of the main program carrying out duties of the computer system. By backup units are meant redundant units in the central unit. These can also take part in the execution of the main program in order thus to relieve the primary units, but they are not necessary for carrying out the duties of the computer. By peripheral units are meant, on the one hand, the secondary memories of the computer equipment, i.e. members for storing programs and data which are not used in the execution in progress, and, on the other hand, the members of the computer equipment for communication with the surroundings, i.e. communication units, input units and output units. By execution unit is meant an instruction sequence which is executed in one sequence. The execution units are delimited by checkpoints . By rollback point is meant a point in the program at which processor state and memory contents are stored, and from which the program execution can be repeated. By logging is meant an on-line recording of information, in this case of address and data exchanged between the units of the computer equipment. The information is recorded in a log buffer . By memory reference is meant a write or a read operation in the memory, and by peripheral unit reference is meant a write or read operation against a peripheral unit. By bumpless changeover is meant the disconnection of a primary unit and the connection of a backup unit to replace the primary unit, performed in such a way that it does not affect the behaviour of the computer system otherwise than by a short time delay introduced in a currently executing operation. By hardware initiated interrupt routine is meant a program section which is executed by processor units in response to an asynchronously generated interrupt request by internal circuits, e.g. the interval clock, or a peripheral unit, e.g. a digital input card. The task of the interrupt routine is to investigate the cause of the interrupt and to initiate execution of an associated procedure. A processor unit may have an interrupt request input or several interrupt request inputs with different priorities. The invention shows a way of establishing rollback points and handling peripheral unit references and interrupts in a central unit such that the switching of redundant processors and memories becomes bumpless independently of the structure and configuration of the application program if an active unit should cease to operate owing to a fault. The methods can be applied to all computer systems, but are particularly intended for computer systems having interrupt systems which execute one or more application programs for monitoring and control of processors in real time with requirements for highly reliable operation, in those cases where the application programs are built up of two or more cooperating program modules which, independently of each other, execute in parallel and asynchronously at different priority levels. The method according to the invention is based on the fact that a computer can be regarded as a machine which, by executing a series of instructions in a program, passes through a number of states in which each state is completely determined by the preceding state and the instructions to be executed. The principle is to divide the program dynamically into execution units and, at checkpoints between these units, to create rollback points with a saved computer state, from which rollback points the program execution can be resumed: The dynamic division of the program into execution units is controlled by the interrupts such that checkpoints are activated when the program execution takes a new path because of an interrupt. A rollback point is created by saving the states of the active processors and a copy of the content of the active memory. The program execution is resumed from a rollback point by restoring the states of the processors, and the program execution is resumed with the saved copy of the memory content. To be able to re-execute a partially already executed execution unit without affecting the peripheral units, the peripheral unit references between rollback points are logged. During the re-execution the results of already performed peripheral unit references are utilized instead of repeating the references. The result of read operations is fetched from the log buffer and write operations are passed without taking any measures since they are already performed. In this way, the states of the peripheral units will not be affected by the re-execution otherwise than by the time delay thus arising. The invention is designed to be applied to a central unit with redundant processors and/or memories in order to maintain the operation of the central unit after a fault on a component of the central unit without affecting the operation of the central unit. The invention will now be described in greater detail with reference to the accompanying drawings showing - by way of example - in Figure 1 the principle of the changeover according to the invention, Figure 2 the problems with write operations against the peripheral units, Figure 3 the principle of interrupt handling according to the invention, Figure 4 a general computer equipment according to the invention, Figure 5 an embodiment of computer equipment according to the invention having doubled processors and memories, Figure 6 an embodiment of computer equipment according to the invention having double central units, Figure 7 more detailed the embodiment according to Figure 6, Figures 8-15 the invention as applied to computer equipment according to Figures 6-7, Figure 8 the central unit selector in block diagram form, Figure 9 a log bus interface unit, Figure 10 an example for the organization of the memory, Figure 11 the configuration of the synchronization control unit, Figure 12 the configuration of the primary and backup unit operating systems, Figures 13a and 13b flow diagrams of the routines of the primary unit and secondary unit operating systems, respectively, for monitoring the backup unit and primary unit, respectively, and for monitoring and control of the synchronization control unit and the synchronization process, Figure 14 the flow diagram of the routine which establishes a rollback point at each checkpoint, Figure 15 a flow diagram of the routine for changeover from the primary unit to the backup unit. The invention is based on the principle of providing checkpoints in the program execution and to save at these points the states of the processor units and the memory units, thus enabling, in case of a failure in the active central unit, the state of this central unit to be restored. The memory content is saved in the simplest way in the redundant memory so that it is immediately available when needed. This can be achieved in different ways. One way is to make a copy of the entire memory at each checkpoint. A more efficient way is first to make a copy and thereafter to update the copy at each checkpoint with the changes. The states of the active processors, the processor status, can also be saved in different ways. One way is to have a special memory in a synchronization control unit. Another way is to save the processor status in the memory, thus having it saved automatically together with the memory content. When the processor status and the memory content are saved at the checkpoint, a rollback point is established from which the program can be re-executed in the same way in which it had been executed previously. However, a condition for a bumpless re-execution is that the surroundings of the central unit are not affected otherwise than by the time delay caused by the takeover procedure. (By a suitable design, this time delay can be made very short). This is achieved partly by delaying carrying out the interrupt acknowledgement until a rollback point has been established, and partly by saving the results of the peripheral unit references after each rollback point, so that they can be used again instead of being repeated upon a re-execution of the program section after the rollback point. The checkpoints are activated dynamically each time the program execution takes a new path because of the interrupt. When a fault occurs in a processor or a memory, the faulty unit is disconnected, a redundant unit is connected to replace it, and the program execution is resumed from the last established rollback point. The processor restores its saved status and resumes the program execution with the saved memory copy. For each peripheral unit reference the processor investigates whether the reference has already been carried out, and if this is the case it uses the saved result instead of repeating the reference. The solution is realized by means of a synchronization control unit, which continuously logs all write operations in the active memory and transfers these to the redundant memory at the checkpoints. The synchronization unit also logs all read and write operations between the checkpoints against the peripheral units and keeps the results of the operations performed after the last checkpoint available to the processor units for re-execution of the program. Figure 1 shows schematically the mode of operation in computer equipment according to the invention. Figure 1a shows an application program, which is divided into a sequence of execution units A,B,C,D,E, delimited by checkpoints, P₀-P₄. At each checkpoint, for example P₁, the state of the active processor is saved into the active memory, and then the content of the active memory is saved in the backup memory. Those operations are designated S and EQU, respectively, in Figure 1b. Figure 1c shows symbolically the change of the content of the active memory with time. This content is changed successively from the initial state 1 to the final state 2 during the execution of the execution unit A and operation S. Following operation EQU, the state of the memory is then changed by execution of the unit B and the following operation S to the state 3, and so on. Figure 1d shows symbolically the states of the redundant memories. Prior to the execution of unit A, these memories at the checkpoint P₀ are updated so as to have the same state ("1") as that of the active memory. This state is maintained until operation EQU at checkpoint P₁. The operation EQU updates then the content of the redundant memory which thereby assumes the state 2. At point P f a fault is assumed to occur in any of the active units. The fault is detected and initiates a transfer of the program execution from the active to the redundant units. This initiates a restoring procedure - "R" in Figure 1e - which restores the program execution to the rollback point which was established at the immediately preceding checkpoint, in this case P₁. Thus, after the fault and the restoring procedure, the previously redundant units start the program execution at the beginning of the execution unit B (see Figure 1f) and continue the execution in the same way as the previously active units. Figure 1g shows how the execution unit B, which up to the fault was executed by the active units, is resumed from its beginning by the redundant units. Referring back to Figure 1b, the operations S and EQU represent an overhead of the fault tolerant computer operations with respect to the same operations in a fault intolerant computer system. The overhead associated with the EQU operation might be particularly high if the whole active memory content is to be copied to the backup memory at each checkpoint. One way to reduce it is to copy the whole active memory content only once and afterwards to keep the backup memory content equalized to the active memory content by copying to the backup memory only those updates of the active memory which have been performed between the actual checkpoint and the immediately preceding checkpoint. The implementation and further improvements of the suggested method are discussed more detailed below with reference to Figure 11. Figure 2 illustrates a problem which is solved by means of the invention. This figure corresponds to Figure 1, but for simplicity the operations S and EQU at the checkpoints have been commonly designated CP. In execution unit B, at point p a , a write operation is made against a peripheral unit, for example activating a digital output signal. At point P b a second write operation is made for deactivating the same digital output signal. After a fault in the active units, occurring at P f , the execution is restored in the manner described above to the rollback point (established by checkpoint P₁) and with the aid of the redundant units a re-execution of unit B is started from the beginning of the execution unit. If no special measures were to be taken, the write operations would be carried out a second time, when points P a and P b are reached during the execution, i.e. one time more than desired. As mentioned, this problem is solved by logging peripheral unit references carried out between the rollback points and by not repeating them during a re-execution. Figure 3 illustrates the handling of interrupts. Figure 3a shows an interrupt request which occurs during the execution of a program unit A, the first part of which, A1, is executed prior to the interrupt (Figure 3c). The checkpoint operation CP is inserted into the interrupt routine IR prior to those parts of the routine which contain peripheral unit references and the interrupt acknowledgement IA. In the event of a fault during the interrupt routine (at P f ), the resumption of the execution of the main program by means of the restoring routine R (Figure 3f) starts at that rollback point which was established at the checkpoint, and the interrupt routine is re-executed from that point (Figure 3h), whereafter the execution of the remaining part A2 of the unit A is carried out (Figure 3g). Figures 3d and 3e show, in similar manner as in Figures 1 and 2, the status of the active memories and the redundant memories, respectively. In this way, it is ensured that an interrupt routine which is in process when a fault in the active units occurs is not lost and that the peripheral unit references can be retrieved in the proper order from the log buffer during the re-execution. Figure 4, Figure 5 and Figure 6 show examples of the configuration of a central unit (CU) with redundant processors and memories. The synchronization control unit (SCU) is a device which saves the states of the active processors and a copy of the active memory and which logs peripheral unit references. Figure 4 shows a general CU with an arbitrary number of active processors PROC 1... PROC N, which take part in the execution of the main program, and an arbitrary number of redundant backup processors, PROC N+1 ... PROC N+M. The CU has two memories, MEM 1 and MEM 2, one being active and the other redundant. Each one of the processors is connected to both memories. All the units are connected to the synchronization unit which monitors and records memory updates and peripheral unit references originating from any one of the active processor units and which transfers updates of the active memory to the redundant memory on a per processor basis. In the case of active processor failure, the failed processor is replaced by one of the backup processors and the operation of N active processors is rolled back to their corresponding rollback points. During program re-execution the synchronization unit is responsible for providing each processor with only those peripheral references which have been previously executed by the same processor. (In the case of the newly activated processor with references originating from the failed processor.) In the case of active memory failure , the operation of all N active processors is stopped, the failed memory is replaced by the backup memory, and then the operation of each processor is rolled back to its corresponding rollback point. Figure 5 shows an embodiment of a CU with two processors PROC 1 and PROC 2, one of which is active and the other redundant, and with two memories MEM 1 and MEM 2, one of which is active and the other redundant. The signal paths between the units in the CU, and between this and the peripheral units PU, are formed as a peripheral bus PB and a memory bus MB. Figure 6 shows another embodiment of an overall CU, which comprises two complete central units CU1 and CU2 and a synchronization control unit SCU. Each CU has an internal bus - IB1 and IB2, respectively - which also connects it to the SCU. A peripheral bus connects the central units to the peripheral units PU. The embodiments shown are only examples of the configuration of equipment to which the invention can be applied. The embodiment which will be described below is based on a central unit configuration according to Figure 6. In this solution the synchronization unit saves the copy of the active memory in the redundant memory so that it is available immediately after a changeover. Also the processor state is saved in the redundant memory, whereas the peripheral unit references are saved in the log buffer. Figure 7 shows a more detailed block diagram of the computer equipment in Figure 6. The overall central unit CU consists of two identical central units LCU and RCU and a synchronization control unit SCU. Each central unit has a processor PROC and a memory MEM, and associated control circuits CC. Each central unit comprises an internal bus IB which operates both as a signal path to the memory and as (internal) signal path to the peripheral units. The internal bus communicates with the (external) peripheral bus PB and the log bus LLB and RLB, respectively, via the controllable interfaces PBI and LBI, respectively. An overall central unit bus CUB connects the two central units. The central units are designed so that one, and only one, of them is connected to the external peripheral bus. The SCU is reversible and the central units are designed so that any one of them can be the active, e.g. the primary unit with the other one acting as the backup unit. The SCU logs the write operations of the primary unit in the memory of the primary unit, updates the memory of the backup unit and logs the peripheral unit references. The SCU has two log buffers LB1 and LB2, two internal buses IB1 and IB2 and interface units LBI for communication between the SCU and the central units via the log buses LLB and RLB. In addition, it has a monitoring and control circuit MCC. The central unit is adapted to the redundancy function as follows: It has a controllable interface PBI (Figure 7) to the external peripheral bus, which is formed so that one, and only one, central unit is always connected to the peripheral bus, and a central unit selector CUS. The CUS (Figure 8) is a circuit which comprises portions of the two central units and constitutes parts of the control circuits CC of the units. When a central unit has established that it can and should operate as a primary unit, it actuates the signal CONNECT REQ. That central unit which activates the signal first becomes the primary unit by activating the signal PERIPHERAL BUS ENABLED. If both central units should activate CONNECT REQ at the same moment, the choice is made by the position assumed by a bistable flip-flop in the CUS upon energizing. With the aid of the signals PROCESSOR EXECUTING, the central units signal to each other if they execute programs. It has an interface between the internal bus and the log bus LBI (Figure 7) which is described in more detail in Figure 9. In addition to address and data lines (ADDRESS BUS and DATA BUS, respectively), the interface also comprises lines for interrupt generation (INTERRUPT REQ), direct memory access from the SCU (BUS ACCESS CONTROL), and stop of execution (HOLD). The memory can be organized in address spaces according to Figure 10. The PROGRAM MEMORY therein can be organized in three ADDRESS SPACES for the STARTUP PROGRAM, the BACKUP PROGRAM, and the MAIN PROGRAM, respectively. The DATE MEMORY can be organized in three corresponding address spaces. In addition, there is an address space for peripheral bus data (PERIPHERAL UNIT REGISTER). The log bus interfaces on the SCU have an address space decoder which selects main program data and peripheral bus data for logging (LOG BUS DATA). If a central unit functions as the primary unit, it executes the main program and carries out the duties of the computer. If it functions as the backup unit, it executes the background program and supervises the primary unit. The SCU maintains a copy of the data of the main program at the last rollback point in the backup unit. Figure 11 shows in more details the configuration of the SCU. The function of the SCU is to record, store and transfer synchronization information between the primary unit and the backup unit, and to record and store information about the operation of the primary unit against the peripheral bus. The main components of the SCU are the log buffers LB1 and LB2. The SCU can be designed with an arbitrary number of log buffers operating cyclically according to a rolling scheme, in which data are logged in recording cycles controlled by the checkpoint activations, and the data transmissions to the backup unit take place asynchronously and in parallel with the recordings and are controlled only by the duration of the transmission and the supply of filled log buffers. The described solution has two buffers operating alternately. Each log buffer has a data memory MEM and an address generator ADR GEN. The log buffers can be connected, via the controllable bus interface circuits LBI, to the internal busses of the central units via the log busses LLB and RLB. The log buffers and the bus interface circuits are controlled by monitoring and control circuits MCC for activation/deactivation of the logging function and for buffer switching at the checkpoints. The monitoring and control circuits MCC, in turn, are controlled by the central units via control registers CTRL REG in the bus interface circuits. The bus interface circuits LBI also contain units (PARITY) for parity bit generation and control, circuits (INTERF) for adoption of the signals, and an ADDRESS SPACE DECODER. When a checkpoint is enabled, the primary unit interrupts the execution of the main program, records its processor state in the memory and orders a buffer switching via the control register. The monitoring and control circuits MCC in the SCU then perform the following function (assuming that data have been logged in LB1): The primary unit is stopped by activating HOLD against it. If the transfer of the data from LB2 to the backup unit has not been completed, it will be completed. The connections of the internal busses to the log bus interfaces are changed. The address generator of LB2 is set to zero, HOLD against the primary unit is deactivated and logging of data in LB2 is initiated. Thereafter, the logging takes place continuously by intercepting addresses and data on the internal bus of the primary unit and recording them in the log buffer. After each logging, the address generator steps one step forward and points at the next cell in the buffer until a buffer switching is initiated at the next checkpoint. In case of a certain buffer address, indicating that the buffer is full, the address generator generates an interruption to the primary unit for activation of a new checkpoint. Data transmission from LB1 to the backup unit is initiated at the moment that HOLD against the primary unit is deactivated. Thereafter, the transfer is carried out utilizing a "direct memory access" such that primary memory data in the log buffer are transferred to the corresponding addresses in the memory of the backup unit. The unit is reversible, i.e. designed in such a way that anyone of the central units may function as the primary unit while the other one functions as the backup unit. Figure 12 shows the configuration of the operating system. The operating system, the function of which is to administer the central unit and its execution of the application program, is adapted to the redundancy function by being divided into three sub-programs and being supplemented with routines for monitoring of active and redundant units and monitoring and control of the synchronization of the redundant units with the active ones as well as switching between them. The operating system consists of the following sub-programs: the STARTUP PROGRAM, which comprises routines for initiation of the central unit (GENERAL INITIATION ROUTINES) and selection between primary function and backup function (PROCESSOR ROLE SELECTION). The selection is made in conjunction with the other central unit via the SCU in Figure 8 starting from the status of the central units and the settings of the operator. If the central unit is to become the primary unit, the continued program execution control is transferred to a primary operating system, and if it is to become the backup unit, the control is transferred to a backup operating system. The PRIMARY OPERATING SYSTEM, which comprises interrupt routines, PRIMARY INTERRUPT ROUTINES, each one with a checkpoint at which a rollback point is established by the ROLLBACK POINT ESTABLISHMENT ROUTINE. It further comprises routines for monitoring the backup unit and monitoring and control of the SCU and the synchronization process, PRIMARY REDUNDANCY MONITOR AND CONTROL ROUTINES (see flow di agram in Figure 13a), and it comprises a general operating system routines for administration of the primary unit, handling of the peripheral units and execution of the application program, GENERAL OS ROUTINES. The APPLICATION PROGRAMS execute under the control of this operating system. The BACKUP OPERATING SYSTEM, which comprises BACKUP INTERRUPT ROUTINES; routines for monitoring of the primary unit and monitoring and control of the SCU and the synchronization process, BACKUP REDUNDANCY MONITOR AND CONTROL ROUTINES (see flow diagram in Figure 13b); TAKEOVER ROUTINES which switch between the central units; and routines for administration of the backup unit and its program execution, BACKUP OS ROUTINES. The BACKUP BACKGROUND PROGRAM executes under the control of this operating system. The interrupt routines, PRIMARY INTERRUPT ROUTINES, of the primary operating system are shown in more detail on the right hand side of Figure 12. They comprise N interrupt routines, INTERRUPT ROUTINE 1 through INTERRUPT ROUTINE N. Each one of these comprises a number of instructions, INSTRUCTION, which among other things include a CHECKPOINT, in which the ROLLBACK POINT ESTABLISHMENT ROUTINE is called, and an instruction or routine for acknowledgement of the interrupt (INTERRUPT ACKNOWLEDGE). Within each interrupt routine no peripheral unit references occur ahead of the checkpoint. Figure 13a shows in the form of a flow diagram the routines of the primary operating system for monitoring of the backup unit and for control and monitoring of the SCU and the synchronization process (PRIMARY REDUNDANCY MONITOR AND CONTROL). Figure 13b shows the corresponding routines of the backup operating system. After checking that the SCU is connected (SCU PRESENT?) and that the backup and primary units are connected and functioning (BACKUP PRESENT AND RUNNING ?), the two operating systems cooperate (symbolized by the arrow COOP) in carrying out an initiation and testing of the SCU (SCU INIT AND TEST). If the unit operates correctly (SCU OK?), the primary operating system carries out an initial total synchronization (INITIAL SYNCHRONIZATION). If this has been correctly completed (SYNCH. OK?), the routines of the two operating systems change into a closed loop with a supervising function (SCU AND SYNCHRONIZATION MONITORING and BACKUP/PRIMARY MONITORING, respectively). If the SCU does not function correctly, the two operating systems initiate an error handling routing (ERROR HANDLING). The backup operating system monitors the primary unit (PRIMARY PRESENT AND RUNNING?) and, in the event of a failure therein, initiates a TAKE OVER routine which causes the backup unit to take over the execution of the main program at that rollback point which is established at the last checkpoint. The primary operating system monitors the backup unit (BACKUP MONITORING) and, in the event of an failure therein, initiates an ERROR HANDLING routine. The synchronization process creates a series of rollback points by transferring the data image of the main program of the primary unit, and the processor state associated with that image, to the backup unit at checkpoints. The first rollback point is established by an initial total synchronization (INITIAL SYNCHRONIZATION), and subsequent stepwise resynchronizations establish new rollback points at the subsequent checkpoints. Between two checkpoints, the SCU logs all changes in the data image of the main program of the primary unit, and at the checkpoints it updates the corresponding data image in the backup unit. The primary processor state belonging to the memory image is transferred to the backup unit by the processor saving its state in the data image before the transfer of the logging is initiated. During the initial total synchronization, a program in the primary unit runs through the data memory of the main program and reads/rewrites each memory cell. Each write operation is logged and transferred at the n ext checkpoint to the backup unit, so when the program has run through the entire memory, also its content has been transferred to the backup unit, thereby establishing the first rollback point. At the subsequently located checkpoints new rollback points are established by updating the memory of the backup unit and the processor state belonging to the backup unit, so that the memory of the backup unit again corresponds to that of the primary unit. Figure 14 shows the flow diagram for the routine (ROLLBACK POINT ESTABLISHMENT) that is executed at each checkpoint. The routine first checks whether the synchronization is active (ENABLED?). Thereafter the routine saves the processor state in the data image of the main program (SAVE PROCESSOR CONTENT IN MEMORY), and finally the routine initiates changeover to a new log buffer and transfer of logged data to the backup unit (INITIATE LOG BUFFER AND LOGGED DATA TRANSFER). When a fault is detected in the primary unit, its program execution is interrupted and it is disconnected from the peripheral bus. Now, the backup unit is to take the place of the primary unit and become the new primary unit. The backup unit has a copy of the data image of the main program of the old primary unit, taken at the last rollback point, which includes the processor state belonging to this data image, and the SCU has all peripheral unit operations after the checkpoint recorded in a log buffer. The backup unit detects when the primary unit is disconnected and activates the TAKE OVER routine. A flow diagram of this routine is shown in Figure 15. The TAKE OVER routine first switches the backup unit to the primary unit by selecting the primary operating system (SELECT PRIMARY OPERATING SYSTEM). The next step is to switch the log buffers in the SCU so that it has access to the last one (SET THE SCU IN LOG BUFFER ACCESS MODE), and to investigate the content therein to check whether there are any peripheral unit references recorded (ANY PERIPHERAL REFERENCES LOGGED?). If this is the case, the peripheral bus is not connected immediately but the program is re-executed from the rollback point (RESTORE THE PROCESSOR CONTENT AND RESUME PROGRAM EXECUTION FROM LAST ROLLBACK POINT) until all logged peripheral unit references have been passed, and for each peripheral unit reference that gives rise to a "bus error", owing to the peripheral bus not being connected, the result is retrieved from the log buffer. Data from read operations are read from the log buffer, and write operations, which are already carried out, are skipped. When there are no more peripheral unit references in the log buffer, a new rollback point is established (ESTABLISH NEW ROLLBACK POINT), the peripheral bus is connected (CONNECT THE PERIPHERAL BUS), and the execution of the main program is resumed from the last established rollback point (RESTORE THE PROCESSOR CONTENT AND RESUME PROGRAM EXECUTION FROM LAST ROLLBACK POINT).

Claims: Method for bumpless changeover from active units like processors and memories to corresponding backup units in the central unit (CU) of computer equipment, with the central unit comprising at least one active processor (PROC), an active memory (MEM), at least one backup unit for at least one of said active units, and members (CUS) for changeover of the function from an active unit to a backup unit, with the processors being adapted for handling interrupts with the aid of interrupt routines (INT ROUTINE 1-N), at least some of which are hardware initiated, and each of which has one entry point; at which the execution of the routine is started, and one interrupt acknowledgement point (INTERRUPT ACKNOWLEDGE), and with the central unit being adapted to carry out write and read operations against peripheral units (PU) included in the computer equipment, characterized in that a) a rollback point (P₀-P₄) is established by the active processors during program execution at the event of at least each hardware initiated interrupt routine said rollback point being established between the entry point and the interrupt acknowledgement point of said interrupt routine, by storing at said rollback point the instantaneous status of the active processors and at least the instantaneous contents of those parts of the active memory which have been modified by the processor since the last rollback point into a corresponding backup unit, b) all operations against the peripheral units are logged after each rollback point, c) when a changeover of the function from an active unit to a backup unit is initiated, the program execution is returned to the last established rollback point by restoring the stored parts of the memory content and the state of the active processors, whereafter the program execution is resumed, d) during the now beginning program execution, the results of the read operations already performed against the peripheral units are fetched from a log unit (e.g. LB1) without carrying out any operations against the peripheral units until all logged operations have been repeated, whereafter e) the program execution is continued while carrying out operations against the peripheral units. Method according to Claim 1, characterized in that the status of a processor, when establishing a rollback point, is stored by first storing it in the active memory and thereafter storing it in a second memory together with the contents of said parts of the active memory. Method according to Claim 1 or 2, characterized in that the contents of said parts of the active memory are stored in the backup memory. Method according to Claim 2 or 3, characterized in that the contents of said parts of the active memory are stored by a process comprising logging of changes in the active memory between two consecutive rollback points (e.g. P₁-P₂) simultaneously with the program execution and initiation of transfer of the logged changes to the corresponding cells in the second memory at each rollback point. Method according to Claim 4, characterized in that the transfer of the logged changes to the second memory is carried out simultaneously with and independently of the logging of the subsequent changes in the active memory, enabling the execution of the program to be continued from the rollback point without any delay pending the completion of the transfer. Method according to Claim 4 or 5, characterized in that the first copy of the content of the active memory is saved in the second memory, thereby establishing the first rollback point, by a process comprising read/write operations on each cell in the active memory in which each read/write operation is carried out in an indivisible memory reference operation. Method according to any of the preceding Claims for recovery of the central unit after a fault in an active memory, characterized by a) disconnecting the faulty memory, b) connecting a backup memory, c) returning the program execution of a processor to a rollback point, and d) resuming the program execution from said rollback point. Method according to any of Claims 1 to 6 for recovery of the central unit after a fault in an active processor, characterized by a) disabling the faulty processor, b) transferring the functions of the faulty processor to a backup processor, c) switching to a backup memory, d) returning the program execution of a processor to a rollback point, and e) resuming the program execution from said rollback point. Computer equipment for carrying out the method according to any of the preceding claims, with a central unit (CU) comprising as active units at least one active processor (PROC) and an active memory (MEM), as well as at least one backup unit for at least one of said active units, and member (CUS) for changeover of the function from an active unit to a backup unit, with the processors being adapted for handling interrupts with the aid of interrupt routines (INT ROUTINE 1-N), at least some of which are hardware initiated and each of which has an entry point in which the execution of the routine is started, and an interrupt acknowledgement point (INTERRUPT ACKNOWLEDGE), and with the central unit further being adapted to carry out write and read operations against peripheral units (PU) included in the computer equipment, characterized in that the computer equipment comprises a) members for establishing a rollback point (P₀-P₄) by the active processors during program execution at the event of at least each hardware initiated interrupt routine said rollback point being established between the entry point and the interrupt acknowledgement point of said interrupt routine, by storing at said rollback point the instantaneous status of the active processors and at least the instantaneous contents of those parts of the active memory which have been modified by the processor since the last rollback point into a corresponding backup unit, b) members (SCU,LB1,LB2) for logging of all operations against the peripheral units after each rollback point, c) members adapted, in case of a changeover of the function from an active unit to a backup unit, to return the program execution to the last established rollback point (P₀-P₄) by restoring the stored parts of the memory contents and the state of active processors, and thereafter resuming the program execution, and d) members adapted to fetch, during the resumed program execution, the results of read operations already performed against the peripheral units from log buffers (e.g. LB1) Without carrying out any operations against the peripheral units, until all logged operations have been repeated. Computer equipment according to Claim 9, in which the central unit comprises a redundant processor unit (PROC), characterized in that it comprises members (CUS) for selecting between an active function and a backup function of the processors of the central unit and adapted, in case of an active function of a processor, to cause said processor to carry out the function of the computer by executing programs and carrying out operations against the peripheral units, members (CUS,PBI) for connecting an active processor to the peripheral units and for disconnecting a backup processor, and members (CUS,PBI) adapted, in case of a fault in an active processor, to disconnect said processor and connect a backup processor. Computer equipment according to Claim 9 with a redundant memory (MEM) in the central unit, characterized in that the computer equipment comprises members (CUS) for selecting between an active function and a backup function of the memories of the central unit and adapted, in case of an active function, to cause a memory to be referred continuously when active processor units execute programs, members (CUS,IB) for connecting an active memory to the active processors and for disconnecting a backup memory, and members (CUS,IB) adapted, upon a fault in an active memory, to disconnect said memory and connect a backup memory. Computer equipment according to any of Claims 9 to 11, characterized in that it comprises a buffer memory (LB1,LB2) which is connectable to a signal path to an active memory for logging write operations therein, as well as to a signal path to a backup memory for transfer of the logged memory operations to corresponding cells therein, and a buffer memory (LB1,LB2) which is connectable to a signal path to the peripheral units for logging read and write operations against these, as well as to the processors for reading of the logged peripheral unit operations by said processors. Computer equipment according to Claim 9, characterized in that it comprises a) two central units (LCU,RCU), each comprising one processor (PROC) and one memory (MEM), b) members (CUS) for selecting between an active central unit function and a backup function for each central unit, in which the active central unit function consisting in performing the function of the computer by executing programs and carrying out operations against the peripheral units, c) members (CUS,PBI) for connecting the active central unit to the peripheral units and disconnecting the backup central unit, d) members (CUS,PBI) adapted, upon a fault in the active central unit, to disconnect said central unit and connect the backup central unit, and e) a device (SCU), connected to both central units, comprising aa) a buffer memory (LB1,LB2) which is connectable to the memory of the active central unit for logging the write operations therein, as well as to the memory of the backup central unit for transfer of the logged write operations to corresponding cells therein, bb) a buffer memory (LB1,LB2) which is connectable to a signal path to the peripheral units for logging read and write operations against said units, as well as to the central units for reading of the logged peripheral unit operations by said central units.

Inventors: KAP, MLADEN
Applicants: ASEA AB
Application year: 1987
Main classification: G06F9
IPC codes: G06F11, G06F9