JP2009169747A - Information processor and data restoration method - Google Patents

Information processor and data restoration method Download PDF

Info

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
Application number
JP2008008187A
Other languages
Japanese (ja)
Inventor
Kenichiro Yoshii
謙一郎 吉井
Hiroshi Yao
浩 矢尾
Tomohide Jokan
友秀 城勘
Tatsunori Kanai
達徳 金井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008008187A priority Critical patent/JP2009169747A/en
Publication of JP2009169747A publication Critical patent/JP2009169747A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To restore the state of data stored in a nonvolatile main storage part when power supply is restored, and perform backup with a reduced backup area. <P>SOLUTION: A backup part 110 reads, upon detection of a writing address, original data from a nonvolatile main storage part 120 to generate backup data, stores an address contained in the backup data to a history table 118, writes the backup data to a nonvolatile backup memory 130 if an address matched to a writing destination address is not stored in the history table 118, writes the writing destination address to the history table 118 when the backup data is written to the backup storage part, and writes data of the writing object to a storage area designated by the writing destination address in the nonvolatile main storage part 120 after the writing of the history table 118 is completed. <P>COPYRIGHT: (C)2009,JPO&INPIT

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).

特開2005−107573号公報JP-A-2005-107573

しかしながら、上記特許文献1に記載された技術では、不意の電源断後の電源が復旧した時に、プロセッサの状態のような揮発性のシステム状態を復元できるようにするために、不意の電源断後にシステム状態を不揮発性メモリ(以下、不揮発性主記憶部という)に格納する間の電源を確保する必要がある。そのため、別途キャパシタ等の電池が必要である。すなわち、不揮発性主記憶部に記憶されたシステム状態を保持するための電池は必要としないが、不意の電源断時にシステム状態を記憶するための電池が必要である。一般にコンピュータが書込み処理を完結するために備える電池は、二次電池であることが多く、頻繁な電源断が生じた場合に十分な電力を供給できない可能性がある。   However, in the technique described in the above-mentioned Patent Document 1, in order to be able to restore the volatile system state such as the state of the processor when the power after the unexpected power failure is restored, after the unexpected power failure, It is necessary to secure a power source while storing the system state in a nonvolatile memory (hereinafter referred to as a nonvolatile main storage unit). Therefore, a battery such as a capacitor is required separately. That is, a battery for holding the system state stored in the nonvolatile main storage unit is not required, but a battery for storing the system state when the power is suddenly turned off is required. In general, a battery provided for a computer to complete the writing process is often a secondary battery, and there is a possibility that sufficient power cannot be supplied when frequent power interruption occurs.

また、上記特許文献1に記載された技術では、不揮発性主記憶部の内容を含むシステムの状態を電源断以前の特定の時点の状態に戻すために、処理のログを取っている。しかし、組込み装置のような限られた資源しか使用できない装置では、物理的な制約等により、ログを書込む領域として少量のメモリしか使用できない場合がある。このような場合、少量のログ領域からログデータが溢れてしまうと、以前のどの状態も復元できなくなってしまい、システム全体として処理を継続することができなくなるという問題があった。   Further, in the technique described in Patent Document 1, a process log is taken in order to return the state of the system including the contents of the nonvolatile main storage unit to a state at a specific time before the power is turned off. However, a device that can use only limited resources such as an embedded device may be able to use only a small amount of memory as an area for writing a log due to physical restrictions. In such a case, if log data overflows from a small amount of log area, it is impossible to restore any previous state, and the system as a whole cannot continue processing.

本発明は、上記に鑑みてなされたものであって、不揮発性主記憶部を備えた情報処理装置において、電池のような追加の電源を用いることなく、不意の電源断が起きた場合でも、その後の電源復旧時に不揮発性主記憶部に格納されたデータの状態を復元し、かつ、少ないバックアップ領域でバックアップができる情報処理装置およびデータ復旧方法を提供することを目的とする。   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 backup unit 110, a nonvolatile main storage unit 120, a nonvolatile backup memory 130, a commit unit 140, a rollback unit 150, a processor unit 160, control software 170, And a bus 180. Further, the PC 100 is supplied with power from the power source 200 via the power line 10.

不揮発性主記憶部120は、MRAMやFeRAM等の不揮発性メモリである。不揮発性主記憶部120には、プロセッサ部160上で動作するソフトウェアのプログラムやそのソフトウェアが使用するデータが格納される。なお、プロセッサ部160は、不揮発性主記憶部120へ書込みを行う際に、書込みアクセスを主記憶アクセス制御部111へ送出する。主記憶アクセス制御部111は、プロセッサ部160から受信した書込みアクセスに応じて、不揮発性主記憶部120への書込みを行う。ここで、書込みアクセスとは、プロセッサ部160が不揮発性主記憶部120へ書込むデータと、そのデータの書込み先を指定する不揮発性主記憶部120のアドレス(以下、書込み先アドレスという)とを含む情報である。   The nonvolatile main storage unit 120 is a nonvolatile memory such as MRAM or FeRAM. The nonvolatile main storage unit 120 stores a software program operating on the processor unit 160 and data used by the software. The processor unit 160 sends a write access to the main memory access control unit 111 when writing to the nonvolatile main memory unit 120. The main memory access control unit 111 performs writing to the nonvolatile main storage unit 120 in accordance with the write access received from the processor unit 160. Here, the write access refers to the data that the processor unit 160 writes to the nonvolatile main storage unit 120 and the address of the nonvolatile main storage unit 120 that specifies the write destination of the data (hereinafter referred to as the write destination address). It is information to include.

