JP2009110467A - Apparatus, system, program, and method for controlling memory - Google Patents

Apparatus, system, program, and method for controlling memory Download PDF

Info

Publication number
JP2009110467A
JP2009110467A JP2007284740A JP2007284740A JP2009110467A JP 2009110467 A JP2009110467 A JP 2009110467A JP 2007284740 A JP2007284740 A JP 2007284740A JP 2007284740 A JP2007284740 A JP 2007284740A JP 2009110467 A JP2009110467 A JP 2009110467A
Authority
JP
Japan
Prior art keywords
page
unit
data
storage device
check code
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.)
Granted
Application number
JP2007284740A
Other languages
Japanese (ja)
Other versions
JP4867892B2 (en
Inventor
Tomihiko Ichikawa
富彦 市川
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2007284740A priority Critical patent/JP4867892B2/en
Publication of JP2009110467A publication Critical patent/JP2009110467A/en
Application granted granted Critical
Publication of JP4867892B2 publication Critical patent/JP4867892B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that it takes time for suspend and resume operation. <P>SOLUTION: During suspension, updated data in a unit storage are stored in a second storage apparatus, and a check code for the updated data in the unit storage is generated. When an access to a first storage is detected, a check code for the data in the inactive unit storage is generated to be compared with the check code generated during the suspend. When they do not match each other, the data for the unit storage stored in the second storage apparatus are read and written to the unit storage. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明はメモリ制御装置、システム、プログラム、および、方法に関し、特に、レジューム機能を有するメモリ制御装置、システム、プログラム、および、方法に関する。   The present invention relates to a memory control device, system, program, and method, and more particularly, to a memory control device, system, program, and method having a resume function.

電源投入時に電源断直前の状態復帰を図るレジューム機能を有したコンピュータにおいて、電源断(サスペンド)中のメモリへの電源供給が不安定な場合、電源投入(レジューム)時にメモリ内容が変化していることがあるという問題があった。   In a computer with a resume function that restores the state immediately before power is turned off when the power is turned on, if the power supply to the memory that is being turned off is unstable, the memory contents are changed when the power is turned on (resume). There was a problem that there was something.

この問題に対して、関連する技術として、電源投入(レジューム)時にメモリ内容の変化をチェックして、誤動作を防止する手段を提供しているものがある(例えば、特許文献1)。   To solve this problem, there is a related technique that provides a means for checking a change in memory contents when power is turned on (resume) to prevent malfunction (for example, Patent Document 1).

同じくこの問題に対して、関連する他の技術として、電源断(サスペンド)時にメモリに格納されている情報を補助記憶手段に保存し、電源投入(レジューム)時に復元対象の情報をメモリに転送するものがある(例えば、特許文献2)。また、類似の関連する他の技術として、メモリに格納されている情報のうち、空き領域および廃棄可能領域を除いて補助記憶手段に保存するものがある(例えば、特許文献3)。   Similarly, as another technique related to this problem, information stored in the memory is saved in the auxiliary storage means when the power is turned off (suspended), and information to be restored is transferred to the memory when the power is turned on (resume). There is a thing (for example, patent document 2). Another similar and related technique is to save information stored in the memory in the auxiliary storage means except for the free area and the discardable area (for example, Patent Document 3).

他の、関連する技術として、システム起動時に、メモリ回路のチェックをページ単位で実行するものがある(例えば、特許文献4)。   As another related technique, there is a technique in which a memory circuit check is executed in units of pages when the system is started (for example, Patent Document 4).

特開平05−088795号公報JP 05-088795 A 特開平10−289167号公報JP-A-10-289167 特開平10−333997号公報Japanese Patent Laid-Open No. 10-333997 特開2000−293391号公報JP 2000-293391 A

しかしながら、特許文献1の技術は、メモリ内容のチェックを全体に対して一度に行うので、レジューム動作に時間がかかるという問題があった。   However, the technique of Patent Document 1 has a problem that it takes time for the resume operation because the memory contents are checked at once for the entire memory.

また、特許文献2の技術は、大量の情報を補助記憶手段に格納し、また、補助記憶手段から復元するので、サスペンド動作、レジューム動作ともに時間がかかるという問題があった。特許文献3の技術では、特許文献2に比べて若干改良されているものの、サスペンド動作、レジューム動作ともに時間がかかるという問題が十分に解決されてはいなかった。   Further, the technique of Patent Document 2 has a problem that both a suspend operation and a resume operation take time because a large amount of information is stored in the auxiliary storage unit and restored from the auxiliary storage unit. Although the technique of Patent Document 3 is slightly improved compared to Patent Document 2, the problem that it takes time for both the suspend operation and the resume operation has not been sufficiently solved.

本発明の目的は、上述した課題を解決するメモリ制御装置、システム、プログラム、および、方法を提供することにある。   An object of the present invention is to provide a memory control device, system, program, and method that solve the above-described problems.

本発明のメモリ制御装置は、複数の単位記憶部からなる第1の記憶装置と、第2の記憶装置とを制御するメモリ制御装置であって、サスペンド時には変更状態にある前記単位記憶部内の前記データを前記第2の記憶装置に格納し、変更状態にある前記単位記憶部内の前記データのチェックコードを生成し、前記第1の記憶装置へのアクセスを検出した場合に、有効状態にない前記単位記憶部内の前記データの前記チェックコードを生成し、当該チェックコードと前記サスペンド時に生成した前記チェックコードとを比較し、一致しなかった場合に、前記第2の記憶装置に格納した前記単位記憶部内の前記データを読み出して前記単位記憶部に書き込む手段を有する。 The memory control device according to the present invention is a memory control device that controls a first storage device including a plurality of unit storage units and a second storage device, and the unit storage unit in the unit storage unit that is in a changed state at the time of suspension is provided. When data is stored in the second storage device, a check code of the data in the unit storage unit in a changed state is generated, and access to the first storage device is detected, the non-valid state The unit memory stored in the second storage device when the check code of the data in the unit storage unit is generated, the check code is compared with the check code generated at the time of suspend, and they do not match Means for reading the data in the unit and writing it in the unit storage unit.

本発明のプログラムは、複数の単位記憶部からなる第1の記憶装置と、第2の記憶装置とを制御するプログラムであって、サスペンド時には変更状態にある前記単位記憶部内の前記データを前記第2の記憶装置に格納し、変更状態にある前記単位記憶部内の前記データのチェックコードを生成し、前記第1の記憶装置へのアクセスを検出した場合に、有効状態にない前記単位記憶部内の前記データの前記チェックコードを生成し、当該チェックコードと前記サスペンド時に生成した前記チェックコードとを比較し、一致しなかった場合に、前記第2の記憶装置に格納した前記単位記憶部内の前記データを読み出して前記単位記憶部に書き込む処理をコンピュータに実行させる。   The program of the present invention is a program for controlling a first storage device and a second storage device comprising a plurality of unit storage units, and the data in the unit storage unit that is in a changed state at the time of suspension is stored in the first storage device. 2 is stored in the storage device of the second unit, the check code of the data in the unit storage unit in the changed state is generated, and when access to the first storage device is detected, in the unit storage unit not in the valid state The check code of the data is generated, the check code is compared with the check code generated at the time of suspension, and the data in the unit storage unit stored in the second storage device when they do not match Is executed by the computer.

本発明の方法は、コンピュータが、複数の単位記憶部からなる第1の記憶装置と、第2の記憶装置とを制御する方法であって、サスペンド時には変更状態にある前記単位記憶部内の前記データを前記第2の記憶装置に格納し、変更状態にある前記単位記憶部内の前記データのチェックコードを生成し、前記第1の記憶装置へのアクセスを検出した場合に、有効状態にない前記単位記憶部内の前記データの前記チェックコードを生成し、当該チェックコードと前記サスペンド時に生成した前記チェックコードとを比較し、一致しなかった場合に、前記第2の記憶装置に格納した前記単位記憶部内の前記データを読み出して前記単位記憶部に書き込む。   The method of the present invention is a method in which a computer controls a first storage device and a second storage device comprising a plurality of unit storage units, wherein the data in the unit storage unit that is in a changed state at the time of suspension Is stored in the second storage device, the check code of the data in the unit storage unit in the changed state is generated, and when the access to the first storage device is detected, the unit that is not in the valid state Generate the check code of the data in the storage unit, compare the check code with the check code generated at the time of suspend, and in the unit storage unit stored in the second storage device if they do not match Are read out and written into the unit storage unit.

本発明によれば、サスペンド動作、および、レジューム動作の高速化が可能になる。   According to the present invention, it is possible to speed up the suspend operation and the resume operation.

次に、本発明の実施の形態について図面を参照して詳細に説明する。   Next, embodiments of the present invention will be described in detail with reference to the drawings.

なお、サスペンドとは、コンピュータ等の情報処理装置の使用を中断する際に、情報処理装置内の直前の作業の状態を保存して電源を切断する動作を示す。こうして電源を切られた情報処理装置の状態は、サスペンド状態と呼ばれる。また、レジュームとは、サスペンド状態の情報処理装置が電源を投入された場合に、電源を切断する直前の状態から作業を再開する動作を示す。そして、本実施の形態では、本発明によるメモリについてのサスペンド/レジュームを実現する構成と動作について説明している。   Note that the suspend indicates an operation of saving the state of the immediately preceding operation in the information processing apparatus and turning off the power when the use of the information processing apparatus such as a computer is interrupted. The state of the information processing apparatus thus turned off is called a suspended state. Resume indicates an operation of resuming work from a state immediately before the power is turned off when the information processing apparatus in the suspended state is turned on. In this embodiment, a configuration and operation for realizing suspend / resume for a memory according to the present invention are described.

なお、以下の実施の形態で記載する各手段は、ハードウェアで実現されても良いし、ソフトウェアで実現されても良いし、ハードウェアとソフトウェアの混在により実現されても良い。   Note that each unit described in the following embodiments may be realized by hardware, software, or a mixture of hardware and software.

また、各手段の物理的な構成は、以下の実施の形態の記載に限定されることは無く、独立して存在しても良いし、組み合わされて存在しても良いし、または、分離して構成されても良い。   Further, the physical configuration of each means is not limited to the description of the following embodiment, and may exist independently, may exist in combination, or may be separated. May be configured.

また、各動作は、以下の実施の形態の記載に限定されることは無く、本発明を実施する上で機能的、性能的、その他の特性に対して支障をきたさない範囲内で変更して良い。   In addition, each operation is not limited to the description of the following embodiment, and can be changed within a range that does not hinder the functional, performance, and other characteristics in carrying out the present invention. good.

図1を参照すると、本発明の第1の実施の形態の一例は、複数の単位記憶部301(たとえば、ページ、セグメント)からなる第1の記憶装置300(たとえば、メモリ、ハードディスク)と、第2の記憶装置500(たとえば、メモリ、ハードディスク)と、メモリ制御装置600とを含む。
メモリ制御装置600は、サスペンド時には、変更状態にない単位記憶部301内のデータを第2の記憶装置500に格納しない。メモリ制御装置600は、サスペンド時には、変更状態にある前記単位記憶部301内のデータを第2の記憶装置500に格納する。メモリ制御装置600は、サスペンド時には、変更状態にある単位記憶部301内のデータに対応するチェックコードを生成する。尚、メモリ制御装置600は、サスペンド時には、変更状態にない単位記憶部301内のデータを第2の記憶装置500に格納する、という構成も可能である。
Referring to FIG. 1, an example of the first embodiment of the present invention includes a first storage device 300 (for example, a memory and a hard disk) including a plurality of unit storage units 301 (for example, pages and segments), 2 storage devices 500 (for example, a memory and a hard disk) and a memory control device 600.
The memory control device 600 does not store the data in the unit storage unit 301 that is not changed in the second storage device 500 during suspension. The memory control device 600 stores the data in the unit storage unit 301 in the changed state in the second storage device 500 at the time of suspension. At the time of suspension, the memory control device 600 generates a check code corresponding to the data in the unit storage unit 301 in the changed state. Note that the memory control device 600 may be configured to store the data in the unit storage unit 301 that is not changed in the second storage device 500 when suspended.

メモリ制御装置600は、第1の記憶装置300へのライト指示またはリード指示(ライト指示またはリード指示は、アクセスの一例である。)があった場合は、これを検出する。そして、メモリ制御装置600は、ライト指示またはリード指示された単位記憶部301が有効状態にない場合は、この単位記憶部301内のデータに対応するチェックコードを生成する。そして、メモリ制御装置600は、この生成した有効状態にない単位記憶部301内のデータに対応するチェックコードと、サスペンド時に生成した変更状態にある単位記憶部301内のデータに対応するチェックコードとを比較する。そして、メモリ制御装置600は、これらのチェックコードが一致しなかった場合に、第2の記憶装置500に格納された、ライト指示またはリード指示された単位記憶部301に対応するデータを読み出す。そして、メモリ制御装置600は、単位記憶部301に読み出したデータを書き込む。   If there is a write instruction or read instruction to the first storage device 300 (the write instruction or read instruction is an example of access), the memory control device 600 detects this. If the unit storage unit 301 that has been instructed to write or read is not in the valid state, the memory control device 600 generates a check code corresponding to the data in the unit storage unit 301. Then, the memory control device 600 generates a check code corresponding to the generated data in the unit storage unit 301 not in the valid state, and a check code corresponding to the data in the unit storage unit 301 in the changed state generated at the time of suspension. Compare If these check codes do not match, the memory control device 600 reads data corresponding to the unit storage unit 301 that is stored in the second storage device 500 and that has been instructed to be written or read. Then, the memory control device 600 writes the read data in the unit storage unit 301.

本発明の第一の実施の形態の別の例を用いてさらに詳細に説明する。   Further details will be described using another example of the first embodiment of the present invention.

図2を参照すると、本発明の第1の実施の形態の他の一例は、プロセッサ1と、メモリ3と、バッテリ4と、補助記憶手段5と、メモリ制御装置6とで構成されている。メモリ3は、第1の記憶装置300の一例である。補助記憶手段5は、第2の記憶装置500の一例である。 プロセッサ1は、メモリ制御装置6経由でメモリ3をアクセスする。   Referring to FIG. 2, another example of the first embodiment of the present invention includes a processor 1, a memory 3, a battery 4, auxiliary storage means 5, and a memory control device 6. The memory 3 is an example of the first storage device 300. The auxiliary storage unit 5 is an example of the second storage device 500. The processor 1 accesses the memory 3 via the memory control device 6.

バッテリ4は、メモリ3の電源をバックアップする。   The battery 4 backs up the power supply of the memory 3.

補助記憶手段5は、メモリ3のデータを格納する。
メモリ制御装置6は、変更状態情報保持手段61と、チェックコード保持手段62と、有効状態情報保持手段63と、変更状態情報設定手段64と、サスペンド処理手段65と、有効状態情報制御手段66とから構成されている。
The auxiliary storage unit 5 stores data in the memory 3.
The memory control device 6 includes a change state information holding unit 61, a check code holding unit 62, a valid state information holding unit 63, a change state information setting unit 64, a suspend processing unit 65, and a valid state information control unit 66. It is composed of

メモリ制御装置6は、メモリ3をあらかじめ定められたサイズのページ単位に分割して制御する。図3は、メモリ3のページ31(以後、単にページ31と記述する。)の概念を示す図である。ページ31は、単位記憶部301の一例である。メモリ制御装置6は、ページ31ごとに、変更状態情報611と、チェックコード621と、有効状態情報631を制御する。   The memory control device 6 controls the memory 3 by dividing it into pages of a predetermined size. FIG. 3 is a diagram showing the concept of a page 31 (hereinafter simply referred to as a page 31) of the memory 3. The page 31 is an example of the unit storage unit 301. The memory control device 6 controls the change state information 611, the check code 621, and the valid state information 631 for each page 31.

図4に変更状態情報保持手段61と、チェックコード保持手段62と、有効状態情報保持手段63の構造の例を示す。図4の例では、変更状態情報保持手段61と、チェックコード保持手段62と、有効状態情報保持手段63とは、1つの表形式で実現されている。   FIG. 4 shows an example of the structure of the change state information holding unit 61, the check code holding unit 62, and the valid state information holding unit 63. In the example of FIG. 4, the change state information holding unit 61, the check code holding unit 62, and the valid state information holding unit 63 are realized in one table format.

変更状態情報保持手段61は、ページ31ごとの変更状態情報611を保持する。本実施の形態においては、例として、変更状態情報611は、『1』で変更有りを示し、『0』で変更なしを示すこととする。メモリ制御装置6の初期化処理後における変更状態情報611の初期値は、例えば『0』が設定されている。   The change state information holding unit 61 holds change state information 611 for each page 31. In the present embodiment, as an example, in the change state information 611, “1” indicates that there is a change, and “0” indicates that there is no change. For example, “0” is set as the initial value of the change state information 611 after the initialization process of the memory control device 6.

チェックコード保持手段62は、ページ31ごとのチェックコード621を保持する。本実施の形態においては、例として、チェックコード621は、32ビットのチェックサムコードであるとする。なお、図4のチェックコード621は、32ビットの2進数を16進数で表現している。   The check code holding unit 62 holds a check code 621 for each page 31. In the present embodiment, as an example, it is assumed that the check code 621 is a 32-bit checksum code. Note that the check code 621 in FIG. 4 represents a 32-bit binary number in hexadecimal.

なお、チェックコード621はチェックサムコードに限らず、巡回冗長検査符号値や、ハッシュ値を用いてもよい。また、チェックコード621は、誤り訂正が可能な冗長度を持つものであっても良い。   The check code 621 is not limited to the checksum code, and a cyclic redundancy check code value or a hash value may be used. Further, the check code 621 may have a redundancy that enables error correction.

有効状態情報保持手段63は、ページ31ごとの有効状態情報631を保持する。本実施の形態においては、例として、有効状態情報631は、『1』で有効を示し、『0』で無効を示すこととする。メモリ制御装置6の初期化処理後における有効状態情報631の初期値は、例えば『1』が設定されている。   The valid state information holding unit 63 holds valid state information 631 for each page 31. In this embodiment, as an example, the valid state information 631 indicates that “1” indicates validity and “0” indicates invalidity. For example, “1” is set as the initial value of the valid state information 631 after the initialization process of the memory control device 6.

変更状態情報設定手段64は、メモリ制御装置6がプロセッサ1からメモリ3へのライト指示を検出した場合に、該当するページ31の変更状態情報611を変更有『1』に設定する。   When the memory control device 6 detects a write instruction from the processor 1 to the memory 3, the change state information setting unit 64 sets the change state information 611 of the corresponding page 31 to “1” with change.

サスペンド処理手段65は、メモリ制御装置6がプロセッサ1からのサスペンド処理指示を検出した場合に、各ページ31の変更状態情報611を参照して、変更有『1』のページ31のデータを補助記憶手段5に書き込む。そして、サスペンド処理手段65は、そのページ31のデータのチェックコード621を生成する。次に、サスペンド処理手段65は、生成したチェックコード621をチェックコード保持手段62に書き込む。そして、サスペンド処理手段65は、すべてのページ31の有効状態情報631を無効に設定する。   When the memory control device 6 detects a suspend processing instruction from the processor 1, the suspend processing unit 65 refers to the change state information 611 of each page 31 and auxiliary stores the data of the page 31 with “1” being changed. Write to means 5. Then, the suspend processing unit 65 generates a check code 621 for the data of the page 31. Next, the suspend processing unit 65 writes the generated check code 621 in the check code holding unit 62. Then, the suspend processing unit 65 sets the valid state information 631 of all pages 31 to invalid.

有効状態情報制御手段66は、メモリ制御装置6がプロセッサ1からメモリ3へのライト指示またはリード指示を検出した場合に、有効状態情報保持手段63を参照して、該当するページ31の有効状態情報631をチェックする。そして、有効状態情報制御手段66は、有効状態情報631が無効『0』の場合に、該当するページ31のデータのチェックコード621を生成する。そして、有効状態情報制御手段66は、生成したチェックコード621とチェックコード保持手段62に格納されている該当するページ31のチェックコード621とを比較する。そして、有効状態情報制御手段66は、これらのチェックコード621が一致しなかった場合に、補助記憶手段5から該当するページ31に対応するデータを読み出す。そして、有効状態情報制御手段66は、読み出したデータを該当するページ31に書き込む。そして、有効状態情報制御手段66は、該当するページ31の有効状態情報631を有効『1』に設定する。また、有効状態情報制御手段66は、これらのチェックコード621が一致した場合には、補助記憶手段5からの該当するページ31の復旧処理を行うことなく、該当するページ31の有効状態情報631を有効『1』に設定する。   When the memory control device 6 detects a write instruction or a read instruction from the processor 1 to the memory 3, the valid state information control unit 66 refers to the valid state information holding unit 63 and refers to the valid state information of the corresponding page 31. Check 631. Then, the valid state information control unit 66 generates a check code 621 for the data of the corresponding page 31 when the valid state information 631 is invalid “0”. Then, the valid state information control unit 66 compares the generated check code 621 with the check code 621 of the corresponding page 31 stored in the check code holding unit 62. The valid state information control unit 66 reads data corresponding to the corresponding page 31 from the auxiliary storage unit 5 when the check codes 621 do not match. Then, the valid state information control unit 66 writes the read data on the corresponding page 31. Then, the valid state information control unit 66 sets the valid state information 631 of the corresponding page 31 to valid “1”. In addition, when these check codes 621 match, the valid state information control unit 66 does not perform the recovery process of the corresponding page 31 from the auxiliary storage unit 5 and stores the valid state information 631 of the corresponding page 31. Set to valid "1".

次に、本発明の実施の形態の動作について図面を参照して説明する。   Next, the operation of the embodiment of the present invention will be described with reference to the drawings.

図5は、メモリ制御装置6のサスペンド処理手段65の動作である。   FIG. 5 shows the operation of the suspend processing means 65 of the memory control device 6.

メモリ制御装置6は、プロセッサ1からのサスペンド処理指示を検出する(ステップS800)。   The memory control device 6 detects a suspend process instruction from the processor 1 (step S800).

サスペンド処理手段65は、すべてのページ31に対して、ステップS802〜S806を行う(ステップS801)。   The suspend processing unit 65 performs steps S802 to S806 for all pages 31 (step S801).

まず、サスペンド処理手段65は、変更状態情報611をチェックする(ステップS802)。   First, the suspend processing unit 65 checks the change state information 611 (step S802).

変更状態情報611が『0』(ステップS802でNOの場合)であれば、サスペンド処理手段65は、有効状態情報631を『0』にして(ステップS806)、次のページ31の処理へ進む。   If the change state information 611 is “0” (NO in step S802), the suspend processing unit 65 sets the valid state information 631 to “0” (step S806), and proceeds to the processing of the next page 31.

変更状態情報611が『1』(ステップS802でYESの場合)であれば、サスペンド処理手段65は、該当するページ31のデータを補助記憶手段5へ書き込む(ステップS803)。そして、サスペンド処理手段65は、該当するページ31のデータについてチェックコードを計算する。そして、サスペンド処理手段65は、その計算したチェックコードをチェックコード621としてチェックコード保持手段62に書き込む(ステップS804)。次に、サスペンド処理手段65は、変更状態情報611を『0』にする(ステップS805)。次に、サスペンド処理手段65は、有効状態情報631を『0』にして(ステップS806)、次のページ31の処理へ進む。   If the change state information 611 is “1” (in the case of YES in step S802), the suspend processing unit 65 writes the data of the corresponding page 31 to the auxiliary storage unit 5 (step S803). Then, the suspend processing unit 65 calculates a check code for the data of the corresponding page 31. Then, the suspend processing unit 65 writes the calculated check code as the check code 621 in the check code holding unit 62 (step S804). Next, the suspend processing unit 65 sets the change state information 611 to “0” (step S805). Next, the suspend processing unit 65 sets the valid state information 631 to “0” (step S806), and proceeds to the processing of the next page 31.

すべてのページ31について以上の処理が終了した時、すべてのページ31のデータと、補助記憶手段5に記憶された各ページ31に対応するデータとの整合が取れた状態になる。つまり、すべてのページ31の変更状態情報611が『0』の状態である。   When the above processing is completed for all the pages 31, the data of all the pages 31 and the data corresponding to each page 31 stored in the auxiliary storage unit 5 are in a consistent state. That is, the change state information 611 of all pages 31 is in a “0” state.

本処理後、一般的には、プロセッサ1は、図示しないサスペンド処理プログラムに基づいて、本発明の第一の実施の形態の構成全体をハードウェア的にサスペンド状態にするために、電源系サスペンド処理へ進む。しかし、これ以後の処理は、本発明と直接的な技術的関係を有しないため、説明を省略する。   After this processing, generally, the processor 1 performs power supply suspend processing in order to put the entire configuration of the first embodiment of the present invention into a hardware suspend state based on a suspend processing program (not shown). Proceed to However, the subsequent processing does not have a direct technical relationship with the present invention, and thus the description thereof is omitted.

図6はレジューム時の動作を示している。   FIG. 6 shows the operation during resume.

図示しない手段により、電源が投入され、レジューム処理が開始される(ステップS810)。   The power is turned on by means not shown, and the resume process is started (step S810).

プロセッサ1は、レジューム処理手段11により、メモリ制御装置6の正常性チェックを行う(ステップS811)。そして、レジューム処理手段11は、メモリ制御装置6に問題がなければ(ステップS812のYESの場合)、レジュームすなわち、サスペンド前の動作の再開へ進む。   The processor 1 checks the normality of the memory control device 6 by the resume processing means 11 (step S811). If there is no problem with the memory control device 6 (YES in step S812), the resume processing unit 11 proceeds to resume, that is, resume the operation before suspending.

そして、レジューム処理手段11は、メモリ制御装置6に問題があれば(ステップS812のNOの場合)、レジュームはあきらめて、図示しない初期化ブート処理へ制御を渡す。   If there is a problem with the memory control device 6 (NO in step S812), the resume processing unit 11 gives up the resume and passes control to an initialization boot process (not shown).

図7は、メモリ制御装置6がプロセッサ1からメモリ3へのライト指示またはリード指示を検出した場合の変更状態情報設定手段64と有効状態情報制御手段66の動作である。   FIG. 7 shows operations of the change state information setting unit 64 and the valid state information control unit 66 when the memory control device 6 detects a write instruction or a read instruction from the processor 1 to the memory 3.

メモリ制御装置6がプロセッサ1からメモリ3へのライト指示またはリード指示を検出する(ステップS820)。   The memory control device 6 detects a write instruction or a read instruction from the processor 1 to the memory 3 (step S820).

まず、有効状態情報制御手段66は、ライト指示またはリード指示されたページ31の有効状態情報631を調べる(ステップS821)。そして、有効状態情報制御手段66は、有効状態情報631が『1』ならば(ステップS821のYESの場合)、ステップS826へ進む。また、有効状態情報制御手段66は、有効状態情報631が『0』ならば(ステップS821のNOの場合)、ステップS822へ進む。   First, the valid state information control unit 66 checks the valid state information 631 of the page 31 that has been instructed to write or read (step S821). If the valid state information 631 is “1” (YES in step S821), the valid state information control unit 66 proceeds to step S826. If the valid state information 631 is “0” (NO in step S821), the valid state information control unit 66 proceeds to step S822.

そして、有効状態情報制御手段66は、該当するページ31のデータについてチェックコードを計算する(ステップS822)。   Then, the valid state information control unit 66 calculates a check code for the data of the corresponding page 31 (step S822).

次に、有効状態情報制御手段66は、その生成したチェックコードが、チェックコード保持手段62に記憶されているチェックコード621と一致するかどうかを調べる(ステップS823)。これらのチェックコードが一致したことは、該当するページ31のデータが変化してないのでそのまま使用して良いことを示している。また、これらのチェックコードが一致しなかったことは、該当するページ31のデータが変化しているのでそのまま使用してはならないことを示している。そして、これらのチェックコードが一致した場合(S823でYESの場合)、有効状態情報制御手段66は、ステップS825へ進む。また、これらのチェックコードが一致しなかった場合(S823でNOの場合)、有効状態情報制御手段66は、ステップS824へ進む。   Next, the valid state information control unit 66 checks whether or not the generated check code matches the check code 621 stored in the check code holding unit 62 (step S823). The coincidence of these check codes indicates that the data of the corresponding page 31 has not changed and can be used as it is. Also, the fact that these check codes do not match indicates that the data of the corresponding page 31 has changed and should not be used as it is. If these check codes match (YES in S823), the valid state information control unit 66 proceeds to step S825. If these check codes do not match (NO in S823), the valid state information control unit 66 proceeds to step S824.

そして、有効状態情報制御手段66は、補助記憶手段5から該当するページ31に対応するデータを読み出す。そして、有効状態情報制御手段66は、読み出したデータを該当するページ31に書き込む。   Then, the valid state information control unit 66 reads data corresponding to the corresponding page 31 from the auxiliary storage unit 5. Then, the valid state information control unit 66 writes the read data on the corresponding page 31.

そして、有効状態情報制御手段66は、該当するページ31の有効状態情報631を『1』にする(ステップS825)。   Then, the valid state information control unit 66 sets the valid state information 631 of the corresponding page 31 to “1” (step S825).

次に、変更状態情報設定手段64は、プロセッサ1からの指示が、ライト指示か否かをチェックする(ステップS826)。そして、変更状態情報設定手段64は、プロセッサ1からの指示がライト指示ならば(ステップS826でYESの場合)、ステップS827へ進む。また、変更状態情報設定手段64は、プロセッサ1からの指示がライト指示でなければ(ステップS826でNOの場合)、指示されたリード処理へ進む。   Next, the change state information setting unit 64 checks whether or not the instruction from the processor 1 is a write instruction (step S826). If the instruction from the processor 1 is a write instruction (YES in step S826), the change state information setting unit 64 proceeds to step S827. If the instruction from the processor 1 is not a write instruction (NO in step S826), the change state information setting unit 64 proceeds to the instructed read process.

そして、変更状態情報設定手段64は、該当するページ31の変更状態情報611を『1』にして(ステップS827)、指示されたライト処理へ進む。   Then, the change state information setting unit 64 sets the change state information 611 of the corresponding page 31 to “1” (step S827), and proceeds to the instructed write process.

なお、チェックコード621として誤り検出訂正を用いることにより、ステップS823でNOの場合に、該当するページ31のデータの誤り訂正を実行し、訂正しきれない場合にステップS824に進むようにしても良い。   Note that by using error detection and correction as the check code 621, if NO in step S823, the error correction of the data of the corresponding page 31 may be executed, and if the correction cannot be completed, the process may proceed to step S824.

本発明の第1の実施の形態のメモリ制御装置によれば、サスペンド時は、ページ単位で、変更状態情報に基づいて補助記憶手段への書き込みを行うようにした。そして、ライト時またはリード時に、ページ単位で、有効状態情報とチェックコードに基づいてデータの有効性をチェックするようにした。このように構成することで、サスペンド処理、および、レジューム処理の高速化が可能になるという効果を有している。   According to the memory control device of the first embodiment of the present invention, at the time of suspension, writing to the auxiliary storage means is performed on a page basis based on the change state information. Then, the validity of the data is checked based on the valid state information and the check code for each page at the time of writing or reading. With this configuration, there is an effect that the speed of the suspend process and the resume process can be increased.

さらに、本発明の第1の実施の形態のメモリ制御装置によれば、補助記憶手段から各ページに対応するデータを読み込むようにした。このように構成することで、あるページのデータが変化していた場合、あるいは、チェックコードが一致しなかった場合に、該当するページのデータを復旧することで、レジューム動作を行える、すなわち、初期化ブートを不要とする効果を有している。
Furthermore, according to the memory control apparatus of the first embodiment of the present invention, data corresponding to each page is read from the auxiliary storage means. With this configuration, when the data of a certain page has changed, or when the check code does not match, the resume operation can be performed by restoring the data of the corresponding page. This has the effect of eliminating the need for an integrated boot.

次に、本発明の第2の実施の形態について図面を参照して詳細に説明する。   Next, a second embodiment of the present invention will be described in detail with reference to the drawings.

図8を参照すると、本発明の第2の実施の形態は、プロセッサ1と、メモリ3と、バッテリ4と、補助記憶手段5と、メモリ制御装置8とで構成されている。メモリ制御装置8は、アドレス変換手段2と、メモリ管理手段7とで構成されている。   Referring to FIG. 8, the second embodiment of the present invention includes a processor 1, a memory 3, a battery 4, auxiliary storage means 5, and a memory control device 8. The memory control device 8 includes an address conversion unit 2 and a memory management unit 7.

図9は、メモリ3の実ページ33(以後、単に実ページ33と記述する。)の概念を示す図である。実ページ33は、物理的/電気的な面で、第1の実施の形態のページ31と同等のものである。図10は、補助記憶手段5に格納された仮想メモリ50の仮想ページ53(以後、単に仮想ページ53と記述する。)の概念を示す図である。仮想ページ53は、プロセッサ1から見た論理的な面で、第1の実施の形態のページ31と同等のものである。   FIG. 9 is a diagram showing a concept of a real page 33 (hereinafter simply referred to as a real page 33) in the memory 3. The real page 33 is equivalent to the page 31 of the first embodiment in physical / electrical aspects. FIG. 10 is a diagram showing the concept of a virtual page 53 (hereinafter simply referred to as a virtual page 53) of the virtual memory 50 stored in the auxiliary storage means 5. The virtual page 53 is equivalent to the page 31 of the first embodiment in a logical aspect viewed from the processor 1.

アドレス変換手段2とメモリ管理手段7は、連携して、仮想メモリを実現するメモリ制御装置8を構成している。   The address conversion unit 2 and the memory management unit 7 cooperate to constitute a memory control device 8 that implements a virtual memory.

アドレス変換手段2は、後述するアドレス変換表71を参照し、仮想アドレス(仮想ページ番号710)から実アドレス(実ページ番号720)への変換を行う。   The address conversion unit 2 refers to an address conversion table 71, which will be described later, and converts a virtual address (virtual page number 710) to a real address (real page number 720).

メモリ管理手段7は、後述するアドレス変換表71を参照し、メモリ3の容量以上の仮想メモリを実現する。具体的には、メモリ管理手段7は、メモリ3の空きが少なくなると、当面不要な仮想ページ53に割り当てられた実ページ33のデータを補助記憶手段5に書き込んで空き実ページ33を作る。また、メモリ管理手段7は、動作に必要になった仮想ページ53に対応するデータを補助記憶手段5から読み出してメモリ3に再配置する。   The memory management unit 7 refers to an address conversion table 71 to be described later, and realizes a virtual memory that is larger than the capacity of the memory 3. Specifically, when the memory 3 becomes less empty, the memory management unit 7 creates the free real page 33 by writing the data of the real page 33 allocated to the virtual page 53 that is unnecessary for the time being to the auxiliary storage unit 5. In addition, the memory management unit 7 reads data corresponding to the virtual page 53 that is necessary for the operation from the auxiliary storage unit 5 and rearranges it in the memory 3.

アドレス変換表と、アドレス変換手段を使用した仮想メモリに関する技術は、当業者にとって周知技術であるため、本明細書では詳細な説明を省略する。なお、上記の技術は、例えば、野口健一郎著「IT Text オペレーティングシステム」第10章(発行所:オーム社、ISBN4−274−13250−1、平成14年9月5日発行)に記載されているので参照することができる。   Since the technology relating to the address translation table and the virtual memory using the address translation means is well known to those skilled in the art, a detailed description thereof will be omitted in this specification. The above-mentioned technique is described in, for example, Kenichiro Noguchi, “IT Text Operating System”, Chapter 10 (Publisher: Ohmsha, ISBN 4-274-13250-1, issued on September 5, 2002). So you can refer.

アドレス変換手段2は、プロセッサ1からメモリ3へのライト指示またはリード指示を検出した場合に、後述するアドレス変換表71を参照し、仮想アドレス(仮想ページ番号710)と実アドレス(実ページ番号720)の変換を行う。アドレス変換手段2は、当該仮想アドレスにメモリ3が割り当て済みで無い場合、すなわち、当該仮想ページ番号710に対応する実ページ番号720がアドレス変換表71に登録されていない場合(例えば、実ページ番号720の部分が『00』になっている場合に登録されていないと判定する。)は、アドレス変換に失敗し、アドレス変換例外を発生する。アドレス変換手段2は、プロセッサ1からメモリ3へのライト指示またはリード指示を検出した場合に、後述するアドレス変換表71を参照して、該当する仮想ページ53の有効ビット711をチェックする。そして、アドレス変換手段2は、有効ビット711が無効『0』の場合はアドレス変換例外を発生する。アドレス変換例外が発生した場合は、制御は、アドレス変換手段2からメモリ管理手段7へ渡る。   When the address conversion unit 2 detects a write instruction or a read instruction from the processor 1 to the memory 3, the address conversion unit 2 refers to an address conversion table 71 to be described later and refers to a virtual address (virtual page number 710) and a real address (real page number 720). ). When the memory 3 has not been assigned to the virtual address, that is, when the real page number 720 corresponding to the virtual page number 710 is not registered in the address conversion table 71 (for example, the real page number) When the part 720 is “00”, it is determined that it is not registered.) Fails in address translation and generates an address translation exception. When the address conversion unit 2 detects a write instruction or a read instruction from the processor 1 to the memory 3, the address conversion unit 2 refers to an address conversion table 71 described later and checks the valid bit 711 of the corresponding virtual page 53. Then, the address conversion unit 2 generates an address conversion exception when the valid bit 711 is invalid “0”. When an address translation exception occurs, control passes from the address translation unit 2 to the memory management unit 7.

