DE102020207618A1 - Method for fault-tolerant storage of user data - Google Patents
Method for fault-tolerant storage of user data Download PDFInfo
- Publication number
- DE102020207618A1 DE102020207618A1 DE102020207618.9A DE102020207618A DE102020207618A1 DE 102020207618 A1 DE102020207618 A1 DE 102020207618A1 DE 102020207618 A DE102020207618 A DE 102020207618A DE 102020207618 A1 DE102020207618 A1 DE 102020207618A1
- Authority
- DE
- Germany
- Prior art keywords
- copy
- administrative information
- user data
- management information
- information copy
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/78—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
- G06F21/79—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1004—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Die Erfindung betrifft ein Verfahren zur fehlertoleranten Speicherung von Nutzdaten auf einem nicht-flüchtigen Speichermedium (110), auf dem Schreib-, Lese- und Löschvorgänge ausgeführt werden können, umfassend ein Schreiben (12) der Nutzdaten (120); ein Bestimmen (14) von Verwaltungsinformationen für die geschriebenen Nutzdaten; ein Schreiben (16) einer ersten Verwaltungsinformationskopie (122), die die bestimmten Verwaltungsinformationen beinhaltet, und Bestimmen und Schreiben eines ersten Prüfwerts, mit dem die Gültigkeit der ersten Verwaltungsinformationskopie geprüft werden kann; und danach ein Schreiben (18) einer zweiten Verwaltungsinformationskopie (124), die die bestimmten Verwaltungsinformationen beinhaltet, und Bestimmen und Schreiben eines zweiten Prüfwerts, mit dem die Gültigkeit der zweiten Kopie der Verwaltungsinformationen geprüft werden kann. The invention relates to a method for fault-tolerant storage of user data on a non-volatile storage medium (110) on which write, read and delete processes can be carried out, comprising writing (12) the user data (120); determining (14) management information for the written user data; writing (16) a first administrative information copy (122) containing the determined administrative information, and determining and writing a first check value with which the validity of the first administrative information copy can be checked; and then writing (18) a second copy of management information (124) containing the determined management information, and determining and writing a second check value with which the validity of the second copy of the management information can be checked.
Description
Die vorliegende Erfindung betrifft ein Verfahren zur fehlertoleranten Speicherung von Nutzdaten sowie eine Recheneinheit und ein Computerprogramm zu dessen Durchführung.The present invention relates to a method for fault-tolerant storage of useful data and to a computing unit and a computer program for its implementation.
Stand der TechnikState of the art
Steuergeräte im Automobilbereich oder im Bereich industrieller Fertigungsanlagen müssen nicht nur den Programmcode einer Steuerungssoftware, sondern auch - zur Laufzeit der Software - Daten nichtflüchtig speichern. Für diesen Zweck werden nicht-flüchtige Speichermedien (NVM, Non-Volatile-Memory), insbesondere EEPROMs oder Flashspeicher, eingesetzt. Es gibt Standards, z.B. des AUTOSAR-Konsortiums, in denen der Funktionsumfang der Software festgelegt ist, nicht jedoch die Art und Weise, in der die Daten auf der Hardware, d.h. auf dem Speichermedium, organisiert werden.Control units in the automotive sector or in the area of industrial production systems not only have to save the program code of a control software, but also - during the runtime of the software - data in a non-volatile manner. For this purpose, non-volatile storage media (NVM, non-volatile memory), in particular EEPROMs or flash memories, are used. There are standards, e.g. of the AUTOSAR consortium, in which the functional scope of the software is specified, but not the way in which the data is organized on the hardware, i.e. on the storage medium.
Bei in den oben genannten Bereichen eingesetzten Steuergeräten ist zu berücksichtigen, dass jeder Lösch- oder Programmiervorgang von Speicherzellen des Speichermediums zu beliebigen Zeitpunkten unterbrochen werden kann, wenn die Spannungsversorgung zusammenbricht. Dies kann zu nicht oder nur schwach gelöschten bzw. programmierten Speicherzellen führen und somit beim Auslesen zu willkürlichen Datenwerten. Insbesondere schwach programmierte Zellen stellen eine Herausforderung dar, da die darin enthaltenen Daten zunächst eine Zeitlang gültig sein können, danach aber auf einen ungültigen Datenwert kippen können (d.h. der gespeicherte Datenwert kann sich unbeabsichtigt ändern, z.B. kann sich auf Bit-Ebene eine logische ‚1‘ in eine logische ‚0‘ ändern). Ebenso können Alterungseffekte, die aufgrund der oftmals hohen Temperaturen im automobilen oder industriellen Umfeld vermehrt auftreten, dazu führen, dass in einzelnen Speicherzellen gespeicherte Datenwerte kippen.In the case of control units used in the above-mentioned areas, it must be taken into account that every erasure or programming process of memory cells of the storage medium can be interrupted at any point in time if the voltage supply breaks down. This can lead to not or only weakly erased or programmed memory cells and thus to arbitrary data values when reading out. In particular, weakly programmed cells pose a challenge, as the data they contain can initially be valid for a while, but can then turn to an invalid data value (i.e. the stored data value can change unintentionally, e.g. a logical '1 'to a logical' 0 '). Aging effects, which occur more frequently due to the often high temperatures in the automotive or industrial environment, can also cause data values stored in individual memory cells to tilt.
Solche Datenfehler sind besonders dann nachteilig, wenn ein Speicherbereich betroffen ist, in dem Verwaltungsinformationen gespeichert sind. Verwaltungsinformationen, die z.B. in Form von sogenannten Headern (Kopfbereichen) oder Footern (Fußbereichen) gespeichert werden, enthalten z.B. Informationen über Ort und Länge oder auch aktuellen Zustand (wie „gelöscht“, defekt“, „bereit“ oder „voll“) von Speicherbereichen, in denen die eigentlichen Nutzdaten liegen. Um die Gültigkeit von Headern/Footern und Nutzdaten erkennen zu können, können diese über Prüfwerte bzw. Prüfsummen - zumeist Cyclic Redundancy Checksummen (CRC) - abgesichert sein. Ist der Prüfwert eines Headers falsch, so sind die entsprechenden Verwaltungsinformationen ungültig, und die damit verwalteten Nutzdatenblöcke dürfen nicht verwendet werden, d.h. deren Inhalt wird verworfen. Ein Datenfehler im Speicherbereich der Verwaltungsinformationen führt also dazu, dass die damit verwalteten Nutzdaten nicht mehr verwendet werden können.Such data errors are particularly disadvantageous when a memory area is concerned in which management information is stored. Administrative information, which is stored in the form of so-called headers or footers, contains information about location and length or the current status (such as "deleted", defective "," ready "or" full ") of memory areas which contain the actual user data. In order to be able to recognize the validity of headers / footers and user data, these can be secured by check values or checksums - mostly cyclic redundancy checksums (CRC). If the check value of a header is incorrect, the corresponding administrative information is invalid and the user data blocks managed with it may not be used, i.e. their content is discarded. A data error in the memory area of the management information means that the user data managed with it can no longer be used.
Offenbarung der ErfindungDisclosure of the invention
Erfindungsgemäß werden ein Verfahren zur fehlertoleranten Speicherung von Nutzdaten sowie eine Recheneinheit und ein Computerprogramm zu dessen Durchführung mit den Merkmalen der unabhängigen Patentansprüche vorgeschlagen. Vorteilhafte Ausgestaltungen sind Gegenstand der Unteransprüche sowie der nachfolgenden Beschreibung.According to the invention, a method for the fault-tolerant storage of useful data and a computing unit and a computer program for its implementation with the features of the independent claims are proposed. Advantageous refinements are the subject matter of the subclaims and the description below.
Durch das Schreiben zweier Verwaltungsinformationskopien auf das Speichermedium, ist, wenn eine der Verwaltungsinformationskopien beschädigt wird, etwa aufgrund unvollständig programmierter Speicherzellen oder aufgrund von Alterungseffekten der Speicherzellen, sichergestellt, dass die Nutzdaten weiterhin verwendet werden können, da die in der anderen Verwaltungsinformationskopie enthaltenen Verwaltungsinformationen verwendet werden können. Dabei kann eine Beschädigung, d.h. eine Ungültigkeit, einer Verwaltungsinformationskopie mit Hilfe des Prüfwerts, der dann nicht mehr korrekt ist, erkannt werden.By writing two copies of management information on the storage medium, if one of the copies of management information is damaged, for example due to incompletely programmed memory cells or due to the aging effects of the memory cells, it is ensured that the user data can continue to be used, since the management information contained in the other management information copy is used be able. Damage, i.e. an invalidation, of an administrative information copy can be detected with the aid of the check value, which is then no longer correct.
Bei den Verwaltungsinformationen handelt es sich um Informationen, die den Zugriff auf die gespeicherten Nutzdaten ermöglichen und/oder Eigenschaften davon betreffen. Die Verwaltungsinformationen umfassen beispielsweise Informationen über Ort und/oder Länge der gespeicherten Nutzdaten oder einen Prüfwert, mit dem die Gültigkeit der Nutzdaten geprüft werden kann.The administrative information is information that enables access to the stored user data and / or relates to properties thereof. The administrative information includes, for example, information about the location and / or length of the stored user data or a check value with which the validity of the user data can be checked.
Bevorzugt erfolgt das Schreiben der Nutzdaten zeitlich vor dem Schreiben der Verwaltungsinformationskopien, so dass, wenn z.B. während des Schreibens der Nutzdaten ein Spannungsausfall auftritt, aus dem Nichtvorhandensein einer Verwaltungsinformationskopie, die nach dem Spannungsausfall nicht mehr geschrieben wird, darauf geschlossen werden kann, dass die Nutzdaten fehlerhaft sind und entsprechend nicht verwendet werden sollten.The user data are preferably written before the administrative information copies are written, so that if, for example, a power failure occurs while the user data is being written, the absence of an administrative information copy that is no longer written after the power failure indicates that the user data is in use are faulty and should therefore not be used.
Das Schreiben der zweiten Verwaltungsinformationskopie wird (zeitlich) nach dem Schreiben der ersten Verwaltungsinformationskopie durchgeführt. Dies ist zweckmäßig, da bei einem gleichzeitigen Schreiben ein Spannungsausfall beide Verwaltungsinformationskopien betreffen würde.The writing of the second management information copy is carried out (in terms of time) after the writing of the first management information copy. This is useful because if writing was done at the same time, a power failure would affect both copies of administrative information.
Die beiden Verwaltungsinformationskopien werden bevorzugt nicht benachbart bzw. aufeinanderfolgend auf das Speichermedium geschrieben, um die Wahrscheinlichkeit einer gleichzeitigen Beschädigung zu verringern. D.h. sie werden so geschrieben, dass sie auf dem Speichermedium räumlich voneinander beabstandet gespeichert werden, z.B. durch Nutzung verschiedener „Wordlines“.The two administrative information copies are preferably not written adjacent or consecutively to the storage medium in order to reduce the likelihood of a simultaneous Reduce damage. This means that they are written in such a way that they are stored spatially separated from one another on the storage medium, for example by using different "Wordlines".
Bei dem nicht-flüchtigen Speichermedium handelt es sich bevorzugt um ein EEPROM, PCM (Phase-change Random Access Memory), MRAM (Magnetoresistive Random Access Memory) oder einen Flashspeicher. Es ist aber ebenso die Verwendung beliebiger anderer nicht-flüchtiger Speichermedien möglich, z.B. einer HDD (Hard Disk Drive, Festplatte) oder einer SSD (Solid State Drive). Falls nicht anderweitig spezifiziert, werden alle in dieser Anmeldung genannten Schreib-, Lese- und Löschvorgänge auf dem nicht-flüchtigen Speichermedium ausgeführt, ohne dass dies gesondert erwähnt wird (d.h. ein Verfahrensschritt „Schreiben“ ist als „Schreiben auf das Speichermedium“ bzw. genauer, als „Schreiben auf das nicht-flüchtige Speichermedium“ zu verstehen, „Löschen“ und „Lesen“ sind analog zu verstehen).The non-volatile storage medium is preferably an EEPROM, PCM (phase change random access memory), MRAM (magnetoresistive random access memory) or a flash memory. However, any other non-volatile storage media can also be used, e.g. an HDD (Hard Disk Drive) or an SSD (Solid State Drive). Unless otherwise specified, all write, read and delete operations mentioned in this application are carried out on the non-volatile storage medium without this being specifically mentioned (ie a process step “writing” is called “writing to the storage medium” or more precisely , to be understood as "writing to the non-volatile storage medium", "erasing" and "reading" are to be understood in the same way).
Als Prüfwert bzw. Prüfsumme ist ein Wert zu verstehen, mit Hilfe dessen Fehler der Daten (hier der Verwaltungsinformationskopien) erkannt werden können. Dieser Prüfwert wird beim Speichern mittels einer geeigneten Funktion aus den Daten bestimmt bzw. berechnet und ebenfalls gespeichert. Bei einem späteren Lesen der Daten wird die Funktion erneut auf die Daten angewendet und so erkannt, ob sich der Prüfwert geändert hat. Typischerweise wird der Prüfwert zusammen mit den Daten gespeichert und optional wird beim Lesen die Funktion auf die Daten und den zusammen damit gespeicherten Prüfwert angewandt. Die Funktion wird dabei normalerweise auf einzelne Bereiche bzw. Blöcke von Daten angewandt und für jeden Datenbereich bzw. -block ein Prüfwert berechnet, so dass im Allgemeinen die Daten zusammen mit mehreren Prüfwerten gespeichert werden. Der Einfachheit halber wird in dieser Anmeldung von einem Prüfwert, mit dem die Gültigkeit einer Verwaltungsinformationskopie geprüft werden kann, gesprochen. Dies ist allerdings im Sinne von wenigstens einem Prüfwert zu verstehen, da die Verwaltungsinformationskopien im Allgemeinen aus mehreren Datenblöcken mit zugehörigen mehreren Prüfwerten bestehen, anders formuliert bildet die Gesamtheit dieser mehreren Prüfwerte einer Verwaltungsinformationskopie den Prüfwert im Sinne dieser Anmeldung (dies ist insbesondere abhängig vom verwendeten Prüfwert-Verfahren). Vorzugsweise wird ein CRC-Wert (CRC = Cyclic Redundancy Check) im Rahmen einer zyklischen Redundanzprüfung als Prüfwert verwendet, dessen Berechnung und Verwendung dem Fachmann bekannt ist.A check value or checksum is to be understood as a value with the aid of which errors in the data (here the administrative information copies) can be recognized. When saving, this test value is determined or calculated from the data by means of a suitable function and is also saved. When the data is read later, the function is applied again to the data and it is thus recognized whether the test value has changed. The test value is typically stored together with the data and optionally the function is applied to the data and the test value stored together with it when reading. The function is normally applied to individual areas or blocks of data and a test value is calculated for each data area or block, so that the data are generally stored together with several test values. For the sake of simplicity, this application speaks of a check value with which the validity of an administrative information copy can be checked. However, this is to be understood in the sense of at least one check value, since the administrative information copies generally consist of several data blocks with associated several check values; in other words, the totality of these several check values of an administrative information copy forms the check value for the purposes of this application (this is particularly dependent on the check value used -Proceedings). A CRC value (CRC = Cyclic Redundancy Check) is preferably used as a check value in the context of a cyclic redundancy check, the calculation and use of which is known to the person skilled in the art.
Bevorzugt kann das Verfahren ein Löschen der zweiten Verwaltungsinformationskopie, danach ein Löschen der ersten Verwaltungsinformationskopie und bevorzugt ein Löschen der Nutzdaten nach dem Löschen der ersten und der zweiten Verwaltungsinformationskopie umfassen. Dadurch können Nutzdaten gelöscht werden, wobei auf ein explizites Löschen der Nutzdaten verzichtet werden kann, da bereits durch das Löschen der beiden Verwaltungsinformationskopien erreicht wird, dass die Nutzdaten nicht mehr verwendet werden. Beim im Prinzip speichermediumabhängigen Löschvorgang eines Speicherbereichs wird z.B. in einer Belegungstabelle des Speichermediums eingetragen, dass der Speicherbereich nicht mehr belegt ist. Weiter können die Speicherzellen des Speicherbereichs jeweils mit einem vorbestimmten Wert beschrieben werden, der anzeigt, dass diese nicht belegt sind, oder auch mit zufälligen Werten beschrieben werden.The method can preferably include deleting the second administrative information copy, then deleting the first administrative information copy, and preferably deleting the useful data after deleting the first and second administrative information copies. As a result, user data can be deleted, and there is no need to explicitly delete the user data, since the deletion of the two administrative information copies already means that the user data is no longer used. In the case of the storage medium-dependent deletion of a storage area, for example, it is entered in an allocation table of the storage medium that the storage area is no longer occupied. Furthermore, the memory cells of the memory area can each be written with a predetermined value, which indicates that they are not occupied, or they can also be written with random values.
Weiter kann das Verfahren bevorzugt ein oder mehrmals die folgenden Schritte umfassen: Lesen der ersten Verwaltungsinformationskopie und des ersten Prüfwertes, und Prüfen der Gültigkeit der gelesenen ersten Verwaltungsinformationskopie mittels des gelesenen ersten Prüfwerts; Lesen der zweiten Verwaltungsinformationskopie und des zweiten Prüfwertes, und Prüfen der Gültigkeit der gelesenen zweiten Verwaltungsinformationskopie mittels des gelesenen zweiten Prüfwerts. Gemäß dieser Ausgestaltung kann die Integrität der gespeicherten Verwaltungsinformationen geprüft werden. Dies kann mehrmals, d.h. zu verschiedenen Zeitpunkten, etwa mit jedem Steuergerätestart oder bei bestimmten Ereignissen, z.B. wenn eine Schwankung der Versorgungsspannung festgestellt wird, und/oder in bestimmten Zeitabständen, etwa Minuten, Stunden, Tagen, Wochen o.ä., erfolgen. Abhängig vom Ergebnis der vorstehend genannten Prüfschritte können gemäß bevorzugten Ausgestaltungen des erfindungsgemäßen Verfahrens verschiedene Schritte durchgeführt werden.Furthermore, the method can preferably comprise one or more times the following steps: reading the first administrative information copy and the first check value, and checking the validity of the read first administrative information copy by means of the read first check value; Reading the second copy of management information and the second check value, and checking the validity of the read second copy of management information by means of the read second check value. According to this embodiment, the integrity of the stored management information can be checked. This can be done several times, i.e. at different times, for example with each control unit start or for certain events, e.g. when a fluctuation in the supply voltage is detected, and / or at certain time intervals, such as minutes, hours, days, weeks or the like. Depending on the result of the above-mentioned test steps, various steps can be carried out according to preferred embodiments of the method according to the invention.
Vorzugsweise umfasst das Verfahren, wenn die gelesene erste und die gelesene zweite Verwaltungsinformationskopie gültig und identisch sind, ein Lesen der Nutzdaten unter Verwendung der ersten oder der zweiten Verwaltungsinformationskopie. Bei Lesevorgängen wird die Gültigkeit und Gleichheit beider Verwaltungsinformationskopien geprüft, sind beide gültig und identisch, werden die Nutzdaten gelesen. Dadurch wird mit jedem Lesevorgang sichergestellt, dass die Verwaltungsinformationskopien weiterhin unverändert sind.If the read first and the read second administrative information copies are valid and identical, the method preferably comprises reading the user data using the first or the second administrative information copy. During read processes, the validity and equality of both administrative information copies is checked; if both are valid and identical, the user data is read. This ensures that the administrative information copies remain unchanged with every read process.
Wenn andererseits die beiden Verwaltungsinformationskopien nicht beide gültig und/oder nicht identisch sind, wird kann, zusätzlich oder alternativ zu einem Lesen der Nutzdaten, eine Reparatur der Verwaltungsinformationskopien durchgeführt werden, um zu erreichen, dass wieder zwei gültige und identische Verwaltungsinformationskopien vorhanden sind und entsprechend selbst bei einer nachfolgenden Beschädigung einer der Verwaltungsinformationskopien die Nutzdaten weiterhin verwendbar sind. Die Reparatur kann im Rahmen eines Lesevorgangs von Nutzdaten erfolgen oder auch im Rahmen eines eigenständigen Reparaturvorgangs, der z.B. mit jedem Start eines Steuergeräts, in dem das Speichermedium verwendet wird, oder regelmäßig erfolgt.If, on the other hand, the two administrative information copies are not both valid and / or not identical, the administrative information copies can be repaired in addition or as an alternative to reading the user data in order to ensure that two valid and identical administrative information copies are available again, and accordingly themselves at a subsequent damage to one of the administrative information copies, the user data can still be used. The repair can take place within the framework of a reading process of user data or also within the framework of an independent repair process, which takes place, for example, every time a control device in which the storage medium is used is started or takes place regularly.
Entsprechend umfasst das Verfahren bevorzugt, wenn die gelesene erste und die gelesene zweite Verwaltungsinformationskopie gültig und nicht identisch sind, wenigstens eines, bevorzugt beides, von:
- a) Lesen der Nutzdaten unter Verwendung der ersten Verwaltungsinformationskopie;
- b) erneutes Schreiben der zweiten Verwaltungsinformationskopie, wobei die in der ersten Verwaltungsinformationskopie beinhalteten Verwaltungsinformationen verwendet werden, und erneutes Bestimmen und Schreiben des zweiten Prüfwerts, mit dem die Gültigkeit der erneut geschriebenen zweiten Verwaltungsinformationskopie geprüft werden kann.
- a) reading the user data using the first administrative information copy;
- b) renewed writing of the second administrative information copy, the administrative information contained in the first administrative information copy being used, and renewed determination and writing of the second check value with which the validity of the newly written second administrative information copy can be checked.
Gemäß dieser Ausgestaltung sind beide Verwaltungsinformationskopien zwar gültig aber nicht identisch, was z.B. auftreten kann, wenn sich der Inhalt zweier Speicherzellen zufällig so ändert, dass sich der Prüfwert nicht ändert. In diesem Fall kann die zweite Verwaltungsinformationskopie unter Verwendung der ersten Verwaltungsinformationskopie repariert werden, da der ersten, älteren, Verwaltungsinformationskopie eine höhere Glaubwürdigkeit zugewiesen wird. Im zusätzlichen oder alternativen Leseschritt wird die erste Verwaltungsinformationskopie verwendet, mit Hilfe derer die Reparatur erfolgt. Vorzugsweise wird beides durchgeführt, das Lesen der Nutzdaten (Schritt a)) und das Reparieren der gespeicherten Verwaltungsinformationen (Schritt b)), da so mit jedem Lesezugriff auf das Speichermedium, bei einer erkannten fehlerhaften Verwaltungsinformationskopie, gleichzeitig eine Reparatur erfolgt, also erkannte Fehler schnellstmöglich behoben werden. Das Lesen der Nutzdaten wird bevorzugt vor dem erneuten Schreiben der zweiten Verwaltungsinformationskopie und dem erneuten Bestimmen und Schreiben des zweiten Prüfwerts durchgeführt, d.h. Schritt a) wird bevorzugt vor Schritt b) durchgeführt, so dass die Nutzdaten möglichst schnell verfügbar sind.According to this embodiment, both copies of management information are valid but not identical, which can occur, for example, if the content of two memory cells happens to change in such a way that the test value does not change. In this case, the second management information copy can be repaired using the first management information copy, since the first, older, management information copy is assigned a higher credibility. In the additional or alternative reading step, the first administrative information copy is used, with the aid of which the repair is carried out. Both the reading of the user data (step a)) and the repair of the stored administrative information (step b)) are preferably carried out, since a repair is carried out at the same time with every read access to the storage medium, i.e. identified errors as quickly as possible be resolved. The user data is preferably read before the second copy of the administrative information is written again and the second check value is determined and written again, i.e. step a) is preferably carried out before step b), so that the user data is available as quickly as possible.
„Erneutes Bestimmen“ eines Prüfwerts kann hier und auch bei weiteren Ausführungsformen ein erneutes Berechnen oder ein Übernehmen bzw. Kopieren des jeweilig anderen Prüfwerts bedeuten. D.h. bei Ausführungsformen, in denen der zweite Prüfwert erneut bestimmt wird (wie der vorstehenden) könnte statt einer Neuberechnung auch der aus der ersten Verwaltungsinformationskopie enthaltene erste Prüfwert als neu bestimmter zweiter Prüfwert übernommen werden (vorausgesetzt natürlich, dass das gleiche Berechnungsverfahren, z.B. CRC-Summe, bei erstem und zweitem Prüfwert zum Einsatz kommt). Analog könnte bei Ausführungsformen, in denen der erste Prüfwert erneut bestimmt wird, statt einer Neuberechnung der zweite Prüfwert als neu bestimmter erster Prüfwert übernommen werden.“New determination” of a test value can mean here and also in further embodiments a new calculation or an acceptance or copying of the respective other test value. In other words, in embodiments in which the second check value is determined again (like the one above), instead of a recalculation, the first check value contained in the first administrative information copy could also be adopted as the newly determined second check value (provided, of course, that the same calculation method, e.g. CRC sum , is used for the first and second test value). Similarly, in embodiments in which the first test value is determined again, the second test value could be adopted as the newly determined first test value instead of a recalculation.
Ist weiterhin genau eine der Verwaltungsinformationskopien ungültig, umfasst das Verfahren bevorzugt: wenn die gelesene erste Verwaltungsinformationskopie gültig ist und die gelesene zweite Verwaltungsinformationskopie nicht gültig ist, wenigstens eines, bevorzugt beides, von:
- c) Lesen der Nutzdaten unter Verwendung der ersten Verwaltungsinformationskopie;
- d) erneutes Schreiben der zweiten Verwaltungsinformationskopie, wobei die in der ersten Verwaltungsinformationskopie beinhalteten Verwaltungsinformationen verwendet werden, und erneutes Bestimmen und Schreiben des zweiten Prüfwerts, mit dem die Gültigkeit der erneut geschriebenen zweiten Verwaltungsinformationskopie geprüft werden kann.
- c) reading the user data using the first administrative information copy;
- d) again writing the second administrative information copy, the administrative information contained in the first administrative information copy being used, and again determining and writing the second check value with which the validity of the newly written second administrative information copy can be checked.
Oder, wenn die gelesene zweite Verwaltungsinformationskopie gültig ist und die gelesene erste Verwaltungsinformationskopie nicht gültig ist, wenigstens eines, bevorzugt beides, von:
- e) Lesen der Nutzdaten unter Verwendung der zweiten Verwaltungsinformationskopie;
- f) erneutes Schreiben der ersten Verwaltungsinformationskopie, wobei die in der zweiten Verwaltungsinformationskopie beinhalteten Verwaltungsinformationen verwendet werden, und erneutes Bestimmen und Schreiben des erstes Prüfwerts, mit dem die Gültigkeit der erneut geschriebenen ersten Verwaltungsinformationskopie geprüft werden kann.
- e) reading the user data using the second administrative information copy;
- f) again writing the first administrative information copy, the administrative information contained in the second administrative information copy being used, and again determining and writing the first check value with which the validity of the newly written first administrative information copy can be checked.
Es wird also jeweils die ungültige Verwaltungsinformationskopie mit Hilfe der gültigen Verwaltungsinformationskopie repariert, so dass wieder zwei gültige und identische Verwaltungsinformationskopien vorhanden sind. Auch hier wird bevorzugt sowohl ein Lesen der Nutzdaten (Schritt c) bzw. e)) als auch eine Reparatur der gespeicherten Verwaltungsinformation (Schritt d) bzw. f)) durchgeführt. Ebenso wird der Leseschritt bevorzugt vor dem erneuten Schreiben der zweiten bzw. ersten Verwaltungsinformationskopie und dem erneuten Bestimmen und Schreiben des zweiten bzw. ersten Prüfwerts durchgeführt.The invalid administrative information copy is therefore repaired in each case with the aid of the valid administrative information copy, so that two valid and identical administrative information copies are again available. Here, too, both the reading of the user data (step c) or e)) and the repair of the stored administrative information (step d) or f)) are preferably carried out. Likewise, the reading step is preferably carried out before the second or first administrative information copy is written again and the second or first check value is determined and written again.
Weiter kann das Verfahren bevorzugt umfassen: wenn die gelesene erste Verwaltungsinformationskopie und die gelesene zweite Verwaltungsinformationskopie nicht gültig sind: Löschen der ersten Verwaltungsinformationskopie und, bevorzugt nachfolgend, Löschen der zweiten Verwaltungsinformationskopie. Sind beide Verwaltungsinformationskopien ungültig, also verändert, ist ein Zugriff auf die zugehörigen Nutzdaten nicht mehr möglich, durch Löschen der Verwaltungsinformationskopie wird dies für ein Steuergerät, das darauf zugreifen will, klar erkennbar. Hier kann optional auch ein Löschen der Nutzdaten vorgesehen werden.The method can furthermore preferably comprise: if the read first Management information copy and the read second management information copy are not valid: deletion of the first management information copy and, preferably subsequently, deletion of the second management information copy. If both copies of administrative information are invalid, that is to say changed, access to the associated user data is no longer possible; by deleting the administrative information copy, this is clearly recognizable for a control device that wants to access it. A deletion of the user data can optionally also be provided here.
Eine erfindungsgemäße Recheneinheit, z.B. ein Steuergerät eines Kraftfahrzeugs, ist, insbesondere programmtechnisch, dazu eingerichtet, ein erfindungsgemäßes Verfahren durchzuführen.A computing unit according to the invention, for example a control unit of a motor vehicle, is set up, in particular in terms of programming, to carry out a method according to the invention.
Auch die Implementierung eines erfindungsgemäßen Verfahrens in Form eines Computerprogramms oder Computerprogrammprodukts mit Programmcode zur Durchführung aller Verfahrensschritte ist vorteilhaft, da dies besonders geringe Kosten verursacht, insbesondere wenn ein ausführendes Steuergerät noch für weitere Aufgaben genutzt wird und daher ohnehin vorhanden ist. Geeignete Datenträger zur Bereitstellung des Computerprogramms sind insbesondere magnetische, optische und elektrische Speicher, wie z.B. Festplatten, Flash-Speicher, EEPROMs, DVDs u.a.m. Auch ein Download eines Programms über Computernetze (Internet, Intranet usw.) ist möglich.The implementation of a method according to the invention in the form of a computer program or computer program product with program code for performing all method steps is advantageous, since this causes particularly low costs, especially if an executing control device is used for other tasks and is therefore available anyway. Suitable data carriers for providing the computer program are, in particular, magnetic, optical and electrical memories, such as hard drives, flash memories, EEPROMs, DVDs, etc. A program can also be downloaded via computer networks (Internet, intranet, etc.).
Weitere Vorteile und Ausgestaltungen der Erfindung ergeben sich aus der Beschreibung und der beiliegenden Zeichnung.Further advantages and embodiments of the invention emerge from the description and the accompanying drawing.
Die Erfindung ist anhand von Ausführungsbeispielen in der Zeichnung schematisch dargestellt und wird im Folgenden unter Bezugnahme auf die Zeichnung beschrieben.The invention is shown schematically in the drawing using exemplary embodiments and is described below with reference to the drawing.
FigurenlisteFigure list
-
1 zeigt einen beispielhaften Schreibvorgang von Nutzdaten und Verwaltungsinformationen gemäß der vorliegenden Erfindung;1 shows an exemplary write process of user data and management information according to the present invention; -
2 zeigt einen beispielhaften Löschvorgang von Nutzdaten und Verwaltungsinformationen gemäß der vorliegenden Erfindung; und2 shows an exemplary deletion process of user data and management information according to the present invention; and -
3 zeigt einen beispielhaften Reparaturvorgang von Verwaltungsinformationen bzw. Lesevorgang von Nutzdaten gemäß der vorliegenden Erfindung.3 shows an exemplary repair process of management information or reading process of user data according to the present invention.
Ausführungsform(en) der ErfindungEmbodiment (s) of the invention
Dabei werden zunächst in Schritt
In Schritt
In Schritt
In Schritt
Insgesamt wird durch die Abfolge von Schritten
Nachdem die beiden Verwaltungsinformationskopien gelöscht wurden, werden im optionalen Schritt
Dabei werden in Schritt
In Schritt
Wenn beide Verwaltungsinformationskopien gültig sind, wird in Schritt
Wenn beide Verwaltungsinformationskopien zwar gültig aber nicht identisch sind, wird eine der beiden Verwaltungsinformationskopien unter Verwendung der anderen Verwaltungsinformationskopie neu geschrieben. Dazu findet in Schritt
Der Schritt des Lesens
Wenn beide Verwaltungsinformationskopien nicht gültig sind, werden in Schritt
Wenn eine der beiden Verwaltungsinformationskopien gültig ist und die andere ungültig ist, wird die ungültige durch die gültige Verwaltungsinformationskopie überschrieben. Dabei wird, wenn die erste Verwaltungsinformationskopie gültig ist und die zweite Verwaltungsinformationskopie ungültig ist, in Schritt
Wenn andererseits die erste Verwaltungsinformationskopie ungültig ist und die zweite Verwaltungsinformationskopie gültig ist, wird in Schritt
Claims (12)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE102020207618.9A DE102020207618A1 (en) | 2020-06-19 | 2020-06-19 | Method for fault-tolerant storage of user data |
CN202110678527.XA CN113821372A (en) | 2020-06-19 | 2021-06-18 | Method for fault-tolerant storage of user data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE102020207618.9A DE102020207618A1 (en) | 2020-06-19 | 2020-06-19 | Method for fault-tolerant storage of user data |
Publications (1)
Publication Number | Publication Date |
---|---|
DE102020207618A1 true DE102020207618A1 (en) | 2021-12-23 |
Family
ID=78822966
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
DE102020207618.9A Pending DE102020207618A1 (en) | 2020-06-19 | 2020-06-19 | Method for fault-tolerant storage of user data |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113821372A (en) |
DE (1) | DE102020207618A1 (en) |
-
2020
- 2020-06-19 DE DE102020207618.9A patent/DE102020207618A1/en active Pending
-
2021
- 2021-06-18 CN CN202110678527.XA patent/CN113821372A/en active Pending
Also Published As
Publication number | Publication date |
---|---|
CN113821372A (en) | 2021-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE112011103295B4 (en) | Decoding in solid-state storage devices | |
DE102008003944B4 (en) | Memory system and programming method for a memory system | |
DE102005045031B4 (en) | Programming method and program resumption method for a nonvolatile memory device | |
DE102007016460A1 (en) | Non-volatile memory device, non-volatile memory system and reading method for a nonvolatile memory device | |
DE102006036070B4 (en) | Cargo trap storage device and method for its manufacture and operation | |
DE102011075814B4 (en) | Memory buffer with accessible information after a write error | |
DE112008001151B4 (en) | Multi-bit programming device and method for multi-bit programming | |
DE102010037290A1 (en) | Memory systems and methods for detecting a distribution of unstable memory cells | |
DE19839680B4 (en) | Method and device for modifying the memory contents of control units | |
DE69930439T2 (en) | Electrical device with integrated flash memory | |
DE112021004294T5 (en) | METHOD AND APPARATUS FOR DETERMINING WHEN THE ACTUAL WEAR OF A FLASH MEMORY DEVICE VARIES FROM RELIABILITY CONDITIONS FOR THE FLASH MEMORY DEVICE | |
DE69820164T2 (en) | Storage device and data reading and writing methods | |
DE602005003778T2 (en) | A method and apparatus for rewriting a sector with bootloader software in a sector-erasable non-volatile semiconductor memory | |
DE102015210651B4 (en) | Circuit and method for testing an error correction capability | |
DE112008003409T5 (en) | Redundant bit patterns for column defect coding | |
DE102006009214A1 (en) | Contents writing method for e.g. uniform channel programming electrically erasable ROM, involves writing contents of output memory to target memory if selection memory indicates to output memory that target memory is not written | |
DE102016107285B4 (en) | METHOD FOR USING A MEMORY DEVICE, MEMORY DEVICE AND MEMORY DEVICE ARRANGEMENT | |
DE102020207618A1 (en) | Method for fault-tolerant storage of user data | |
DE102018219877A1 (en) | Device and method for generating error correction information | |
DE10148047B4 (en) | Method and device for securing data in a memory module and memory module | |
EP2003566B1 (en) | Method and control device for operating a non-volatile memory, in particular for use in motor vehicles | |
DE112015002881B4 (en) | Storage device, flash memory controller and program | |
DE102007051061B4 (en) | Non-volatile semiconductor memory system and corresponding method for performing a programming operation | |
DE102020209236A1 (en) | Method of operating a non-volatile memory device | |
EP2002446B1 (en) | Method for operating a memory unit comprising the marking of memory blocks that are identified as defective |