不揮発性バックアップメモリ130は、不揮発性主記憶部120と同様に不揮発性メモリである。不揮発性バックアップメモリ130は、バックアップデータを記録する。ここで、バックアップデータとは、不揮発性主記憶部120への書込みアクセスを検出した際に、書込みアクセスに含まれる書込み先アドレスが示す不揮発性記憶部120の記憶領域に既に格納されているデータを複製したデータであり、具体的には、不揮発性記憶部120へのデータの復旧を可能にするために少なくとも不揮発性主記憶部120において更新されるデータのアドレスである書込み先アドレスと、そのアドレスに格納されていた更新前のデータ(以下、元データという)を含む。   The non-volatile backup memory 130 is a non-volatile memory like the non-volatile main storage unit 120. The non-volatile backup memory 130 records backup data. Here, the backup data refers to data already stored in the storage area of the nonvolatile storage unit 120 indicated by the write destination address included in the write access when the write access to the nonvolatile main storage unit 120 is detected. A write destination address that is replicated data, specifically, an address of data that is updated at least in the nonvolatile main storage unit 120 to enable recovery of the data to the nonvolatile storage unit 120, and the address Data before update (hereinafter referred to as original data) stored in the.

バックアップ部110は、不揮発性主記憶部120への書込み時にバックアップデータを作成して不揮発性バックアップメモリ130に書込む。具体的には、不揮発性主記憶部120へのアクセスを監視して、不揮発性主記憶部120への書込みアクセスを検出した場合に、書込みアクセスに含まれた書込み先アドレスによって指定される記憶領域に既に記憶されている元データを不揮発性主記憶部120から読み出す。次に、バックアップ部110は、書込みアクセスに含まれた書込み先アドレスと元データからバックアップデータを生成し、不揮発性バックアップメモリ130に書込む。その後、バックアップ部110は、書込みアクセスで不揮発性主記憶部120への書込みを指示されたデータを実際に不揮発性主記憶部120の書込み先アドレスによって指定された記憶領域に書き込む。   The backup unit 110 creates backup data at the time of writing to the nonvolatile main storage unit 120 and writes the backup data to the nonvolatile backup memory 130. Specifically, when the access to the nonvolatile main storage unit 120 is monitored and the write access to the nonvolatile main storage unit 120 is detected, the storage area specified by the write destination address included in the write access The original data already stored in the non-volatile main storage unit 120 is read out. Next, the backup unit 110 generates backup data from the write destination address and the original data included in the write access, and writes the backup data in the nonvolatile backup memory 130. Thereafter, the backup unit 110 actually writes the data instructed to write to the nonvolatile main storage unit 120 by the write access to the storage area designated by the write destination address of the nonvolatile main storage unit 120.

バックアップ部110は、さらに主記憶アクセス制御部111と、バックアップ制御部112と、バックアップメモリアクセス制御部113と、バックアップデータ生成部114と、バックアップメモリ先頭アドレス保持部115と、書込ポインタ保持部116と、履歴テーブル管理部117と、履歴テーブル118とを備えている。   The backup unit 110 further includes a main memory access control unit 111, a backup control unit 112, a backup memory access control unit 113, a backup data generation unit 114, a backup memory start address holding unit 115, and a write pointer holding unit 116. A history table management unit 117, and a history table 118.

主記憶アクセス制御部111は、バス180を介して受信した不揮発性主記憶部120への読み書きアクセスに応じ、不揮発性主記憶部120に格納されたデータを読み出し、不揮発性主記憶部120にデータを書込む。ただし、主記憶アクセス制御部111は、バス180を介した不揮発性主記憶部120への書込みアクセスが検出された場合に、すぐに不揮発性主記憶部120にデータを書込まず、一旦バックアップ制御部112に書込み先アドレスを送出する。   The main memory access control unit 111 reads data stored in the non-volatile main storage unit 120 in response to read / write access to the non-volatile main storage unit 120 received via the bus 180, and stores data in the non-volatile main storage unit 120. Write. However, when a write access to the nonvolatile main storage unit 120 via the bus 180 is detected, the main memory access control unit 111 does not immediately write data to the nonvolatile main storage unit 120, but temporarily performs backup control. The write destination address is sent to the unit 112.

また、主記憶アクセス制御部111は、バックアップ制御部112からの不揮発性主記憶部120へのアクセスに応じ、不揮発性主記憶部120に格納されたデータを読み書きする。主記憶アクセス制御部111は、バス180を介した不揮発性バックアップメモリ130へのアクセスをバックアップ制御部112に送出する。また、主記憶アクセス制御部111は、書込ポインタ保持部116へのアクセスをバックアップ制御部112に送出する。なお、主記憶アクセス制御部111は、特許請求の範囲に記載した読取手段および第3の書込手段に対応する。   Further, the main memory access control unit 111 reads / writes data stored in the nonvolatile main storage unit 120 in response to access from the backup control unit 112 to the nonvolatile main storage unit 120. The main memory access control unit 111 sends access to the non-volatile backup memory 130 via the bus 180 to the backup control unit 112. Further, the main memory access control unit 111 sends access to the write pointer holding unit 116 to the backup control unit 112. The main memory access control unit 111 corresponds to the reading unit and the third writing unit described in the claims.

バックアップ制御部112は、主記憶アクセス制御部111から不揮発性主記憶部120へのアクセスを受信した場合、データをバックアップするために、主記憶アクセス制御部111を経由して不揮発性主記憶部120から書込み先アドレスが示す記憶領域に格納されているデータを読み出す。また、バックアップ制御部112は、バックアップデータ生成部114に書込み先アドレスおよび不揮発性主記憶部120から読み出したデータを送出する。   When the backup control unit 112 receives an access from the main memory access control unit 111 to the non-volatile main storage unit 120, the backup control unit 112 passes the main memory access control unit 111 to back up the data. To read data stored in the storage area indicated by the write destination address. In addition, the backup control unit 112 sends the data read from the write destination address and the nonvolatile main storage unit 120 to the backup data generation unit 114.

