JP2009129026A - Data management device, information processor, and program - Google Patents
Data management device, information processor, and program Download PDFInfo
- Publication number
- JP2009129026A JP2009129026A JP2007300920A JP2007300920A JP2009129026A JP 2009129026 A JP2009129026 A JP 2009129026A JP 2007300920 A JP2007300920 A JP 2007300920A JP 2007300920 A JP2007300920 A JP 2007300920A JP 2009129026 A JP2009129026 A JP 2009129026A
- Authority
- JP
- Japan
- Prior art keywords
- data
- unit
- stored
- page
- cpu
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、電力供給を受けてデータを記憶した状態を維持する記憶手段と、電力供給を受けずにデータを記憶した状態を維持する記憶手段との間でデータを移動させる技術に関する。 The present invention relates to a technique for moving data between a storage unit that maintains a state in which data is stored by receiving power supply and a storage unit that maintains a state in which data is stored without receiving power supply.
コンピュータの電源を投入したときにそれ以前に電源を切った時の作業内容が復元される、ハイバネーションという技術が知られている。例えば、特許文献1には、電源を切る前に揮発性メモリ内のデータを不揮発性メモリに書き込んでおいてから、電源オフの電力非供給状態に移行し、電源が再度投入されたときには、不揮発性メモリに書き込まれたデータを揮発性メモリに書き戻す技術が開示されている。また、特許文献2には、スリープモードに移行する前に、揮発性メモリ内のデータのうち、データ領域とバックアップ領域に保存されているデータのみを不揮発性メモリに書き込む技術が開示されている。特許文献2に開示された技術によれば、揮発性メモリ内の全てのデータを書き戻す場合と比べて、不揮発性メモリに書き込むデータの量が少なくなるため、不揮発性メモリに記憶されているデータを短時間で揮発性メモリに書き戻すことができる。
上記のように電力非供給状態に移行するときには、揮発性メモリに記憶された全てのデータを不揮発性メモリに書き込むようになっている。一般に、不揮発性メモリに対するデータの読み書きに要する時間は、揮発性メモリに対するデータの読み書きに要する時間よりも長いため、揮発性メモリに記憶された全てのデータを不揮発性メモリに書き込むのには相当の時間を要するという問題がある。特に携帯端末のように小型の電源を搭載している装置の場合には、電力の残量に余裕がないため、電力非供給状態に移行するときに揮発性メモリに記憶された全てのデータを不揮発性メモリに書き込むことができなかった、という事態を招く虞もある。 When shifting to the non-power supply state as described above, all data stored in the volatile memory is written into the nonvolatile memory. In general, the time required to read / write data from / to a nonvolatile memory is longer than the time required to read / write data from / to a volatile memory, so it is quite appropriate to write all the data stored in the volatile memory to the nonvolatile memory. There is a problem that it takes time. In particular, in the case of a device equipped with a small power source such as a portable terminal, since there is no room for the remaining amount of power, all data stored in the volatile memory is stored when the power is not supplied. There is also a possibility that a situation in which data could not be written to the nonvolatile memory could be caused.
本発明は、このような背景に鑑みてなされたものであり、その目的は、電力非供給状態に移行するのに要する時間を短縮することにある。 The present invention has been made in view of such a background, and an object thereof is to shorten the time required to shift to a power non-supply state.
上述した課題を解決するため、本発明に係るデータ管理装置は、電力供給を受けて、データを記憶した状態を維持する第1の記憶手段と、電力供給を受けずに、データを記憶した状態を維持する第2の記憶手段と、前記第1の記憶手段に電力を供給する電力供給状態、又は、前記第1の記憶手段に電力を供給しない電力非供給状態のいずれかに移行させる状態移行手段と、前記電力供給状態において、前記第1の記憶手段に記憶されているデータを用いて処理を実行する処理実行手段と、前記電力供給状態から前記電力非供給状態に移行する指示があるまでに、前記第1の記憶手段に記憶されているデータを一部分ずつ、それぞれ異なる時期に読み出して前記第2の記憶手段に記憶させる退避処理を行う退避手段とを備え、前記状態移行手段は、前記第1の記憶手段に記憶されているデータに対して前記退避手段による前記退避処理が行われてから、前記電力供給状態から前記電力非供給状態に移行させることを特徴とする。
本発明によれば、電力供給状態から電力非供給状態に移行する指示があるまでに、第1の記憶手段に記憶されているデータを一部分ずつ、それぞれ異なる時期に読み出して第2の記憶手段に記憶させる退避処理を行うので、電力非供給状態に移行するのに要する時間を短縮することができる。
In order to solve the above-described problems, a data management device according to the present invention is configured to receive a power supply and maintain a state in which the data is stored, and a state in which the data is stored without receiving the power supply. The second storage means for maintaining the power and the state transition for shifting to either the power supply state for supplying power to the first storage means or the power non-supply state for not supplying power to the first storage means Means, processing execution means for executing processing using data stored in the first storage means in the power supply state, and an instruction to shift from the power supply state to the power non-supply state And a retreating unit for performing retreat processing for reading out data stored in the first storage unit part by part at different times and storing them in the second storage unit, The from the saving processing being performed by the saving means, and wherein the shifting from the power supply state to the power non-supply state to the data stored in the first storage unit.
According to the present invention, data stored in the first storage means is read out part by part at different times until an instruction to shift from the power supply state to the power non-supply state is given to the second storage means. Since the save processing to be stored is performed, the time required to shift to the power non-supply state can be shortened.
前記退避手段は、前記処理実行手段による実行の単位となる処理が完了するたびに前記退避処理を開始してもよく、前記処理実行手段により処理が実行されていない期間に当該退避処理を行うとしてもよい。このようにすると、退避処理がその退避処理以外の処理に対して負荷をかけないようにすることができる。 The saving unit may start the saving process every time processing as a unit of execution by the processing execution unit is completed, and performs the saving process during a period when the process is not executed by the processing execution unit. Also good. In this way, it is possible to prevent the save process from applying a load to processes other than the save process.
また、前記処理実行手段は、実行の単位となる処理を開始してから完了するまでに、当該処理の実行を一時中断し、前記退避手段は、前記処理実行手段が前記処理の実行を一時中断している期間に、前記退避処理を行ってもよい。このようにすると、退避処理以外の処理が実行されている期間であっても、退避処理を行うことができる。 Further, the process execution means temporarily suspends execution of the process from the start to completion of the process as a unit of execution, and the save means temporarily suspends execution of the process by the process execution means The evacuation process may be performed during the period of time. In this way, the save process can be performed even during a period in which a process other than the save process is being executed.
また、上述の態様において、前記処理実行手段は、プログラムに記述された手順に従って処理を実行するCPUであり、前記処理実行手段による実行の単位となる処理は、前記プログラムに記述された手順に従ってCPUが実行する処理の単位となるタスクであることが望ましい。 In the above-described aspect, the process execution unit is a CPU that executes a process according to a procedure described in a program, and a process that is a unit of execution by the process execution unit is a CPU according to a procedure described in the program. It is desirable that the task is a unit of processing to be executed.
また、好ましくは、前記データが複数の部分データに区分されている場合に、前記処理実行手段が前記第1の記憶手段に記憶された前記部分データを用いた回数を、当該部分データ毎に記憶する回数記憶手段を備え、前記退避手段は、前記回数記憶手段によって記憶されている回数が少ない部分データに対して、当該回数が多い部分データよりも先に前記退避処理を行うとよい。このようにすると、部分データの利用回数から、退避の優先順位を決定することができるため、より効率的な退避処理を行うことができる。 Preferably, when the data is divided into a plurality of partial data, the number of times the processing execution unit uses the partial data stored in the first storage unit is stored for each partial data. It is preferable that the save unit performs the save process on the partial data stored in the number storage unit before the partial data with the high number of times. In this way, since the priority of saving can be determined from the number of times partial data is used, more efficient saving processing can be performed.
また、好ましくは、前記退避手段は、前記回数記憶手段によって記憶されている前記回数の合計が第1の閾値以上である場合に、前記退避処理を行うとよい。このようにすると、データの利用回数の合計が閾値以下の場合に、不揮発性記憶装置へ記憶することがないため、退避処理によって、その退避処理以外の処理の実行速度を低下させないようにできる。 Preferably, the save unit performs the save process when the total number of times stored in the number storage unit is equal to or greater than a first threshold value. In this way, when the total number of times data is used is less than or equal to the threshold value, the data is not stored in the nonvolatile storage device, so that the execution speed of processes other than the save process can be prevented from being reduced by the save process.
また、好ましくは、前記退避手段は、前記回数記憶手段によって記憶されている前記回数の合計が第1の閾値以上である場合には、前記処理実行手段により処理が実行されていない期間において前記退避処理を行い、前記回数記憶手段によって記憶されている前記回数の合計が、前記第1の閾値よりも大きい第2の閾値以上である場合には、前記処理実行手段により処理が実行されている期間においても前記退避処理を行うとよい。このようにすると、データの利用回数の合計に応じて、その値が第1の閾値になるまでは「退避の必要のない状態」、第1の閾値から第2の閾値までは「処理実行手段による処理が行われていない場合には退避処理を行う状態」、第2の閾値以上では「処理実行手段による処理が行われている場合であっても強制的に退避処理を行う状態」に分けることができ、データの利用回数の合計に応じた適切な退避処理をさせることができる。 Preferably, the save unit saves the save during a period when the process is not executed by the process execution unit when the total number of times stored in the number storage unit is equal to or greater than a first threshold. A period during which processing is executed by the processing execution means when the total number of times stored in the number storage means is equal to or greater than a second threshold value greater than the first threshold value. Also in the above, it is preferable to perform the saving process. In this way, according to the total number of times of data use, “a state in which saving is not necessary” is performed until the value reaches the first threshold, and “processing execution means” is performed from the first threshold to the second threshold. If the process is not performed, the save process is performed ", and if the process is greater than or equal to the second threshold value, the process is forcibly performed even if the process is being performed by the process execution unit. Therefore, it is possible to perform an appropriate saving process according to the total number of times data is used.
また、好ましくは、前記退避手段は、前記電力供給状態から前記電力非供給状態に移行する指示があるまでに、前記第1の記憶手段に記憶されているデータを全て退避することができなかった場合には、当該指示があった後に、退避していないデータを前記第1の記憶手段から読み出して前記第2の記憶手段に記憶させるとよい。このようにすると、電力非供給状態への移行指示があってから、第1の記憶手段の記憶内容が変更されても、その変更を反映した退避処理を行うことができる。 Further, preferably, the saving unit has not been able to save all the data stored in the first storage unit until there is an instruction to shift from the power supply state to the power non-supply state. In this case, after the instruction is given, the data that has not been saved may be read from the first storage unit and stored in the second storage unit. In this way, even if the storage content of the first storage unit is changed after the instruction to shift to the power non-supply state is issued, the saving process reflecting the change can be performed.
また、好ましくは、前記電力供給状態において、前記処理実行手段が実行する処理に用いるデータが前記第1の記憶手段に記憶されていない場合に、前記第2の記憶手段に記憶されている当該データを読み出し、前記第1の記憶手段に記憶させる復元処理を行うとともに、前記第2の記憶手段において、当該データに関連した関連データの復元順を記憶する第1の復元手段と、前記処理実行手段により処理が実行されていない期間において、前記第1の復元手段が記憶した復元順に基づいて、前記第2の記憶手段に記憶されている前記関連データを読み出し、前記第1の記憶手段に記憶させる第2の復元手段とを備えるとよい。このようにすると、電力非供給状態から電力供給状態へ移行したときに、迅速に復元すべきデータを復元するとともに、復元したデータに基づいて、次に復元が必要となるデータを類推して関連データとして記憶しておき、これを優先的に復元させるので、データ復元処理を効率的に分散化することができる。 Preferably, in the power supply state, when data used for processing executed by the processing execution unit is not stored in the first storage unit, the data stored in the second storage unit Is read out and stored in the first storage means, and in the second storage means, a first restoration means for storing a restoration order of related data related to the data, and the process execution means Based on the restoration order stored by the first restoration unit, the related data stored in the second storage unit is read out and stored in the first storage unit during a period when the processing is not executed by It is good to provide a 2nd decompression | restoration means. In this way, when moving from the non-power supply state to the power supply state, the data that should be restored quickly is restored, and the data that needs to be restored next is inferred based on the restored data. Since it is stored as data and restored preferentially, the data restoration process can be efficiently distributed.
また、好ましくは、前記関連データのデータサイズは、前記処理実行手段が実行する処理毎に定められているとよい。処理ごとに、関連データのサイズが異なっている場合もあるからである。 Preferably, the data size of the related data is determined for each process executed by the process execution unit. This is because the size of the related data may be different for each process.
また、本発明に係る情報処理装置は、上述のデータ管理装置と、前記処理実行手段によって処理された結果を出力する出力手段とを具備することを特徴とする。 An information processing apparatus according to the present invention includes the data management apparatus described above and an output unit that outputs a result processed by the process execution unit.
また、本発明に係るプログラムは、電力供給を受けてデータを記憶した状態を維持する第1の記憶手段と、電力供給を受けずにデータを記憶した状態を維持する第2の記憶手段とを備えたコンピュータを、前記第1の記憶手段に電力を供給する電力供給状態、又は、前記第1の記憶手段に電力を供給しない電力非供給状態のいずれかに移行させる状態移行手段と、前記電力供給状態において、前記第1の記憶手段に記憶されているデータを用いて処理を実行する処理実行手段と、前記電力供給状態において、前記第1の記憶手段に記憶されているデータを一部分ずつ、それぞれ異なる時期に読み出して前記第2の記憶手段に記憶させる退避処理を行う退避手段として機能させ、さらに前記状態移行手段は、前記第1の記憶手段に記憶されているデータに対して前記退避手段による前記退避処理が行われてから、前記電力供給状態から前記電力非供給状態に移行させるプログラムである。
本発明によれば、電力供給状態から電力非供給状態に移行する指示があるまでに、第1の記憶手段に記憶されているデータを一部分ずつ、それぞれ異なる時期に読み出して第2の記憶手段に記憶させる退避処理を行うので、電力非供給状態に移行するのに要する時間を短縮することができる。
In addition, the program according to the present invention includes a first storage unit that maintains a state in which data is stored by receiving power supply, and a second storage unit that maintains a state in which data is stored without receiving power supply. A state transition unit that shifts the computer provided to either a power supply state that supplies power to the first storage unit or a power non-supply state that does not supply power to the first storage unit; and the power In a supply state, a process execution means for executing processing using data stored in the first storage means, and in the power supply state, data stored in the first storage means in part Each of the state transition means is stored in the first storage means and functions as a save means for performing a save process that is read at different times and stored in the second storage means. From said save processing is performed by the saving means to the data, a program for transition to the power non-supply state from the power supply state.
According to the present invention, data stored in the first storage means is read out part by part at different times until an instruction to shift from the power supply state to the power non-supply state is given to the second storage means. Since the save processing to be stored is performed, the time required to shift to the power non-supply state can be shortened.
[A:構成]
[A−1:表示装置の全体構成]
図1は、本実施形態に係る表示装置1の構成を示す図である。同図に示すように、表示装置1は、CPU(Central Processing Unit)10と、ROM(Read Only Memory)20と、RAM(Random Access Memory)30と、フラッシュメモリ40と、操作部50と、表示部60と、メモリアクセス監視装置70と、電源部80とを備えている。CPU10と、ROM20と、RAM30と、フラッシュメモリ40と、操作部50と、表示部60と、メモリアクセス監視装置70は、バス90を介して接続されている。また、これらの各部10〜70と電源部80とは図示せぬ電源線を介して接続されている。電源部80は、例えば充電可能な電池や電源制御回路を備えており、表示装置1を構成する各部に対し、上記電源線を介して電力を供給する。
[A: Configuration]
[A-1: Overall configuration of display device]
FIG. 1 is a diagram illustrating a configuration of a
ROM20は、読み出し専用のメモリであり、表示装置1の起動処理を司るブートプログラムやOS(Operation System)などの各種制御プログラムなどを記憶している。CPU10は、ROM20に記憶されている制御プログラムや、フラッシュメモリ40に記憶されている各種処理プログラムを実行することにより、表示装置1の動作を制御したり、各種の処理を行ってその処理結果を表示部60によって出力したりする。
The
RAM30は、電源部80から電力供給を受けて、データを記憶した状態を維持する揮発性メモリである。すなわち、RAM30に記憶されたデータは、電源部80からRAM30に電力が供給されている期間にわたっては記憶され続けるが、電源部80からの電力供給がなくなると消去される。このRAM30は、CPU10のワークエリアとして使用され、例えばCPU10が実行中の処理において用いられるデータを記憶する。このデータには、ROM20やフラッシュメモリ40から読み出されてRAM30にロードされた各種のプログラムや関数のほか、実行中の処理で用いられている各種の値や引数などが含まれている。以下では、RAM30に記憶されているこれらのデータを「処理データ」と総称する。
The
フラッシュメモリ40は、電源部80から電力供給を受けなくても、データを記憶した状態を維持し得る不揮発性メモリである。このフラッシュメモリ40には、上述した処理プログラムが記憶されているほか、CPU10が処理実行中のRAM30上の処理データを記憶するための記憶領域が設けられている。このように、RAM30は、電力供給を受けて、処理データを記憶した状態を維持する第1の記憶手段として機能するの対し、フラッシュメモリ40は、電力供給を受けずに、処理データを記憶した状態を維持する第2の記憶手段として機能する。
The
操作部50は、例えばペンデバイスやジョイスティックなどを備え、利用者の操作に応じた操作信号をCPU10に供給する。表示部60は、例えばコレステリック液晶や電気泳動などを利用した記憶性液晶表示体や表示制御回路を備え、CPU10による指示の下で各種の画像を表示する。メモリアクセス監視装置70は、CPU10のRAM30に対するアクセス状況を監視する装置であり、自身が備える揮発性メモリにアクセス管理テーブル71を記憶している。このアクセス管理テーブル71は、上記の監視結果が記述されたテーブルである。
The
[A−2:アクセス管理テーブルの構成]
図2は、このアクセス管理テーブル71の一例を示した図である。
図2に示すように、アクセス管理テーブル71は、退避済フラグ、復元済フラグ、処理データの記憶場所を表すRAM30のメモリアドレス、アクセス頻度、およびページIDといった各フィールドを有するテーブルである。さらに、このアクセス管理テーブル71には、上記アクセス頻度の総計が記述されるアクセス頻度総数のフィールドを備えている。この表示装置1においては、RAM30とフラッシュメモリ40との間では「ページ」と呼ばれる単位でデータが遣り取りされる。アクセス管理テーブル71の「メモリアドレス」とは、これらの各ページが処理データとしてRAM30に記憶されているときのその記憶領域の先頭アドレスである。また、「アクセス頻度」とは、CPU10が、そのメモリアドレスで示されるページにアクセスした回数である。この回数は、メモリアクセス監視装置70によって常時、計数され、該当ページに対応するアクセス頻度のフィールドに記述される。「ページID」は、各ページに割り当てられた識別情報である。「退避済フラグ」は、RAM30に記憶されている各ページをフラッシュメモリ40に記憶させること、つまりページの退避が行われた否かを示す情報であり、「1」が退避済みで「0」が未退避を意味している。また、「復元済フラグ」は、フラッシュメモリ40に記憶されている各ページをRAM30に記憶させること、つまりページの復元が行われた否かを示す情報であり、「1」が復元済みで「0」が未復元を意味している。
[A-2: Configuration of access management table]
FIG. 2 is a diagram showing an example of the access management table 71.
As shown in FIG. 2, the access management table 71 is a table having fields such as a saved flag, a restored flag, a memory address of the
[A−3:表示装置の起動状態]
ここで、表示装置1の起動状態について説明する。表示装置1は、「オン状態」、「スリープ状態」、「オフ状態」の3つの起動状態を有しており、これらのうちのいずれかの1つの起動状態をとるようになっている。まず、「オン状態」は、表示装置1の各部に電力が供給される電力供給状態であり、表示装置1が通常の動作を行う状態である。この「オン状態」では、CPU10によって各種の処理が行われることになる。次に、「スリープ状態」は、表示装置1の限られた部品のみに電力が供給され、表示装置1の一部が動作しない状態である。この「スリープ状態」では、CPU10や表示部60には電力が供給されないが、それ以外の部品(RAM30を含む)には電力が供給される。よって、「オン状態」は、消費電力が多い第1の電力供給状態であるし、「スリープ状態」は、消費電力が少ない第2の電力供給状態であると言える。そして、「オフ状態」は、電源部80がオフになったときの状態である。この「オフ状態」では、表示装置1の各部に電力が供給されないので、表示装置1はいっさい動作しない。上述した「オン状態」から「スリープ状態」への移行は、例えば「オン状態」においてCPU10が処理を行わない待機時間が所定時間以上になった時に行われる。また、「スリープ状態」から「オン状態」への移行は、例えば操作部50が操作された時に行われる。このように、「オン状態」及び「スリープ状態」は、表示装置1の各部のうち少なくともRAM30に電力を供給する「電力供給状態」であるのに対し、「オフ状態」はRAM30に電力を供給しない「電力非供給状態」である。
[A-3: Activation state of display device]
Here, the activation state of the
[B:動作]
次に、表示装置1の動作について説明する。
[B−1:アクセス頻度集計処理]
図3は、メモリアクセス監視装置70が実行するアクセス頻度集計処理の流れを示すフローチャートである。この図3を参照して、RAM30に記憶されているデータを退避させる優先順位を決定するためのアクセス頻度集計処理について説明する。例えば表示装置1が「オン状態」の時に、利用者が操作部50を操作して、文書データによって表わされる文書を閲覧している場合を想定する。CPU10は、この操作に応じて、各々の処理に用いる処理データを生成したり又はフラッシュメモリ40から読み出したりしてRAM30に記憶し、これらの処理データを用いて、文書を表示する処理を実行する。このとき、CPU10は、タスクと呼ばれる単位で処理を実行する。
[B: Operation]
Next, the operation of the
[B-1: Access frequency counting process]
FIG. 3 is a flowchart showing a flow of access frequency counting processing executed by the memory
CPU10が例えば上記のような表示処理を実行したときに、フラッシュメモリ40から読み出されたデータ(ページデータの集合)が処理データとしてRAM30に記憶されるが、このとき、メモリアクセス監視装置70は、図2に示すようなフォーマットのアクセス管理テーブル71を生成して自身の揮発性メモリに記憶する。ただし、初期の状態では、各メモリアドレスに対応するアクセス頻度およびアクセス頻度総数には0が記述されている。
For example, when the
メモリアクセス監視装置70は、これらのメモリアドレスが示すページを監視して、CPU10によるメモリアクセスが発生したか否かを判断する(ステップSa11)。ここで、メモリアクセスとは、CPU10がページを読み出したり、書き込んだりする両方の動作のことをいうが、特に書き込みがあったときに限定してメモリアクセスとしてもよい。ページの読み出しのみを行った場合には、当該ページの内容は変化せず、これを新たに退避する必要が生じないからである。メモリアクセスの発生がない間は(ステップSa11;NO)、メモリアクセス監視装置70は、ページの監視を続ける(ステップSa11)。一方、CPU10がいずれかのページにアクセスすると、メモリアクセス監視装置70は、メモリアクセスが発生したと判断して(ステップSa11;YES)、アクセスされたページに対応する退避済フラグを「0」にし(ステップSa12)、アクセス頻度を1増加させ(ステップSa13)、アクセス頻度総数を1増加させる(ステップSa14)。
The memory
次に、メモリアクセス監視装置70は、アクセス頻度総数と予め定められた閾値Lim1(例えば1000回)とを比較し、アクセス頻度総数が閾値Lim1以上であるか否かを判断する(ステップSa15)。アクセス頻度総数が閾値Lim1以上でない場合には(ステップSa15;NO)、メモリアクセス監視装置70は、ページの監視を続ける(ステップSa11)。これにより、アクセス頻度総数が閾値Lim1以上になるまでの間は、各ページのアクセス頻度が逐一集計されることになる。
Next, the memory
一方、アクセス頻度総数が閾値Lim1以上である場合には(ステップSa15;YES)、メモリアクセス監視装置70は、CPU10がアイドル状態か否かを判断する(ステップSa16)。アイドル状態とはCPU10がいずれのタスクも実行していない状態を言う。CPU10がアイドル状態ではないと判断すると(ステップSa16;NO)、メモリアクセス監視装置70は、アクセス頻度総数と予め定められた閾値Lim2(閾値Lim1より大きい数値であり、例えば2000回)とを比較し、アクセス頻度総数が閾値Lim2以上であるか否かを判断する(ステップSa17)。アクセス頻度総数が閾値Lim2以上でない場合には(ステップSa17;NO)、メモリアクセス監視装置70は、ページの監視を続ける(ステップSa11)。これにより、アクセス頻度総数が閾値Lim1以上になったとしても、CPU10によりタスクが実行されていれば、CPU10は、退避処理よりもそのタスクの処理を優先して、そのタスクの処理を継続することになる。ただし、これはアクセス頻度総数が閾値Lim2以上になるまでの間である。
On the other hand, if the total access frequency is greater than or equal to the threshold Lim1 (step Sa15; YES), the memory
一方、CPU10がアイドル状態であると判断されたとき(ステップSa16;YES)、および、アクセス頻度総数が閾値Lim2以上であると判断されたとき(ステップSa17;YES)には、メモリアクセス監視装置70は、CPU10にデータ退避処理の開始を指示する(ステップSa18)。よって、アクセス頻度総数が閾値Lim2以上であって退避の必要性が増した状態にあっては、CPU10によってタスクが実行されていても、これを中断して、退避処理にCPU10の計算資源を割り当てることになる。
On the other hand, when it is determined that the
[B−2:データ退避処理]
次に、CPU10によるデータ退避処理について、図4を参照しながら説明する。ここでいうデータの退避とは、RAM30に記憶されているデータをフラッシュメモリ40に記憶させることである。図4は、データ退避処理の流れを示すフローチャートである。CPU10は、メモリアクセス監視装置70からデータ退避処理を開始する旨の指示を受けると、アクセス管理テーブル71に基づいて、退避すべきページの順序を記述する退避キューを、RAM30に作成する(ステップSb11)。具体的には、CPU10は、アクセス管理テーブル71のうち退避済フラグが「0」のレコードについて、そのアクセス頻度を参照し、アクセス頻度の少ないレコードから順に、そのページIDをRAM30に記憶する。このRAM30上に記憶されたページIDの順列が退避キューである。
[B-2: Data saving process]
Next, data saving processing by the
図5は、この退避キューの一例を示す図である。
図2において、ページA1、ページA2およびページA3の退避済フラグは「0」であるから、これらは全てCPU10による退避の対象として扱われる。そして、ページA1のアクセス頻度は15回、ページA2のアクセス頻度は0回、ページA3のアクセス頻度は12回であるから、これらのデータをアクセス頻度の少ない方から並べると、ページA2→ページA3→ページA1となる。したがって、CPU10は、図5に示すような順序の退避キューをRAM30に作成する。この退避キューにおけるページIDの順番が、そのページIDのページの退避順を意味している
FIG. 5 is a diagram illustrating an example of the save queue.
In FIG. 2, the saved flags for page A1, page A2, and page A3 are “0”, and therefore all of these are treated as objects to be saved by the
次に、CPU10は、RAM30に作成された退避キューの先頭にあるページIDを読み出し、アクセス管理テーブル71を参照してメモリアドレスを特定して、そのページIDに対応するページをフラッシュメモリ40に退避させる(ステップSb12)。そしてCPU10は、退避したページのページIDを退避キューから削除し(ステップSb13)、アクセス管理テーブル71においてそのページIDに対応する退避済フラグを「1」にする(ステップSb14)。例えば、図5に示す退避キューの場合には、ステップSb12において、CPU10は、ページA2が記憶されているメモリアドレス「1A80」で示されるページをフラッシュメモリ40に退避する。退避が完了すると、CPU10は、ステップSb13において、退避キューからページID「ページA2」を削除し、ステップSb14において、アクセス管理テーブルのうちページID「ページA2」に対応する退避済フラグを「1」にする。
Next, the
次に、CPU10は、退避キューが空か否かを判断する(ステップSb15)。退避キューが空でない場合(ステップSb15;NO)には、CPU10は、割り込み処理が有るか否かを判断する(ステップSb16)。ここでいう割り込み処理とは、この退避処理とは別の処理ことであり、例えば利用者の何らかの操作に応じた処理などが含まれる。割り込み処理がない場合(ステップSb16;NO)には、CPU10は、上述した退避キューを参照して、データ退避処理を続ける(ステップSb12)。一方、退避キューが空である場合(ステップSb15;YES)、および割り込み処理がある場合(ステップSb16;YES)には、CPU10はデータ退避処理を中断し、処理待ち状態に移行するか、または割り込み処理の実行に移行する。
このような退避処理を行うことにより、CPU10は、RAM30に記憶されている処理データを、その処理データに含まれるページ単位ずつ、それぞれ異なる読み出しタイミングで読み出してフラッシュメモリ40に記憶させることができる。
Next, the
By performing such a saving process, the
[B−3:状態移行処理]
次に、CPU10による状態移行処理について、図6を参照しながら説明する。図6は、電源供給状態から電源非供給状態に移行する処理の流れを説明するためのフローチャートである。
CPU10は、所定の割り込み処理により、電源非供給状態への移行が指示されているか否かを判断する(ステップSc11)。ここで電源非供給状態へ移行する旨の指示には、様々な態様がある。例えば、CPU10が、利用者から操作部50を介して移行の指示を受けた場合や、所定の条件を自動的に検知したときに、CPU10自身が上記移行の指示を発生させる場合などである。後者の所定の条件としては、例えば、上述した退避処理が終了してから、所定時間以上CPU10がアイドル状態に置かれた場合などが挙げられる。上記の移行が指示されていないときは(ステップSc11;NO)、CPU10はこの判断を継続する(ステップSc11)。
[B-3: State transition processing]
Next, the state transition process by the
The
一方、上記の移行が指示されたときは(ステップSc11;YES)、CPU10は、アクセス管理テーブル71を参照して、RAM30上の全てのページが退避済であるか否かを判断する(ステップSc12)。アクセス管理テーブル71における退避済フラグのうち少なくともいずれか1つが「0」であれば、CPU10は、退避済でないページが1つ以上あると判断して(ステップSc12;NO)、図4に示した処理を実行する。一方、アクセス管理テーブル71における退避済フラグが全て「1」であれば、CPU10は、全てのページが退避済であると判断して(ステップSc12;YES)、メモリアクセス監視装置70に指示して、アクセス管理テーブル71をフラッシュメモリ40に退避させる(ステップSc13)。そして、CPU10はアクセス管理テーブル71のハッシュ値を計算し、これをフラッシュメモリ40に記憶する(ステップSc14)。これは、フラッシュメモリ40に記憶されたアクセス管理テーブル71の信頼性を、後述するデータ復元処理の際に確認するためである。以上の処理に続いてCPU10は、電源部80の電力供給を停止させ、電源非供給状態に移行する(ステップSc15)。
On the other hand, when the above migration is instructed (step Sc11; YES), the
ここで、状態移行指示の具体的な例を挙げて、上述した退避処理および状態移行処理の具体例を説明する。図7は、利用者から操作部50を介して移行の指示を受けた場合のタイムチャートである。図7の上段は割り込み処理を、中段は一般のタスクを、下段は退避処理をそれぞれ表している。
まず、CPU10は、或るタスクAを時刻t1から時刻t2までの間に実行する。この間に、メモリアクセス監視装置70は、CPU10のメモリアクセスが発生したか否かを判断し(図3のステップSa11)、上記タスクAにおいてメモリアクセスが発生するたびに(図3のステップSa11;YES)、アクセスされたページに対応する退避済フラグを「0」にし(図3のステップSa12)、アクセス頻度を1増加させ(図3のステップSa13)、さらにアクセス頻度総数を1増加させる(図3のステップSa14)。次に、メモリアクセス監視装置70は、アクセス頻度総数と予め定められた閾値Lim1とを比較し、アクセス頻度総数が閾値Lim1以上であるか否かを判断する(図3のステップSa15)。ここで、時刻t1から時刻t2までの間には、アクセス頻度総数はLim1(例えば1000回)以上になっていないものとする。よって、時刻t2では退避処理は開始されない。
Here, a specific example of the state transition instruction will be described, and a specific example of the above-described saving process and state transition process will be described. FIG. 7 is a time chart when a shift instruction is received from the user via the
First, the
続いてCPU10は、別のタスクBを時刻t3から時刻t5までの間に実行する。上述と同様に、CPU10は、このタスクBが実行されている期間においてもメモリアクセスの発生を判断して、図3のステップSa12〜Sa14の処理を行う。ここで、時刻t3から時刻t5までの間の或る時刻t4において、アクセス頻度総数がLim1以上になったとする。メモリアクセス監視装置70は、時刻t4において、これを検知すると(図3のステップSa15;YES)、CPU10がアイドル状態か否かを判断する(図3のステップSa16)。CPU10は時刻t5になるまでタスクBを実行しており、アイドル状態ではないため、メモリアクセス監視装置70は、時刻t4から時刻t5までの間、CPU10がアイドル状態ではないと判断し(図3のステップSa16;NO)、アクセス頻度総数が閾値Lim2以上であるか否かを判断する(図3のステップSa17)。ここで、時刻t5までの間にアクセス頻度総数は閾値Lim2以上にならないとすると、メモリアクセス監視装置70は、CPU10がアイドル状態になる(図3のステップSa16;YES)時刻t5になった時点で、CPU10にデータ退避処理の開始を指示する(図3のステップSa18)。この退避処理は、退避キューが空になる時刻t6において完了する。
Subsequently, the
続いてCPU10は、さらに別のタスクCを時刻t7から時刻t10までの間に実行する。上述と同様に、CPU10は、このタスクCが実行されている期間においてもメモリアクセスの発生を判断して、図3のステップSa12〜Sa14の処理を行う。ここで、時刻t7から時刻t10までの間の或る時刻t8において、アクセス頻度総数がLim2以上になったとする。メモリアクセス監視装置70は、時刻t8において、これを検知すると(図3のステップSa17;YES)、CPU10がアイドル状態でないにも関わらず、すぐにタスクCを中断して、データ退避処理を開始するようCPU10に指示する(図3のステップSa18)。この指示に応じて、CPU10は、直ちにタスクCを中断し、退避処理に移行する。そしてCPU10は、時刻t8から時刻t9までの間に退避処理を完了すると、中断していたタスクCを再開する。そして、時刻t10においてタスクCが終了すると、CPU10は、時刻t9から時刻t10までの間にタスクCにおいて発生したメモリアクセスに対する退避処理を開始し、これを時刻t11に完了する。
Subsequently, the
そして、時刻t12において、利用者が操作部50を介して、電力供給状態から電力非供給状態への移行を指示したとする。CPU10は、電力供給状態から電源非供給状態への移行が指示されているか否かを判断しているから(図6のステップSc11)、時刻t12に上記指示を受けると(図6のステップSc11;YES)、アクセス管理テーブル71を参照して、全てのページが退避済であるか否かを判断する(図6のステップSc12)。この場合には、全ての退避処理は時刻t11において終了しており、時刻t12までの間にメモリアクセスを発生させるタスクは行われていない。よって、CPU10は、アクセス管理テーブル71をフラッシュメモリ40に退避させる(図6のステップSc13)。そしてCPU10は、アクセス管理テーブル71のハッシュ値を計算し、これをフラッシュメモリ40に記憶する(図6のステップSc14)。最後にCPU10は、電源部80の電力供給を停止させ、電源非供給状態に移行する(図6のステップSc15)。
Then, it is assumed that at time t <b> 12, the user instructs to shift from the power supply state to the power non-supply state via the
このように、CPU10は、RAM30に記憶されている処理データを一部分ずつ時間的に分散して退避させているので、電力非供給状態に移行するときまでには、RAM30に記憶されている処理データの少なくとも一部を退避済みにしておくことができる。よって、電力非供給状態に移行するときに退避させるデータの量をより少なくすることができ、状態移行に要する時間を短縮することが可能となる。
なお、電力供給状態から電力非供給状態に移行する指示があるまでに、RAM30に記憶されているデータを全てフラッシュメモリ40に退避することができなかった場合には、CPU10は、その指示があった後に、まだ退避していないデータをRAM30から読み出してフラッシュメモリ40に退避させればよい。
Thus, since the
If all the data stored in the
次に、図8は、電力非供給状態への移行の別の例を示すタイムチャートである。CPU10は、時刻t14から時刻t15の間に或るタスクDを実行する。上述したタスクBやタスクCの場合と同様に、タスクDが終了する時刻t15から、CPU10は退避処理を開始し、時刻t16に、その退避処理を完了する。そして、CPU10は、この時刻t16の時点からの経過時間を計測し、これが所定時間Δt(例えば1分など)以上になったことを検知すると、アクセス管理テーブル71の退避処理(図6のステップSc12,ステップSc13,およびステップSc14)を行う。そして、上述と同様に最後にCPU10は、電源部80の電力供給を停止させ、電力非供給状態に移行する(ステップSc15)。
このように、CPU10は、電力非供給状態に移行するときまでには、RAM30に記憶されている処理データを退避済みにしておくことで、電力非供給状態に移行するときに退避させるデータの量をより少なくすることができる。よって、状態移行に要する時間を短縮することが可能となる。
Next, FIG. 8 is a time chart showing another example of the transition to the power non-supply state. The
As described above, the
[B−4:データ復元処理]
続いて、図9を参照して、表示装置1の起動状態が「オフ状態」から「オン状態」に復帰させられたときに、フラッシュメモリ40に退避させていたデータを復元させるデータ復元処理について説明する。ここでいう起動状態の復帰とは、表示装置1の起動状態が、「電力供給状態」から「電力非供給状態」に移行させられた後に、「電力非供給状態」から再び「電力供給状態」に移行させられることをいう。また、データの復元とは、前述のとおり、RAM30からフラッシュメモリ40に退避させていたデータを再びRAM30に記憶させることである。
[B-4: Data restoration processing]
Subsequently, referring to FIG. 9, a data restoration process for restoring the data saved in the
利用者によって操作部50の電源ボタンがオンにされると(ステップSd11)、CPU10は、ROM20に記憶されている制御プログラムを実行して、表示装置1を起動させる(ステップSd12)。これにより、表示装置1の起動状態が「オフ状態」から「オン状態」に移行させられる。表示装置1が「オン状態」になると、利用者は、操作部50を操作して、所望するプログラムを指定し、それを実行するよう指示する。
When the power button of the
CPU10は、フラッシュメモリ40に記憶されたアクセス管理テーブル71を読み出してメモリアクセス監視装置70の揮発性メモリに記憶させる(ステップSd13)。これをアクセス管理テーブル71の復元という。そして、CPU10は、復元したアクセス管理テーブル71からハッシュ値を計算し(ステップSd14)、フラッシュメモリ40に記憶されているハッシュ値と比較する(ステップSd15)。このハッシュ値が等しくない場合(ステップSd15;NO)には、CPU10は、利用者に注意を促す警告処理を行う(ステップSd16)。このような場合には、図6で説明したデータ退避処理のうち、ステップSc13からステップSc14までの間に何らかの障害が発生し、正しくアクセス管理テーブル71が退避されなかった可能性があるからである。
The
一方、この比較したハッシュ値同士が等しい場合(ステップSd15;YES)には、CPU10は復元したアクセス管理テーブル71の復元済フラグを全て「0」にする(ステップSd17)。図10は、復元したアクセス管理テーブル71の一例を示す図である。アクセス管理テーブル71は、図に示すように「データB3」、「データB4」、および「データB5」を記憶したページについて、それぞれ退避済フラグ、復元済フラグ、メモリアドレス及びアクセス頻度を記憶している。なお、このデータ復元処理においては、復元済フラグ、メモリアドレスおよびページID以外のデータは利用しない。以下、この図10に示したアクセス管理テーブル71がメモリアクセス監視装置70に復元されていることを想定して、説明を続ける。
On the other hand, if the compared hash values are equal (step Sd15; YES), the
図9の説明に戻る。利用者が操作部50を介して、処理を指示すると、CPU10は指示された処理のタスクを開始する(ステップSd18)。タスクが開始されると、メモリアクセス監視装置70は、CPU10のメモリアクセスが発生したか否かを判断する(ステップSd19)。CPU10のメモリアクセスが発生していないうちは(ステップSd19;NO)、メモリアクセス監視装置70は、この判断を継続する(ステップSd19)。
Returning to the description of FIG. When the user instructs processing via the
一方、CPU10のメモリアクセスが発生すると、メモリアクセス監視装置70は、アクセス管理テーブルにおいて、アクセスが発生したページに対応する復元済フラグが「0」であるか否かを判断する(ステップSd20)。ここで、上記の復元済フラグが「0」でない、すなわち「1」である場合(ステップSd20;NO)には、アクセスが発生したページは既に復元されているため、メモリアクセス監視装置70は、CPU10によるメモリアクセス発生の監視を継続する(ステップSd19)。
On the other hand, when the memory access of the
一方、上記の復元済フラグが「0」である場合(ステップSd20;YES)には、メモリアクセス監視装置70は、ページフォールト信号を発生する(ステップSd21)。この信号を受けてCPU10は、アクセス管理テーブル71を参照して、アクセスが発生したページのメモリアドレスを特定し、当該ページをフラッシュメモリ40からRAM30へ復元する(ステップSd22)。そして、メモリアクセス監視装置70は、アクセス管理テーブル71の対応する復元済フラグを「1」に書き換え(ステップSd23)、後述する復元キューに、上記のアクセスが発生したページの周辺に記憶されているページのページIDを追加する(ステップSd24)。
On the other hand, if the restored flag is “0” (step Sd20; YES), the memory
例えば、CPU10がタスクを実行することにより、図10に示すページB4に対して、メモリアクセスが発生したことを想定する。すると、CPU10は、ページB4に対応する復元済フラグが「0」であるか否かを判断する(ステップSd20)。ページB4に対応する復元済フラグは「0」であるから(ステップSd20;YES)、メモリアクセス監視装置70は、ページフォールト信号を発生する(ステップSd21)。そしてCPU10は、ページB4が記憶されたページをフラッシュメモリ40から読み出し、ページB4に対応するRAM30のメモリアドレス「2A80」に復元する(ステップSd22)。
For example, it is assumed that a memory access has occurred for the page B4 shown in FIG. 10 when the
そして、メモリアクセス監視装置70は、ページB4に対応する復元済フラグを「1」に書き換え(ステップSd23)、さらに、そのページB4のメモリアドレスの前後のメモリアドレスに記憶されているページである「ページB3」と「ページB5」のページIDを、RAM30上の所定の位置に記憶した復元キューに追加する(ステップSd24)。図11は、このようにして作成された復元キューを示す図である。復元キューは、図中左側ほど復元の優先順位の高い。優先順位が高いページは、優先順位が低いページよりも先に復元される。したがって、図11に示す復元キューにおいては、「ページB3」の方が「ページB5」よりも先に復元されることになる。
ページフォールト信号が発生した瞬間にRAM30上に必要なページは「ページB4」のみであるが、「ページB4」が要求されたことから、「ページB3」および「ページB5」もこの後、要求される可能性が高い。なぜなら、ユーザが利用するデータの位置は特定の箇所に集中する傾向があるからである。このようにすれば、「ページB3」または「ページB5」を要求するページフォールト信号を発生させることなく、先回りしてこれらのページを復元させておくことができるので、表示装置1は、迅速な復帰を行うことができる。なお、「ページB3」と「ページB5」のどちらを優先的に復元されるべきかについては、任意に定めることができるが、例えばアクセス管理テーブル71のそれぞれのアクセス頻度に基づいて定めてもよい。この場合、図10に示すように、「ページB3」のアクセス頻度は「12」であり、「ページB5」のアクセス頻度は「3」であるから、「ページB3」の方が「ページB5」よりもアクセス頻度が多い。CPU10は、これを判断して、「ページB3」の優先順位が「ページB5」よりも高くなるように復元キューを作成すればよい。退避前までにアクセスが頻繁に行われたページは、復帰後にも頻繁にアクセスされる可能性が高く、優先して復元すべきだからである。
Then, the memory
The only page required on the
ここで、図12は、CPU10がデータ復元処理を実行するときの処理の手順を示したフローチャートである。この図12を参照して、CPU10が所定の周期で、一般の処理に割り込んで実行するデータ復元処理について説明する。
CPU10は、アイドル期間中に所定の周期で、図11に示したような復元キューに基づいてデータ復元処理を実行する。具体的には、CPU10は、復元キューの先頭のデータIDが示すデータを復元し(ステップSe11)、そのデータIDを復元キューから削除する(ステップSe12)。この場合、先頭は「ページB3」であるから、RAM30のメモリアドレス「2A00」には「ページB3」が記憶されたページが、フラッシュメモリ40から復元される。次にCPU10は、アクセス管理テーブルの「ページB3」に対応する復元済フラグを「1」にする(ステップSe13)。そして、CPU10はRAM30の所定の領域に作成された復元キューが空であるか否かを判断する(ステップSe14)。復元キューが空でない場合(ステップSe14;NO)には、CPU10は、割り込み処理が存在するか否かを判断する(ステップSe15)。そして、割り込み処理が存在しない場合(ステップSe15;NO)には、データ復元処理を繰り返す(ステップSe11)。一方、復元キューが空である場合(ステップSe14;YES)、および割り込み処理が存在する場合(ステップSe15;YES)には、CPU10は、このデータ復元処理を終了する。
Here, FIG. 12 is a flowchart showing a processing procedure when the
The
以上説明したように、実施形態の表示装置1は、電力非供給状態に移行する前に一部の退避処理が既に行われているため、電力非供給状態に移行するときの退避処理による負荷を低減し、電力非供給状態に移行するのに要する時間を短縮することができる。
また、ページに対するアクセス頻度(部分データの利用回数)から、退避の優先順位を決定することができるため、より効率的な退避処理を行うことができる。そして、アクセス頻度総数から、退避処理以外のタスクと退避処理とのいずれを優先すべきかを決定することができる。
また、電力供給状態に移行する際に、復元したデータに基づいて、次に復元が必要となるデータを類推し、これを優先的に復元させるので、データ復元処理を効率的に分散化することができる。
As described above, the
Further, since the priority of saving can be determined from the access frequency to the page (the number of times partial data is used), more efficient saving processing can be performed. Then, it is possible to determine which of the tasks other than the save process and the save process should be prioritized from the total access frequency.
In addition, when shifting to the power supply state, the data that needs to be restored next is inferred based on the restored data, and this is preferentially restored, so that the data restoration process can be efficiently distributed. Can do.
[C:変形例]
以上が実施形態の説明であるが、この実施形態の内容は以下のように変形し得る。また、以下の変形例を適宜組み合わせてもよい。
(変形例1)
上述した実施形態では、CPU10とメモリアクセス監視装置70とは別のプロセッサであり、メモリアクセスの監視は、CPU10とは別体のハードウェアにより実現されていた。このメモリアクセスの監視は、CPU10において行ってもよい。すなわち、CPU10に読み込むプログラムに上述したメモリアクセスの監視の手続を記述し、CPU10がこれを実行すればよい。
[C: Modification]
The above is the description of the embodiment, but the contents of this embodiment can be modified as follows. Further, the following modifications may be combined as appropriate.
(Modification 1)
In the embodiment described above, the
(変形例2)
上述した実施形態では、RAM30に記憶されている処理データを、ページと呼ばれる単位で区分して退避及び復元を行っていた。このようにRAM30とフラッシュメモリ40との間で遣り取りされる処理データの単位は、ページと呼ばれるものに限らず、CPU10の1つのタスクで取り扱われるデータ単位であってもよいし、それよりも小さな単位、例えば処理を実現する処理プログラムのプロセス単位や関数単位であってもよい。要するに、処理データを複数に区分した部分データであればよい。
(Modification 2)
In the above-described embodiment, the processing data stored in the
(変形例3)
上述した実施形態では、アクセス管理テーブル71に記憶されたアクセス頻度総数が、閾値Lim1以上にならない限り退避処理は行われなかったが、このような閾値は設けなくてもよい。すなわち、CPU10はタスクが完了するたびに、退避処理を開始してもよい。
(Modification 3)
In the embodiment described above, the saving process is not performed unless the total access frequency stored in the access management table 71 is equal to or greater than the threshold value Lim1, but such a threshold value may not be provided. That is, the
(変形例4)
上述した実施形態では、ハッシュ値を計算して、退避前のアクセス管理テーブル71と復元後のアクセス管理テーブル71が一致するか否かを確認したが、この確認には、ハッシュ値を計算する以外の方法(パリティビットやチェックサム等)を用いてもよい。また、この確認を行わなくてもよい。
(Modification 4)
In the above-described embodiment, the hash value is calculated and it is confirmed whether or not the access management table 71 before saving matches the access management table 71 after restoration. For this confirmation, the hash value is not calculated. The above method (parity bit, checksum, etc.) may be used. Further, this confirmation need not be performed.
(変形例5)
上述した実施形態では、ページフォールト信号に伴って、これを発生させたページを復元する際に、そのページの前後のメモリアドレスに記憶された1つずつのページを関連ページとして、復元キューに追加した。しかし、関連ページとして復元キューに追加するページの数はこれに限られない。例えば、2つずつ、3つずつなどでもよい。また、当該ページフォールト信号を発生させたときにCPU10が実行しているタスクに応じて、この関連ページの数を決定してもよい。この場合には、予め、タスク毎に関連ページとして復元キューに追加するページの数が定められており、この数が記述されたテーブルをフラッシュメモリ40から読み出して、当該数を決定すればよい。
(Modification 5)
In the above-described embodiment, when the page that generated this is restored in accordance with the page fault signal, one page stored in the memory address before and after the page is added to the restoration queue as a related page. did. However, the number of pages added to the restoration queue as related pages is not limited to this. For example, two, three, etc. may be used. Further, the number of related pages may be determined in accordance with the task executed by the
図13は、この変形例におけるタスクごとの関連ページ数を記述したテーブルの一例を示す図である。図に示すように、ROM20から読み込まれるOSには、予めタスクごとに関連ページ数(つまり関連データのデータサイズ)が定められたテーブルが含まれており、このOSがRAM30に読み込まれることにより、このテーブルはRAM30上に記憶される。ここで「前方」とは、ページのメモリアドレスが小さい方向を意味し、「後方」とはページのメモリアドレスが大きい方向を意味する。したがって、例えば、タスクAの場合は、当該ページよりメモリアドレスが小さい方向の1ページと大きい方向の4ページが関連ページである。CPU10は、ページフォールト信号が発生したときには、このテーブルにおいて、ページフォールト信号の発生時に要求されたタスクに対応する関連ページ数を参照し、その関連ページ数に基づいて上述の復元キューに追加すべき関連ページを特定すればよい。
また、図13はタスク毎に関連ページ数を定義した例であったが、これらのタスクの手順の集合とも言えるプログラム毎に関連ページ数を定義してもよい。この場合、CPU10は、ページフォールト信号が発生したときには、このテーブルにおいて、ページフォールト信号の発生時に実行されているプログラムに対応する関連ページ数を参照し、その関連ページ数に基づいて上述の復元キューに追加すべき関連ページを特定する。
タスク毎であってもプログラム毎であっても、いずれにせよ関連データのデータサイズはCPUが実行する処理毎に定められていればよい。
FIG. 13 is a diagram showing an example of a table describing the number of related pages for each task in this modification. As shown in the figure, the OS read from the
FIG. 13 shows an example in which the number of related pages is defined for each task. However, the number of related pages may be defined for each program that can be said to be a set of procedures of these tasks. In this case, when the page fault signal is generated, the
Regardless of the task or the program, the data size of the related data only needs to be determined for each process executed by the CPU.
また、実施形態では、ページを1単位としていたため、その関連ページは、そのページの前後のページであった。要するに、復元したデータに関連したデータであれば、復元したデータの後にアクセスがなされる可能性が高いから、CPU10は、復元したデータに何らかのルールに従って関連すると思われる関連データの復元順を復元キューに記憶すればよい。
In the embodiment, since the page is a unit, the related page is the page before and after the page. In short, since data related to the restored data is likely to be accessed after the restored data, the
(変形例6)
上述した実施形態では、電力供給を受けてデータを記憶した状態を維持する第1の記憶手段としてRAM30を例示し、電力供給を受けずにデータを記憶した状態を維持する第2の記憶手段としてフラッシュメモリ40を例示していたが、これら記憶手段の具体例は、実施形態の例示に限定されることはない。
(Modification 6)
In the above-described embodiment, the
(変形例7)
上述の実施形態では、表示装置1に備えられた不揮発性メモリは、フラッシュメモリ40のみの1種類だけであったが、表示装置1は2種類以上の不揮発性メモリを備えていてもよい。また、この2種類以上の不揮発性メモリにおいて、記憶内容の読み書きの速度に差がある場合には、RAM30上の処理データの退避先を異ならせてもよい。例えばアクセス管理テーブル71に記憶されたページのうち、アクセス頻度が少ないページは、読み書きの速度の遅い不揮発性メモリに記憶し、アクセス頻度が多いページは読み書きの速度の速い不揮発性メモリに記憶してもよい。このようにすると、頻繁にアクセスするページは、より読み書きの速度の速い不揮発性メモリに記憶されるので、退避処理および復元処理を迅速に行うことができる。なお、このアクセス頻度が多いか少ないかの判断には、予め閾値を定めておいてもよいし、集計したアクセス頻度の平均値等(相加平均、相乗平均、最頻値)と比較してもよい。
(Modification 7)
In the above-described embodiment, the
(変形例8)
上述の実施形態では、アクセス管理テーブル71の全てのフィールドを退避させていたが、メモリアドレスとページIDのみを退避させてもよい。退避済フラグは退避時にのみ用いており、復元済フラグは復元時に初期化し、アクセス頻度およびアクセス頻度総数は復元時には用いないからである。
(Modification 8)
In the above embodiment, all the fields of the access management table 71 are saved, but only the memory address and the page ID may be saved. This is because the saved flag is used only at the time of saving, the restored flag is initialized at the time of restoration, and the access frequency and the total access frequency are not used at the time of restoration.
(変形例9)
実施形態では、CPU10がアイドル時になったときに退避処理を開始していたが、その開始タイミングは、アイドル時になったタイミングには限定されない。要するに、CPU10のアイドル時である期間に退避処理を行えばよく、その退避開始のタイミングは、アイドル時になったタイミングから遅れてもよい。
(Modification 9)
In the embodiment, the save process is started when the
(変形例10)
また、上述した表示装置1のCPU10が実行するプログラムは、磁気テープ、磁気ディスク、フレキシブルディスク、光記録媒体、光磁気記録媒体、CD(Compact Disk)、DVD(Digital Versatile Disk)、RAMなどの記録媒体に記録した状態で提供し得る。また、インターネットなどのネットワーク経由で表示装置1にダウンロードさせることも可能である。即ち、本発明をプログラムとして実現することもできる。
(Modification 10)
The program executed by the
1…表示装置、10…CPU、20…ROM、30…RAM、40…フラッシュメモリ、50…操作部、60…表示部、70…メモリアクセス監視装置、71…アクセス管理テーブル、80…電源部、90…バス
DESCRIPTION OF
Claims (13)
電力供給を受けずに、データを記憶した状態を維持する第2の記憶手段と、
前記第1の記憶手段に電力を供給する電力供給状態、又は、前記第1の記憶手段に電力を供給しない電力非供給状態のいずれかに移行させる状態移行手段と、
前記電力供給状態において、前記第1の記憶手段に記憶されているデータを用いて処理を実行する処理実行手段と、
前記電力供給状態から前記電力非供給状態に移行する指示があるまでに、前記第1の記憶手段に記憶されているデータを一部分ずつ、それぞれ異なる時期に読み出して前記第2の記憶手段に記憶させる退避処理を行う退避手段とを備え、
前記状態移行手段は、前記第1の記憶手段に記憶されているデータに対して前記退避手段による前記退避処理が行われてから、前記電力供給状態から前記電力非供給状態に移行させる
ことを特徴とするデータ管理装置。 First storage means for receiving a power supply and maintaining a state of storing data;
Second storage means for maintaining a state of storing data without receiving power supply;
State transition means for shifting to either a power supply state for supplying power to the first storage means or a power non-supply state for not supplying power to the first storage means;
Processing execution means for executing processing using data stored in the first storage means in the power supply state;
Until there is an instruction to shift from the power supply state to the power non-supply state, the data stored in the first storage unit is read out in portions at different times and stored in the second storage unit. Evacuation means for performing evacuation processing,
The state transition unit shifts the data stored in the first storage unit from the power supply state to the power non-supply state after the save process by the save unit is performed. Data management device.
ことを特徴とする請求項1記載のデータ管理装置。 The data management apparatus according to claim 1, wherein the save unit starts the save process every time processing that is a unit of execution by the process execution unit is completed.
ことを特徴とする請求項2に記載のデータ管理装置。 The data management apparatus according to claim 2, wherein the save unit performs the save process during a period when the process is not executed by the process execution unit.
前記退避手段は、前記処理実行手段が前記処理の実行を一時中断している期間に、前記退避処理を行う
ことを特徴とする請求項1記載のデータ管理装置。 The process execution means temporarily suspends execution of the process from the start of the process as a unit of execution until completion.
The data management apparatus according to claim 1, wherein the save unit performs the save process during a period in which the process execution unit temporarily suspends execution of the process.
前記処理実行手段による実行の単位となる処理は、前記プログラムに記述された手順に従ってCPUが実行する処理の単位となるタスクである
ことを特徴とする請求項2〜4のいずれか1項に記載のデータ管理装置。 The process execution means is a CPU that executes a process according to a procedure described in a program,
5. The process as a unit of execution by the process execution unit is a task as a unit of a process executed by the CPU according to a procedure described in the program. 6. Data management device.
前記退避手段は、前記回数記憶手段によって記憶されている回数が少ない部分データに対して、当該回数が多い部分データよりも先に前記退避処理を行う
ことを特徴とする請求項1に記載のデータ管理装置。 When the data is divided into a plurality of partial data, a number of times storage means for storing the number of times the processing execution means uses the partial data stored in the first storage means for each partial data Prepared,
2. The data according to claim 1, wherein the saving unit performs the saving process on partial data stored in the frequency storage unit before the partial data having a high number of times. Management device.
ことを特徴とする請求項6に記載のデータ管理装置。 The data management apparatus according to claim 6, wherein the save unit performs the save process when the total number of times stored by the number storage unit is equal to or greater than a first threshold value.
ことを特徴とする請求項6に記載のデータ管理装置。 The saving unit performs the saving process in a period in which the process is not executed by the process execution unit when the total number of times stored by the number storage unit is equal to or greater than a first threshold, When the total number of times stored by the number storage unit is equal to or greater than a second threshold value that is greater than the first threshold value, the save processing is performed even during a period in which the process is being executed by the process execution unit. The data management device according to claim 6, wherein:
ことを特徴とする請求項1に記載のデータ管理装置。 If the save means cannot save all the data stored in the first storage means until there is an instruction to shift from the power supply state to the power non-supply state, The data management apparatus according to claim 1, wherein after being instructed, unsaved data is read from the first storage unit and stored in the second storage unit.
前記処理実行手段により処理が実行されていない期間において、前記第1の復元手段が記憶した復元順に基づいて、前記第2の記憶手段に記憶されている前記関連データを読み出し、前記第1の記憶手段に記憶させる第2の復元手段と
を備えることを特徴とする請求項1に記載のデータ管理装置。 In the power supply state, when the data used for the process executed by the process execution unit is not stored in the first storage unit, the data stored in the second storage unit is read, and the second storage unit Performing a restoration process to be stored in one storage unit, and storing a restoration order of related data related to the data in the second storage unit;
Based on the restoration order stored by the first restoration unit, the related data stored in the second storage unit is read out during the period when the process is not performed by the process execution unit, and the first storage The data management apparatus according to claim 1, further comprising: a second restoration unit that is stored in the unit.
ことを特徴とする請求項10に記載のデータ管理装置。 The data management apparatus according to claim 10, wherein the data size of the related data is determined for each process executed by the process execution unit.
前記処理実行手段によって処理された結果を出力する出力手段と
を具備することを特徴とする情報処理装置。 A data management device according to any one of claims 1 to 11,
An information processing apparatus comprising: output means for outputting a result processed by the process execution means.
前記第1の記憶手段に電力を供給する電力供給状態、又は、前記第1の記憶手段に電力を供給しない電力非供給状態のいずれかに移行させる状態移行手段と、
前記電力供給状態において、前記第1の記憶手段に記憶されているデータを用いて処理を実行する処理実行手段と、
前記電力供給状態において、前記第1の記憶手段に記憶されているデータを一部分ずつ、それぞれ異なる時期に読み出して前記第2の記憶手段に記憶させる退避処理を行う退避手段として機能させ、
さらに前記状態移行手段は、前記第1の記憶手段に記憶されているデータに対して前記退避手段による前記退避処理が行われてから、前記電力供給状態から前記電力非供給状態に移行させるプログラム。 A computer comprising first storage means for maintaining a state in which data is stored upon receiving power supply, and second storage means for maintaining a state in which data is stored without receiving power supply,
State transition means for shifting to either a power supply state for supplying power to the first storage means or a power non-supply state for not supplying power to the first storage means;
Processing execution means for executing processing using data stored in the first storage means in the power supply state;
In the power supply state, the data stored in the first storage unit is functioned as a saving unit that performs a saving process of reading data in portions at different times and storing them in the second storage unit,
Furthermore, the state transition unit is a program for shifting from the power supply state to the power non-supply state after the save process by the save unit is performed on the data stored in the first storage unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007300920A JP2009129026A (en) | 2007-11-20 | 2007-11-20 | Data management device, information processor, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007300920A JP2009129026A (en) | 2007-11-20 | 2007-11-20 | Data management device, information processor, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009129026A true JP2009129026A (en) | 2009-06-11 |
Family
ID=40819914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007300920A Pending JP2009129026A (en) | 2007-11-20 | 2007-11-20 | Data management device, information processor, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009129026A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010124076A (en) * | 2008-11-17 | 2010-06-03 | Ricoh Co Ltd | Image processor, control method for image processor, and program of the same |
JP2012058840A (en) * | 2010-09-06 | 2012-03-22 | Fujitsu Ltd | Saving processing equipment, saving processing method and saving processing program |
JPWO2013088782A1 (en) * | 2011-12-13 | 2015-04-27 | 株式会社ソニー・コンピュータエンタテインメント | Information processing apparatus, information processing method, program, and information storage medium |
-
2007
- 2007-11-20 JP JP2007300920A patent/JP2009129026A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010124076A (en) * | 2008-11-17 | 2010-06-03 | Ricoh Co Ltd | Image processor, control method for image processor, and program of the same |
JP2012058840A (en) * | 2010-09-06 | 2012-03-22 | Fujitsu Ltd | Saving processing equipment, saving processing method and saving processing program |
JPWO2013088782A1 (en) * | 2011-12-13 | 2015-04-27 | 株式会社ソニー・コンピュータエンタテインメント | Information processing apparatus, information processing method, program, and information storage medium |
US9513841B2 (en) | 2011-12-13 | 2016-12-06 | Sony Corporation | Information processing device, information processing method, program, and information storage medium for managing and reproducing program execution condition data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109739563B (en) | Terminal control method, device, system and storage medium | |
JP4175838B2 (en) | Information processing apparatus with standby mode, standby mode start method and standby mode cancel method | |
JP4515093B2 (en) | CPU power-down method and apparatus therefor | |
TWI436199B (en) | Method and controller for power management | |
TWI298436B (en) | An operation method in an apparatus, an electronic system therefor, and a computer readable medium therefor | |
US20070150760A1 (en) | Reducing the amount of memory contents saved to non-volatile storage | |
US6438708B1 (en) | Information processing apparatus that can hold internal information | |
JPH077317B2 (en) | System restart device | |
US20070283187A1 (en) | Bios for saving and restoring operational state in the absence of ac power | |
JP2007219581A (en) | Memory controller, and electronic equipment mounted therewith | |
JPH10207588A (en) | Information processor | |
JP2009129026A (en) | Data management device, information processor, and program | |
JP5622429B2 (en) | Microcomputer | |
JP3525070B2 (en) | Access control device and access method | |
JP2004078772A (en) | Microcomputer device processing method during standby, and microcomputer device | |
JP2006350930A (en) | Control circuit and information processor | |
JP4334312B2 (en) | Start-up time reduction computing device and data loading method | |
JP2006127407A (en) | Semiconductor integrated circuit | |
JP2009093270A (en) | Computer system and startup method therefor | |
JPH0876876A (en) | Clock supply control circuit of microprocessor | |
JP2000056984A (en) | Micro computer with built-in memory and resetting method for micro computer | |
JP5823000B2 (en) | Microcomputer | |
JPS6381537A (en) | Computer system | |
JP5194360B2 (en) | Information processing apparatus and control method thereof | |
JP2002149262A (en) | Program executing method |