JP2009169747A - Information processor and data restoration method - Google Patents
Information processor and data restoration method Download PDFInfo
- Publication number
- JP2009169747A JP2009169747A JP2008008187A JP2008008187A JP2009169747A JP 2009169747 A JP2009169747 A JP 2009169747A JP 2008008187 A JP2008008187 A JP 2008008187A JP 2008008187 A JP2008008187 A JP 2008008187A JP 2009169747 A JP2009169747 A JP 2009169747A
- Authority
- JP
- Japan
- Prior art keywords
- backup
- address
- data
- storage unit
- writing
- 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
Abstract
Description
本発明は、不揮発性の主記憶部を備える情報処理装置およびデータ復旧方法に関する。 The present invention relates to an information processing apparatus including a nonvolatile main storage unit and a data recovery method.
近年、フラッシュメモリ、MRAM(Magnetoresistive Random Access Memory)、FeRAM(Ferroelectric Random Access Memory)やPRAM(Phase change Random Access Memory)といった電源供給を断っても記録した内容が失われない不揮発性メモリの技術開発が進んでいる。将来、それらの不揮発性メモリが、現在コンピュータの主記憶部として広く使われているDRAM等の揮発性メモリにとって代わることが予想される。 In recent years, the development of nonvolatile memory technologies such as flash memory, magnetic random access memory (MRAM), ferro-electric random access memory (FeRAM), and phase change random access memory (PRAM) that will not lose recorded content even when power is turned off. Progressing. In the future, it is expected that these non-volatile memories will replace volatile memories such as DRAMs that are currently widely used as the main memory of computers.
このような不揮発性メモリをコンピュータの主記憶部に使用すると、プログラムの処理中に主記憶部への電源供給が途切れた場合でも、その主記憶部に保存されたデータやシステムの状態は主記憶部に残り、失われない。これにより、電源供給復旧時に、電源が切れた瞬間の状態からコンピュータの動作を再開することが容易になり、コンピュータの起動時間が短縮され、操作性が向上する。また、不揮発性メモリは、揮発性メモリと異なり、記憶内容を保持するための電源装置が必要ないため、コンピュータ全体としての消費電力の削減、電池の小型化、電池の長寿命化が期待される。 When such a non-volatile memory is used for the main storage unit of a computer, even if power supply to the main storage unit is interrupted during processing of a program, the data stored in the main storage unit and the state of the system are stored in the main memory. It remains in the department and is not lost. As a result, when the power supply is restored, it becomes easy to restart the operation of the computer from the moment when the power is turned off, the startup time of the computer is shortened, and the operability is improved. In addition, unlike a volatile memory, a non-volatile memory does not require a power supply device for holding stored contents, and therefore, reduction of power consumption, battery size, and battery life are expected as a whole computer. .
このような不揮発性メモリを使用したコンピュータで不意の電源断を経てその後電源が復旧した際に、電源が切れた瞬間の状態を保持してかつ復元する方法としては、電源断が生じた場合に電源監視機構によってCPUに割り込みが通知され、オペレーティングシステムのような制御ソフトウェアによってCPUの状態を主記憶部に保存する方法が開示されている(特許文献1参照)。 When a computer using such a non-volatile memory is suddenly powered off and then restored, the method of maintaining and restoring the state at the moment when the power is turned off is as follows: A method is disclosed in which an interrupt is notified to a CPU by a power supply monitoring mechanism, and the state of the CPU is saved in a main memory by control software such as an operating system (see Patent Document 1).
しかしながら、上記特許文献1に記載された技術では、不意の電源断後の電源が復旧した時に、プロセッサの状態のような揮発性のシステム状態を復元できるようにするために、不意の電源断後にシステム状態を不揮発性メモリ(以下、不揮発性主記憶部という)に格納する間の電源を確保する必要がある。そのため、別途キャパシタ等の電池が必要である。すなわち、不揮発性主記憶部に記憶されたシステム状態を保持するための電池は必要としないが、不意の電源断時にシステム状態を記憶するための電池が必要である。一般にコンピュータが書込み処理を完結するために備える電池は、二次電池であることが多く、頻繁な電源断が生じた場合に十分な電力を供給できない可能性がある。
However, in the technique described in the above-mentioned
また、上記特許文献1に記載された技術では、不揮発性主記憶部の内容を含むシステムの状態を電源断以前の特定の時点の状態に戻すために、処理のログを取っている。しかし、組込み装置のような限られた資源しか使用できない装置では、物理的な制約等により、ログを書込む領域として少量のメモリしか使用できない場合がある。このような場合、少量のログ領域からログデータが溢れてしまうと、以前のどの状態も復元できなくなってしまい、システム全体として処理を継続することができなくなるという問題があった。
Further, in the technique described in
本発明は、上記に鑑みてなされたものであって、不揮発性主記憶部を備えた情報処理装置において、電池のような追加の電源を用いることなく、不意の電源断が起きた場合でも、その後の電源復旧時に不揮発性主記憶部に格納されたデータの状態を復元し、かつ、少ないバックアップ領域でバックアップができる情報処理装置およびデータ復旧方法を提供することを目的とする。 The present invention has been made in view of the above, and in an information processing apparatus including a nonvolatile main storage unit, even when an unexpected power failure occurs without using an additional power source such as a battery, It is an object of the present invention to provide an information processing apparatus and a data recovery method capable of restoring the state of data stored in a nonvolatile main storage unit at the time of subsequent power recovery and performing backup with a small backup area.
上述した課題を解決し、目的を達成するために、本発明は、不揮発性の主記憶部と、前記主記憶部に記憶されているデータの複製を記憶する不揮発性のバックアップ記憶部と、プロセッサ部から送出された、前記主記憶部に対する書込み対象のデータと当該書込み対象のデータの書込み先を指定する書込み先のアドレスとを含む書込みアクセスを検出した場合に、前記アドレスによって指定される記憶領域に既に記憶されているデータを読取る読取手段と、前記読取手段で読取られた前記データと、前記書込みアクセスに含まれる前記アドレスとを含むバックアップデータを生成する生成手段と、前記バックアップ記憶部に書込む前記バックアップデータに含まれる前記アドレスを記憶する履歴情報記憶手段と、前記履歴情報記憶手段に記憶されたアドレスのなかから、前記書込み先のアドレスと一致するアドレスを検索する履歴情報検索手段と、前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶されていない場合は、前記バックアップデータを前記バックアップ記憶部に書込む第1の書込手段と、前記バックアップデータを前記バックアップ記憶部に書込まれた場合に、前記履歴情報記憶手段に前記書込み先アドレスを書込む第2の書込手段と、第2の書込手段による書込みが終了した後、前記主記憶部の前記アドレスによって指定される記憶領域へ、前記書込み対象のデータを書込む第3の書込手段と、を備えることを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides a nonvolatile main storage unit, a nonvolatile backup storage unit that stores a copy of data stored in the main storage unit, and a processor Storage area specified by the address when a write access including the data to be written to the main storage unit and the write destination address specifying the write destination of the data to be written is detected. Reading means for reading data already stored in the memory, generation means for generating backup data including the data read by the reading means, and the address included in the write access, and writing to the backup storage unit History information storage means for storing the address included in the backup data to be stored, and storage in the history information storage means History information search means for searching for an address that matches the address of the write destination from among the written addresses, and if the address that matches the address of the write destination is not stored in the history information storage means, the backup A first writing unit for writing data to the backup storage unit; and a second writing unit for writing the write destination address to the history information storage unit when the backup data is written to the backup storage unit. And a third writing means for writing the data to be written into the storage area specified by the address of the main memory after the writing by the second writing means is completed. It is characterized by that.
また、本発明は、情報処理装置で実行されるデータ復旧方法であって、不揮発性の主記憶部と、前記主記憶部に記憶されているデータの複製を記憶する不揮発性のバックアップ記憶部と、を備える情報処理装置のデータ復旧方法であって、プロセッサ部から送出された、前記主記憶部に対する書込み対象のデータと当該書込み対象のデータの書込み先を指定する書込み先のアドレスとを含む書込みアクセスを検出した場合に、前記アドレスによって指定される記憶領域に既に記憶されているデータを読取る読取ステップと、前記読取ステップで読取られた前記データと、前記書込みアクセスに含まれる前記アドレスとを含むバックアップデータを生成する生成ステップと、前記バックアップ記憶部に書込む前記バックアップデータに含まれる前記アドレスを記憶する履歴情報記憶手段に記憶されたアドレスのなかから、前記書込み先のアドレスと一致するアドレスを検索する履歴情報検索ステップと、前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶されていない場合は、前記バックアップデータを前記バックアップ記憶部に書込む第1の書込ステップと、前記バックアップデータを前記バックアップ記憶部に書込まれた場合に、前記履歴情報記憶手段に前記書込み先アドレスを書込む第2の書込ステップと、第2の書込ステップによる書込みが終了した後、前記主記憶部の前記アドレスによって指定される記憶領域へ、前記書込み対象のデータを書込む第3の書込ステップと、を特徴とする。 The present invention is also a data recovery method executed by the information processing apparatus, and includes a nonvolatile main storage unit, and a nonvolatile backup storage unit that stores a copy of data stored in the main storage unit. A data recovery method for an information processing apparatus comprising: a write including data to be written to the main storage unit and a write destination address designating a write destination of the data to be written, sent from a processor unit A read step for reading data already stored in the storage area designated by the address when access is detected; the data read in the read step; and the address included in the write access Included in the generation step of generating backup data and the backup data to be written to the backup storage unit A history information search step for searching for an address that matches the address of the write destination from among the addresses stored in the history information storage means for storing the recorded address; and a match with the address of the write destination in the history information storage means If the address is not stored, a first writing step of writing the backup data to the backup storage unit, and the history information storage means when the backup data is written to the backup storage unit A second writing step for writing the write destination address; and after the writing by the second writing step is completed, the data to be written is written to the storage area specified by the address of the main storage unit. And a third writing step.
本発明によれば、不揮発性主記憶部を備える情報処理装置において、追加の電源を用いることなく、不意の電源断が起きても、電源復旧時に、電源断時に最も近い安定した不揮発性主記憶の内容を復元することができ、かつ、可能な限りバックアップ処理および必要なバックアップ領域を削減し、バックアップ用メモリの使用量削減と既存情報処理装置の性能低下を抑制することができるという効果を奏する。 According to the present invention, in an information processing apparatus including a nonvolatile main storage unit, even when an unexpected power failure occurs without using an additional power source, when the power is restored, the stable nonvolatile main memory closest to the power failure is restored. Can be restored, and backup processing and necessary backup areas can be reduced as much as possible, reducing the amount of backup memory used and reducing the performance of existing information processing devices. .
以下に添付図面を参照して、この発明にかかる情報処理装置およびデータ復旧方法の最良な実施の形態を詳細に説明する。本発明にかかる情報処理装置をパーソナルコンピュータ(以下、PCと示す)に適用した例を示すが、これに限定されるものではなく、主記憶部を備える装置であれば、サーバ装置、ゲーム機等の様々な装置に適用することができる。 Exemplary embodiments of an information processing apparatus and a data recovery method according to the present invention are explained in detail below with reference to the accompanying drawings. Although the example which applied the information processing apparatus concerning this invention to a personal computer (henceforth PC) is shown, it is not limited to this, If it is an apparatus provided with a main memory part, a server apparatus, a game machine, etc. It can be applied to various devices.
(第1の実施の形態)
第1の実施の形態について、添付図面を参照して説明する。まず、本発明が適用されるPCの構成例について説明する。図1は、第1の実施の形態にかかるPC100の構成を示すブロック図である。
(First embodiment)
A first embodiment will be described with reference to the accompanying drawings. First, a configuration example of a PC to which the present invention is applied will be described. FIG. 1 is a block diagram showing the configuration of the PC 100 according to the first embodiment.
本実施の形態にかかるPC100は、バックアップ部110と、不揮発性主記憶部120と、不揮発性バックアップメモリ130と、コミット部140と、ロールバック部150と、プロセッサ部160と、制御ソフトウェア170と、バス180とを備えている。また、PC100は、電源線10を介して電源200から電力を供給されている。
The PC 100 according to the present embodiment includes a
不揮発性主記憶部120は、MRAMやFeRAM等の不揮発性メモリである。不揮発性主記憶部120には、プロセッサ部160上で動作するソフトウェアのプログラムやそのソフトウェアが使用するデータが格納される。なお、プロセッサ部160は、不揮発性主記憶部120へ書込みを行う際に、書込みアクセスを主記憶アクセス制御部111へ送出する。主記憶アクセス制御部111は、プロセッサ部160から受信した書込みアクセスに応じて、不揮発性主記憶部120への書込みを行う。ここで、書込みアクセスとは、プロセッサ部160が不揮発性主記憶部120へ書込むデータと、そのデータの書込み先を指定する不揮発性主記憶部120のアドレス(以下、書込み先アドレスという)とを含む情報である。
The nonvolatile
不揮発性バックアップメモリ130は、不揮発性主記憶部120と同様に不揮発性メモリである。不揮発性バックアップメモリ130は、バックアップデータを記録する。ここで、バックアップデータとは、不揮発性主記憶部120への書込みアクセスを検出した際に、書込みアクセスに含まれる書込み先アドレスが示す不揮発性記憶部120の記憶領域に既に格納されているデータを複製したデータであり、具体的には、不揮発性記憶部120へのデータの復旧を可能にするために少なくとも不揮発性主記憶部120において更新されるデータのアドレスである書込み先アドレスと、そのアドレスに格納されていた更新前のデータ(以下、元データという)を含む。
The
バックアップ部110は、不揮発性主記憶部120への書込み時にバックアップデータを作成して不揮発性バックアップメモリ130に書込む。具体的には、不揮発性主記憶部120へのアクセスを監視して、不揮発性主記憶部120への書込みアクセスを検出した場合に、書込みアクセスに含まれた書込み先アドレスによって指定される記憶領域に既に記憶されている元データを不揮発性主記憶部120から読み出す。次に、バックアップ部110は、書込みアクセスに含まれた書込み先アドレスと元データからバックアップデータを生成し、不揮発性バックアップメモリ130に書込む。その後、バックアップ部110は、書込みアクセスで不揮発性主記憶部120への書込みを指示されたデータを実際に不揮発性主記憶部120の書込み先アドレスによって指定された記憶領域に書き込む。
The
バックアップ部110は、さらに主記憶アクセス制御部111と、バックアップ制御部112と、バックアップメモリアクセス制御部113と、バックアップデータ生成部114と、バックアップメモリ先頭アドレス保持部115と、書込ポインタ保持部116と、履歴テーブル管理部117と、履歴テーブル118とを備えている。
The
主記憶アクセス制御部111は、バス180を介して受信した不揮発性主記憶部120への読み書きアクセスに応じ、不揮発性主記憶部120に格納されたデータを読み出し、不揮発性主記憶部120にデータを書込む。ただし、主記憶アクセス制御部111は、バス180を介した不揮発性主記憶部120への書込みアクセスが検出された場合に、すぐに不揮発性主記憶部120にデータを書込まず、一旦バックアップ制御部112に書込み先アドレスを送出する。
The main memory
また、主記憶アクセス制御部111は、バックアップ制御部112からの不揮発性主記憶部120へのアクセスに応じ、不揮発性主記憶部120に格納されたデータを読み書きする。主記憶アクセス制御部111は、バス180を介した不揮発性バックアップメモリ130へのアクセスをバックアップ制御部112に送出する。また、主記憶アクセス制御部111は、書込ポインタ保持部116へのアクセスをバックアップ制御部112に送出する。なお、主記憶アクセス制御部111は、特許請求の範囲に記載した読取手段および第3の書込手段に対応する。
Further, the main memory
バックアップ制御部112は、主記憶アクセス制御部111から不揮発性主記憶部120へのアクセスを受信した場合、データをバックアップするために、主記憶アクセス制御部111を経由して不揮発性主記憶部120から書込み先アドレスが示す記憶領域に格納されているデータを読み出す。また、バックアップ制御部112は、バックアップデータ生成部114に書込み先アドレスおよび不揮発性主記憶部120から読み出したデータを送出する。
When the backup control unit 112 receives an access from the main memory
また、バックアップ制御部112は、バックアップメモリアクセス制御部113を経由して不揮発性バックアップメモリ130に格納されたデータを読み書きする。また、バックアップ制御部112は、書込ポインタ保持部116に格納された書込ポインタおよびバックアップメモリ先頭アドレス保持部115に格納されたバックアップメモリ先頭アドレスを読み書きする。なお、バックアップ制御部112は、特許請求の範囲に記載した第1の書込手段および第2の書込手段に対応する。
The backup control unit 112 reads and writes data stored in the
バックアップメモリアクセス制御部113は、バックアップ制御部112からのアクセスに応じて不揮発性バックアップメモリ130に格納されたデータを読み書きする。
The backup memory
バックアップデータ生成部114は、バックアップ制御部112から送信された不揮発性主記憶部120の書込み先アドレスおよび不揮発性主記憶部120の書込み先アドレスが示す記憶領域から読み出した元データからバックアップデータを生成する。
The backup data generation unit 114 generates backup data from the write destination address of the nonvolatile
バックアップメモリ先頭アドレス保持部115は、不揮発性バックアップメモリ130の先頭アドレスを保持する。バックアップメモリ先頭アドレス保持部115は、バックアップ制御部112からの要求に応じてその内容を更新する、またはその内容をバックアップ制御部112に送出する。
The backup memory head address holding unit 115 holds the head address of the
書込ポインタ保持部116は、書込ポインタを保持する。ここで、書込ポインタとは、バックアップデータを書込む不揮発性バックアップメモリ130上のアドレスである。書込ポインタ保持部116は、バックアップ制御部112からの要求に応じてその内容を更新し、またはその内容をバックアップ制御部112に送出する。
The write
履歴テーブル管理部117は、バックアップ制御部112の指示により、履歴テーブルの操作を行う。バックアップ制御部112から履歴テーブル管理部117への指示は3つある。1つめは、既にバックアップした不揮発性主記憶部120のアドレスを履歴テーブル118に登録することを指示する。2つめは、これからバックアップしようとしている不揮発性主記憶部120のアドレスを履歴テーブル118から検索することを指示する。そして3つめは、履歴テーブル118をクリアする指示である。
The history table management unit 117 operates the history table according to an instruction from the backup control unit 112. There are three instructions from the backup control unit 112 to the history table management unit 117. The first instruction is to register the address of the non-volatile
履歴テーブル118は、不揮発性バックアップメモリ130にバックアップした不揮発性主記憶部120のアドレスを記憶しておく記憶領域である。履歴テーブル118は、履歴テーブル管理部117によってアクセスをされ、管理される。
The history table 118 is a storage area for storing the address of the nonvolatile
ここで、さらに履歴テーブル118について説明する。図2は、履歴テーブル118のデータ構成の一例を示す説明図である。履歴テーブル118は、例えば図2に示すような単純な表として構成される。履歴テーブル118の記憶領域(以下、履歴エントリ21という)には、既にバックアップされた不揮発性主記憶部120内のアドレスが格納されている。なお、履歴テーブル118が図2に示すような単純な表形式の場合、履歴テーブル118への登録処理は、空いている履歴エントリ21にアドレスを書き込むことで実現できる。また、履歴テーブル118のバックアップされたアドレスの検索は、履歴テーブル118内の履歴エントリ21に検索対象のアドレスが登録されているかどうか、すなわちアドレスを比較することで実現できる。また、履歴テーブル118のクリアは、例えばすべての履歴エントリ21に不揮発性主記憶部120のアドレスとしては不正なアドレスを格納し、検索時に絶対に一致しないようにすることで実現できる。
Here, the history table 118 will be further described. FIG. 2 is an explanatory diagram showing an example of the data configuration of the history table 118. The history table 118 is configured as a simple table as shown in FIG. In the storage area of the history table 118 (hereinafter referred to as history entry 21), the addresses in the nonvolatile
また、バックアップ部110は、バックアップ処理そのものを行うか否かのスイッチを備え、不揮発性主記憶部120への書込みに対するバックアップ処理全体を有効にしたり無効にしたりする機能もあわせ持つ。なお、不揮発性主記憶部120に対する書込みアクセスを検出した場合にバックアップ処理を行うか否かを示すこのスイッチは、物理的なスイッチでも、メモリ上に保持した情報であってもよい。
In addition, the
コミット部140は、コミット処理を行う。コミット処理とは、突然の電源断を経て電源が復旧した場合であって、不揮発性主記憶部120の状態を復元する必要が生じた場合に、復元目標となる不揮発性主記憶部120の状態(以下、チェックポイントという)を作成する一連の処理のことである。具体的には、コミット部140が、コミット処理が指示された時点からバックアップ部110によって新たに不揮発性バックアップメモリ130に記憶されたバックアップデータを、不揮発性主記憶部120の記憶内容を書戻す際に用いるバックアップデータとして、読み出し許可と設定することにより実現する。なお、コミット処理の詳細は、不揮発性バックアップメモリ130のデータの使用方法(スタックかリングバッファか等)に依存する。
The commit
ロールバック部150は、不揮発性バックアップメモリ130に格納されているバックアップデータから不揮発性主記憶部120の内容を復元するために必要な、読み出し許可と設定されたバックアップデータを読み出し、読み出されたバックアップデータから抽出した不揮発性主記憶部120の書込み先アドレスに示された記憶領域に、バックアップデータから抽出した元データを書戻す。この処理により、不揮発性主記憶部120を一番最近に作成したチェックポイントの状態を復元する。なお、バックアップ制御部112は、特許請求の範囲に記載した抽出手段および第4の書込手段に対応する。
The
ロールバック部150が正しい復元処理を行うためには、不揮発性バックアップメモリ130に格納されている1または複数のバックアップデータのなかから、不揮発性主記憶部120の状態を最新のチェックポイントの状態に復元するために必要なバックアップデータを読み出すことができることが重要である。つまり、不揮発性バックアップメモリ130は、不揮発性主記憶部120の状態を最新のチェックポイントの状態に復元するために必要なバックアップデータを管理する必要がある。したがって、コミット処理では、不揮発性バックアップメモリ130が管理対象としている復元処理に必要な1または複数のバックアップデータとして、当該コミット処理以前に管理していたバックアップデータから、新たに不揮発性バックアップメモリ130に記憶するバックアップデータに、読み出し許可を設定する処理を行う。
In order for the
ここで、あるコミット処理から次のコミット処理までに不揮発性バックアップメモリ130に記録され管理の対象となる一連のバックアップデータのことをシーケンスと呼ぶ。また、最後のコミット処理以降に不揮発性バックアップメモリ130に記録された一連のバックアップデータを、最新シーケンスという。つまり、ある時点で不揮発性バックアップメモリ130が管理しているシーケンスが最新シーケンスであり、最新シーケンスとして新たに不揮発性バックアップメモリ130に記憶するバックアップデータを読み出し許可と設定する処理とは、具体的に言えば、最新シーケンスの切替え処理である。
Here, a series of backup data recorded in the
プロセッサ部160は、制御ソフトウェア170を動作させる。制御ソフトウェア170は、通常の処理においては不揮発性主記憶部120のデータを操作してシステム固有の機能を提供する。また、制御ソフトウェア170は、適切なタイミング(例えば、一定時間ごとに)でコミット部140に要求を出し、不揮発性主記憶部120のチェックポイントを作成する。制御ソフトウェア170は、電源復帰時にはロールバック部150に要求を出し、最新のチェックポイントまで不揮発性主記憶部120の状態を戻す処理を行う。
The
バス180は、コミット部140、ロールバック部150、プロセッサ部160およびバックアップ部110を接続する。不揮発性主記憶部120は、バス180に直接接続されず、バックアップ部110を介してバス180と接続する。これにより、不揮発性主記憶部120へのアクセスは、すべてバックアップ部110を介するため、バックアップ部110において不揮発性主記憶部120へのアクセスに応じたバックアップ処理を行うことができる。なお、バックアップ部110の配置位置は、バス180と不揮発性主記憶部120の間に限らず、不揮発性主記憶部120へのアクセスを不揮発性主記憶部120が受け取る前に受け取ることができる位置であれば、どの位置に配置されていてもよい。また、バックアップ部110には、不揮発性主記憶部120に加え、不揮発性バックアップメモリ130が接続される。
The bus 180 connects the commit
次に、以上のように構成されているPC100のバックアップ部110によるバックアップ処理、コミット部140によるコミット処理およびロールバック部150によるロールバック処理について説明する。
Next, backup processing by the
図3−1、図3−2は、バックアップ部110が行うバックアップ処理手順を示すフローチャートである。なお、バックアップ部110は、バス180からのアクセスを受け取って動作する。
FIGS. 3A and 3B are flowcharts illustrating the backup processing procedure performed by the
まず、主記憶アクセス制御部111は、バス180からのアクセスを検出する(ステップS301)。主記憶アクセス制御部111は、検出したアクセスが不揮発性主記憶部120への読出しアクセスであるか否かを判断する(ステップS302)。具体的には、アクセスに含まれる命令から不揮発性主記憶部120への読出しアクセスであるか否かを判断する。なお、読出しアクセスに限らず、書込みアクセス等の他のアクセスについても同様に、アクセスに含まれる命令からアクセスの種類やアクセスする記憶媒体を判断する。
First, the main memory
検出したアクセスが不揮発性主記憶部120への読出しアクセスであると判断した場合は(ステップS302:Yes)、主記憶アクセス制御部111は不揮発性主記憶部120からデータを読み出し(ステップS303)、バス180へ読み出したデータを返す。
When it is determined that the detected access is a read access to the nonvolatile main storage unit 120 (step S302: Yes), the main memory
検出したアクセスが不揮発性主記憶部120への読出しアクセスでないと判断した場合は(ステップS302:No)、主記憶アクセス制御部111がバックアップ制御部112にアクセスを送出し、バックアップ制御部112がアクセスを受け取る(ステップS304)。バックアップ制御部112は、受け取ったアクセスが不揮発性主記憶部120への書込みアクセスであるか否かを判断する(ステップS305)。
When it is determined that the detected access is not a read access to the nonvolatile main storage unit 120 (step S302: No), the main storage
受け取ったアクセスが不揮発性主記憶部120への書込みアクセスであると判断した場合は(ステップS305:Yes)、バックアップ制御部112はバックアップ処理が有効であるか否かを判断する(ステップS306)。バックアップ処理が有効でないと判断した場合は(ステップS306:No)、バックアップ処理は行わず、ステップS317に進む。バックアップ処理が有効であると判断した場合は(ステップS306:Yes)、バックアップ制御部112は書込み先アドレスを履歴テーブル管理部117に送出する(ステップS307)。履歴テーブル管理部117は、受信した書込み先アドレスが履歴テーブル118に記録されているかを検索する(ステップS308)。履歴テーブル管理部117は、受信した書込み先アドレスが履歴テーブル118に記録されているか否かを判断する(ステップS309)。受信した書込み先アドレスが履歴テーブル118に記録されていると判断した場合は(ステップS309:Yes)、ステップS317に進む。 When it is determined that the received access is a write access to the nonvolatile main storage unit 120 (step S305: Yes), the backup control unit 112 determines whether the backup process is valid (step S306). If it is determined that the backup process is not valid (step S306: No), the backup process is not performed and the process proceeds to step S317. When it is determined that the backup process is valid (step S306: Yes), the backup control unit 112 sends the write destination address to the history table management unit 117 (step S307). The history table management unit 117 searches whether the received write destination address is recorded in the history table 118 (step S308). The history table management unit 117 determines whether or not the received write destination address is recorded in the history table 118 (step S309). When it is determined that the received write destination address is recorded in the history table 118 (step S309: Yes), the process proceeds to step S317.
これにより、最新シーケンスにおいて、あるアドレスに書込みアクセスがなされ、さらに同一のアドレスに書込みアクセスがなされた場合には、最初の書込みアクセスに対するバックアップデータがあればチェックポイントの状態にロールバックすることができるため、不揮発性バックアップメモリ130にバックアップデータの格納を行わない。
As a result, in the latest sequence, when a write access is made to a certain address and a write access is made to the same address, if there is backup data for the first write access, it can be rolled back to the checkpoint state. Therefore, backup data is not stored in the
すなわち、このような処理を行うことにより、同一シーケンス内において同一アドレスに対する複数のバックアップデータを書くことがなくなり、少ない容量のバックアップメモリで同じ機能を実現することができる。さらに、バックアップデータの書込み処理自体の回数を削減できるので、バックアップ処理によるPC100全体の性能低下を抑えることができる。 That is, by performing such processing, a plurality of backup data for the same address is not written in the same sequence, and the same function can be realized with a backup memory having a small capacity. Furthermore, since the number of backup data writing processes themselves can be reduced, it is possible to suppress the performance degradation of the entire PC 100 due to the backup processes.
受信した書込み先アドレスが履歴テーブル118に記録されていないと判断した場合は(ステップS309:No)、すなわち最新のコミット処理以降のそのアドレスに対する最初の書込みアクセスである場合、バックアップ制御部112は主記憶アクセス制御部111に読出し要求を送出し、主記憶アクセス制御部111が不揮発性主記憶部120から書込み先アドレスに示す記憶領域に記憶されている元データを読出す(ステップS310)。次に、バックアップ部110は、書込み先アドレスおよび元データをバックアップデータ生成部140に送出し、バックアップデータ生成部140は受け取った書込み先アドレスと元データからバックアップデータを生成する(ステップS311)。
When it is determined that the received write destination address is not recorded in the history table 118 (step S309: No), that is, when it is the first write access to the address after the latest commit process, the backup control unit 112 A read request is sent to the storage
バックアップ制御部112は、生成したバックアップデータを書込む不揮発性バックアップメモリ130上のアドレスを書込ポインタ保持部116から読み出す(ステップS312)。バックアップメモリアクセス制御部113は、読み出した不揮発性バックアップメモリ130上のアドレスに示す記憶領域にバックアップデータを書込む(ステップS313)。バックアップ制御部112は、書込ポインタ保持部116に保持しているポインタの値を更新する(ステップS314)。バックアップ制御部112は、書込み先アドレスを履歴テーブル管理部117に送出し、記録を指示する(ステップS315)。履歴テーブル管理部117は、管理している履歴テーブルの構造に従って、履歴テーブル118内の記憶領域(履歴エントリ)を決定して書込み先アドレスを記録する(ステップS316)。主記憶アクセス制御部111は、不揮発性主記憶部120の書込み先アドレスに示す記憶領域にデータを書込む(ステップS317)。
The backup control unit 112 reads the address on the
ステップS305において、受け取ったアクセスが不揮発性主記憶部120への書込みアクセスでないと判断した場合は(ステップS305:No)、バックアップ制御部112は不揮発性バックアップメモリ130へのアクセスであるか否かを判断する(ステップS318)。不揮発性バックアップメモリ130へのアクセスであると判断した場合は(ステップS318:Yes)、バックアップメモリアクセス制御部113は不揮発性バックアップメモリ130のデータを読み出す、または不揮発性バックアップメモリ130にデータを書込む(ステップS319)。
If it is determined in step S305 that the received access is not a write access to the nonvolatile main storage unit 120 (step S305: No), the backup control unit 112 determines whether the access is to the
不揮発性バックアップメモリ130へのアクセスでないと判断した場合は(ステップS318:No)、バックアップ制御部112は書込ポインタ保持部116へのアクセスであるか否かを判断する(ステップS320)。書込ポインタ保持部116へのアクセスであると判断した場合は(ステップS320:Yes)、バックアップ制御部112は書込ポインタ保持部116の値を読み出す、または更新する(ステップS321)。書込ポインタ保持部116へのアクセスでないと判断した場合は(ステップS320:No)、処理を終了する。 If it is determined that the access is not to the nonvolatile backup memory 130 (step S318: No), the backup control unit 112 determines whether the access is to the write pointer holding unit 116 (step S320). If it is determined that the access is to the write pointer holding unit 116 (step S320: Yes), the backup control unit 112 reads or updates the value of the write pointer holding unit 116 (step S321). If it is determined that the access is not to the write pointer holding unit 116 (step S320: No), the process ends.
次に、コミット処理について説明する。図4は、コミット部140が行うコミット処理手順を示すフローチャートである。なお、コミット部140は、プロセッサ部160上で動作する制御ソフトウェア170またはロールバック部150からの、バックアップ部110に対するコミット処理の指示で起動する。
Next, commit processing will be described. FIG. 4 is a flowchart showing a commit processing procedure performed by the commit
まず、バックアップ制御部112は、履歴テーブル管理部117に履歴テーブル118のクリアを指示する(ステップS401)。履歴テーブル管理部117は、バックアップ制御部112から履歴テーブル118のクリア指示を受けると、管理している履歴テーブル118の構造に従って履歴テーブル118内のデータをクリアする(ステップS402)。次に、コミット部140は、不揮発性バックアップメモリ130上の最新シーケンスを切替える(ステップS403)。このコミット処理により、この時点の不揮発性主記憶部120の状態が新たな不揮発性主記憶部120のチェックポイントとなる。コミット処理の詳細は、バックアップ部110の構成とバックアップデータの形式に依存する。例えば、不揮発性バックアップメモリ130のデータ構造がスタックである場合、書込ポインタ保持部116にバックアップメモリ先頭アドレス保持部115に保持されている値を格納することによって最新シーケンスの切替えを実現する。
First, the backup control unit 112 instructs the history table management unit 117 to clear the history table 118 (step S401). When the history table management unit 117 receives an instruction to clear the history table 118 from the backup control unit 112, the history table management unit 117 clears the data in the history table 118 according to the structure of the managed history table 118 (step S402). Next, the commit
次に、ロールバック処理について説明する。図5は、ロールバック部150が行うロールバック処理手順を示すフローチャートである。なお、ロールバック部150は、プロセッサ部160上で動作する制御ソフトウェア170からの指示で起動する。
Next, the rollback process will be described. FIG. 5 is a flowchart showing a rollback processing procedure performed by the
まず、ロールバック部150は、バックアップ部110にバックアップ処理を無効にする要求を送出する(ステップS501)。バックアップ部110は、バックアップ処理を無効にする(ステップS502)。これは、不揮発性主記憶部120にバックアップデータを書戻す際に、不意の電源断で不定となっている不揮発性主記憶部120のデータを不揮発性バックアップメモリ130にバックアップデータとして格納しないようにするためである。
First, the
次に、ロールバック部150は、ロールバック処理に必要な一連のバックアップデータである最新シーケンスを特定する(ステップS503)。なお、最新シーケンスの特定方法はバックアップ部110の構成とバックアップデータの形式に依存する。ロールバック部150は、読み出された最新シーケンス内の最新バックアップデータをEに格納する(ステップS504)。ロールバック部150は、Eが空であるか否かを判断する(ステップS505)。
Next, the
Eが空でないと判断した場合は(ステップS505:No)、ロールバック部150はEの読み出し要求をバックアップ部110に送出する(ステップS506)。バックアップ部110は、不揮発性バックアップメモリ130からバックアップデータEを読み出す(ステップS507)。ロールバック部150は、Eに含まれる不揮発性主記憶120の書込み先アドレスが示す記憶領域へ、同じくEに含まれる元データを書き戻す要求をバックアップ部110に送出する(ステップS508)。バックアップ部110は、不揮発性主記憶部120の指定されたアドレスに元データを書き込む(ステップS509)。ロールバック部150は、最新シーケンス内の次のバックアップデータをEに格納する(ステップS510)。これにより、最新シーケンス内で記録された時刻の逆順、すなわち新しく格納された順にバックアップデータを読み出すことができる。ステップS505に戻り、最新シーケンス内の全てのバックアップデータに対してこの処理を繰り返す。
If it is determined that E is not empty (step S505: No), the
ステップS505において、Eが空であると判断した場合は(ステップS505:Yes)、ロールバック部150はバックアップ部110にバックアップ処理を有効にする要求を送出する(ステップS511)。バックアップ部110は、バックアップ処理を有効にする(ステップS512)。ロールバック部150は、コミット部140にコミット要求を送出する(ステップS513)。コミット部140は、コミット処理を行う(ステップS514)。これにより、ロールバック処理が完了した時点でのチェックポイントが生成される。
If it is determined in step S505 that E is empty (step S505: Yes), the
バックアップ処理において履歴テーブル118が存在しない場合を考えると、不揮発性主記憶部120への書込み1回に対して、不揮発性主記憶部120に格納されているデータの読み出しが必ず1回必要となり、同じ性能の不揮発性メモリ素子を、不揮発性バックアップメモリ130と不揮発性主記憶部120に使用したと仮定しても、不揮発性主記憶部120への書込み処理に2倍の時間がかかると考えられ、PC100の処理性能の低下が予想される。
Considering the case where the history table 118 does not exist in the backup process, the data stored in the nonvolatile
また、プロセッサ部160上で動作する制御ソフトウェア170には、時間的に近接していれば同一もしくは近接した記憶領域をアクセスする特徴があり(時間的局所性および空間的局所性と呼ばれる)、短い時間に主記憶部の同一または周辺のアドレスに対して書込みを含むアクセスをすることが多いことが知られている。
In addition, the
したがって、本実施の形態のように、バックアップした不揮発性主記憶部120のアドレスを履歴テーブル118に記録してバックアップ時にチェックすることで、不揮発性主記憶部120の同一アドレスのデータをバックアップすることを防ぐことができるため、PC100の性能低下を防止することができ、また不揮発性バックアップメモリ130の使用量を削減することができる。また、より少量の不揮発性バックアップメモリ130でPC100を構成することができる。
Therefore, as in the present embodiment, the data of the same address in the nonvolatile
次に、上述した構成とは異なる履歴テーブルの構成の例について説明する。図6は、履歴テーブル118のデータ構成の一例を示す説明図である。 Next, an example of a history table configuration different from the above-described configuration will be described. FIG. 6 is an explanatory diagram showing an example of the data configuration of the history table 118.
図6に示す履歴テーブル118は、履歴エントリ21と有効ビット22とを対応付けて記憶している。図6に示す履歴テーブル118を使用した場合、検出した不揮発性主記憶部120への書込みアクセスに含まれる書込み先アドレスが既にバックアップされているか否かを判断する際に、有効ビット22の値で対応する履歴エントリ21が使われているか否かで判別できる。また、履歴テーブル118をクリアする処理も、有効ビット22のみをクリアすることで実現できる。
The history table 118 shown in FIG. 6 stores the
また、他の構成例として、ハッシュを使った履歴テーブルの構成の例について説明する。図7は、履歴テーブル118のデータ構成の一例を示す説明図である。 As another configuration example, a configuration example of a history table using a hash will be described. FIG. 7 is an explanatory diagram showing an example of the data configuration of the history table 118.
図7に示す履歴テーブル118は、インデックスが0〜N−1で表現される記憶領域(履歴エントリ21)を備える。履歴テーブル管理部117は、ハッシュ値計算部31とセレクタ32を備える。履歴テーブル118にバックアップした書込み先アドレスを登録する際には、ハッシュ値計算部31は、書込み先アドレスを入力としてインデックス23を算出し、履歴テーブル118の算出されたインデックス23で示される履歴エントリ21に書込み先アドレスを格納する。
The history table 118 illustrated in FIG. 7 includes a storage area (history entry 21) whose index is expressed by 0 to N-1. The history table management unit 117 includes a hash
また、履歴テーブル118から書込み先アドレスを検索する際には、ハッシュ値計算部31は、検索する書込み先アドレスを入力としてインデックス23を算出し、履歴テーブル118における算出されたインデックス23で示される履歴エントリ21に記憶されている書込み先アドレスが、検索しているアドレスと一致するか否かをチェックする。一致すれば検索成功、一致しなければ検索失敗である。最後に、履歴テーブル118をクリアする処理は、単純な表形式の場合と同じである。なお、有効ビットを備えれば、有効ビットをクリアすることにより、履歴テーブル118をクリアすることができる。
Further, when searching for the write destination address from the history table 118, the hash
なお、ハッシュ値計算部31は、例えば図7に示すように履歴テーブル118が備える履歴エントリ21の数がN個だった場合、書込み先アドレスをNで割った余りを出力のハッシュ値とすることなどが考えられる。しかし、ハッシュ値としての性質を満たせばよく、特定の計算方法には依存しない。
For example, when the number of
(第2の実施の形態)
第2の実施の形態について、添付図面を参照して第1の実施の形態と異なる部分である履歴テーブルに不揮発性主記憶部から読み出したデータを記録する点を中心に説明する。他の部分については第1の実施の形態と同様であるので、上述した説明を参照し、ここでの説明を省略する。本実施の形態では、履歴テーブル118の構成とバックアップ処理について、詳細に説明する。
(Second Embodiment)
The second embodiment will be described with reference to the attached drawings, centering on the point that data read from the nonvolatile main storage unit is recorded in a history table, which is a different part from the first embodiment. The other parts are the same as those in the first embodiment, so the description is omitted with reference to the above description. In the present embodiment, the configuration of the history table 118 and backup processing will be described in detail.
図8は、第2の実施の形態にかかる履歴テーブル118のデータ構成の一例を示す説明図である。本実施の形態にかかる履歴テーブル118は、不揮発性主記憶部120のアドレスと、読み出したデータと、有効ビットと、バックアップ済みフラグとを対応付けて記憶する。
FIG. 8 is an explanatory diagram of an example of a data configuration of the history table 118 according to the second embodiment. The history table 118 according to the present embodiment stores the address of the nonvolatile
履歴テーブル管理部117は、上述した場合と同様に、バックアップ制御部112の指示により、履歴テーブル118の操作を行う。具体的には、履歴テーブル管理部117は、データを読み出した不揮発性主記憶部120のアドレスとデータを履歴テーブル118に登録する。履歴テーブル管理部117は、これからバックアップしようとしている不揮発性主記憶部120のアドレスを履歴テーブル118から検索する。履歴テーブル管理部117は、履歴テーブル118をクリアする。本実施の形態では、上述した第1の実施の形態と異なり、バックアップした不揮発性主記憶部120のアドレスに加えて、読み出した不揮発性主記憶部120のデータも記録する。
The history table management unit 117 operates the history table 118 according to an instruction from the backup control unit 112 in the same manner as described above. Specifically, the history table management unit 117 registers the address and data of the nonvolatile
図9−1、図9−2は、バックアップ部110が行うバックアップ処理手順を示すフローチャートである。なお、バックアップ部110は、バス180からのアクセスを受け取って動作する。また、本実施の形態で行う履歴テーブル118にデータを登録する処理、および履歴テーブル118からデータを検索する処理は、第1の実施の形態と処理内容や処理位置が異なる。
9A and 9B are flowcharts illustrating the backup processing procedure performed by the
まず、主記憶アクセス制御部111は、バス180からのアクセスを検出する(ステップS901)。主記憶アクセス制御部111は、検出したアクセスが不揮発性主記憶部120への読出しアクセスであるか否かを判断する(ステップS902)。
First, the main memory
検出したアクセスが不揮発性主記憶部120への読出しアクセスであると判断した場合は(ステップS902:Yes)、主記憶アクセス制御部111は不揮発性主記憶部120からデータを読み出し(ステップS903)、バス180へ読み出したデータを返す。バックアップ制御部112は、バックアップ処理が有効であるか否かを判断する(ステップS904)。バックアップ処理が有効でないと判断した場合は(ステップS904:No)、処理を終了する。バックアップ処理が有効であると判断した場合は(ステップS904:Yes)、バックアップ制御部112は、読出し先アドレスと読み出したデータを履歴テーブル管理部117に送出し、履歴テーブル118への記録を指示する(ステップS905)。履歴テーブル管理部117は、履歴テーブル118内の記憶領域を決定して読出し先アドレスとデータを記録する(ステップS906)。履歴テーブル管理部117は、読み出し処理ではバックアップ処理は行われないため、記録した履歴エントリに対応するバックアップ済みフラグを、バックアップを行っていない値であるOFFに設定する(ステップS907)。
If it is determined that the detected access is a read access to the nonvolatile main storage unit 120 (step S902: Yes), the main memory
検出したアクセスが不揮発性主記憶部120への読出しアクセスでないと判断した場合は(ステップS902:No)、主記憶アクセス制御部111がバックアップ制御部112にアクセスを送出し、バックアップ制御部112がアクセスを受け取る(ステップS908)。バックアップ制御部112は、受け取ったアクセスが不揮発性主記憶部120への書込みアクセスであるか否かを判断する(ステップS909)。
If it is determined that the detected access is not a read access to the nonvolatile main storage unit 120 (step S902: No), the main storage
受け取ったアクセスが不揮発性主記憶部120への書込みアクセスであると判断した場合は(ステップS909:Yes)、バックアップ制御部112はバックアップ処理が有効であるか否かを判断する(ステップS910)。バックアップ処理が有効でないと判断した場合は(ステップS910:No)、バックアップ処理は行わず、ステップS922に進む。バックアップ処理が有効であると判断した場合は(ステップS910:Yes)、バックアップ制御部112は書込み先アドレスを履歴テーブル管理部117に送出して、記録されているか否かを検索させる(ステップS911)。履歴テーブル管理部117は、受信した書込み先アドレスが履歴テーブル118に記録されているか否かを検索する(ステップS912)。履歴テーブル管理部117は、受信した書込み先アドレスが履歴テーブル118に記録されているか否かを判断する(ステップS913)。 If it is determined that the received access is a write access to the nonvolatile main storage unit 120 (step S909: Yes), the backup control unit 112 determines whether the backup process is valid (step S910). When it is determined that the backup process is not valid (step S910: No), the backup process is not performed and the process proceeds to step S922. When it is determined that the backup process is valid (step S910: Yes), the backup control unit 112 sends the write destination address to the history table management unit 117 to search whether it is recorded (step S911). . The history table management unit 117 searches whether the received write destination address is recorded in the history table 118 (step S912). The history table management unit 117 determines whether or not the received write destination address is recorded in the history table 118 (step S913).
受信した書込み先アドレスが履歴テーブル118に記録されていないと判断した場合は(ステップS913:No)、すなわち最新のコミット処理以降のそのアドレスに対する最初のアクセスである場合、バックアップ制御部112は主記憶アクセス制御部111に読出し要求を送出し、主記憶アクセス制御部111が不揮発性主記憶部120から書込み先アドレスに示す記憶領域に記憶されている元データを読み出す(ステップS914)。次に、バックアップデータ生成部114は、書込み先アドレスおよび元データからバックアップデータを生成する(ステップS915)。
When it is determined that the received write destination address is not recorded in the history table 118 (step S913: No), that is, when it is the first access to the address after the latest commit process, the backup control unit 112 stores the main memory. A read request is sent to the
バックアップ制御部112は、生成したバックアップデータを書込む不揮発性バックアップメモリ130上のアドレスを書込ポインタ保持部116から読み出す(ステップS916)。バックアップメモリアクセス制御部113は、読み出した不揮発性バックアップメモリ130上のアドレスに示す記憶領域にバックアップデータを書込む(ステップS917)。バックアップ制御部112は、書込ポインタ保持部116に保持しているポインタの値を更新する(ステップS918)。バックアップ制御部112は、書込み先アドレスと読み出したデータを履歴テーブル管理部117に送出し、記録を指示する(ステップS919)。履歴テーブル管理部117は、管理している履歴テーブルの構造に従って、履歴テーブル118内の記憶領域を決定して記録する(ステップS920)。履歴テーブル管理部117は、この書込み処理では、バックアップ処理が行われたため、記録した履歴エントリに対応するバックアップ済みフラグを、バックアップを行なった値であるONに設定する(ステップS921)。主記憶アクセス制御部111は、不揮発性主記憶部120の書込み先アドレスにデータを書込む(ステップS922)。
The backup control unit 112 reads the address on the
ステップS913において、受信した書込み先アドレスが履歴テーブル118に記録されていると判断した場合は(ステップS913:Yes)、履歴テーブル管理部117はバックアップ済みであるか否かを判断する(ステップS923)。履歴テーブル管理部117は、受信した書込み先アドレスがバックアップ済みであると判断した場合は(ステップS923:Yes)、ステップS922に進む。 In step S913, when it is determined that the received write destination address is recorded in the history table 118 (step S913: Yes), the history table management unit 117 determines whether backup has been completed (step S923). . When the history table management unit 117 determines that the received write destination address has been backed up (step S923: Yes), the history table management unit 117 proceeds to step S922.
履歴テーブル管理部117はバックアップ済みでないと判断した場合は(ステップS923:No)、履歴テーブル管理部117は履歴テーブル118からアドレスとデータを読み出す(ステップS924)。履歴テーブル管理部117は、記録した履歴エントリに対応するバックアップ済みフラグをONに設定する(ステップS925)。その後、ステップS915に進む。これにより、読み出し処理によって履歴テーブルに記録されていたアドレスとデータを用いることができるため、不揮発性主記憶部120へのアクセスを行うことなく、書込み先アドレスに示す記憶領域に記憶されたデータを取得することができ、処理時間を短縮することができる。
When the history table management unit 117 determines that the backup has not been completed (step S923: No), the history table management unit 117 reads an address and data from the history table 118 (step S924). The history table management unit 117 sets the backed up flag corresponding to the recorded history entry to ON (step S925). Thereafter, the process proceeds to step S915. As a result, the address and data recorded in the history table by the read process can be used, so that the data stored in the storage area indicated by the write destination address can be stored without accessing the nonvolatile
ステップS909において、受け取ったアクセスが不揮発性主記憶部120への書込みアクセスでないと判断した場合は(ステップS909:No)、バックアップ制御部112は不揮発性バックアップメモリ130へのアクセスであるか否かを判断する(ステップS926)。不揮発性バックアップメモリ130へのアクセスであると判断した場合は(ステップS926:Yes)、バックアップ制御部112はバックアップメモリアクセス制御部113にアクセス先アドレスを送り、バックアップメモリアクセス制御部113は不揮発性バックアップメモリ130のデータを読み出す、または不揮発性バックアップメモリ130にデータを書込む(ステップS927)。
If it is determined in step S909 that the received access is not a write access to the nonvolatile main storage unit 120 (step S909: No), the backup control unit 112 determines whether the access is to the
不揮発性バックアップメモリ130へのアクセスでないと判断した場合は(ステップS926:No)、バックアップ制御部112は書込ポインタ保持部116へのアクセスであるか否かを判断する(ステップS928)。書込ポインタ保持部116へのアクセスであると判断した場合は(ステップS928:Yes)、バックアップ制御部112は書込ポインタ保持部116の値を読み出す、または更新する(ステップS929)。書込ポインタ保持部116へのアクセスでないと判断した場合は(ステップS928:No)、処理を終了する。 When determining that the access is not to the nonvolatile backup memory 130 (step S926: No), the backup control unit 112 determines whether the access is to the write pointer holding unit 116 (step S928). When it is determined that the access is to the write pointer holding unit 116 (step S928: Yes), the backup control unit 112 reads or updates the value of the write pointer holding unit 116 (step S929). If it is determined that the access is not to the write pointer holding unit 116 (step S928: No), the process is terminated.
このように、本実施の形態では、バックアップした不揮発性主記憶部120のアドレスだけでなく、不揮発性主記憶部120からデータを読み出したアドレスと読み出したデータを記録しておくことにより、バックアップ処理において不揮発性主記憶部120の同一アドレスのデータへのアクセスを削減することができる。これにより、PC100の性能低下を低減することができる。
As described above, in this embodiment, not only the address of the backed-up non-volatile
なお、本発明は、上記実施の形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化することができる。また、上記実施の形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成することができる。例えば、実施の形態に示される全構成要素からいくつかの構成要素を削除してもよい。さらに、異なる実施の形態にわたる構成要素を適宜組み合わせてもよい。 It should be noted that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the above embodiments. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.
100 パーソナルコンピュータ(PC)
110 バックアップ部
111 主記憶アクセス制御部
112 バックアップ制御部
113 バックアップメモリアクセス制御部
114 バックアップデータ生成部
115 バックアップメモリ先頭アドレス保持部
116 書込ポインタ保持部
117 履歴テーブル管理部
118 履歴テーブル
120 不揮発性主記憶部
130 不揮発性バックアップメモリ
140 コミット部
150 ロールバック部
160 プロセッサ部
170 制御ソフトウェア
180 バス
200 電源
100 Personal computer (PC)
DESCRIPTION OF
Claims (10)
前記主記憶部に記憶されているデータの複製を記憶する不揮発性のバックアップ記憶部と、
プロセッサ部から送出された、前記主記憶部に対する書込み対象のデータと当該書込み対象のデータの書込み先を指定する書込み先のアドレスとを含む書込みアクセスを検出した場合に、前記アドレスによって指定される記憶領域に既に記憶されているデータを読取る読取手段と、
前記読取手段で読取られた前記データと、前記書込みアクセスに含まれる前記アドレスとを含むバックアップデータを生成する生成手段と、
前記バックアップ記憶部に書込む前記バックアップデータに含まれる前記アドレスを記憶する履歴情報記憶手段と、
前記履歴情報記憶手段に記憶されたアドレスのなかから、前記書込み先のアドレスと一致するアドレスを検索する履歴情報検索手段と、
前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶されていない場合は、前記バックアップデータを前記バックアップ記憶部に書込む第1の書込手段と、
前記バックアップデータを前記バックアップ記憶部に書込まれた場合に、前記履歴情報記憶手段に前記書込み先アドレスを書込む第2の書込手段と、
第2の書込手段による書込みが終了した後、前記主記憶部の前記アドレスによって指定される記憶領域へ、前記書込み対象のデータを書込む第3の書込手段と、
を備えることを特徴とする情報処理装置。 A non-volatile main memory unit;
A non-volatile backup storage unit that stores a copy of the data stored in the main storage unit;
A memory specified by the address when a write access including a data to be written to the main storage unit and a write destination address for designating a write destination of the data to be written sent from the processor unit is detected. Reading means for reading data already stored in the area;
Generating means for generating backup data including the data read by the reading means and the address included in the write access;
History information storage means for storing the address included in the backup data to be written to the backup storage unit;
History information search means for searching for an address that matches the address of the write destination from among the addresses stored in the history information storage means;
If the history information storage means does not store an address that matches the address of the write destination, a first writing means for writing the backup data to the backup storage unit;
Second writing means for writing the write destination address in the history information storage means when the backup data is written in the backup storage unit;
A third writing means for writing the data to be written into the storage area specified by the address of the main storage unit after the writing by the second writing means is completed;
An information processing apparatus comprising:
前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶されていると判明した後、前記第3の書込手段は、前記主記憶部の前記アドレスによって指定される記憶領域へ、前記書込み対象のデータを書込むことを特徴とする請求項1に記載の情報処理装置。 The first writing unit writes the backup data into the backup storage unit when an address that matches the address of the writing destination is stored in the history information storage unit;
After it is determined that the address that matches the address of the write destination is stored in the history information storage unit, the third writing unit stores the address in the storage area specified by the address of the main storage unit. The information processing apparatus according to claim 1, wherein data to be written is written.
前記主記憶部の記憶内容を書戻す旨を指示された場合に、前記バックアップ記憶部に記憶されたバックアップデータのなかから、読み出し許可と設定された前記バックアップデータに含まれる前記データおよび前記アドレスを抽出する抽出手段と、
前記バックアップデータから抽出された前記データおよび前記アドレスごとに、当該データを当該アドレスが示す前記主記憶部上の記憶領域へ書込む第4の書込手段と、をさらに備えることを特徴とする請求項1または請求項2に記載の情報処理装置。 Commit means for setting the backup data newly written to the backup storage unit from the current time by the first writing means as read permission;
When it is instructed to rewrite the storage contents of the main storage unit, the backup data stored in the backup storage unit is read from the data and the address included in the backup data set as read permission. Extracting means for extracting;
And a fourth writing means for writing the data into the storage area on the main memory indicated by the address for each of the data and the address extracted from the backup data. The information processing apparatus according to claim 1 or 2.
前記履歴情報記憶手段は、読取られた前記データと、前記アドレスと、前記バックアップ記憶部に前記バックアップデータを格納したか否かを示すバックアップ済み情報とを対応付けて記憶し、
前記履歴情報検索手段は、前記書込みアクセスを検出した際に前記履歴情報記憶手段から前記書込み先のアドレスと一致するアドレスを検索し、
前記第1の書込手段は、前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶され、かつ、前記バックアップ済み情報が前記バックアップ記憶部に前記バックアップデータを書込んだ旨を示す場合は、前記バックアップデータを前記バックアップ記憶部に書込まないこと、を特徴とする請求項1乃至3のいずれか1項に記載の情報処理装置。 The reading means reads data stored in a storage area indicated by the address from the main storage unit when detecting a read access including a read destination address designating a read destination for the main storage unit;
The history information storage means stores the read data, the address, and backed up information indicating whether or not the backup data is stored in the backup storage unit in association with each other,
The history information search means searches for an address that matches the address of the write destination from the history information storage means when detecting the write access,
The first writing means indicates that the history information storage means stores an address that matches the address of the writing destination, and that the backed up information has written the backup data to the backup storage unit 4. The information processing apparatus according to claim 1, wherein the backup data is not written to the backup storage unit.
前記履歴情報検索手段は、前記履歴情報記憶手段から、前記フラグ情報が有効を示し、かつ、前記書込み先のアドレスと一致するアドレスを検索すること、を特徴とする請求項1乃至3のいずれか1項に記載の情報処理装置。 The history information storage means stores flag information indicating whether the storage area storing the address is valid in association with the address,
4. The history information searching means searches the history information storage means for an address that indicates that the flag information is valid and matches the address of the write destination. The information processing apparatus according to item 1.
前記履歴情報検索手段は、前記履歴情報記憶手段から、前記フラグ情報が有効を示し、かつ、前記書込み先のアドレスと一致するアドレスを検索すること、を特徴とする請求項5乃至7のいずれか1項に記載の情報処理装置。 The history information storage means stores flag information indicating whether or not the storage area storing the data and the address is valid in association with the data and the address;
8. The history information search means searches the history information storage means for an address indicating that the flag information is valid and coincides with the address of the write destination. 8. The information processing apparatus according to item 1.
プロセッサ部から送出された、前記主記憶部に対する書込み対象のデータと当該書込み対象のデータの書込み先を指定する書込み先のアドレスとを含む書込みアクセスを検出した場合に、前記アドレスによって指定される記憶領域に既に記憶されているデータを読取る読取ステップと、
前記読取ステップで読取られた前記データと、前記書込みアクセスに含まれる前記アドレスとを含むバックアップデータを生成する生成ステップと、
前記バックアップ記憶部に書込む前記バックアップデータに含まれる前記アドレスを記憶する履歴情報記憶手段に記憶されたアドレスのなかから、前記書込み先のアドレスと一致するアドレスを検索する履歴情報検索ステップと、
前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶されていない場合は、前記バックアップデータを前記バックアップ記憶部に書込む第1の書込ステップと、
前記バックアップデータを前記バックアップ記憶部に書込まれた場合に、前記履歴情報記憶手段に前記書込み先アドレスを書込む第2の書込ステップと、
第2の書込ステップによる書込みが終了した後、前記主記憶部の前記アドレスによって指定される記憶領域へ、前記書込み対象のデータを書込む第3の書込ステップと、
を特徴とするデータ復旧方法。 A data recovery method for an information processing apparatus comprising: a nonvolatile main storage unit; and a nonvolatile backup storage unit that stores a copy of data stored in the main storage unit,
A memory specified by the address when a write access including a data to be written to the main storage unit and a write destination address for designating a write destination of the data to be written sent from the processor unit is detected. A reading step of reading data already stored in the area;
Generating the backup data including the data read in the reading step and the address included in the write access;
A history information search step for searching for an address that matches the address of the write destination from among the addresses stored in the history information storage means for storing the address included in the backup data to be written to the backup storage unit;
A first writing step of writing the backup data to the backup storage unit when the history information storage means does not store an address that matches the address of the write destination;
A second writing step of writing the write destination address in the history information storage means when the backup data is written in the backup storage unit;
A third writing step of writing the data to be written into the storage area specified by the address of the main storage unit after the writing by the second writing step is completed;
A data recovery method characterized by.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008008187A JP2009169747A (en) | 2008-01-17 | 2008-01-17 | Information processor and data restoration method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008008187A JP2009169747A (en) | 2008-01-17 | 2008-01-17 | Information processor and data restoration method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009169747A true JP2009169747A (en) | 2009-07-30 |
Family
ID=40970828
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008008187A Pending JP2009169747A (en) | 2008-01-17 | 2008-01-17 | Information processor and data restoration method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009169747A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20150055884A (en) * | 2013-11-14 | 2015-05-22 | 삼성전자주식회사 | Data storage device including a nonvolatile memory device and an operating method thereof |
CN109471754A (en) * | 2018-10-31 | 2019-03-15 | 深信服科技股份有限公司 | Backup method, device, equipment and computer readable storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06266626A (en) * | 1993-03-15 | 1994-09-22 | Hitachi Ltd | Backup method for semiconductor auxiliary storage and non-volatile semiconductor auxiliary storage |
JPH09330303A (en) * | 1996-06-12 | 1997-12-22 | Toshiba Corp | Computer system and its fault recovering method |
JPH103434A (en) * | 1996-06-14 | 1998-01-06 | Nec Corp | Semiconductor disk device and its write system |
WO1999039347A1 (en) * | 1998-02-02 | 1999-08-05 | Hitachi, Ltd. | Automatic replacing method in reading and magnetic disc drive using the method |
JP2000148562A (en) * | 1998-11-18 | 2000-05-30 | Nec Eng Ltd | Data backup method, data backup device utilizing the method and computer readable recording medium recorded with data backup program |
JP2000222232A (en) * | 1999-01-28 | 2000-08-11 | Toshiba Corp | Electronic computer, and memory fault avoiding method for electronic computer |
JP2002116937A (en) * | 2000-10-06 | 2002-04-19 | Toshiba Corp | Newspaper production system |
JP2003216511A (en) * | 2002-01-23 | 2003-07-31 | Matsushita Electric Ind Co Ltd | Non-volatile memory device, data updating method, data updating program and computer readable recording medium with recorded program |
JP2006011589A (en) * | 2004-06-23 | 2006-01-12 | Sharp Corp | Mobile communication device and program for controlling the device |
JP2008009485A (en) * | 2006-06-27 | 2008-01-17 | Fujitsu Ltd | Virtual storage controller and virtual storage control program |
-
2008
- 2008-01-17 JP JP2008008187A patent/JP2009169747A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06266626A (en) * | 1993-03-15 | 1994-09-22 | Hitachi Ltd | Backup method for semiconductor auxiliary storage and non-volatile semiconductor auxiliary storage |
JPH09330303A (en) * | 1996-06-12 | 1997-12-22 | Toshiba Corp | Computer system and its fault recovering method |
JPH103434A (en) * | 1996-06-14 | 1998-01-06 | Nec Corp | Semiconductor disk device and its write system |
WO1999039347A1 (en) * | 1998-02-02 | 1999-08-05 | Hitachi, Ltd. | Automatic replacing method in reading and magnetic disc drive using the method |
JP2000148562A (en) * | 1998-11-18 | 2000-05-30 | Nec Eng Ltd | Data backup method, data backup device utilizing the method and computer readable recording medium recorded with data backup program |
JP2000222232A (en) * | 1999-01-28 | 2000-08-11 | Toshiba Corp | Electronic computer, and memory fault avoiding method for electronic computer |
JP2002116937A (en) * | 2000-10-06 | 2002-04-19 | Toshiba Corp | Newspaper production system |
JP2003216511A (en) * | 2002-01-23 | 2003-07-31 | Matsushita Electric Ind Co Ltd | Non-volatile memory device, data updating method, data updating program and computer readable recording medium with recorded program |
JP2006011589A (en) * | 2004-06-23 | 2006-01-12 | Sharp Corp | Mobile communication device and program for controlling the device |
JP2008009485A (en) * | 2006-06-27 | 2008-01-17 | Fujitsu Ltd | Virtual storage controller and virtual storage control program |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20150055884A (en) * | 2013-11-14 | 2015-05-22 | 삼성전자주식회사 | Data storage device including a nonvolatile memory device and an operating method thereof |
KR102135702B1 (en) * | 2013-11-14 | 2020-07-20 | 삼성전자주식회사 | Data storage device including a nonvolatile memory device and an operating method thereof |
CN109471754A (en) * | 2018-10-31 | 2019-03-15 | 深信服科技股份有限公司 | Backup method, device, equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5224800B2 (en) | Information processing apparatus and data recovery method | |
US7971014B2 (en) | Information processing apparatus and data recovering method | |
KR101870521B1 (en) | Methods and systems for improving storage journaling | |
JP5202130B2 (en) | Cache memory, computer system, and memory access method | |
CN101901189B (en) | User data updating method and method for recovering user data | |
CN105164657A (en) | Selective backup of program data to non-volatile memory | |
TW201017405A (en) | Improved hybrid drive | |
US20150074336A1 (en) | Memory system, controller and method of controlling memory system | |
JP6034183B2 (en) | Semiconductor memory device | |
KR20130030237A (en) | Handling unclean shutdowns for a system having non-volatile memory | |
CN109284066B (en) | Data processing method, device, equipment and system | |
CN101615162A (en) | Memory Management Unit, image forming apparatus, storage management method and program | |
US10101933B2 (en) | Controller and memory system | |
JP4908481B2 (en) | Data storage device and in-casing replication method | |
US20100115004A1 (en) | Backup system that stores boot data file of embedded system in different strorage sections and method thereof | |
JP2009169747A (en) | Information processor and data restoration method | |
CN106909514B (en) | Method and device for positioning snapshot disk address | |
JP2008262390A (en) | Program | |
CN105453057A (en) | Storing difference information in a backup system | |
Kang et al. | Per-block-group journaling for improving fsync response time | |
JP2007310548A (en) | Disk array device and data management method | |
JP5161600B2 (en) | Information processing apparatus and data recovery method | |
WO2015174062A1 (en) | Information-processing device, information-processing method, and program-recording medium | |
KR20210051803A (en) | Memory system and controller | |
JP2004062851A (en) | Storage system for directly and redundantly writable nonvolatile memory without needing use of redundant field, and writing method therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101014 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120821 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121010 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20121120 |