また、バックアップ制御部112は、バックアップメモリアクセス制御部113を経由して不揮発性バックアップメモリ130に格納されたデータを読み書きする。また、バックアップ制御部112は、書込ポインタ保持部116に格納された書込ポインタおよびバックアップメモリ先頭アドレス保持部115に格納されたバックアップメモリ先頭アドレスを読み書きする。なお、バックアップ制御部112は、特許請求の範囲に記載した第1の書込手段および第2の書込手段に対応する。   The backup control unit 112 reads and writes data stored in the nonvolatile backup memory 130 via the backup memory access control unit 113. Further, the backup control unit 112 reads and writes the write pointer stored in the write pointer holding unit 116 and the backup memory start address stored in the backup memory start address holding unit 115. The backup control unit 112 corresponds to the first writing unit and the second writing unit described in the claims.

バックアップメモリアクセス制御部113は、バックアップ制御部112からのアクセスに応じて不揮発性バックアップメモリ130に格納されたデータを読み書きする。   The backup memory access control unit 113 reads / writes data stored in the non-volatile backup memory 130 in response to an access from the backup control unit 112.

バックアップデータ生成部114は、バックアップ制御部112から送信された不揮発性主記憶部120の書込み先アドレスおよび不揮発性主記憶部120の書込み先アドレスが示す記憶領域から読み出した元データからバックアップデータを生成する。   The backup data generation unit 114 generates backup data from the write destination address of the nonvolatile main storage unit 120 and the original data read from the storage area indicated by the write destination address of the nonvolatile main storage unit 120 transmitted from the backup control unit 112 To do.

バックアップメモリ先頭アドレス保持部115は、不揮発性バックアップメモリ130の先頭アドレスを保持する。バックアップメモリ先頭アドレス保持部115は、バックアップ制御部112からの要求に応じてその内容を更新する、またはその内容をバックアップ制御部112に送出する。   The backup memory head address holding unit 115 holds the head address of the nonvolatile backup memory 130. The backup memory head address holding unit 115 updates the content in response to a request from the backup control unit 112 or sends the content to the backup control unit 112.

書込ポインタ保持部116は、書込ポインタを保持する。ここで、書込ポインタとは、バックアップデータを書込む不揮発性バックアップメモリ130上のアドレスである。書込ポインタ保持部116は、バックアップ制御部112からの要求に応じてその内容を更新し、またはその内容をバックアップ制御部112に送出する。   The write pointer holding unit 116 holds a write pointer. Here, the write pointer is an address on the non-volatile backup memory 130 into which backup data is written. The write pointer holding unit 116 updates the content in response to a request from the backup control unit 112 or sends the content to the backup control unit 112.

履歴テーブル管理部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 main storage unit 120 that has already been backed up in the history table 118. Second, it instructs to search the history table 118 for the address of the nonvolatile main storage unit 120 to be backed up. The third is an instruction to clear the history table 118.

履歴テーブル118は、不揮発性バックアップメモリ130にバックアップした不揮発性主記憶部120のアドレスを記憶しておく記憶領域である。履歴テーブル118は、履歴テーブル管理部117によってアクセスをされ、管理される。   The history table 118 is a storage area for storing the address of the nonvolatile main storage unit 120 backed up in the nonvolatile backup memory 130. The history table 118 is accessed and managed by the history table management unit 117.

ここで、さらに履歴テーブル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 main storage unit 120 that have already been backed up are stored. When the history table 118 has a simple table format as shown in FIG. 2, the registration process to the history table 118 can be realized by writing an address in the empty history entry 21. The search for the backed-up address in the history table 118 can be realized by comparing whether or not the search target address is registered in the history entry 21 in the history table 118, that is, by comparing the addresses. Further, clearing of the history table 118 can be realized, for example, by storing an illegal address as the address of the nonvolatile main storage unit 120 in all the history entries 21 so that they do not coincide at the time of retrieval.

また、バックアップ部110は、バックアップ処理そのものを行うか否かのスイッチを備え、不揮発性主記憶部120への書込みに対するバックアップ処理全体を有効にしたり無効にしたりする機能もあわせ持つ。なお、不揮発性主記憶部120に対する書込みアクセスを検出した場合にバックアップ処理を行うか否かを示すこのスイッチは、物理的なスイッチでも、メモリ上に保持した情報であってもよい。   In addition, the backup unit 110 includes a switch for determining whether or not to perform the backup process itself, and also has a function of enabling or disabling the entire backup process for writing to the nonvolatile main storage unit 120. It should be noted that this switch indicating whether or not to perform backup processing when a write access to the nonvolatile main storage unit 120 is detected may be a physical switch or information held in a memory.