アドレス変換手段2は、プロセッサ1からメモリ3へのライト指示を検出した場合に、変更ビット712を『1』にする。   When the address conversion unit 2 detects a write instruction from the processor 1 to the memory 3, the address conversion unit 2 sets the change bit 712 to “1”.

メモリ管理手段7は、アドレス変換表71と、チェックサムデータ表72と、サスペンド処理手段75と、チェックサム確認手段76と、ページイン処理手段77と、ページアウト処理手段78とを備える。   The memory management unit 7 includes an address conversion table 71, a checksum data table 72, a suspend processing unit 75, a checksum confirmation unit 76, a page-in processing unit 77, and a page-out processing unit 78.

図11はアドレス変換表71の構造を示している。アドレス変換表71は、有効状態情報保持手段として仮想ページ53ごとに有効ビット711を有している。アドレス変換表71は、変更状態情報保持手段として仮想ページ53ごとに変更ビット712を有している。アドレス変換表71は、プロセッサ1がアクセスするアドレス(仮想ページ番号710)が、メモリ3のどこに対応するのか(実ページ番号720)を示す。有効ビット711は、対応する仮想ページ53が、実ページ33を割り当てられて有効な状態にあるか否かを示す。有効ビット711が『1』の場合は有効、『0』の場合は無効を示す。変更ビット712は、対応する仮想ページ53が割り当てられた実ページ33のデータに変更があったかどうかを示す。変更ビット712が『1』の場合は変更有り、『0』の場合は変更なしを示す。   FIG. 11 shows the structure of the address conversion table 71. The address conversion table 71 has a valid bit 711 for each virtual page 53 as valid state information holding means. The address conversion table 71 has a change bit 712 for each virtual page 53 as a change state information holding unit. The address conversion table 71 indicates where in the memory 3 the address (virtual page number 710) accessed by the processor 1 corresponds (real page number 720). The valid bit 711 indicates whether or not the corresponding virtual page 53 is in a valid state with the real page 33 assigned thereto. When the valid bit 711 is “1”, it is valid, and when it is “0”, it is invalid. The change bit 712 indicates whether or not the data of the real page 33 to which the corresponding virtual page 53 is assigned has been changed. When the change bit 712 is “1”, there is a change, and when it is “0”, there is no change.

