DE102004019371B4 - Recovery process for use with a computer system uses routines based on critical and uncritical data - Google Patents

Recovery process for use with a computer system uses routines based on critical and uncritical data Download PDF

Info

Publication number
DE102004019371B4
DE102004019371B4 DE200410019371 DE102004019371A DE102004019371B4 DE 102004019371 B4 DE102004019371 B4 DE 102004019371B4 DE 200410019371 DE200410019371 DE 200410019371 DE 102004019371 A DE102004019371 A DE 102004019371A DE 102004019371 B4 DE102004019371 B4 DE 102004019371B4
Authority
DE
Germany
Prior art keywords
critical
interruption
sequence
software
uncritical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
DE200410019371
Other languages
German (de)
Other versions
DE102004019371A1 (en
Inventor
Klaus Freiberg
René. Dr. Graf
Jürgen LAFORSCH
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Siemens AG
Original Assignee
Siemens AG
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Siemens AG filed Critical Siemens AG
Priority to DE200410019371 priority Critical patent/DE102004019371B4/en
Publication of DE102004019371A1 publication Critical patent/DE102004019371A1/en
Application granted granted Critical
Publication of DE102004019371B4 publication Critical patent/DE102004019371B4/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering

Abstract

The computer system recovery following an interruption begins with uncritical software (2) followed by critical software (3). The critical software is characterised by not all system data being saved. Each task is repeated with an enter function (6) together with a recovery function (10) to secure the critical data.

Description

Die Erfindung betrifft ein Verfahren zur Wiederherstellung eines Betriebszustands eines Systems gemäß den im Anspruch 1 angegebenen Maßnahmen.The The invention relates to a method for restoring an operating state a system according to the Claim 1 specified measures.

Aus der US 4 959 774 ist ein Speichersystem mit einem Haupt- und einem Schattenspeicher bekannt, der Zugriffe auf den Hauptspeicher überwacht. Es sind Maßnahmen vorgesehen, welche bei einem Stromausfall einen Verlust der Daten im Hauptspeicher verhindern.From the U.S. 4,959,774 For example, a memory system having a main memory and a shadow memory is known which monitors accesses to the main memory. Measures are provided which prevent a loss of data in the main memory in the event of a power failure.

Bei Systemen, insbesondere bei Rechnern, besteht in der Regel die Forderung, dass sie nach einer Unterbrechung, wie beispielsweise nach einem Stromausfall, ihren Betrieb an der Stelle fortsetzen sollen, an der die Unterbrechung auftrat. Dies ist häufig sehr schwierig, da bei einer plötzlichen Unterbrechung nicht fest abgespeicherte, d. h. flüchtige Daten in der Regel verloren gehen. Um dies zu vermeiden, wird insbesondere bei Rechnern die Stromversorgung überwacht, um eine Unterbrechung der Stromversorgung rechtzeitig zu erkennen und entsprechende Sicherheitsmaßnahmen ergreifen zu können. Wird eine Unterbrechung der Stromversorgung festgestellt, wird eine so genannte Interruptroutine gestartet, mittels welcher alle wesentlichen flüchtigen Systemdaten gespeichert werden, wobei während der Ausführung der Interruptroutine die Energieversorgung des Rechners mittels eines entsprechenden Energiepuffers vorgenommen wird.at Systems, especially in computers, there is usually the requirement that after a break, such as after a power outage, to continue their operations at the point where the interruption occurred. This is common very difficult, given a sudden Interruption not permanently stored, d. H. volatile data in usually lost. In particular, this is to avoid this monitors the power supply to computers for an interruption the power supply in good time and appropriate security measures to be able to take. Becomes an interruption of the power supply is detected, so one called interrupt routine started by means of which all essential volatile system data be stored during the execution the interrupt routine the power supply of the computer by means of a corresponding energy buffer is made.

Sofern jede einzelne Task exakt an dem Befehl weiterläuft, an dem sie durch den Ausfall der Energieversorgung unterbrochen wurde, wird das betreffende System als wiederanlauffähig nach Energieunterbrechung bezeichnet. Hierzu müssen für alle Tasks aber nach dem Wiedereinschalten der Energieversorgung alle Speicherbereiche, Kontexthierarchien, Stacks und Prozessorregister den gleichen Inhalt haben wie zum Zeitpunkt der Unterbrechung der Energieversorgung.Provided each individual task continues exactly to the command it receives due to the failure the power supply is interrupted, the system in question as restartable designated after interruption of energy. For this, however, have to after all for all tasks Reconnecting the power supply to all memory areas, context hierarchies, Stacks and processor registers have the same content as at the time the interruption of the power supply.

Um dies zu erreichen, wird beispielsweise bei einer Unterbrechung der Stromversorgung ein Interrupt ausgelöst, der die jeweils laufende Task unterbricht. In der entsprechenden Interrupt-Service-Routine bleibt der Software nur eine kurze Zeit, um wichtige Informationen, die in einem flüchtigen Speicher liegen, in einen remanenten Speicher zu sichern. Das System wird hierdurch in einen eindeutigen Zustand gebracht. Dieser Vorgang wird regelmäßig als "Herunterfahren" bezeichnet.Around To achieve this, for example, in an interruption of Power supply triggered an interrupt, which is the current one Task interrupts. In the corresponding interrupt service routine the software only stays for a short time to get important information, which in a fleeting Memory are stored in a retentive memory. The system is thereby brought into a clear state. This process is regularly referred to as "shutdown".

Nachdem die Unterbrechung der Stromversorgung beendet ist, d. h. beim Wiedereinschalten des Rechners, läuft eine Firmware an, mittels welcher, soweit erforderlich, die Hardware initialisiert und anschließend festgestellt wird, dass eine Unterbrechung der Stromversorgung vorlag. Daraufhin werden die Speicher und Task-Kontexte aus den gesicherten Daten restauriert und, vereinfacht ausgedrückt, die Interrupt-Service-Routine fortgesetzt, die sich dann beendet und die Rechenleistung an die unterbrochene Task zurückgibt. Dieser Vorgang wird regelmäßig als "Wiederanlauf" bezeichnet.After this the interruption of the power supply has ended, d. H. when restarting the Calculator, runs a firmware, by means of which, if necessary, the hardware initialized and then it is determined that there was an interruption of the power supply. The memory and task contexts are then backed up Data restored and, to put it simply, the interrupt service routine continued, which then ends and the computing power to the interrupted Returns task. This process is regularly referred to as "restart".

Die Erfassung eines Systemzustands bzw. die Speicherung der relevanten Systemdaten ist häufig nur mit sehr großem Aufwand bzw. manchmal gar nicht zu realisieren. Dies ist insbesondere dann der Fall, wenn Softwarepakete Dritter verwendet werden, die die Eigenschaft der Wiederanlauffähigkeit nicht aufweisen oder sich nur mit unverhältnismäßigem Aufwand nachbessern ließen. Des Weiteren ist ein Wiederanlauf häufig nicht möglich, weil Hardware vorhanden ist, welche bei einer Unterbrechung der Stromversorgung Registerinhalte verliert, und die entsprechende Software dies nicht kompensieren kann.The Acquisition of a system status or the storage of the relevant System data is common only with very big Effort or sometimes not to realize. This is special then the case when third-party software packages are used, the do not have the property of restartability or only with disproportionate effort had to be corrected. Furthermore, a restart is often not possible because Hardware is present, which in case of interruption of the power supply Register contents lose, and the corresponding software does not can compensate.

Es ist Aufgabe der Erfindung, ein Verfahren zur Wiederherstellung eines Betriebszustands eines Systems derart auszubilden, dass nicht wiederanlauffähige Programmteile in ein insgesamt wiederanlauffähiges System integriert werden können.It It is an object of the invention to provide a method for restoring a Operating state of a system such that non-restartable program parts into a total restartable System can be integrated.

Diese Aufgabe wird durch die im Anspruch 1 angegebenen Maßnahmen gelöst. Vorteilhafte Weiterbildungen der Erfindung ergeben sich aus den Unteransprüchen.These The object is achieved by the measures specified in claim 1 solved. Advantageous developments of the invention will become apparent from the Dependent claims.

Kritisch bedeutet hierbei, dass die Befehlsfolge bzw. ein entsprechendes Softwarepaket selbst nicht wiederanlauffähig ist oder auf Hardware zugreift, die ihren Speicherinhalt bei einer Unterbrechung verliert, wie beispielsweise Prozessorregister.Critical means here that the command sequence or a corresponding Software package itself can not be restarted or accesses hardware, which loses its memory content in the event of an interruption, such as Processor registers.

Dadurch, dass die zweiten flüchtigen Zustandsdaten jeweils zu Beginn einer kritischen Befehlsfolge gesichert werden, ergibt sich in vorteilhafter Weise die Möglichkeit, das System und insbesondere den von der kritischen Befehlsfolge abhängigen Systemteil jederzeit in den Zustand versetzen zu können, in dem es bzw. er sich vor Beginn der Abarbeitung der kritischen Befehlsfolge befunden hat. Tritt während der Abarbeitung einer kritischen Befehlsfolge beispielsweise eine Unterbrechung der Stromversorgung auf, werden die von der unkritischen Befehlsfolge abhängigen flüchtigen Zustandsdaten des Systems auf herkömmliche Weise gesichert und nach Beendigung der Unterbrechung wieder hergestellt. Da die von der kritischen Befehlsfolge abhängigen Zustandsdaten des Systems beim Eintritt der Unterbrechung systembedingt nicht gesichert werden konnten, können diese nicht wieder hergestellt werden. Da jedoch die von der kritischen Befehlsfolge abhängigen flüchtigen Zustandsdaten vor Beginn der Abarbeitung der kritischen Befehlsfolge gesichert wurden, können diese Zustandsdaten des Systems wieder in den Zustand gebracht werden, den sie vor Beginn der Abarbeitung der kritischen Befehlsfolge hatten.The fact that the second volatile state data are respectively backed up at the beginning of a critical sequence of instructions, advantageously results in the possibility of being able to put the system, and in particular the system part dependent on the critical instruction sequence, at any time into the state in which it or it is before starting the execution of the critical instruction sequence. If, for example, a power interruption occurs during execution of a critical instruction sequence, the volatile state data of the system, which is dependent on the noncritical instruction sequence, is saved in a conventional manner and restored after the interruption has ended. Since the conditional data of the system dependent on the critical instruction sequence, when the Un Due to system failure, they could not be restored. However, since the volatile state data dependent on the critical instruction sequence was saved prior to the critical instruction sequence being executed, these system state data can be restored to the state they had prior to starting the critical instruction sequence.

Der Betrieb des Systems kann daher an der Stelle fortgesetzt werden, an der die kritische Befehlsfolge beginnt.Of the Operation of the system can therefore be continued at the point at which the critical instruction sequence begins.

Das erfindungsgemäße Verfahren könnte als Enter-Exit-Verfahren bezeichnet werden, da es immer dann relevant wird, wenn ein kritischer Softwareabschnitt betreten wird (Enter) und später wieder verlassen wird (Exit). Ein Enter-Punkt stellt jeweils den Beginn eines kritischen Abschnitts dar, der Exit-Punkt dessen Ende. In jeder Task kann an beliebig vielen Stellen ein Enter-Punkt definiert werden. Hierbei ist jedoch darauf zu achten, dass die Definitionen nicht geschachtelt werden. D. h., innerhalb eines kritischen Abschnitts dürfen zwar untergeordnete, d. h. geschachtelte Programmabschnitte abgearbeitet werden, ein kritischer Abschnitt darf jedoch nur in derselben Ebene verlassen werden, in der er betreten wurde. Mit anderen Worten, ein Exit-Punkt muss in derselben Programmebene liegen wie der zugehörige Enter-Punkt.The inventive method could be referred to as an enter-exit procedure, since it is always relevant becomes when a critical software section is entered (Enter) and later will leave again (Exit). An enter point always marks the beginning of a critical section, the exit point of its end. In each task can at any number of places an enter point can be defined. in this connection However, make sure that the definitions are not nested become. That is, within a critical section may indeed subordinate, d. H. Nested program sections processed however, a critical section may only be in the same level be abandoned, in which he was entered. In other words, an exit point must be in the same program level as the corresponding enter point.

Gemäß dem erfindungsgemäßen Verfahren wird an einem aktuellen Enter-Punkt der Kontext der laufenden Task gesichert, so dass ein definierter Wiederaufsetzpunkt mit allen Prozessorregistern und Programmzählern existiert. Am Exit-Punkt wird diese Kontextinformation wieder freigegeben, da die Task nicht mehr auf kritische Adressen zugreift und somit wiederanlauffähig ist. Tritt während der Abarbeitung der kritischen Befehlsfolge eine Unterbrechung auf, so wird die Software nicht befehlsgranular an dem Unterbrechungspunkt fortgesetzt, sondern an dem für diesen Abschnitt definierten Enter-Punkt, da durch die Sicherung des Kontexts am Enter-Punkt hierfür noch eine konsistente Speicher- und Registersicht vorliegt.According to the inventive method is at a current enter point the context of the running task is saved, so that a defined restart point with all processor registers and program counters exist. At the exit point, this context information is released again, because the task no longer accesses critical addresses and is therefore restartable. Kicks while the execution of the critical instruction sequence an interruption, so The software will not be command granular at the breakpoint continued, but at the for Entering this point defined enter point because of the backup of the context at the Enter point, a consistent memory and register view.

Vor der Abarbeitung der kritischen Befehlsfolge wird festgestellt, ob eine Unterbrechung vorlag, wobei im Falle einer Unterbrechung zunächst durch die kritische Befehlsfolge veränderte und nicht gesicherte Zustandsdaten an einen definierten Zustand angepasst werden. D. h., wird vor Abarbeitung einer kritischen Befehlsfolge festgestellt, dass eine Unter brechung nicht vorlag, werden die zweiten flüchtigen Zustandsdaten gesichert und die kritische Befehlsfolge abgearbeitet. Wird jedoch festgestellt, dass eine Unterbrechung vorlag, müssen durch die kritische Befehlsfolge veränderte, nicht gesicherte Zustandsdaten vor der Abarbeitung der kritischen Befehlsfolge zunächst an einen definierten Zustand angepasst werden. Es wird somit eine Korrekturroutine, d. h. eine Aufräum-Funktion aufgerufen, die alle im kritischen Abschnitt veränderten Variablen und Ressourcen in einen definierten Zustand bringt.In front the processing of the critical instruction sequence is determined whether an interruption, whereby in case of an interruption first by the critical command sequence changed and unsecured status data adapted to a defined state become. That is, before processing a critical instruction sequence found that an interruption did not exist, the second volatile status data secured and processed the critical command sequence. Will, however found that an interruption had to be made by the critical command sequence altered, Unsecured status data before processing the critical Command sequence first be adapted to a defined state. It is thus a Correction routine, d. H. called a cleanup function, the all changed in the critical section Brings variables and resources to a defined state.

In vorteilhafter Weise wird die Anpassung der nicht gesicherten Zustandsdaten an einen definierten Zustand, d. h. die Ausführung der Korrekturroutine als kritische Befehlsfolge behandelt. Hierdurch ist gewährleistet, dass bei Beginn der Korrekturroutine am aktuellen Enter-Punkt der Kontext der laufenden Task gesichert wird, wodurch eine während der Durchführung der Korrekturroutine auftretende erneute Unterbrechung ebenfalls abgesichert ist.In Advantageously, the adaptation of the unsecured status data to a defined state, i. H. the execution of the correction routine treated as a critical thread. This ensures that that at the beginning of the correction routine at the current enter point the Context of the running task is backed up, causing one during the execution the interrupt routine also occurs is secured.

Als sehr vorteilhaft hat sich eine Ausführungsform der Erfindung herausgestellt, bei welcher gewährleistet ist, dass bei vollständig zu durchlaufenden untergeordneten unkritischen Befehlsfolgen wie beispielsweise eine Listenverwaltung, welche innerhalb einer kritischen Befehlsfolge angeordnet sind, durch eine Unterbrechung während der Abarbeitung der vollständig zu durchlaufenden Befehlsfolge keine Inkonsistenzen entstehen. Dies könnte einerseits durch eine Interruptsperre erreicht werden, welche bewirkt, dass die Interrupt-Service-Routine, mittels welcher flüchtige Systemdaten bei einer Unterbrechung gesichert werden, zeitverzögert ausgeführt wird. Da wegen der begrenzten Energie, welche nach einer Unterbrechung der Stromversorgung in der Regel nur noch zur Verfügung steht, die Zeit für die Ausführung der Interrupt-Service-Routine begrenzt ist, lässt sich die Ausführung der Interrupt-Service-Routine aber nur um eine sehr begrenzte Zeit verschieben.When very advantageous, an embodiment of the invention has been found at which guaranteed is that at complete to be passed subordinate uncritical command sequences such as a list management, which within a critical command sequence are arranged, through an interruption during the processing of the complete to continuous sequence of commands do not incur inconsistencies. This could be achieved on the one hand by an interrupt lock, which causes that the interrupt service routine, by means of which volatile System data is saved in the event of an interruption, is executed with a time delay. Because of the limited energy, which after a break the power supply is usually only available, the time for execution the interrupt service routine is limited, the execution of the Interrupt service routine but only for a very limited time.

In vorteilhafter Weise werden daher erfindungsgemäß beim Eintritt einer Unterbrechung während der Abarbeitung der untergeordneten unkritischen Befehlsfolge flüchtige Zustandsdaten gesichert und nach der Unterbrechung wieder hergestellt sowie die Abarbeitung der untergeordneten unkritischen Befehlsfolge fortgesetzt. D. h., die untergeordnete Befehlsfolge wird nach der Unterbrechung befehlsgranular fortgesetzt.In Advantageously, therefore, according to the invention upon the occurrence of an interruption while the processing of the subordinate uncritical instruction sequence volatile status data secured and restored after the break as well as the Processing of the subordinate non-critical command sequence continued. That is, the subordinate instruction sequence becomes after the interruption command granular continued.

Hierzu wird zu Beginn der untergeordneten Befehlsfolge eine Disable-Enter-Funktion aufgerufen, welche bewirkt, dass nach einer Unterbrechung, welche bei der Abarbeitung einer innerhalb einer kritischen Befehlsfolge angeordneten untergeordneten unkritischen Befehlsfolge auftrat, das Programm nicht am Enter-Punkt fortgesetzt wird, sondern zunächst an der Stelle, an der es unterbrochen wurde. D. h., die betreffende Task läuft wie jede andere unkritische Task befehlsgranular an. Nachdem die untergeordnete Befehlsfolge durchlaufen wurde, wird eine Enable-Enter-Funktion aufgerufen. Diese Funktion bewirkt, dass das Programm dann in der üblichen erfindungsgemäßen Weise am Enter-Punkt fortgesetzt wird. Durch die Funktionen Disable-Enter und Enable-Enter wird sowohl die Konsistenz im untergeordneten unkritischen Programmteil gewahrt, als auch die Inkonsistenz im darumliegenden kritischen Programmteil ausgeschlossen.For this purpose, a disable-enter function is called at the beginning of the subordinate command sequence, which causes after an interruption, which occurred during the processing of a arranged within a critical command sequence subordinate uncritical command sequence, the program is not continued at the Enter point, but first at the point where it was interrupted. That is, the task in question, like any other uncritical task, runs on a command-granular basis. After the subordinate command sequence has been traversed, called an enable-enter function. This function causes the program to continue at the enter point in the usual manner according to the invention. The functions Disable-Enter and Enable-Enter both ensure consistency in the subordinate non-critical part of the program and rule out inconsistency in the critical part of the program.

Mittels des erfindungsgemäßen Verfahrens lassen sich in vorteilhafter Weise beliebige Softwarekomponenten in eine Firmware integrieren, da sie keinen Randbedingungen für einen Wiederanlauf genügen müssen. Der Wiederaufsetzpunkt vor dem Aufruf der Enter-Funktion und deren erneutes Durchlaufen erlauben auch die korrekte Behandlung wiederkehrender, hochfrequenter Netzausfälle, bei denen die Aufräum-Funktion mehrfach gestartet werden muss, bis alle Ressourcen freigegeben sind. Betriebssystem-Ressourcen werden korrekt behandelt, da ihr Zustandsvektor um den Enter-Status erweitert wurde. Wird die Enter-Funktion vor Eintritt der Produktivschleife einer Task aufgerufen, ist es möglich, diese Task mittels des er findungsgemäßen Verfahrens vollständig neu zu starten. Eine gegebenenfalls erforderliche Konsistenzsicherung in bestimmten kritischen Softwareabschnitten ist durch das vorübergehende Stilllegen des definierten Wiederaufsetzpunktes realisierbar.through of the method according to the invention advantageously any software components in one Integrate firmware as they have no boundary conditions for one Restart is enough have to. The restart point before calling the Enter function and its retracing also allows the correct treatment of recurring, high-frequency power failures, where the cleanup function must be started multiple times until all resources are released are. Operating system resources are handled correctly, as theirs State vector was extended by the Enter status. Will the enter function It is called before the productive loop of a task possible, this Task by means of he inventive method Completely to restart. An optionally required consistency assurance in certain critical software sections is due to the temporary Shutting down the defined restart point can be realized.

Weitere Einzelheiten, Merkmale und Vorteile der vorliegenden Erfindung ergeben sich aus der nachfolgenden Beschreibung eines besonderen Ausführungsbeispiels unter Bezugnahme auf die Zeichnung.Further Details, features and advantages of the present invention result from the following description of a particular embodiment with reference to the drawing.

Es zeigen:It demonstrate:

1 eine schematische Darstellung eines Ablaufplans einer ersten Ausführungsform eines erfindungsgemäßen Verfahrens und 1 a schematic representation of a flowchart of a first embodiment of a method according to the invention and

2 eine schematische Darstellung eines Ablaufplans einer zweiten Ausführungsform eines erfindungsgemäßen Verfahrens. 2 a schematic representation of a flowchart of a second embodiment of a method according to the invention.

Wie 1 entnommen werden kann, wird nach dem Start 1 eines Systems zunächst unkritische Software 2 ausgeführt. Nach dem Abarbeiten der unkritischen Software 2 wird kritische Software 3 abgearbeitet. Im Anschluss an die Abarbeitung der kritischen Software 3 wird wiederum unkritische Software 4 abgearbeitet, bis das Ende 5 erreicht wird. Die unkritische Software 2 ist dadurch gekennzeichnet, dass sie wiederanlauffähig ist. D. h., bei einer Unterbrechung der Abarbeitung der unkritischen Software 2 werden mittels einer Interruptroutine alle wesentlichen flüchtigen Systemdaten gespeichert, so dass sie nach der Unterbrechung wieder hergestellt werden können.As 1 can be taken after the start 1 a system initially uncritical software 2 executed. After processing the uncritical software 2 becomes critical software 3 processed. Following the execution of the critical software 3 in turn becomes uncritical software 4 worked off until the end 5 is reached. The uncritical software 2 is characterized in that it is restartable. In other words, if the processing of the uncritical software is interrupted 2 By means of an interrupt routine all essential volatile system data are stored so that they can be restored after the interruption.

Die kritische Software 3 ist dadurch gekennzeichnet, dass sie nicht wiederanlauffähig ist. D. h., bei einer Unterbrechung der kritischen Software 3 können nicht alle wesentlichen Systemdaten zum Zeitpunkt der Unterbrechung gespeichert werden, so dass sie nach der Unterbrechung nicht wieder herstellbar sind.The critical software 3 is characterized in that it is not restartable. That is, in case of interruption of the critical software 3 Not all essential system data can be stored at the time of the interruption, so that they can not be restored after the interruption.

Vor Beginn der kritischen Software 3 wird eine Enter-Funktion 6 aufgerufen, welche bewirkt, dass der vollständige Kontext der Task sowie dessen Position im Call-Stack an dieser Stelle gesichert (Sicherung 7) wird. Nach der Sicherung 7 der genannten Systemdaten erfolgt eine Abfrage 8, ob ein Netzausfall (NAU) vorlag. Lag kein Netzausfall vor, wird die kritische Software 3 regulär abgearbeitet. Nach dem Abarbeiten der kritischen Software 3 wird eine Exit-Funktion 11 aufgerufen, durch die dem System mitgeteilt wird, dass der Bereich der kritischen Software 3 verlassen wurde. Dies bewirkt, dass bei einem danach auftretenden Netzausfall neben der regulären Interrupt-Service-Routine keine weiteren Sicherungsmaßnahmen durchgeführt werden müssen.Before starting the critical software 3 becomes an enter function 6 which causes the complete context of the task as well as its position in the call stack to be saved at this point (backup 7 ) becomes. After the backup 7 The system data mentioned is a query 8th whether a power failure (NAU) was present. If there was no power failure, the critical software becomes 3 processed regularly. After running the critical software 3 becomes an exit function 11 called by which the system is informed that the area of critical software 3 was left. This means that, in the event of a subsequent power failure, no further safeguards must be carried out in addition to the regular interrupt service routine.

Tritt beim Abarbeiten der kritischen Software 3 ein Netzausfall auf, wird dies festgestellt, woraufhin das Programm nach Beendigung des Netzausfalls zu einem Wiederaufsetzpunkt 9 verzweigt, welcher vor dem Aufruf der Enter-Funktion 6 angeordnet ist. Somit erfolgt zunächst wiederum der Aufruf der Enter-Funktion 6, so dass der vollständige Kontext der Task sowie dessen Position im Call-Stack zu diesem Zeitpunkt erneut gesichert (Sicherung 7) wird. Bei der anschließenden erneuten Abfrage 8, ob ein Netzausfall vorlag, verzweigt das Programm dann zu einer Aufräum-Funktion 10. Die Aufräum-Funktion 10 bewirkt, dass alle im kritischen Abschnitt 3 veränderten Variablen und Ressourcen in einen definierten Zustand gebracht werden. Nach Durchlaufen der Aufräum-Funktion 10 verzweigt das Programm zum Aufruf der Exit-Funktion 11, wodurch dem System mitgeteilt wird, dass der Bereich der kritischen Software 3 verlassen wurde. Die kritische Software 3 wird dann erst beim nächsten regulären Durchlauf abgearbeitet. Die Aufräum-Funktion 10 könnte aber auch so ausgebildet sein, dass sie die Befehlsfolge der kritischen Software 3 enthält, wodurch die kritische Software 3 innerhalb der Aufräum-Funktion 10 abgearbeitet werden würde. Des Weiteren könnte das Programm nach Durchlaufen der Aufräum-Funktion 10 zum Eingang der kritischen Software 3 verzweigen, so dass die kritische Software 3 unmittelbar nach Durchlaufen der Aufräum-Funktion 10 abgearbeitet wird.Occurs while processing the critical software 3 If there is a power outage, this is detected and the program will reboot after the power failure 9 branches, which before calling the Enter function 6 is arranged. Thus, first the call of the Enter function occurs again 6 , so that the full context of the task as well as its position in the call stack at this time again saved (backup 7 ) becomes. In the subsequent renewed query 8th If there was a power failure, the program then branches to a cleanup function 10 , The cleanup function 10 causes everyone in the critical section 3 changed variables and resources are brought into a defined state. After passing through the cleanup function 10 the program branches to call the exit function 11 , which tells the system that the area of critical software 3 was left. The critical software 3 will then be processed on the next regular pass. The cleanup function 10 but could also be designed so that they are the command sequence of critical software 3 contains, eliminating the critical software 3 within the cleanup function 10 would be processed. Furthermore, the program could after running the cleanup function 10 to the entrance of the critical software 3 branch out, leaving the critical software 3 immediately after passing through the cleanup function 10 is processed.

Die Abfrage 8, ob ein Netzausfall vorlag, entscheidet somit, ob der Bereich der kritischen Software 3 durchlaufen wird oder ob eine Unterbrechung während der vorhergehenden Abarbeitung der kritischen Software 3 stattgefunden hat, so dass nun aufgeräumt werden muss. So könnten beispielsweise Semaphoren freigegeben werden müssen, die während des Abarbeitens der kritischen Software 3 gesetzt wurden. Der Aufruf der Exit-Funktion 11 gibt den gespeicherten Kontext wieder frei (12), da dieser nicht mehr benötigt wird. Die vorstehend beschriebene Ablaufsequenz kann mehrfach hintereinander in einer Task vorkommen, in der sich kritische und unkritische Programmteile abwechseln.The query 8th whether or not there was a power failure, thus decides whether the area of critical software 3 is going through or whether an interruption during the previous processing of the critical software 3 took place, so that now has to be cleaned up. For example, semaphores may have to be released during the execution of the critical software 3 were set. The call of the exit function 11 releases the saved context ( 12 ), because this is no longer needed. The sequence of sequences described above can occur several times in a row in a task in which critical and uncritical program parts alternate.

Trat während der Abarbeitung der kritischen Software 3 ein Netzausfall auf, so läuft das System beim anschließenden Wiederanlauf nach der Initialisierung des Systems innerhalb der kritischen Software 3 nicht befehlsgranular in der unterbrochenen Task weiter, sondern es werden zuerst alle Tasks auf ihren Enter-Exit-Status hin untersucht. Ist eine Task zwischen Enter und Exit unterbrochen worden, so muss deren Call-Stack analysiert werden. Wurden innerhalb der kritischen Software 3 weitere Funktionsaufrufe vorgenommen, muss der Call-Stack rückgebaut werden, bis man wieder in der Funktion steht, in der Enter aufgerufen wurde. Daraufhin wird an diese Stelle im Call-Stack der gesicherte Kontext kopiert, so dass die Task exakt vor dem Enter-Aufruf steht mit allen Prozessorregisterinhalten. Nachdem diese Analyse für jede Task durchgeführt wurde, stehen alle Tasks entweder an dem unterbrochenen Befehl oder vor dem Aufruf der jeweiligen Enter-Funktion 6, weil die Unterbrechung in einem Bereich kriti scher Software 3 stattfand. Erst wenn jede Task wieder in einem Bereich unkritischer Software 2, 4 steht, wird die jeweilige unterbrochene Task wie vorstehend beschrieben fortgesetzt.Occurred during the processing of the critical software 3 If there is a power failure, the system runs during the subsequent restart after initialization of the system within the critical software 3 not command-granular in the interrupted task, but all tasks are first checked for their enter-exit status. If a task has been interrupted between Enter and Exit, its call stack must be analyzed. Were within the critical software 3 If further function calls are made, the call stack must be removed until you are back in the function in which Enter was called. Then the saved context is copied to this location in the call stack so that the task is exactly in front of the enter call with all processor register contents. After this analysis has been performed for each task, all tasks are either at the interrupted command or before calling the respective Enter function 6 because the interruption is in an area of critical software 3 took place. Only when each task is back in a range of uncritical software 2 . 4 the respective interrupted task is continued as described above.

Jede Task, die in einem Bereich kritischer Software 3 unterbrochen wurde, wird unmittelbar vor dem Aufruf der Enter-Funktion 6 fortgesetzt. Die Abfrage 8, ob ein Netzausfall vorlag, bewirkt, dass anschließend in die Aufräum-Funktion 10 verzweigt wird. Der erneute Aufruf der Enter-Funktion 6 bewirkt, dass auch die Aufräum-Funktion 10 vor einem weiteren Netzausfall geschützt ist und so sichergestellt wird, dass die Task in einen sicheren Zustand kommt. Denn tritt während der Ausführung der Aufräum-Funktion 10 erneut ein Netzausfall auf, verzweigt das Programm nach Beendigung des Netzausfalls erneut zu dem Wiederaufsetzpunkt 9, da die Exit-Funktion 11 noch nicht aufgerufen wurde. Da vor Beginn der Aufräum-Funktion 10 die Enter-Funktion 6 aufgerufen wurde, wurden die relevanten Systemdaten gespeichert, so dass das Auftreten eines Netzausfalls während der Durchführung der Aufräum-Funktion 10 genauso behandelt wird, wie das Auftreten eines Netzausfalls bei der Durchführung der kritischen Software 3.Any task that is in a critical software area 3 is interrupted, immediately before the call of the Enter function 6 continued. The query 8th Whether or not there was a power failure causes subsequently in the cleanup function 10 is branched. The renewed call of the Enter function 6 also causes the cleanup function 10 is protected against another power failure, thus ensuring that the task enters a safe state. Because occurs during the execution of the cleanup function 10 Once again a power failure, the program branches again to the restart point after the end of the power failure 9 because the exit function 11 was not called yet. As before the start of the cleanup function 10 the enter function 6 was called, the relevant system data was stored, so that the occurrence of a power failure while performing the cleanup function 10 is treated in the same way as the occurrence of a power failure in the execution of the critical software 3 ,

Betriebssystem-Ressourcen, wie beispielsweise Semaphoren oder Events, müssen die Information bereitstellen, ob sie zwischen dem Aufruf der Enter-Funktion 6 und dem Aufruf der Exit-Funktion 11 besetzt bzw. freigegeben wurden und von welcher Task, so dass genau diese Task in ihrer Aufräumroutine den Zustand wieder herstellen kann, der vor dem Aufruf der Enter-Funktion 6 vorlag.Operating system resources, such as semaphores or events, must provide the information as to whether they are calling between the Enter function 6 and calling the exit function 11 have been set or released and by which task, so that this task in its scavenging routine can restore the state before the call of the Enter function 6 present.

Die unkritische Software 2 kann eine Befehlsfolge aufweisen, mittels welcher Vorarbeiten zur Abarbeitung der kritischen Software 3 oder zur Vorbereitung des Aufrufs der Enter-Funktion 6 durchgeführt werden. Die kritische Software 3 kann beispielsweise eine Befehlsfolge enthalten, mittels welcher Daten aus einem Eingangs-/Ausgangs-Chip (IO-Chip) gelesen werden. Mittels der Aufräum-Funktion 10 können beispielsweise unvollständige Daten aufgeräumt werden.The uncritical software 2 may have a sequence of instructions by which preparatory work for processing the critical software 3 or to prepare for calling the Enter function 6 be performed. The critical software 3 For example, it may contain a command sequence by means of which data is read from an input / output chip (IO chip). By means of the clean-up function 10 For example, incomplete data can be tidied up.

Die in 2 dargestellte Ausführungsform unterscheidet sich von der in 1 dargestellten Ausführungsform lediglich dadurch, dass innerhalb der kritischen Software 3 eine unkritische Befehlsfolge (konsistente Software) 3a angeordnet ist, welche vollständig durchlaufen werden muss, damit keine Inkonsistenzen entstehen. Um dies zu gewährleisten, ist vor der konsistenten Software 3a eine Disable-Enter-Funktion 13 angeordnet. Durch die Disable-Enter-Funktion 13 wird bewirkt, dass bei Beendigung eines Netzausfalls, der während der Abarbeitung der konsistenten Software 3a und somit innerhalb der Abarbeitung der kritischen Software 3 auftritt, nicht zum Wiederaufsetzpunkt 9 verzweigt wird. Solange die Disable-Enter-Funktion 13 aktiv ist, wird die konsistente Software 3a, da diese unkritisch ist und somit die betreffenden Systemdaten mittels der Interrupt-Service-Routine wieder restauriert werden, befehlsgranular fortgesetzt.In the 2 illustrated embodiment differs from the in 1 illustrated embodiment only in that within the critical software 3 an uncritical sequence of instructions (consistent software) 3a is arranged, which must be completed, so that no inconsistencies arise. To ensure this is before the consistent software 3a a disable-enter function 13 arranged. Through the Disable-Enter function 13 This will cause a power failure upon completion of the consistent software 3a and thus within the processing of the critical software 3 occurs, not to the restart point 9 is branched. As long as the disable-enter feature 13 Active is the consistent software 3a Since this is not critical and thus the system data concerned are restored by means of the interrupt service routine again, command granular continued.

Nach Beendigung der konsistenten Software 3a wird eine Enable-Enter-Funktion 14 aufgerufen, welche die Disable-Enter-Funktion 13 wieder aufhebt. Im Anschluss an den Aufruf der Enable-Enter-Funktion 14 erfolgt eine Abfrage 15, ob während der Abarbeitung der konsistenten Software 3a ein Netzausfall aufgetreten ist. Ist dies der Fall, wird zum Wiederaufsetzpunkt 9 verzweigt und der Netzausfall wie zu 1 beschrieben behandelt. Ist während der Abarbeitung der konsistenten Software 3a kein Netzausfall aufgetreten, wird die Abarbeitung der kritischen Software 3 fortgesetzt.After finishing the consistent software 3a becomes an enable-enter function 14 called which the disable-enter function 13 picks up again. Following the call of the Enable-Enter function 14 a query is made 15 whether during the execution of the consistent software 3a A power failure has occurred. If so, becomes the restart point 9 Branched and the power failure as to 1 described treated. Is during the processing of the consistent software 3a No power failure occurred, the processing of the critical software 3 continued.

Die kritische Software 3 kann beispielsweise einen Zugriff auf Hardware enthalten. Die konsistente Software 3a könnte dann beispielsweise eine Befehlsfolge zur Speicherverwaltung sein. Nach dem Durchlaufen der Abfrage 15, ob während der Abarbeitung der konsistenten Software 3a ein Netzausfall aufgetreten ist, könnten dann weitere Hardware-Zugriffe erfolgen.The critical software 3 For example, it may contain access to hardware. The consistent software 3a could then be a memory management command, for example. After going through the query 15 whether during the execution of the consistent software 3a If a power failure has occurred, then further hardware accesses could occur.

Claims (3)

Verfahren zur Wiederherstellung eines Betriebszustands eines Systems nach einer Unterbrechung des Betriebs, mit wenigstens einer unkritischen Befehlsfolge und wenigstens einer kritischen Befehlsfolge, welche abgearbeitet werden, wobei erste flüchtige Zustandsdaten beim Abarbeiten der unkritischen Befehlsfolge bei Eintritt der Unterbrechung gesichert werden und nach dem Ende der Unterbrechung wieder hergestellt werden und zweite flüchtige Zustandsdaten beim Abarbeiten der kritischen Befehlsfolge bei Eintritt der Unterbrechung nicht gesichert werden, wobei die zweiten flüchtigen Zustandsdaten zu Beginn der kritischen Befehlsfolge gesichert werden und die zweiten flüchtigen Zustandsdaten gegebenenfalls nach einer während der Abarbeitung der kritischen Befehlsfolge aufgetretenen Unterbrechung wieder hergestellt werden und die kritische Befehlsfolge nach dem Ende der Unterbrechung von Beginn an abgearbeitet wird, wobei vor der Abarbeitung der kritischen Befehlsfolge festgestellt wird, ob eine Unterbrechung vorlag, und im Falle einer Unterbrechung zunächst durch die kritische Befehlsfolge veränderte, nicht gesicherte Zustandsdaten an einen definierten Zustand angepasst werden.Method for restoring an operating state a system after an interruption of the operation, with at least an uncritical instruction sequence and at least one critical instruction sequence, which are processed, wherein first volatile state data when processing the uncritical sequence of instructions secured at the occurrence of the interruption and be restored after the end of the interruption and second volatile State data when processing the critical command sequence upon entry the interruption are not saved, the second volatile state data be backed up at the beginning of the critical command sequence and the second volatile Status data, if necessary after a during the processing of the critical Sequence encountered interruption and the critical thread after the interruption of At the beginning is worked off, whereby before the processing of the critical The sequence of commands determines whether there was an interruption, and in case of interruption first changed, unsecured status data by the critical instruction sequence be adapted to a defined state. Verfahren nach Anspruch 1, dadurch gekennzeichnet, dass die Anpassung der nicht gesicherten Zustandsdaten als kritische Befehlsfolge behandelt wird.Method according to claim 1, characterized in that that the adaptation of the unsecured status data as critical Command sequence is handled. Verfahren nach Anspruch 1 oder 2, dadurch gekennzeichnet, dass innerhalb der kritischen Befehlsfolge eine untergeordnete unkritische Befehlsfolge abgearbeitet wird, wobei beim Eintritt einer Unterbrechung während der Abarbeitung der untergeordneten unkritischen Befehlsfolge flüchtige Zustandsdaten gesichert und nach dem Ende der Unterbrechung wieder hergestellt werden sowie die Abarbeitung der untergeordneten unkritischen Befehlsfolge fortgesetzt wird.Method according to claim 1 or 2, characterized that within the critical command sequence a subordinate uncritical Command sequence is processed, wherein at the occurrence of an interruption while the processing of the subordinate uncritical instruction sequence volatile status data secured and restored after the end of the break and the processing of the subordinate uncritical command sequence will continue.
DE200410019371 2004-04-21 2004-04-21 Recovery process for use with a computer system uses routines based on critical and uncritical data Expired - Fee Related DE102004019371B4 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE200410019371 DE102004019371B4 (en) 2004-04-21 2004-04-21 Recovery process for use with a computer system uses routines based on critical and uncritical data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE200410019371 DE102004019371B4 (en) 2004-04-21 2004-04-21 Recovery process for use with a computer system uses routines based on critical and uncritical data

Publications (2)

Publication Number Publication Date
DE102004019371A1 DE102004019371A1 (en) 2005-11-17
DE102004019371B4 true DE102004019371B4 (en) 2006-04-13

Family

ID=35160207

Family Applications (1)

Application Number Title Priority Date Filing Date
DE200410019371 Expired - Fee Related DE102004019371B4 (en) 2004-04-21 2004-04-21 Recovery process for use with a computer system uses routines based on critical and uncritical data

Country Status (1)

Country Link
DE (1) DE102004019371B4 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4959774A (en) * 1984-07-06 1990-09-25 Ampex Corporation Shadow memory system for storing variable backup blocks in consecutive time periods
DE69905272T2 (en) * 1998-10-12 2003-12-11 Centre Nat Etd Spatiales METHOD FOR TREATING A TEMPORARY ERROR SUBJECT TO ELECTRONIC SYSTEM

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4959774A (en) * 1984-07-06 1990-09-25 Ampex Corporation Shadow memory system for storing variable backup blocks in consecutive time periods
DE69905272T2 (en) * 1998-10-12 2003-12-11 Centre Nat Etd Spatiales METHOD FOR TREATING A TEMPORARY ERROR SUBJECT TO ELECTRONIC SYSTEM

Also Published As

Publication number Publication date
DE102004019371A1 (en) 2005-11-17

Similar Documents

Publication Publication Date Title
DE19810814B4 (en) Computer system and status copying process for scalable software updates
DE2953432C1 (en) Device for testing a microprogram
EP1019819B1 (en) Program controlled unit and method for debugging same
EP1794680A1 (en) Method for running a computer program on a computer system
DE102005024327B4 (en) Watch-Dog in a distributed application environment
DE19535546B4 (en) Method for operating a real-time computer system controlled by a real-time operating system
DE2417578C2 (en) Method for preventing command conflicts in a central unit of a data processing system and device for carrying out the method
EP1810139B1 (en) Method, operating system and computing element for running a computer program
DE10056828A1 (en) Method of handling and releasing CPU-jamming, involves conducting a machine check abort followed by determining if it has removed the jamming
EP1805617A1 (en) Method for executing a computer program on a computer system
DE3036926A1 (en) METHOD AND ARRANGEMENT FOR CONTROLLING THE WORKFLOW IN DATA PROCESSING SYSTEMS WITH MICROPROGRAM CONTROL
DE102004037713A1 (en) Method, operating system and computing device for executing a computer program
DE102004019371B4 (en) Recovery process for use with a computer system uses routines based on critical and uncritical data
EP3770766A1 (en) Method for testing a system
EP1812853B1 (en) Method, operating system and computing element for running a computer program
DE102005045904B4 (en) Data processing device with performance control
DE2622140C3 (en) Device for controlling manual operations
DE1966991C3 (en) Fail-safe data processing system
DE102010039607B3 (en) Method for the redundant control of processes of an automation system
DE19801992C2 (en) Process for improving system availability after processor processor failure
EP0991995B1 (en) Interrupt method in a computer system with interrupt control
DE2240432C3 (en) Method and device for establishing fixed points and for repeating operations from the last fixed point in data processing systems with an overlapped working method
CH631820A5 (en) Method and arrangement for dealing with interrupt requests in a multi-programmable data processing system
DE10057782C1 (en) Operating mode switching method for process control switches between solo operating mode and redundant control mode employing back-up central processing unit
DE102008029231B4 (en) Processor with startup commands for monitoring the control flow

Legal Events

Date Code Title Description
OP8 Request for examination as to paragraph 44 patent law
8364 No opposition during term of opposition
R119 Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal fee