コミット部140は、コミット処理を行う。コミット処理とは、突然の電源断を経て電源が復旧した場合であって、不揮発性主記憶部120の状態を復元する必要が生じた場合に、復元目標となる不揮発性主記憶部120の状態(以下、チェックポイントという)を作成する一連の処理のことである。具体的には、コミット部140が、コミット処理が指示された時点からバックアップ部110によって新たに不揮発性バックアップメモリ130に記憶されたバックアップデータを、不揮発性主記憶部120の記憶内容を書戻す際に用いるバックアップデータとして、読み出し許可と設定することにより実現する。なお、コミット処理の詳細は、不揮発性バックアップメモリ130のデータの使用方法(スタックかリングバッファか等)に依存する。   The commit unit 140 performs a commit process. The commit process is a case where the power is restored after a sudden power interruption, and when the state of the nonvolatile main storage unit 120 needs to be restored, the state of the nonvolatile main storage unit 120 which is a restoration target It is a series of processes for creating (hereinafter referred to as a checkpoint). Specifically, when the commit unit 140 rewrites the backup data newly stored in the non-volatile backup memory 130 by the backup unit 110 from the time when the commit process is instructed, the storage content of the non-volatile main storage unit 120 is rewritten. This is realized by setting the read permission as the backup data used for. Note that the details of the commit process depend on the method of using data in the nonvolatile backup memory 130 (stack or ring buffer, etc.).

ロールバック部150は、不揮発性バックアップメモリ130に格納されているバックアップデータから不揮発性主記憶部120の内容を復元するために必要な、読み出し許可と設定されたバックアップデータを読み出し、読み出されたバックアップデータから抽出した不揮発性主記憶部120の書込み先アドレスに示された記憶領域に、バックアップデータから抽出した元データを書戻す。この処理により、不揮発性主記憶部120を一番最近に作成したチェックポイントの状態を復元する。なお、バックアップ制御部112は、特許請求の範囲に記載した抽出手段および第4の書込手段に対応する。   The rollback unit 150 has read and read the backup data set as read permission necessary for restoring the contents of the nonvolatile main storage unit 120 from the backup data stored in the nonvolatile backup memory 130. The original data extracted from the backup data is written back to the storage area indicated by the write destination address of the nonvolatile main storage unit 120 extracted from the backup data. By this processing, the state of the checkpoint that was most recently created in the nonvolatile main storage unit 120 is restored. The backup control unit 112 corresponds to the extraction unit and the fourth writing unit described in the claims.

ロールバック部150が正しい復元処理を行うためには、不揮発性バックアップメモリ130に格納されている1または複数のバックアップデータのなかから、不揮発性主記憶部120の状態を最新のチェックポイントの状態に復元するために必要なバックアップデータを読み出すことができることが重要である。つまり、不揮発性バックアップメモリ130は、不揮発性主記憶部120の状態を最新のチェックポイントの状態に復元するために必要なバックアップデータを管理する必要がある。したがって、コミット処理では、不揮発性バックアップメモリ130が管理対象としている復元処理に必要な1または複数のバックアップデータとして、当該コミット処理以前に管理していたバックアップデータから、新たに不揮発性バックアップメモリ130に記憶するバックアップデータに、読み出し許可を設定する処理を行う。   In order for the rollback unit 150 to perform correct restoration processing, the state of the nonvolatile main storage unit 120 is changed to the latest checkpoint state from one or a plurality of backup data stored in the nonvolatile backup memory 130. It is important that the backup data necessary for restoration can be read out. That is, the nonvolatile backup memory 130 needs to manage backup data necessary for restoring the state of the nonvolatile main storage unit 120 to the latest checkpoint state. Therefore, in the commit process, as one or a plurality of backup data necessary for the restoration process that is managed by the nonvolatile backup memory 130, the backup data managed before the commit process is newly transferred to the nonvolatile backup memory 130. A process for setting read permission to the backup data to be stored is performed.

ここで、あるコミット処理から次のコミット処理までに不揮発性バックアップメモリ130に記録され管理の対象となる一連のバックアップデータのことをシーケンスと呼ぶ。また、最後のコミット処理以降に不揮発性バックアップメモリ130に記録された一連のバックアップデータを、最新シーケンスという。つまり、ある時点で不揮発性バックアップメモリ130が管理しているシーケンスが最新シーケンスであり、最新シーケンスとして新たに不揮発性バックアップメモリ130に記憶するバックアップデータを読み出し許可と設定する処理とは、具体的に言えば、最新シーケンスの切替え処理である。   Here, a series of backup data recorded in the nonvolatile backup memory 130 from one commit process to the next commit process and to be managed is called a sequence. A series of backup data recorded in the nonvolatile backup memory 130 after the last commit process is referred to as the latest sequence. That is, the sequence managed by the nonvolatile backup memory 130 at a certain point in time is the latest sequence, and the process of setting the backup data newly stored in the nonvolatile backup memory 130 as the latest sequence as read permission is specifically In other words, it is the latest sequence switching process.

プロセッサ部160は、制御ソフトウェア170を動作させる。制御ソフトウェア170は、通常の処理においては不揮発性主記憶部120のデータを操作してシステム固有の機能を提供する。また、制御ソフトウェア170は、適切なタイミング(例えば、一定時間ごとに)でコミット部140に要求を出し、不揮発性主記憶部120のチェックポイントを作成する。制御ソフトウェア170は、電源復帰時にはロールバック部150に要求を出し、最新のチェックポイントまで不揮発性主記憶部120の状態を戻す処理を行う。   The processor unit 160 causes the control software 170 to operate. In normal processing, the control software 170 operates the data in the nonvolatile main storage unit 120 to provide a system-specific function. In addition, the control software 170 issues a request to the commit unit 140 at an appropriate timing (for example, at regular intervals), and creates a checkpoint for the nonvolatile main storage unit 120. The control software 170 issues a request to the rollback unit 150 when power is restored, and performs processing to return the state of the nonvolatile main storage unit 120 to the latest checkpoint.