図12はチェックサムデータ表72の構造を示している。チェックサムデータ表72は、チェックコードとして、各実ページ33のデータに対応するチェックサム722の値と、そのチェックサム722によって対応する実ページ33のデータがチェック済みかどうかを示すチェックビット721から構成されている。チェックサム722のチェックが済んでいなければチェックビット721は『0』、チェック済みであれば『1』である。   FIG. 12 shows the structure of the checksum data table 72. The checksum data table 72 includes, as check codes, values of the checksum 722 corresponding to the data of each real page 33 and check bits 721 indicating whether or not the data of the corresponding real page 33 has been checked by the checksum 722. It is configured. The check bit 721 is “0” if the checksum 722 has not been checked, and “1” if it has been checked.

メモリ管理手段7は、プロセッサ1からのサスペンド処理指示を検出した場合に、サスペンド処理手段75によりサスペンド処理を実行する。サスペンド処理手段75は、各仮想ページ53の変更ビット712を参照して、変更有『1』の仮想ページ53に割り当てられた実ページ33のデータを補助記憶手段5に書き込む。そして、サスペンド処理手段75は、その実ページ33のデータのチェックサム722を計算する。次に、サスペンド処理手段75は、計算したチェックサム722をチェックサムデータ表72に書き込む。そして、サスペンド処理手段75は、すべての仮想ページ53の有効ビット711を無効『0』に設定する。   When the memory management unit 7 detects a suspend process instruction from the processor 1, the suspend process unit 75 executes the suspend process. The suspend processing unit 75 refers to the change bit 712 of each virtual page 53 and writes the data of the real page 33 assigned to the virtual page 53 with change “1” in the auxiliary storage unit 5. Then, the suspend processing means 75 calculates the checksum 722 of the data of the real page 33. Next, the suspend processing means 75 writes the calculated checksum 722 into the checksum data table 72. Then, the suspend processing means 75 sets the valid bits 711 of all virtual pages 53 to invalid “0”.