バス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 unit 140, the rollback unit 150, the processor unit 160, and the backup unit 110. The nonvolatile main storage unit 120 is not directly connected to the bus 180 but is connected to the bus 180 via the backup unit 110. Thereby, since all accesses to the nonvolatile main storage unit 120 are via the backup unit 110, the backup unit 110 can perform backup processing according to the access to the nonvolatile main storage unit 120. Note that the arrangement position of the backup unit 110 is not limited to the position between the bus 180 and the nonvolatile main storage unit 120, and can be received before the nonvolatile main storage unit 120 receives access to the nonvolatile main storage unit 120. As long as it is, it may be arranged at any position. In addition to the nonvolatile main storage unit 120, a nonvolatile backup memory 130 is connected to the backup unit 110.

次に、以上のように構成されているPC100のバックアップ部110によるバックアップ処理、コミット部140によるコミット処理およびロールバック部150によるロールバック処理について説明する。   Next, backup processing by the backup unit 110 of the PC 100 configured as described above, commit processing by the commit unit 140, and rollback processing by the rollback unit 150 will be described.

図3−1、図3−2は、バックアップ部110が行うバックアップ処理手順を示すフローチャートである。なお、バックアップ部110は、バス180からのアクセスを受け取って動作する。   FIGS. 3A and 3B are flowcharts illustrating the backup processing procedure performed by the backup unit 110. The backup unit 110 operates by receiving an access from the bus 180.

まず、主記憶アクセス制御部111は、バス180からのアクセスを検出する(ステップS301)。主記憶アクセス制御部111は、検出したアクセスが不揮発性主記憶部120への読出しアクセスであるか否かを判断する(ステップS302)。具体的には、アクセスに含まれる命令から不揮発性主記憶部120への読出しアクセスであるか否かを判断する。なお、読出しアクセスに限らず、書込みアクセス等の他のアクセスについても同様に、アクセスに含まれる命令からアクセスの種類やアクセスする記憶媒体を判断する。   First, the main memory access control unit 111 detects an access from the bus 180 (step S301). The main memory access control unit 111 determines whether or not the detected access is a read access to the nonvolatile main storage unit 120 (step S302). Specifically, it is determined whether or not it is a read access to the nonvolatile main storage unit 120 from an instruction included in the access. In addition, not only for read access but also for other accesses such as write access, the type of access and the storage medium to be accessed are determined from the instructions included in the access.

検出したアクセスが不揮発性主記憶部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 access control unit 111 reads data from the nonvolatile main storage unit 120 (step S303), The read data is returned to the bus 180.

検出したアクセスが不揮発性主記憶部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 access control unit 111 sends the access to the backup control unit 112, and the backup control unit 112 accesses Is received (step S304). The backup control unit 112 determines whether the received access is a write access to the nonvolatile main storage unit 120 (step S305).

受け取ったアクセスが不揮発性主記憶部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 nonvolatile backup memory 130.

すなわち、このような処理を行うことにより、同一シーケンス内において同一アドレスに対する複数のバックアップデータを書くことがなくなり、少ない容量のバックアップメモリで同じ機能を実現することができる。さらに、バックアップデータの書込み処理自体の回数を削減できるので、バックアップ処理による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 access control unit 111, and the main storage access control unit 111 reads the original data stored in the storage area indicated by the write destination address from the nonvolatile main storage unit 120 (step S310). Next, the backup unit 110 sends the write destination address and the original data to the backup data generation unit 140, and the backup data generation unit 140 generates backup data from the received write destination address and the original data (step S311).

バックアップ制御部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 nonvolatile backup memory 130 into which the generated backup data is written from the write pointer holding unit 116 (step S312). The backup memory access control unit 113 writes the backup data in the storage area indicated by the read address on the nonvolatile backup memory 130 (step S313). The backup control unit 112 updates the value of the pointer held in the write pointer holding unit 116 (step S314). The backup control unit 112 sends the write destination address to the history table management unit 117 and instructs recording (step S315). The history table management unit 117 determines a storage area (history entry) in the history table 118 according to the structure of the managed history table and records the write destination address (step S316). The main memory access control unit 111 writes data in the storage area indicated by the write destination address of the nonvolatile main storage unit 120 (step S317).

ステップ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 nonvolatile backup memory 130 or not. Judgment is made (step S318). If it is determined that the access is to the nonvolatile backup memory 130 (step S318: Yes), the backup memory access control unit 113 reads data from the nonvolatile backup memory 130 or writes data to the nonvolatile backup memory 130. (Step S319).

不揮発性バックアップメモリ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 unit 140. The commit unit 140 is activated in response to an instruction for commit processing for the backup unit 110 from the control software 170 or the rollback unit 150 operating on the processor unit 160.

まず、バックアップ制御部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 unit 140 switches the latest sequence on the nonvolatile backup memory 130 (step S403). By this commit process, the state of the nonvolatile main storage unit 120 at this point becomes a new check point of the nonvolatile main storage unit 120. The details of the commit process depend on the configuration of the backup unit 110 and the format of the backup data. For example, when the data structure of the non-volatile backup memory 130 is a stack, switching of the latest sequence is realized by storing the value held in the backup memory head address holding unit 115 in the write pointer holding unit 116.

次に、ロールバック処理について説明する。図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 rollback unit 150. The rollback unit 150 is activated by an instruction from the control software 170 operating on the processor unit 160.

まず、ロールバック部150は、バックアップ部110にバックアップ処理を無効にする要求を送出する(ステップS501)。バックアップ部110は、バックアップ処理を無効にする(ステップS502)。これは、不揮発性主記憶部120にバックアップデータを書戻す際に、不意の電源断で不定となっている不揮発性主記憶部120のデータを不揮発性バックアップメモリ130にバックアップデータとして格納しないようにするためである。   First, the rollback unit 150 sends a request to invalidate the backup process to the backup unit 110 (step S501). The backup unit 110 invalidates the backup process (step S502). This is so that when the backup data is written back to the non-volatile main storage unit 120, the data of the non-volatile main storage unit 120 that is indefinite due to an unexpected power interruption is not stored in the non-volatile backup memory 130 as backup data. It is to do.