メモリ管理手段7は、アドレス変換例外が発生すると、アドレス変換例外処理を実行する。   When an address translation exception occurs, the memory management means 7 executes an address translation exception process.

メモリ管理手段7は、アドレス変換例外の発生原因が、有効ビット711が無効『0』であることによる場合は、チェックサム確認手段76により以下の処理を行う。チェックサム確認手段76は、該当する実ページ33のデータのチェックサム722を計算する。そして、チェックサム確認手段76は、計算したチェックサム722とチェックサムデータ表72に格納されている該当する実ページ33のチェックサム722とを比較する。そして、チェックサム確認手段76は、これらのチェックサム722が一致しなかった場合に、補助記憶手段5から該当する仮想ページ53に対応するデータを読み出す。そして、チェックサム確認手段76は、読み出したデータを該当する実ページ33に書き込む。そして、チェックサム確認手段76は、該当する実ページ33のチェックビット721を『1』に設定する。   When the cause of the address translation exception is that the valid bit 711 is invalid “0”, the memory management means 7 performs the following processing using the checksum confirmation means 76. The checksum confirmation unit 76 calculates the checksum 722 of the data of the corresponding real page 33. Then, the checksum confirmation unit 76 compares the calculated checksum 722 with the checksum 722 of the corresponding real page 33 stored in the checksum data table 72. The checksum confirmation unit 76 reads data corresponding to the corresponding virtual page 53 from the auxiliary storage unit 5 when the checksums 722 do not match. Then, the checksum confirmation unit 76 writes the read data to the corresponding real page 33. Then, the checksum confirmation unit 76 sets the check bit 721 of the corresponding real page 33 to “1”.

そして、メモリ管理手段7は該当する仮想ページ53の有効ビット711を有効『1』に設定する。   Then, the memory management unit 7 sets the valid bit 711 of the corresponding virtual page 53 to valid “1”.

メモリ管理手段7は、アドレス変換例外の発生原因がアクセス対象の仮想ページ番号710に対応する実ページ番号720がアドレス変換表71に登録されていないことによる場合は、メモリ割り当て処理(図示せず)を実行する。メモリ割り当て処理において、すでに補助記憶手段5にデータが格納されている仮想ページ53の場合は、メモリ管理手段7は、ページイン処理手段77によりページイン処理を行う。   If the cause of the address translation exception is that the real page number 720 corresponding to the virtual page number 710 to be accessed is not registered in the address translation table 71, the memory management means 7 performs a memory allocation process (not shown). Execute. In the memory allocation process, in the case of the virtual page 53 in which data is already stored in the auxiliary storage unit 5, the memory management unit 7 performs the page-in process by the page-in processing unit 77.

メモリ管理手段7は、メモリ3の空きが少なくなったことを検出した場合は、ページアウト処理手段78によりページアウト処理を実行する。なお、メモリ3の空きが少なくなったことを検出するタイミングは、例えば、ページイン処理を実行した直後である。
When the memory management unit 7 detects that the free space in the memory 3 has decreased, the page-out processing unit 78 performs page-out processing. Note that the timing for detecting that the memory 3 is low is immediately after the page-in process is executed, for example.

次に、本発明の第2の実施の形態の動作について図面を参照して説明する。   Next, the operation of the second exemplary embodiment of the present invention will be described with reference to the drawings.

図13はサスペンド時のメモリ管理手段7の動作である。   FIG. 13 shows the operation of the memory management means 7 during suspension.

メモリ管理手段7は、サスペンド処理指示を検出する(ステップS830)。   The memory management unit 7 detects a suspend process instruction (step S830).

メモリ管理手段7は、アドレス変換表71のすべての仮想ページ番号710について、ステップS832〜ステップS836を行う(ステップS831)。   The memory management unit 7 performs Steps S832 to S836 for all virtual page numbers 710 in the address conversion table 71 (Step S831).

メモリ管理手段7において、サスペンド処理手段75は、変更ビット712をチェックする(ステップS832)。   In the memory management unit 7, the suspend processing unit 75 checks the change bit 712 (step S832).

変更ビット712が『1』の場合(ステップS832でYESの場合)、サスペンド処理手段75は、該当する実ページ33のデータを補助記憶手段5へ書き込む(ステップS833)。   When the change bit 712 is “1” (YES in step S832), the suspend processing unit 75 writes the data of the corresponding real page 33 to the auxiliary storage unit 5 (step S833).

さらに、サスペンド処理手段75は、該当する実ページ33のデータについてチェックサムを計算し、その計算したチェックサムをチェックコード722としてチェックサムデータ表72に書き込む(ステップS834)。そして、サスペンド処理手段75は、変更ビット712を『0』にする(ステップS835)。そして、サスペンド処理手段75は、有効ビット711を『0』にする。そして、サスペンド処理手段75は、アドレス変換表71に設定されている実ページ番号720に対応するチェックサムデータ表72の実ページ番号720のチェックビット721を『0』にする(ステップS836)。そして、メモリ管理手段7は、次の仮想ページ53の処理へ進む。   Furthermore, the suspend processing means 75 calculates a checksum for the data of the corresponding real page 33, and writes the calculated checksum as the check code 722 in the checksum data table 72 (step S834). Then, the suspend processing means 75 sets the change bit 712 to “0” (step S835). Then, the suspend processing means 75 sets the valid bit 711 to “0”. Then, the suspend processing means 75 sets the check bit 721 of the real page number 720 of the checksum data table 72 corresponding to the real page number 720 set in the address conversion table 71 to “0” (step S836). Then, the memory management unit 7 proceeds to the processing of the next virtual page 53.