次に、ロールバック部150は、ロールバック処理に必要な一連のバックアップデータである最新シーケンスを特定する(ステップS503)。なお、最新シーケンスの特定方法はバックアップ部110の構成とバックアップデータの形式に依存する。ロールバック部150は、読み出された最新シーケンス内の最新バックアップデータをEに格納する(ステップS504)。ロールバック部150は、Eが空であるか否かを判断する(ステップS505)。   Next, the rollback unit 150 identifies the latest sequence, which is a series of backup data necessary for the rollback process (step S503). Note that the latest sequence identification method depends on the configuration of the backup unit 110 and the format of the backup data. The rollback unit 150 stores the latest backup data in the read latest sequence in E (step S504). The rollback unit 150 determines whether E is empty (step S505).

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 rollback unit 150 sends an E read request to the backup unit 110 (step S506). The backup unit 110 reads the backup data E from the nonvolatile backup memory 130 (step S507). The rollback unit 150 sends to the backup unit 110 a request to write back the original data also included in E to the storage area indicated by the write destination address of the nonvolatile main memory 120 included in E (step S508). The backup unit 110 writes the original data to the designated address in the nonvolatile main storage unit 120 (step S509). The rollback unit 150 stores the next backup data in the latest sequence in E (step S510). As a result, the backup data can be read out in the reverse order of the times recorded in the latest sequence, that is, in the newly stored order. Returning to step S505, this process is repeated for all backup data in the latest sequence.

ステップ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 rollback unit 150 sends a request to enable backup processing to the backup unit 110 (step S511). The backup unit 110 validates the backup process (step S512). The rollback unit 150 sends a commit request to the commit unit 140 (step S513). The commit unit 140 performs a commit process (step S514). Thereby, a checkpoint at the time when the rollback process is completed is generated.

バックアップ処理において履歴テーブル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 main storage unit 120 must be read once for every writing to the nonvolatile main storage unit 120. Even if it is assumed that a non-volatile memory element having the same performance is used for the non-volatile backup memory 130 and the non-volatile main storage unit 120, it is considered that the writing process to the non-volatile main storage unit 120 takes twice as long. A decrease in the processing performance of the PC 100 is expected.

また、プロセッサ部160上で動作する制御ソフトウェア170には、時間的に近接していれば同一もしくは近接した記憶領域をアクセスする特徴があり(時間的局所性および空間的局所性と呼ばれる)、短い時間に主記憶部の同一または周辺のアドレスに対して書込みを含むアクセスをすることが多いことが知られている。   In addition, the control software 170 operating on the processor unit 160 has a feature of accessing the same or close storage areas if they are close in time (called temporal locality and spatial locality), and is short. It is known that access including writing is often made to the same or peripheral addresses of the main memory unit in time.

したがって、本実施の形態のように、バックアップした不揮発性主記憶部120のアドレスを履歴テーブル118に記録してバックアップ時にチェックすることで、不揮発性主記憶部120の同一アドレスのデータをバックアップすることを防ぐことができるため、PC100の性能低下を防止することができ、また不揮発性バックアップメモリ130の使用量を削減することができる。また、より少量の不揮発性バックアップメモリ130でPC100を構成することができる。   Therefore, as in the present embodiment, the data of the same address in the nonvolatile main storage unit 120 is backed up by recording the address of the backed up nonvolatile main storage unit 120 in the history table 118 and checking at the time of backup. Therefore, it is possible to prevent the performance of the PC 100 from being deteriorated and to reduce the amount of use of the nonvolatile backup memory 130. Further, the PC 100 can be configured with a smaller amount of the non-volatile backup memory 130.

次に、上述した構成とは異なる履歴テーブルの構成の例について説明する。図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 history entry 21 and the valid bit 22 in association with each other. When the history table 118 shown in FIG. 6 is used, when the write destination address included in the detected write access to the nonvolatile main storage unit 120 is already backed up, the value of the valid bit 22 is used. It can be determined by whether or not the corresponding history entry 21 is used. Also, the process of clearing the history table 118 can be realized by clearing only the valid bit 22.

また、他の構成例として、ハッシュを使った履歴テーブルの構成の例について説明する。図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 value calculation unit 31 and a selector 32. When registering the backup destination address in the history table 118, the hash value calculation unit 31 calculates the index 23 using the write destination address as an input, and the history entry 21 indicated by the calculated index 23 in the history table 118. The write destination address is stored in.

また、履歴テーブル118から書込み先アドレスを検索する際には、ハッシュ値計算部31は、検索する書込み先アドレスを入力としてインデックス23を算出し、履歴テーブル118における算出されたインデックス23で示される履歴エントリ21に記憶されている書込み先アドレスが、検索しているアドレスと一致するか否かをチェックする。一致すれば検索成功、一致しなければ検索失敗である。最後に、履歴テーブル118をクリアする処理は、単純な表形式の場合と同じである。なお、有効ビットを備えれば、有効ビットをクリアすることにより、履歴テーブル118をクリアすることができる。   Further, when searching for the write destination address from the history table 118, the hash value calculation unit 31 calculates the index 23 with the write destination address to be searched as an input, and the history indicated by the calculated index 23 in the history table 118. It is checked whether or not the write destination address stored in the entry 21 matches the address being searched. If they match, the search is successful, and if they do not match, the search fails. Finally, the process of clearing the history table 118 is the same as in the case of a simple table format. If a valid bit is provided, the history table 118 can be cleared by clearing the valid bit.