変更ビット712が『0』の場合(ステップS832でNOの場合)、サスペンド処理手段75は、有効ビット711を『0』にする。そして、サスペンド処理手段75は、アドレス変換表71に設定されている実ページ番号720に対応するチェックサムデータ表72の実ページ番号720のチェックビット721を『0』にする(ステップS836)。そして、メモリ管理手段7は、次の仮想ページ53の処理へ進む。   When the change bit 712 is “0” (NO in step S832), the suspend processing unit 75 sets the valid bit 711 to “0”. Then, the suspend processing means 75 sets the check bit 721 of the real page number 720 of the checksum data table 72 corresponding to the real page number 720 set in the address conversion table 71 to “0” (step S836). Then, the memory management unit 7 proceeds to the processing of the next virtual page 53.

図13に示す動作が終了した時、すべての仮想ページ53の変更ビット712が『0』となり、メモリ3に格納されているデータは、補助記憶手段5に格納されているデータと整合が取れた状態になる。   When the operation shown in FIG. 13 is completed, the change bits 712 of all virtual pages 53 are “0”, and the data stored in the memory 3 is consistent with the data stored in the auxiliary storage unit 5. It becomes a state.

また、すべての仮想ページ53の有効ビット711が『0』、チェックビット721が『0』の状態になる。従って、レジューム後のアクセスにおいて、アドレス変換例外が発生する。   In addition, the valid bits 711 of all virtual pages 53 are set to “0” and the check bit 721 is set to “0”. Therefore, an address translation exception occurs in the access after resume.

図14はレジューム時の動作を示している。   FIG. 14 shows the operation during resume.

図示しない手段により、電源が投入され、レジューム処理が開始される(ステップS840)。   The power is turned on by means not shown, and the resume process is started (step S840).

プロセッサ1は、メモリ管理手段7のチェックを行う(ステップS841)。チェックの結果が問題なしならば(ステップS842でYESの場合)、サスペンドの直前の動作を再開する。   The processor 1 checks the memory management means 7 (step S841). If there is no problem as a result of the check (YES in step S842), the operation immediately before the suspend is resumed.

チェックの結果が問題有りならば(ステップS842でNOの場合)、レジュームはあきらめて、初期化ブート処理(図示しない)へ制御を渡す。   If the result of the check is a problem (NO in step S842), the resume is given up and control is passed to an initialization boot process (not shown).

図15は、リード指示、または、ライト指示を検出した場合のアドレス変換手段2の動作を示すフローチャートである。   FIG. 15 is a flowchart showing the operation of the address conversion unit 2 when a read instruction or a write instruction is detected.

アドレス変換手段2がプロセッサ1からメモリ3へのライト指示またはリード指示を検出する(ステップS860)。   The address conversion unit 2 detects a write instruction or a read instruction from the processor 1 to the memory 3 (step S860).

アドレス変換手段2は、有効ビット711をチェックする(ステップS861)。有効ビット711が『0』の場合(ステップS861でNOの場合)、アドレス変換手段2は、アドレス変換例外を発生する。また、有効ビット711が『1』の場合(ステップS861でYESの場合)、アドレス変換手段2は、S862へ進む。   The address conversion unit 2 checks the valid bit 711 (step S861). If the valid bit 711 is “0” (NO in step S861), the address conversion unit 2 generates an address conversion exception. If the valid bit 711 is “1” (YES in step S861), the address conversion unit 2 proceeds to S862.

次に、アドレス変換手段2は、実ページ番号720がアドレス変換表71に登録されているか否かをチェックする(ステップS862)。実ページ番号720が登録されていない場合(ステップS862でNOの場合)、アドレス変換手段2は、アドレス変換例外を発生する。また、実ページ番号720がアドレス変換表71に登録されている場合(ステップS862でYESの場合)、アドレス変換手段2は、S863へ進む。   Next, the address conversion unit 2 checks whether or not the real page number 720 is registered in the address conversion table 71 (step S862). If the real page number 720 is not registered (NO in step S862), the address conversion unit 2 generates an address conversion exception. If the real page number 720 is registered in the address conversion table 71 (YES in step S862), the address conversion unit 2 proceeds to S863.

次にアドレス変換手段2は、ライト指示か否かを確認する(ステップS863)。ライト指示で無かった場合(ステップS863でNOの場合)、アドレス変換手段2は、アドレス変換処理へ進む。ライト指示であった場合(ステップS863でYESの場合)、アドレス変換手段2は、ステップS864へ進む。   Next, the address conversion means 2 confirms whether or not it is a write instruction (step S863). If there is no write instruction (NO in step S863), the address conversion unit 2 proceeds to the address conversion process. If it is a write instruction (YES in step S863), the address conversion unit 2 proceeds to step S864.

そして、アドレス変換手段2は、対応する仮想ページ53の変更ビット712を『1』にする(ステップS864)。そしてアドレス変換手段2は、アドレス変換処理へ進む。   Then, the address conversion unit 2 sets the change bit 712 of the corresponding virtual page 53 to “1” (step S864). Then, the address conversion unit 2 proceeds to the address conversion process.

図16は、アドレス変換手段2がアドレス変換例外を発生した場合の、メモリ管理手段7のアドレス変換例外動作のフローチャートである。   FIG. 16 is a flowchart of the address translation exception operation of the memory management means 7 when the address translation means 2 generates an address translation exception.

メモリ管理手段7は、アドレス変換表71に実ページ番号720が登録されているかどうかを確認する(ステップS851)。   The memory management means 7 checks whether or not the real page number 720 is registered in the address conversion table 71 (step S851).

実ページ番号720が登録されていない場合(ステップS851でNOの場合)、メモリ管理手段7は、メモリ割り当て処理へ進む。実ページ番号720が登録されている場合(ステップS851でYESの場合)、メモリ管理手段7は、ステップ852へ進む。   If the real page number 720 is not registered (NO in step S851), the memory management unit 7 proceeds to the memory allocation process. If the real page number 720 is registered (YES in step S851), the memory management unit 7 proceeds to step 852.

次に、メモリ管理手段7は、変更ビット712を確認する(ステップS852)。変更ビット712が『1』の場合(ステップS852でYESの場合)、ステップS858へ進む。変更ビット712が『0』の場合(ステップS852でNOの場合)、ステップS853へ進む。   Next, the memory management means 7 confirms the change bit 712 (step S852). When the change bit 712 is “1” (YES in step S852), the process proceeds to step S858. If the change bit 712 is “0” (NO in step S852), the process proceeds to step S853.

次に、メモリ管理手段7は、チェックビット721を確認する(ステップS853)。チェックビット721が『1』の場合(ステップS853でYESの場合)、ステップS858へ進む。チェックビット721が『0』の場合(ステップS853でNOの場合)、ステップS854へ進む。   Next, the memory management unit 7 confirms the check bit 721 (step S853). If the check bit 721 is “1” (YES in step S853), the process proceeds to step S858. If the check bit 721 is “0” (NO in step S853), the process proceeds to step S854.

次に、チェックサム確認手段76は、対象の実ページ33のデータについてチェックサムを計算する(ステップS854)。そして、その計算したチェックサムが、対象の実ページ番号720に対応するチェックサムデータ表72に記憶されているチェックサム722と一致するか否かを確認する(ステップS855)。2つのチェックサムが一致した場合(ステップS855でYESの場合)、ステップS857へ進む。なお、2つのチェックサムが一致したことは、該当する実ページ33のデータは変化してないので、そのまま使用して良いことを示している。2つのチェックサムが一致しなかった場合(ステップS855でNOの場合)、ステップS856へ進む。なお、2つのチェックサムが一致しなかったことは、該当する実ページ33のデータが変化しているので、そのまま使用できないことを示している。   Next, the checksum confirmation unit 76 calculates a checksum for the data of the target real page 33 (step S854). Then, it is confirmed whether or not the calculated checksum matches the checksum 722 stored in the checksum data table 72 corresponding to the target real page number 720 (step S855). If the two checksums match (YES in step S855), the process proceeds to step S857. The fact that the two checksums match indicates that the data of the corresponding real page 33 has not changed and can be used as it is. If the two checksums do not match (NO in step S855), the process advances to step S856. The fact that the two checksums do not match indicates that the data of the corresponding real page 33 has changed and cannot be used as it is.

そして、チェックサム確認手段76は、補助記憶手段5から対象の仮想ページ53に対応するデータを読み込む。そして、チェックサム確認手段76は、読み込んだ仮想ページ53に対応するデータを対象の実ページ33に書き込む(ステップS856)。これで、実ページ33のデータは変化前の状態に復旧する。   Then, the checksum confirmation unit 76 reads data corresponding to the target virtual page 53 from the auxiliary storage unit 5. Then, the checksum confirmation unit 76 writes the data corresponding to the read virtual page 53 to the target real page 33 (step S856). Thus, the data of the real page 33 is restored to the state before the change.

そして、チェックサム確認手段76は、チェックビット721を『1』にする(ステップS857)。   Then, the checksum confirmation unit 76 sets the check bit 721 to “1” (step S857).

そして、メモリ管理手段7は、有効ビット711を『1』にする(ステップS858)。なお、この後、元の処理に復帰すると、今度は有効ビット711が『1』なので、アドレス変換手段2によるアドレス変換が成功する。   Then, the memory management unit 7 sets the valid bit 711 to “1” (step S858). After that, when returning to the original processing, since the effective bit 711 is “1” this time, the address conversion by the address conversion means 2 is successful.

図17は、必要になった仮想ページ53に対応するデータを、補助記憶手段5から読み込み、メモリ3に配置してアクセスできるようにするページイン処理の動作のフローチャートである。   FIG. 17 is a flowchart of the operation of page-in processing for reading data corresponding to the required virtual page 53 from the auxiliary storage means 5 and placing it in the memory 3 so that it can be accessed.

ページイン処理手段77は、仮想ページ53を配置するメモリ3内の実ページ33の位置を決めて、これに対応する実ページ番号720をアドレス変換表71に登録する(ステップS871)。   The page-in processing unit 77 determines the position of the real page 33 in the memory 3 where the virtual page 53 is arranged, and registers the real page number 720 corresponding thereto in the address conversion table 71 (step S871).

次に、ページイン処理手段77は、補助記憶手段5から対象の仮想ページ53に対応するデータを読み出し、割り当てた実ページ33に書き込む(ステップS872)。   Next, the page-in processing unit 77 reads the data corresponding to the target virtual page 53 from the auxiliary storage unit 5 and writes it in the allocated real page 33 (step S872).

さらに、ページイン処理手段77は、この実ページ33のデータについてチェックサム722を計算し、チェックサムデータ表72に書き込む(ステップS873)。   Further, the page-in processing unit 77 calculates the checksum 722 for the data of the real page 33 and writes it in the checksum data table 72 (step S873).

そして、ページイン処理手段77は、チェックビット721を『1』に、変更ビット712を『0』に初期化し、有効ビット711を『1』にする(ステップS874)。   Then, the page-in processing unit 77 initializes the check bit 721 to “1”, the change bit 712 to “0”, and sets the valid bit 711 to “1” (step S874).

図18は、メモリ3の空きが少なくなった時に、当面不要な仮想ページ53に割り当てられた実ページ33のデータを補助記憶手段5に書き出して、未使用実ページ33を作るページアウト処理の動作のフローチャートである。   FIG. 18 shows the operation of the page-out process for writing the data of the real page 33 allocated to the virtual page 53 that is unnecessary for the time being to the auxiliary storage means 5 to create the unused real page 33 when the memory 3 becomes small. It is a flowchart of.