なお、ハッシュ値計算部31は、例えば図7に示すように履歴テーブル118が備える履歴エントリ21の数がN個だった場合、書込み先アドレスをNで割った余りを出力のハッシュ値とすることなどが考えられる。しかし、ハッシュ値としての性質を満たせばよく、特定の計算方法には依存しない。   For example, when the number of history entries 21 included in the history table 118 is N as illustrated in FIG. 7, the hash value calculation unit 31 sets the remainder obtained by dividing the write destination address by N as the output hash value. And so on. However, it only needs to satisfy the properties as a hash value and does not depend on a specific calculation method.

(第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 main storage unit 120, the read data, the valid bit, and the backed up flag in association with each other.

履歴テーブル管理部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 main storage unit 120 that has read the data in the history table 118. The history table management unit 117 searches the history table 118 for the address of the nonvolatile main storage unit 120 to be backed up. The history table management unit 117 clears the history table 118. In the present embodiment, unlike the first embodiment described above, in addition to the address of the backed-up nonvolatile main storage unit 120, the read data of the nonvolatile main storage unit 120 is also recorded.

図9−1、図9−2は、バックアップ部110が行うバックアップ処理手順を示すフローチャートである。なお、バックアップ部110は、バス180からのアクセスを受け取って動作する。また、本実施の形態で行う履歴テーブル118にデータを登録する処理、および履歴テーブル118からデータを検索する処理は、第1の実施の形態と処理内容や処理位置が異なる。   9A and 9B are flowcharts illustrating the backup processing procedure performed by the backup unit 110. The backup unit 110 operates by receiving an access from the bus 180. The processing for registering data in the history table 118 and the processing for searching for data from the history table 118 performed in the present embodiment are different from the first embodiment in processing content and processing position.

まず、主記憶アクセス制御部111は、バス180からのアクセスを検出する(ステップS901)。主記憶アクセス制御部111は、検出したアクセスが不揮発性主記憶部120への読出しアクセスであるか否かを判断する(ステップS902)。   First, the main memory access control unit 111 detects an access from the bus 180 (step S901). The main memory access control unit 111 determines whether or not the detected access is a read access to the nonvolatile main storage unit 120 (step S902).

検出したアクセスが不揮発性主記憶部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 access control unit 111 reads data from the nonvolatile main storage unit 120 (step S903), The read data is returned to the bus 180. The backup control unit 112 determines whether the backup process is valid (step S904). If it is determined that the backup process is not valid (step S904: No), the process ends. If it is determined that the backup processing is valid (step S904: Yes), the backup control unit 112 sends the read destination address and the read data to the history table management unit 117 and instructs to record in the history table 118. (Step S905). The history table management unit 117 determines a storage area in the history table 118 and records a read destination address and data (step S906). Since the backup process is not performed in the read process, the history table management unit 117 sets the backed-up flag corresponding to the recorded history entry to OFF, which is a value that is not backed up (step S907).

検出したアクセスが不揮発性主記憶部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 access control unit 111 sends the access to the backup control unit 112, and the backup control unit 112 accesses Is received (step S908). The backup control unit 112 determines whether the received access is a write access to the nonvolatile main storage unit 120 (step S909).

受け取ったアクセスが不揮発性主記憶部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 access control unit 111, and the main memory access control unit 111 reads the original data stored in the storage area indicated by the write destination address from the nonvolatile main storage unit 120 (step S914). Next, the backup data generation unit 114 generates backup data from the write destination address and the original data (step S915).

バックアップ制御部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 nonvolatile backup memory 130 into which the generated backup data is written from the write pointer holding unit 116 (step S916). The backup memory access control unit 113 writes the backup data in the storage area indicated by the read address on the nonvolatile backup memory 130 (step S917). The backup control unit 112 updates the value of the pointer held in the write pointer holding unit 116 (step S918). The backup control unit 112 sends the write destination address and the read data to the history table management unit 117, and instructs recording (step S919). The history table management unit 117 determines and records a storage area in the history table 118 according to the structure of the managed history table (step S920). The history table management unit 117 sets the backup completed flag corresponding to the recorded history entry to ON, which is the value of the backup (step S921), because the backup process was performed in this writing process. The main memory access control unit 111 writes data to the write destination address of the nonvolatile main storage unit 120 (step S922).

ステップ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 main storage unit 120. Can be obtained, and the processing time can be shortened.

ステップ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 nonvolatile backup memory 130 or not. Judgment is made (step S926). When it is determined that the access is to the non-volatile backup memory 130 (step S926: Yes), the backup control unit 112 sends an access destination address to the backup memory access control unit 113, and the backup memory access control unit 113 performs non-volatile backup. Data in the memory 130 is read or written in the nonvolatile backup memory 130 (step S927).

不揮発性バックアップメモリ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 main storage unit 120 but also the address at which data is read from the non-volatile main storage unit 120 and the read data are recorded, thereby The access to the data at the same address in the nonvolatile main storage unit 120 can be reduced. Thereby, the performance fall of PC100 can be reduced.

なお、本発明は、上記実施の形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化することができる。また、上記実施の形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成することができる。例えば、実施の形態に示される全構成要素からいくつかの構成要素を削除してもよい。さらに、異なる実施の形態にわたる構成要素を適宜組み合わせてもよい。   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.

第1の実施の形態にかかるPCの構成を示すブロック図である。It is a block diagram which shows the structure of PC concerning 1st Embodiment. 履歴テーブルのデータ構成の一例を示す説明図である。It is explanatory drawing which shows an example of a data structure of a log | history table. バックアップ部が行うバックアップ処理手順を示すフローチャートである。It is a flowchart which shows the backup processing procedure which a backup part performs. バックアップ部が行うバックアップ処理手順を示すフローチャートである。It is a flowchart which shows the backup processing procedure which a backup part performs. コミット部が行うコミット処理手順を示すフローチャートである。It is a flowchart which shows the commit processing procedure which a commit part performs. ロールバック部が行うロールバック処理手順を示すフローチャートである。It is a flowchart which shows the rollback process sequence which a rollback part performs. 履歴テーブルのデータ構成の一例を示す説明図である。It is explanatory drawing which shows an example of a data structure of a log | history table. 履歴テーブルのデータ構成の一例を示す説明図である。It is explanatory drawing which shows an example of a data structure of a log | history table. 第2の実施の形態にかかる履歴テーブルのデータ構成に一例を示す説明図である。It is explanatory drawing which shows an example in the data structure of the log | history table concerning 2nd Embodiment. バックアップ部が行うバックアップ処理手順を示すフローチャートである。It is a flowchart which shows the backup processing procedure which a backup part performs. バックアップ部が行うバックアップ処理手順を示すフローチャートである。It is a flowchart which shows the backup processing procedure which a backup part performs.

符号の説明Explanation of symbols

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 SYMBOLS 110 Backup part 111 Main memory access control part 112 Backup control part 113 Backup memory access control part 114 Backup data generation part 115 Backup memory head address holding part 116 Write pointer holding part 117 History table management part 118 History table 120 Nonvolatile main memory Unit 130 nonvolatile backup memory 140 commit unit 150 rollback unit 160 processor unit 170 control software 180 bus 200 power supply

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:
前記第1の書込手段は、前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶されている場合は、前記バックアップデータを前記バックアップ記憶部に書込まず、
前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶されていると判明した後、前記第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.
前記第1の書込手段によって現時点から新たに前記バックアップ記憶部に書込まれるバックアップデータを読み出し許可と設定するコミット手段と、
前記主記憶部の記憶内容を書戻す旨を指示された場合に、前記バックアップ記憶部に記憶されたバックアップデータのなかから、読み出し許可と設定された前記バックアップデータに含まれる前記データおよび前記アドレスを抽出する抽出手段と、
前記バックアップデータから抽出された前記データおよび前記アドレスごとに、当該データを当該アドレスが示す前記主記憶部上の記憶領域へ書込む第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の書込手段は、前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶され、かつ、前記バックアップ済み情報が前記バックアップ記憶部に前記バックアップデータを書込んでいない旨を示す場合は、前記バックアップデータを前記バックアップ記憶部に書込むこと、を特徴とする請求項4に記載の情報処理装置。   The first writing means stores an address that matches the address of the writing destination in the history information storage means, and that the backed up information has not written the backup data in the backup storage unit. 5. The information processing apparatus according to claim 4, wherein in the case shown, the backup data is written to the backup storage unit. 前記第1の書込手段は、前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶されていない場合は、前記バックアップデータを前記バックアップ記憶部に書込み、前記履歴情報記憶手段に、読取られた前記データと、前記書込み先のアドレスと、前記バックアップ済み情報とを書込むこと、を特徴とする請求項5に記載の情報処理装置。   The first writing unit writes the backup data into the backup storage unit when the history information storage unit does not store an address that matches the address of the write destination, and the history information storage unit 6. The information processing apparatus according to claim 5, wherein the read data, the write destination address, and the backed up information are written. 前記履歴情報記憶手段は、前記アドレスに対応付けて、前記アドレスを記憶している記憶領域が有効であるか否かを示すフラグ情報を記憶し、
前記履歴情報検索手段は、前記履歴情報記憶手段から、前記フラグ情報が有効を示し、かつ、前記書込み先のアドレスと一致するアドレスを検索すること、を特徴とする請求項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の書込手段は、前記プロセッサ部と前記主記憶部との間に接続され、前記プロセッサ部から前記書込みアクセスを受け、受けた前記書込みアクセスを前記主記憶部へ送出すること、を特徴とする請求項1乃至8のいずれか1項に記載の情報処理装置。   The first writing means is connected between the processor unit and the main storage unit, receives the write access from the processor unit, and sends the received write access to the main storage unit. The information processing apparatus according to claim 1, wherein the information processing apparatus is characterized. 不揮発性の主記憶部と、前記主記憶部に記憶されているデータの複製を記憶する不揮発性のバックアップ記憶部と、を備える情報処理装置のデータ復旧方法であって、
プロセッサ部から送出された、前記主記憶部に対する書込み対象のデータと当該書込み対象のデータの書込み先を指定する書込み先のアドレスとを含む書込みアクセスを検出した場合に、前記アドレスによって指定される記憶領域に既に記憶されているデータを読取る読取ステップと、
前記読取ステップで読取られた前記データと、前記書込みアクセスに含まれる前記アドレスとを含むバックアップデータを生成する生成ステップと、
前記バックアップ記憶部に書込む前記バックアップデータに含まれる前記アドレスを記憶する履歴情報記憶手段に記憶されたアドレスのなかから、前記書込み先のアドレスと一致するアドレスを検索する履歴情報検索ステップと、
前記履歴情報記憶手段に前記書込み先のアドレスと一致するアドレスが記憶されていない場合は、前記バックアップデータを前記バックアップ記憶部に書込む第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.
JP2008008187A 2008-01-17 2008-01-17 Information processor and data restoration method Pending JP2009169747A (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (10)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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