ページアウト処理手段78は、該当する仮想ページ53に対応するアドレス変換表71の有効ビット711を『0』にする(ステップS875)。   The page-out processing means 78 sets the valid bit 711 of the address conversion table 71 corresponding to the corresponding virtual page 53 to “0” (step S875).

次に、ページアウト処理手段78は、該当する仮想ページ53に対応する変更ビット712を確認する(ステップS876)。変更ビット712が『0』の場合(ステップS876でNO場合)、ページアウト処理手段78は、ステップS878へ進む。変更ビット712が『1』の場合(ステップS876でYES場合)、ページアウト処理手段78は、ステップS877へ進む。   Next, the page-out processing unit 78 checks the change bit 712 corresponding to the corresponding virtual page 53 (step S876). If the change bit 712 is “0” (NO in step S876), the page-out processing unit 78 proceeds to step S878. If the change bit 712 is “1” (YES in step S876), the page-out processing unit 78 proceeds to step S877.

そして、ページアウト処理手段78は、該当する実ページ33のデータを補助記憶手段5に書き込む(ステップS877)。   Then, the page-out processing unit 78 writes the data of the corresponding real page 33 in the auxiliary storage unit 5 (step S877).

そして、ページアウト処理手段78は、アドレス変換表71の、該当する仮想ページ53に対応する実ページ番号720クリアし、メモリ3の対応する実ページ33を開放する(ステップS878)。   Then, the page-out processing unit 78 clears the real page number 720 corresponding to the corresponding virtual page 53 in the address conversion table 71 and releases the corresponding real page 33 in the memory 3 (step S878).

本発明の第2の実施の形態によれば、仮想メモリを制御する構成において、サスペンド時は、実ページ単位で、変更状態情報に基づいて補助記憶への書き込みを行うようにした。そして、仮想メモリを制御する構成において、レジューム時は、メモリ制御装置部分のチェックだけでサスペンド前の動作を再開するようにした。そして、仮想メモリを制御する構成において、ライト時またはリード時に、実ページ単位で、有効状態情報とチェックサムに基づいてデータの有効性をチェックするようにした。   According to the second embodiment of the present invention, in the configuration for controlling the virtual memory, at the time of suspension, writing to the auxiliary memory is performed in units of real pages based on the change state information. In the configuration in which the virtual memory is controlled, the operation before the suspension is resumed only by checking the memory control device part at the time of resume. In the configuration for controlling the virtual memory, the validity of the data is checked based on the valid state information and the checksum for each real page at the time of writing or reading.

こうして、仮想メモリを制御する構成において、第一の実施の形態と同様の効果を得ることができる。   Thus, in the configuration for controlling the virtual memory, the same effect as that of the first embodiment can be obtained.

また、本発明の第2の実施の形態によれば、ページインの際にチェックサムを計算している。こうして、それ以降にその実ページのデータの書き換えがなければ、サスペンド時にチェックサム計算処理を行う必要がなく、サスペンド処理の高速化が可能になるという効果を有している。   Further, according to the second embodiment of the present invention, the checksum is calculated at the time of page-in. Thus, if the data of the actual page is not rewritten thereafter, there is no need to perform the checksum calculation process at the time of suspend, and the suspend process can be speeded up.

次に、本発明の第3の実施の形態について図面を参照して説明する。なお、本発明の第3の実施の形態については、本発明の第2の実施の形態と異なる部分について説明する。   Next, a third embodiment of the present invention will be described with reference to the drawings. In addition, about the 3rd Embodiment of this invention, a different part from the 2nd Embodiment of this invention is demonstrated.

図19を参照すると、本発明の第3の実施の形態は、メモリ管理手段7が、第2の実施の形態の構成を示す図8のメモリ管理手段7に加えて、レジューム対象プロセス表79を有する点で第2の実施の形態と異なる。また、図21に示すアドレス変換表71が、図11に示す第2の実施の形態のアドレス変換表71に比べて、プロセス識別子保持手段として、仮想ページ53ごとにプロセスID731を追加されている点で第2の実施の形態と異なる。   Referring to FIG. 19, in the third embodiment of the present invention, in addition to the memory management means 7 of FIG. 8 showing the configuration of the second embodiment, the memory management means 7 stores a resume process table 79. It differs from the second embodiment in that it has. Further, the address conversion table 71 shown in FIG. 21 is added with a process ID 731 for each virtual page 53 as a process identifier holding unit as compared with the address conversion table 71 of the second embodiment shown in FIG. This is different from the second embodiment.

レジューム対象プロセス表79は、レジュームの対象とするプロセスを設定する表である。図20にレジューム対象プロセス表79の構造を示す。本発明の第3の実施の形態のメモリ管理手段7は、レジューム対象プロセス表79に設定されたプロセスID731のプロセスについてレジュームを保障する。   The resume target process table 79 is a table for setting a process to be resumed. FIG. 20 shows the structure of the resume target process table 79. The memory management unit 7 according to the third exemplary embodiment of the present invention guarantees the resume for the process with the process ID 731 set in the resume target process table 79.

次に本発明の第3の実施の形態の動作について説明する。本発明の第3の実施の形態のサスペンド処理手段75によるサスペンド処理の動作は、図13のステップS833の部分を図22に置き換えたものである。本発明の第3の実施の形態のメモリ管理手段7によるアドレス変換例外処理の動作は、図16のステップS856の部分を図23に置き換えたものである。   Next, the operation of the third embodiment of the present invention will be described. The operation of the suspend processing by the suspend processing means 75 according to the third embodiment of the present invention is obtained by replacing the portion of step S833 in FIG. 13 with FIG. The operation of the address translation exception process by the memory management unit 7 according to the third embodiment of the present invention is obtained by replacing step S856 in FIG. 16 with FIG.

サスペンド処理手段75は、変更ビット712が『1』であっても、無条件で補助記憶手段5にデータを書き込まない。サスペンド処理手段75は、アドレス変換表71から、対象の仮想ページ53のプロセスID731を取得する。 そして、サスペンド処理手段75は、レジューム対象プロセス表79を参照して、取得したプロセスID731がレジューム対象プロセス表79に設定されているか否かを確認する。そして、サスペンド処理手段75は、プロセスID731がレジューム対象プロセス表79に設定されている場合(ステップS881のYESの場合)は、レジューム対象プロセスの仮想ページ53であると判断してステップS882へ進む。また、サスペンド処理手段75は、プロセスID731がレジューム対象プロセス表79に設定されていない場合(ステップS881のNOの場合)は、レジューム対象プロセスの仮想ページ53ではないと判断してステップS883へ進む。   Even when the change bit 712 is “1”, the suspend processing unit 75 does not write data to the auxiliary storage unit 5 unconditionally. The suspend processing unit 75 acquires the process ID 731 of the target virtual page 53 from the address conversion table 71. Then, the suspend processing means 75 refers to the resume target process table 79 and confirms whether or not the acquired process ID 731 is set in the resume target process table 79. When the process ID 731 is set in the resume target process table 79 (YES in step S881), the suspend processing unit 75 determines that the process is the virtual page 53 of the resume target process and proceeds to step S882. If the process ID 731 is not set in the resume target process table 79 (NO in step S881), the suspend processing means 75 determines that the process is not the resume target process virtual page 53 and proceeds to step S883.

そして、サスペンド処理手段75は、補助記憶手段5に該当する仮想ページ53に割り当てられた実ページ33のデータを書き込む(ステップS882)。   Then, the suspend processing unit 75 writes the data of the real page 33 allocated to the virtual page 53 corresponding to the auxiliary storage unit 5 (step S882).

そして、サスペンド処理手段75は、補助記憶手段5の該当部分を無効化する(ステップS883)。なお、無効化の処理方法としては、例えば、該当する仮想ページ53に割り当てられた実ページ33のデータが、補助記憶装置5のどこに記憶されているかの情報(図示しない)をクリアし、補助記憶装置5の該当領域を解放する方法がある。   Then, the suspend processing unit 75 invalidates the corresponding part of the auxiliary storage unit 5 (step S883). As an invalidation processing method, for example, information (not shown) where the data of the real page 33 allocated to the corresponding virtual page 53 is stored in the auxiliary storage device 5 is cleared, and the auxiliary storage is performed. There is a method of releasing the corresponding area of the device 5.

本発明の第3の実施の形態のアドレス変換例外処理におけるチェックサム確認手段76による処理は、第2の実施の形態の図16のステップS856の動作を、図23の動作に置き換えた構成となる。本発明の第3の実施の形態では、図16のステップS856で補助記憶手段5の該当する仮想ページ53の部分が無効化された部分である場合は、その仮想ページ53を使用しているプロセスを強制終了させる処理(図示しない。)へ制御を渡す。このため、レジューム対象プロセス表79に設定されていないプロセスの仮想ページ53に対応するデータがサスペンド状態の間に変化した場合は、そのプロセスはレジューム後に強制終了となる。   The processing by the checksum confirmation unit 76 in the address translation exception processing according to the third embodiment of the present invention has a configuration in which the operation in step S856 in FIG. 16 in the second embodiment is replaced with the operation in FIG. . In the third embodiment of the present invention, if the corresponding virtual page 53 of the auxiliary storage unit 5 is invalidated in step S856 of FIG. 16, the process using the virtual page 53 is used. Control is passed to the process for forcibly terminating (not shown). For this reason, when the data corresponding to the virtual page 53 of a process not set in the resume target process table 79 changes during the suspended state, the process is forcibly terminated after the resume.

本発明の第3の実施の形態によれば、レジューム対象プロセス表に設定されたプロセスのみのレジュームを保証するように構成して、補助記憶手段5へ書き込む量が減少させたため、サスペンド処理がより高速になるという効果を有する。   According to the third embodiment of the present invention, it is configured to guarantee the resume of only the process set in the resume target process table, and the amount of data written to the auxiliary storage unit 5 is reduced. It has the effect of speeding up.

なお、以上説明した実施の形態は一例であるため、例えば、チェックコードを保持する場所は、メモリでも、補助記憶手段でも良い。また、例えば、補助記憶手段は、ディスクその他の不揮発性メモリでも良いし、ネットワーク経由で接続された記憶処断を持つ装置であっても良い。   Since the embodiment described above is an example, for example, the location where the check code is held may be a memory or an auxiliary storage unit. Further, for example, the auxiliary storage means may be a disk or other nonvolatile memory, or may be a device having a storage process connected via a network.

本発明は、レジューム機能を有するコンピュータ等に利用できる。本発明は、例えば、サスペンド状態時のメモリへの電源供給が不安定な状況下においても、高速でかつ信頼性の高いレジューム動作を要求されるコンピュータ等に利用できる。   The present invention can be used for a computer having a resume function. The present invention can be used for, for example, a computer that requires a high-speed and highly reliable resume operation even in a situation where power supply to a memory in a suspended state is unstable.

本発明の第1実施の形態の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of 1st Embodiment of this invention. 本発明の第1実施の形態の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of 1st Embodiment of this invention. 本発明の第1の実施の形態におけるメモリのページの概念を示す図である。It is a figure which shows the concept of the page of the memory in the 1st Embodiment of this invention. 本発明の第1の実施の形態における変更状態情報保持手段とチェックコード保持手段と有効状態情報保持手段の構造を示す図である。It is a figure which shows the structure of the change status information holding means in the 1st Embodiment of this invention, a check code holding means, and a valid state information holding means. 本発明の第1の実施の形態におけるサスペンド処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the suspend process in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるレジューム処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the resume process in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるライト指示またはリード指示を検出した場合の動作を示すフローチャートである。4 is a flowchart showing an operation when a write instruction or a read instruction is detected in the first embodiment of the present invention. 本発明の第2実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるメモリの実ページの概念を示す図である。It is a figure which shows the concept of the real page of the memory in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における補助記憶手段に格納された仮想ページの概念を示す図である。It is a figure which shows the concept of the virtual page stored in the auxiliary storage means in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるアドレス変換表の構造を示す図である。It is a figure which shows the structure of the address conversion table in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるチェックサムデータ表の構造を示す図である。It is a figure which shows the structure of the checksum data table in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるサスペンド処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the suspend process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるレジューム処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the resume process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるライト指示またはリード指示を検出した場合の動作を示すフローチャートである。It is a flowchart which shows operation | movement when the write instruction | indication or read instruction | indication in the 2nd Embodiment of this invention is detected. 本発明の第2の実施の形態におけるアドレス変換例外処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the address translation exception process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるページイン処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the page-in process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるページアウト処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the page-out process in the 2nd Embodiment of this invention. 本発明の第3実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるレジューム対象プロセス表の構造を示す図である。It is a figure which shows the structure of the resume object process table | surface in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるアドレス変換表の構造を示す図である。It is a figure which shows the structure of the address conversion table | surface in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるサスペンド処理の動作の一部を示すフローチャートである。It is a flowchart which shows a part of operation | movement of the suspend process in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるアドレス変換例外処理の動作の一部を示すフローチャートである。It is a flowchart which shows a part of operation | movement of the address translation exception process in the 3rd Embodiment of this invention.

符号の説明Explanation of symbols

1 プロセッサ
2 アドレス変換手段
3 メモリ
4 バッテリ
5 補助記憶手段
6 メモリ制御装置
7 メモリ管理手段
8 メモリ制御装置
11 レジューム処理手段
31 ページ
33 実ページ
50 仮想メモリ
53 仮想ページ
61 変更状態情報保持手段
62 チェックコード保持手段
63 有効状態情報保持手段
64 変更状態情報設定手段
65 サスペンド処理手段
66 有効状態情報制御手段
71 アドレス変換表
72 チェックサムデータ表
75 サスペンド処理手段
76 チェックサム確認手段
77 ページイン処理手段
78 ページアウト処理手段
79 レジューム対象プロセス表
300 第1の記憶装置
301 単位記憶部
500 第2の記憶装置
600 メモリ制御装置
611 変更状態情報
621 チェックコード
631 有効状態情報
710 仮想ページ番号
711 有効ビット
712 変更ビット
720 実ページ番号
721 チェックビット
722 チェックサム
731 プロセスID
DESCRIPTION OF SYMBOLS 1 Processor 2 Address conversion means 3 Memory 4 Battery 5 Auxiliary storage means 6 Memory control apparatus 7 Memory management means 8 Memory control apparatus 11 Resume processing means 31 Page 33 Real page 50 Virtual memory 53 Virtual page 61 Change state information holding means 62 Check code Holding means 63 Valid state information holding means 64 Change state information setting means 65 Suspend processing means 66 Valid state information control means 71 Address conversion table 72 Checksum data table 75 Suspend processing means 76 Checksum confirmation means 77 Page-in processing means 78 Page-out Processing means 79 Resume target process table 300 First storage device 301 Unit storage unit 500 Second storage device 600 Memory control device 611 Change state information 621 Check code 631 Valid state information 7 0 virtual page number 711 valid bits 712 change bit 720 real page number 721 check bits 722 checksum 731 process ID

Claims (21)

複数の単位記憶部からなる第1の記憶装置と、第2の記憶装置とを制御するメモリ制御装置であって、
サスペンド時には変更状態にある前記単位記憶部内の前記データを前記第2の記憶装置に格納し、変更状態にある前記単位記憶部内の前記データのチェックコードを生成し、
前記第1の記憶装置へのアクセスを検出した場合に、有効状態にない前記単位記憶部内の前記データの前記チェックコードを生成し、当該チェックコードと前記サスペンド時に生成した前記チェックコードとを比較し、一致しなかった場合に、前記第2の記憶装置に格納した前記単位記憶部内の前記データを読み出して前記単位記憶部に書き込む手段
を有するメモリ制御装置。
A memory control device that controls a first storage device including a plurality of unit storage units and a second storage device,
Storing the data in the unit storage unit in the changed state in the second storage device at the time of suspension, and generating a check code of the data in the unit storage unit in the changed state;
When an access to the first storage device is detected, the check code of the data in the unit storage unit that is not in a valid state is generated, and the check code is compared with the check code generated at the time of suspend. A memory control device comprising means for reading the data in the unit storage unit stored in the second storage device and writing it in the unit storage unit when they do not match.
前記手段は、サスペンド時には変更状態にない前記単位記憶部内の前記データを前記第2の記憶装置には格納しない
請求項1記載のメモリ制御装置。
2. The memory control device according to claim 1, wherein the means does not store the data in the unit storage unit that is not changed when suspended in the second storage device. 3.
ページ単位の前記単位記憶部で構成されるメモリである前記第1の記憶装置と、
補助記憶手段である前記第2の記憶装置と、
を制御する請求項1または2記載のメモリ制御装置。
The first storage device which is a memory configured by the unit storage unit in page units;
The second storage device being auxiliary storage means;
3. The memory control device according to claim 1, wherein the memory control device is controlled.
前記ページを単位として前記第1の記憶装置を管理する前記メモリ制御装置であって、
前記ページのデータの有効状態情報を保持する有効状態情報保持手段と、
前記ページのデータに対する前記チェックコードを保持するチェックコード保持手段と、
前記第1の記憶装置へのアクセスを検出した場合に、該当する前記ページの前記有効状態情報を参照し、前記有効状態情報が無効の場合に、当該ページの前記チェックコードを生成し、当該チェックコードと前記チェックコード保持手段に格納されている前記チェックコードとを比較し、一致しなかった場合に、前記第2の記憶装置から当該ページに対応する前記データを読み出して当該ページに書き込み、前記有効状態情報を有効に設定する有効状態情報制御手段と、
を有する請求項3記載のメモリ制御装置。
The memory control device that manages the first storage device in units of the page,
Valid state information holding means for holding valid state information of the data of the page;
Check code holding means for holding the check code for the data of the page;
When the access to the first storage device is detected, the valid state information of the corresponding page is referred to. When the valid state information is invalid, the check code of the page is generated and the check is performed. If the code and the check code stored in the check code holding means are compared and do not match, the data corresponding to the page is read from the second storage device and written to the page, Valid state information control means for validly setting valid state information;
The memory control device according to claim 3.
前記ページのデータの変更状態情報を保持する変更状態情報保持手段と、
ライト指示により前記ページのデータが変更された場合に、該当するページの前記変更状態情報を変更有に設定する変更状態情報設定手段と、
サスペンド処理指示を検出した場合に、前記変更状態情報を参照して変更有の場合に、当該ページの前記データを前記第2の記憶装置に書き込み、当該ページの前記データのチェックコードを生成して前記チェックコード保持手段に書き込むサスペンド処理手段と、
を更に有する請求項4記載のメモリ制御装置。
Change state information holding means for holding change state information of the data of the page;
A change state information setting means for setting the change state information of the corresponding page to changed when the data of the page is changed by a write instruction;
When a suspend processing instruction is detected, if there is a change with reference to the change state information, the data of the page is written to the second storage device, and a check code of the data of the page is generated. Suspend processing means for writing in the check code holding means;
The memory control device according to claim 4, further comprising:
仮想メモリ制御のためのアドレス変換手段を有し、
前記アドレス変換手段が、前記第1の記憶装置へのアクセスを検出し、これを前記有効状態情報設定手段に通知する手段と、前記変更状態情報設定手段と、
を有する請求項4または5記載のメモリ制御装置。
Having address translation means for virtual memory control;
The address conversion means detects access to the first storage device and notifies the effective state information setting means of the access; the change state information setting means;
The memory control device according to claim 4, comprising:
ページイン処理指示を検出した場合に、前記チェックコードを生成し、前記有効状態情報を有効に設定する手段
を有する請求項6記載のメモリ制御装置。
7. The memory control device according to claim 6, further comprising means for generating the check code and setting the valid state information valid when a page-in processing instruction is detected.
レジューム対象のプロセスの識別子を保持するレジューム対象プロセス保持手段と、
前記ページが割り当てられた前記プロセスの前記識別子を保持するプロセス識別子保持手段と、
前記サスペンド処理指示を検出した場合に、各ページの前記プロセス識別子保持手段と、
前記レジューム対象プロセス保持手段を参照して、当該ページが前記レジューム対象の前記プロセスに割り当てられているか否かを判断し、当該ページが前記レジューム対象の前記プロセスに割り当てられている場合に、当該ページの前記データを前記第2の記憶装置に書き込む手段と、
を有する請求項3乃至7のいずれかに記載のメモリ制御装置。
A resume target process holding means for holding an identifier of a resume target process;
Process identifier holding means for holding the identifier of the process to which the page is allocated;
When detecting the suspend process instruction, the process identifier holding means of each page;
With reference to the resume process holding means, it is determined whether or not the page is assigned to the process to be resumed, and when the page is assigned to the process to be resumed, the page Means for writing the data in the second storage device;
The memory control device according to claim 3, comprising:
請求項1乃至8のいずれかに記載の前記メモリ制御装置と、
前記第1の記憶装置と、
前記第2の記憶装置と、
前記メモリ制御装置を介して前記第1の記憶装置をアクセスするプロセッサと、
前記第1の記憶装置の電源をバックアップするバッテリと、
を有するシステム。
The memory control device according to any one of claims 1 to 8,
The first storage device;
The second storage device;
A processor for accessing the first storage device via the memory control device;
A battery for backing up the power source of the first storage device;
Having a system.
レジューム処理時に、前記メモリ制御装置が正常であることを検出した場合はサスペンド前の動作を再開し、前記メモリ制御装置が正常でないことを検出した場合は前記メモリ制御装置及び前記第1の記憶装置の初期化処理を実行する手段
を更に有する請求項9記載のシステム。
During the resume process, when it is detected that the memory control device is normal, the operation before suspend is resumed, and when it is detected that the memory control device is not normal, the memory control device and the first storage device The system according to claim 9, further comprising means for executing the initialization process.
複数の単位記憶部からなる第1の記憶装置と、第2の記憶装置とを制御するプログラムであって、
サスペンド時には変更状態にある前記単位記憶部内の前記データを前記第2の記憶装置に格納し、変更状態にある前記単位記憶部内の前記データのチェックコードを生成し、
前記第1の記憶装置へのアクセスを検出した場合に、有効状態にない前記単位記憶部内の前記データの前記チェックコードを生成し、当該チェックコードと前記サスペンド時に生成した前記チェックコードとを比較し、一致しなかった場合に、前記第2の記憶装置に格納した前記単位記憶部内の前記データを読み出して前記単位記憶部に書き込む処理をコンピュータに実行させるプログラム。
A program for controlling a first storage device comprising a plurality of unit storage units and a second storage device,
Storing the data in the unit storage unit in the changed state in the second storage device at the time of suspension, and generating a check code of the data in the unit storage unit in the changed state;
When an access to the first storage device is detected, the check code of the data in the unit storage unit that is not in a valid state is generated, and the check code is compared with the check code generated at the time of suspend. A program for causing a computer to execute a process of reading the data in the unit storage unit stored in the second storage device and writing the data in the unit storage unit when they do not match.
ページ単位の前記単位記憶部で構成されるメモリである前記第1の記憶装置と、
補助記憶手段である前記第2の記憶装置と、
を制御する請求項11記載のプログラム。
The first storage device which is a memory configured by the unit storage unit in page units;
The second storage device being auxiliary storage means;
12. The program according to claim 11, wherein the program is controlled.
前記ページを単位として前記第1の記憶装置を管理する前記プログラムであって、
前記ページの前記データの有効状態情報を保持する有効状態情報保持部と、
前記ページの前記データに対する前記チェックコードを保持するチェックコード保持部と、
をワークエリアとして使用し、
前記第1の記憶装置へのアクセスを検出した場合に、前記ページの前記有効状態情報を参照し、前記有効状態情報が無効の場合に、当該ページの前記チェックコードを生成し、当該チェックコードと前記チェックコード保持部に格納されている前記チェックコードとを比較し、一致しなかった場合に、前記第2の記憶装置から当該ページに対応する前記データを読み出して当該ページに書き込み、前記有効状態情報を有効に設定する処理、
をコンピュータに実行させる請求項12記載のプログラム。
The program for managing the first storage device in units of the page,
A valid state information holding unit for holding valid state information of the data of the page;
A check code holding unit for holding the check code for the data of the page;
As a work area,
When the access to the first storage device is detected, the valid state information of the page is referred to. When the valid state information is invalid, the check code of the page is generated, and the check code and The check code stored in the check code holding unit is compared, and if they do not match, the data corresponding to the page is read from the second storage device and written to the page, and the valid state The process of setting the information valid,
13. The program according to claim 12, which causes a computer to execute.
前記ページのデータの変更状態情報を保持する変更状態情報保持部を
更にワークエリアとして使用し、
ライト指示により前記ページのデータが変更された場合に、該当するページの前記変更状態情報を変更有に設定する処理と、
サスペンド処理指示を検出した場合に、前記変更状態情報を参照して変更有の場合に、当該ページの前記データを前記第2の記憶装置に書き込み、当該ページの前記データのチェックコードを生成して前記チェックコード保持手段に書き込むサスペンド処理と、
を更にコンピュータに実行させる請求項13記載のプログラム。
A change state information holding unit for holding change state information of the data of the page is further used as a work area,
When the data of the page is changed by a write instruction, a process of setting the change state information of the corresponding page to changeable,
When a suspend processing instruction is detected, if there is a change with reference to the change state information, the data of the page is written to the second storage device, and a check code for the data of the page is generated. A suspend process for writing to the check code holding means;
The program according to claim 13, further causing the computer to execute.
前記サスペンド処理指示を検出した場合に、前記各ページが割り当てられた前記プロセスがあらかじめ定められた前記レジューム対象の前記プロセスである場合に、当該ページの前記データを前記第2の記憶装置に書き込む処理
をコンピュータに実行させる請求項12乃至14のいずれかに記載のプログラム。
Processing for writing the data of the page to the second storage device when the process to which each page is allocated is the predetermined process to be resumed when the suspend process instruction is detected 15. The program according to claim 12, which causes a computer to execute.
コンピュータが、複数の単位記憶部からなる第1の記憶装置と、第2の記憶装置とを制御する方法であって、
サスペンド時には変更状態にある前記単位記憶部内の前記データを前記第2の記憶装置に格納し、変更状態にある前記単位記憶部内の前記データのチェックコードを生成し、
前記第1の記憶装置へのアクセスを検出した場合に、有効状態にない前記単位記憶部内の前記データの前記チェックコードを生成し、当該チェックコードと前記サスペンド時に生成した前記チェックコードとを比較し、一致しなかった場合に、前記第2の記憶装置に格納した前記単位記憶部内の前記データを読み出して前記単位記憶部に書き込む
方法。
A method for controlling a first storage device and a second storage device, each comprising a plurality of unit storage units,
Storing the data in the unit storage unit in the changed state in the second storage device at the time of suspension, and generating a check code of the data in the unit storage unit in the changed state;
When an access to the first storage device is detected, the check code of the data in the unit storage unit that is not in a valid state is generated, and the check code is compared with the check code generated at the time of suspend. A method of reading the data in the unit storage unit stored in the second storage device and writing it in the unit storage unit when they do not match.
サスペンド時には変更状態にない前記単位記憶部内の前記データを前記第2の記憶装置に格納しない
請求項16記載の方法。
The method according to claim 16, wherein the data in the unit storage unit that is not changed when suspended is not stored in the second storage device.
ページ単位の前記単位記憶部で構成されるメモリである前記第1の記憶装置と、
補助記憶手段である前記第2の記憶装置を制御する
請求項17記載の方法。
The first storage device which is a memory configured by the unit storage unit in page units;
The method according to claim 17, wherein the second storage device which is auxiliary storage means is controlled.
コンピュータが前記ページを単位として前記第1の記憶装置を管理する方法であって、
前記第1の記憶装置へのアクセスを検出した場合に、前記ページの前記有効状態情報が無効ならば、当該ページの前記データのチェックコードを生成し、当該チェックコードと前記サスペンド時に生成した前記チェックコードとが一致しなかった場合に、前記第2の記憶装置から当該ページに対応する前記データを読み出して当該ページに書き込み、前記有効状態情報を有効に設定する
請求項18記載の方法。
A method in which a computer manages the first storage device in units of pages,
When the access to the first storage device is detected, if the valid state information of the page is invalid, a check code of the data of the page is generated, and the check code and the check generated at the time of suspend are generated. 19. The method according to claim 18, wherein when the code does not match, the data corresponding to the page is read from the second storage device and written to the page, and the valid state information is set to be valid.
コンピュータが、ライト指示により前記ページのデータが変更された場合に、該当するページの前記変更状態情報を変更有に設定し、
サスペンド処理指示を検出した場合に、前記変更状態情報が変更有ならば、当該ページの前記データを前記第2の記憶装置に書き込み、当該ページの前記データのチェックコードを生成する
請求項19記載の方法。
When the data of the page is changed by a write instruction, the computer sets the change state information of the corresponding page to change,
20. When a suspend process instruction is detected, if the change state information is changed, the data of the page is written to the second storage device, and a check code of the data of the page is generated. Method.
あらかじめレジューム対象のプロセスの識別子を保持するレジューム対象プロセス保持手段と、前記ページが割り当てられた前記プロセスの前記識別子を保持するプロセス識別子保持手段と、前記サスペンド処理指示を検出した場合に、前記各ページが割り当てられた前記プロセスがあらかじめ定められた前記レジューム対象の前記プロセスである場合に、当該ページの前記データを前記第2の記憶装置に書き込む請求項18乃至20のいずれかに記載の方法。 When a resume target process holding unit that holds an identifier of a process to be resumed in advance, a process identifier holding unit that holds the identifier of the process to which the page is allocated, and each of the pages when the suspend process instruction is detected 21. The method according to any one of claims 18 to 20, wherein the data of the page is written to the second storage device when the process to which is assigned is the predetermined process to be resumed.
JP2007284740A 2007-11-01 2007-11-01 MEMORY CONTROL DEVICE, SYSTEM, PROGRAM, AND METHOD Expired - Fee Related JP4867892B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007284740A JP4867892B2 (en) 2007-11-01 2007-11-01 MEMORY CONTROL DEVICE, SYSTEM, PROGRAM, AND METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007284740A JP4867892B2 (en) 2007-11-01 2007-11-01 MEMORY CONTROL DEVICE, SYSTEM, PROGRAM, AND METHOD

Publications (2)

Publication Number Publication Date
JP2009110467A true JP2009110467A (en) 2009-05-21
JP4867892B2 JP4867892B2 (en) 2012-02-01

Family

ID=40778856

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007284740A Expired - Fee Related JP4867892B2 (en) 2007-11-01 2007-11-01 MEMORY CONTROL DEVICE, SYSTEM, PROGRAM, AND METHOD

Country Status (1)

Country Link
JP (1) JP4867892B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011060217A (en) * 2009-09-14 2011-03-24 Toshiba Corp Data storage apparatus, and data writing/reading method
JP2012185609A (en) * 2011-03-04 2012-09-27 Sony Corp Virtual memory system, control method of virtual memory, and program
JP2015537274A (en) * 2012-09-14 2015-12-24 インテル・コーポレーション Method and apparatus for protecting a memory area during a low power state

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61278953A (en) * 1985-06-04 1986-12-09 Ishida Scales Mfg Co Ltd Method for checking error in ram
JPH04180111A (en) * 1990-11-15 1992-06-26 Seiko Epson Corp Information processor
JPH0588795A (en) * 1991-09-30 1993-04-09 Casio Comput Co Ltd Data processor
JPH07200112A (en) * 1993-12-15 1995-08-04 Internatl Business Mach Corp <Ibm> Information processing system
JPH10207789A (en) * 1997-01-23 1998-08-07 Canon Inc Information processor and method therefor and storage medium
JPH11328045A (en) * 1998-05-20 1999-11-30 Nec Corp Initialization control system for dram device with battery backup function
JP2000082014A (en) * 1998-09-04 2000-03-21 Canon Inc Information processor, information processing method, and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61278953A (en) * 1985-06-04 1986-12-09 Ishida Scales Mfg Co Ltd Method for checking error in ram
JPH04180111A (en) * 1990-11-15 1992-06-26 Seiko Epson Corp Information processor
JPH0588795A (en) * 1991-09-30 1993-04-09 Casio Comput Co Ltd Data processor
JPH07200112A (en) * 1993-12-15 1995-08-04 Internatl Business Mach Corp <Ibm> Information processing system
JPH10207789A (en) * 1997-01-23 1998-08-07 Canon Inc Information processor and method therefor and storage medium
JPH11328045A (en) * 1998-05-20 1999-11-30 Nec Corp Initialization control system for dram device with battery backup function
JP2000082014A (en) * 1998-09-04 2000-03-21 Canon Inc Information processor, information processing method, and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011060217A (en) * 2009-09-14 2011-03-24 Toshiba Corp Data storage apparatus, and data writing/reading method
JP2012185609A (en) * 2011-03-04 2012-09-27 Sony Corp Virtual memory system, control method of virtual memory, and program
JP2015537274A (en) * 2012-09-14 2015-12-24 インテル・コーポレーション Method and apparatus for protecting a memory area during a low power state

Also Published As

Publication number Publication date
JP4867892B2 (en) 2012-02-01

Similar Documents

Publication Publication Date Title
CN109426619B (en) Method for accessing flash memory module, related flash memory controller and electronic device
US9104529B1 (en) System and method for copying a cache system
JP4481999B2 (en) Method and apparatus for reducing page replacement execution time in a system to which demand paging technique is applied
JP5161696B2 (en) Virtual computer system, error recovery method in virtual computer system, and virtual computer control program
US20160306588A1 (en) Solid state disk and data moving method
EP2016499B1 (en) Migrating data that is subject to access by input/output devices
US20120159101A1 (en) Information processing device
Skarlatos et al. Pageforge: a near-memory content-aware page-merging architecture
JP5658827B2 (en) Storage system
JP2008090657A (en) Storage system and control method
US20150074336A1 (en) Memory system, controller and method of controlling memory system
US20120226832A1 (en) Data transfer device, ft server and data transfer method
KR20120102923A (en) Storage system for supporting copy and move command and operating method thereof
US8090907B2 (en) Method for migration of synchronous remote copy service to a virtualization appliance
TW200417857A (en) Allocating cache lines
JP4867892B2 (en) MEMORY CONTROL DEVICE, SYSTEM, PROGRAM, AND METHOD
US9454445B2 (en) Fault tolerant server
WO2012163017A1 (en) Method for processing access exception of distributed virtual machine and virtual machine monitor
WO2011148447A1 (en) Virtual computer system, area management method, and program
JP5977430B2 (en) Storage system, storage system control method, and storage controller
US20130103910A1 (en) Cache management for increasing performance of high-availability multi-core systems
CN105373414B (en) Support the Java Virtual Machine implementation method and device of MIPS platform
CN111679914B (en) Memory management method, system, computer equipment and storage medium
KR20110052902A (en) Computing system and method for controling memory of computing system
JP2000305818A (en) Memory fragment elimination (defragmentation) of chip card

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20090512

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20110705

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110707

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110726

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110921

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111018

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111031

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141125

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees