JP2005196343A - Memory management device, memory management method and program - Google Patents
Memory management device, memory management method and program Download PDFInfo
- Publication number
- JP2005196343A JP2005196343A JP2004000307A JP2004000307A JP2005196343A JP 2005196343 A JP2005196343 A JP 2005196343A JP 2004000307 A JP2004000307 A JP 2004000307A JP 2004000307 A JP2004000307 A JP 2004000307A JP 2005196343 A JP2005196343 A JP 2005196343A
- Authority
- JP
- Japan
- Prior art keywords
- address
- memory
- memory bank
- unused
- management device
- 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.)
- Withdrawn
Links
- 238000007726 management method Methods 0.000 title claims description 170
- 238000000034 method Methods 0.000 claims abstract description 36
- 230000008569 process Effects 0.000 claims abstract description 27
- 230000004913 activation Effects 0.000 claims description 25
- 230000004044 response Effects 0.000 claims description 5
- 230000009849 deactivation Effects 0.000 claims description 3
- 238000012217 deletion Methods 0.000 abstract description 27
- 230000037430 deletion Effects 0.000 abstract description 27
- 238000010586 diagram Methods 0.000 description 16
- 101000911772 Homo sapiens Hsc70-interacting protein Proteins 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 101001139126 Homo sapiens Krueppel-like factor 6 Proteins 0.000 description 1
- 101000710013 Homo sapiens Reversion-inducing cysteine-rich protein with Kazal motifs Proteins 0.000 description 1
- 101000661807 Homo sapiens Suppressor of tumorigenicity 14 protein Proteins 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 108090000237 interleukin-24 Proteins 0.000 description 1
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
- Memory System (AREA)
Abstract
Description
この発明は、計算機システムの電力管理技術に関し、特に携帯電話などバッテリー動作が必要とされる計算機システムの省電力化に関するものである。 The present invention relates to a power management technique for a computer system, and more particularly to power saving of a computer system such as a mobile phone that requires battery operation.
仮想アドレス空間でメモリ管理するオペレーティングシステムにおけるメモリ省電力化に関する技術として、特開平9−212416号公報に記載の「計算機システムおよび計算機システムの電力管理方法」がある。 As a technique related to memory power saving in an operating system that manages memory in a virtual address space, there is a “computer system and a power management method for a computer system” described in Japanese Patent Laid-Open No. 9-212416.
計算機システムでは実行中のプログラムおよびデータは揮発性のメモリに格納されており、内容保持のためには常に電源を入れておく必要がある。省電力化のために、メモリを複数のバンクに分割し、内容保持が必要なバンクだけ電源オンにすることで電源オンの範囲を少なくする方法が取られている。 In the computer system, the program and data being executed are stored in a volatile memory, and it is necessary to always turn on the power to maintain the contents. In order to save power, a method of reducing the power-on range by dividing the memory into a plurality of banks and turning on only the banks that need to retain the contents is used.
特開平9−212416号公報では、バンクの電源オン、オフ制御をオペレーティングシステムメモリのなかで行う。メモリ管理部はメモリ領域管理テーブルを使用して領域の割り当ておよび解放の制御を行う。メモリ領域管理テーブルには連続する空き領域もしくは使用領域毎に先頭アドレス、サイズ、バンク情報が格納されている。メモリ電源管理部は管理テーブル内容より現在のメモリ使用状態を調べ、未使用メモリバンクがあれば対応するメモリバンクの電源をオフあるいはDRAMリフレッシュを停止し省電力化を図る。
従来の特開平9−212416号公報の方式では、少ないデータであっても、あるメモリバンクにデータが存在していれば、そのメモリバンクの電源はオフできないという問題点があった。仮想アドレス空間でメモリ管理するオペレーティングシステムでは、アプリケーションから要求されたデータをその都度空いている物理アドレスに割り付け与えているため、しばらく運転していると物理アドレス空間全体にデータが点在するといった状態になる。したがって全メモリ消費量は少ないものの、どのメモリバンクも電源がオフできないという問題が生じる。 The conventional method disclosed in Japanese Patent Application Laid-Open No. 9-212416 has a problem that even if there is a small amount of data, if there is data in a certain memory bank, the power of the memory bank cannot be turned off. In an operating system that manages memory in the virtual address space, the data requested by the application is assigned to a vacant physical address each time, so the data is scattered throughout the physical address space after operating for a while. become. Therefore, although the total memory consumption is small, there arises a problem that no memory bank can be turned off.
この発明は上記のような問題点を解決するためになされたもので、仮想アドレス空間でメモリ管理をしているオペレーティングシステムに対し、使用中のメモリバンクに優先的にアドレス割付を行い、他のメモリバンクの電源をオフすることで省電力化を図ることを目的とする。 The present invention has been made in order to solve the above-described problems. For the operating system that manages the memory in the virtual address space, the address allocation is preferentially performed to the memory bank in use. An object is to save power by turning off the power of the memory bank.
本発明に係るメモリ管理装置は、
複数のメモリバンクを管理するメモリ管理装置であって、
アドレス割当のための優先度をメモリバンクごとに設定し、
アドレス割当の際に、メモリバンクごとの優先度及び各メモリバンク内のアドレスの序列に基づき、未使用アドレスのうち、優先度が上位のメモリバンク内の上位のアドレスから順に割当の対象とし、優先度が上位のメモリバンク内のアドレスが一定以上割当済となった場合に優先度が下位のメモリバンク内の未使用アドレスを上位のアドレスから順に割当の対象とすることを特徴とする。
The memory management device according to the present invention includes:
A memory management device for managing a plurality of memory banks,
Set the priority for address assignment for each memory bank,
When assigning addresses, based on the priority of each memory bank and the order of the addresses in each memory bank, among the unused addresses, the priority is assigned in order from the upper address in the upper memory bank. When an address in a memory bank having a higher level is assigned to a certain level or more, unused addresses in a memory bank having a lower priority are assigned in order from the higher address.
本発明によれば、アドレス割当の際に、未使用アドレスのうち、優先度が上位のメモリバンク内の上位のアドレスから順に割当の対象とし、優先度が上位のメモリバンク内のアドレスが一定以上割当済となった場合に優先度が下位のメモリバンク内の未使用アドレスを上位のアドレスから順に割当の対象とするため、使用中のメモリバンクを優先的に使うことができ、物理アドレス空間全体にデータが点在するという事態を回避することができ、使用していないメモリバンクを非活性化させることによりメモリ管理における省電力化を図ることができる。 According to the present invention, at the time of address allocation, among the unused addresses, the priority is assigned in order from the upper address in the higher-order memory bank, and the addresses in the higher-priority memory bank are more than a certain level. When assigned, unused addresses in the lower priority memory bank are assigned in order from the higher address, so that the memory bank in use can be used preferentially, and the entire physical address space In other words, it is possible to avoid a situation where data is scattered, and by deactivating unused memory banks, it is possible to save power in memory management.
実施の形態1.
図1は本実施の形態に係る計算機システム100のハードウェア構成図である。
FIG. 1 is a hardware configuration diagram of a
図において、1はオペレーティングシステムやアプリケーションプログラムを処理するCPU(Central Processing Unit)、2はCPU1で処理するプログラムおよびデータを論理アドレスから物理アドレスへ変換するメモリマネジメントユニット、3a〜3dはメモリマネジメントユニット2で変換された物理アドレスのプログラムおよびデータを記憶するメモリバンク、4はメモリバンク3a〜3dの電源オン、オフを制御する電源制御回路である。メモリバンク3a〜3dは、主記憶装置として動作する。また、メモリバンク3a〜3dには、それぞれアドレス割当における優先度が設定されており、ここでは、メモリバンク3aが一番優先度が高く、メモリバンク3dに向かうにつれて優先度が低くなっていくものとする。また、CPU1、メモリマネジメントユニット2、電源制御回路4は、メモリ管理装置200として機能する。
In the figure, 1 is a CPU (Central Processing Unit) for processing an operating system and application programs, 2 is a memory management unit for converting programs and data processed by the
また図2は本実施の形態に係る計算機システム100のソフトウェア構成図である。
FIG. 2 is a software configuration diagram of the
図において、10はCPU1上で動作するオペレーティングシステム、20はアプリケーションプログラム、11はオペレーティングシステム10内にてアプリケーションプログラムの起動、終了を管理するプロセス管理部、12はメモリマネジメントユニット2で例外割込みが発生した際の処理を行う例外処理部、13はプロセス管理部11からのぺージ削除要求や例外処理部12からのページ登録要求を受けて割り当てられている物理メモリを解放したり新たに割り当てるページ管理データ処理部、14はページ管理データ処理部13がページ登録、削除する上で必要な情報を格納しておくページ管理データ、15は電源制御回路4にメモリ電源の制御指示を送るメモリ電源制御部である。
In the figure, 10 is an operating system operating on the
さらにページ管理データ処理部13は、ページ登録/削除処理部131と未使用先頭アドレスレジスタ132で構成されている。未使用先頭アドレスレジスタ132は、アドレス割当の優先順位において先頭に位置する未使用先頭アドレスを記憶している。ここで、アドレス割当の優先順位は、優先度が上位のメモリバンク内の上位のアドレスから順にアドレス割当の対象となり、優先度が上位のメモリバンク内のアドレスがすべて割当済となった場合に、下位の優先度のメモリバンクに移り、下位の優先度のメモリバンクにおいても上位のアドレスから順にアドレス割当の対象となるものとする。
Further, the page management
なお、ページ登録/削除処理部131はアドレス割当管理部の例であり、メモリ電源制御部15は電力供給制御部の例である。
The page registration /
次に動作について説明する。 Next, the operation will be described.
アプリケーションプログラム20でデータアクセスが発生した時、CPU1はメモリマネジメントユニット2に対して論理アドレスを送付する。通常オペレーティングシステムは数キロバイトの固定サイズを1単位(ページ)として扱い、ページ毎の論理アドレスと物理アドレスの対応はページ管理データ14に格納されている。メモリマネジメントユニット2はページ管理データ14を参照し、物理アドレスへ変換した上でメモリバンク3a〜3dに物理アドレスを送付しデータの書込みもしくは読出しを行う。
When data access occurs in the
登録されていない論理アドレスへのアクセスが発生した場合、メモリマネジメントユニット2はCPU1へ例外割込みを発生する。例外割込みはCPU1に受信され、CPU1上で動作しているオペレーティングシステム10の例外処理部12で分析される。例外処理部12は新たなページ登録の要求と判断すると、ページ管理データ処理部13へページ登録の要求を発する。
When an access to an unregistered logical address occurs, the
ページ管理データ処理部13のページ登録/削除処理部131は、図3に示す処理フローで登録処理(アドレス割当処理)を行う。
The page registration /
すなわち、ST11にて、未使用先頭アドレスレジスタ132を参照しメモリ空き領域の先頭の物理アドレス(未使用先頭アドレス)を読出し、ST12にて、読み出した物理アドレスを登録すべきページの物理アドレスとしてページ管理データ14に登録する(未使用先頭アドレスに対する割当を行う)。続いて未使用先頭アドレスレジスタ132の内容を更新するために、ST13で未使用先頭アドレスレジスタ132の内容を1ページ分だけ増やし、ST14で同じ物理アドレスをすでに使っていないかページ管理データ14内を検索する。
That is, in ST11, the unused
すでに物理アドレスが使用されていれば、ST13に戻り使っていない物理アドレスが見つかるまで、未使用先頭アドレスレジスタ132の値を増やしていく。使っていない物理アドレスが見つかった場合、検索を終了し、見つけた物理アドレスの値を未使用先頭アドレスレジスタ132の更新値とする。なお、未使用先頭アドレスレジスタに新たに登録された未使用先頭アドレスは、次回のアドレス割当時に割当の対象となるアドレスとなる。
If the physical address has already been used, the process returns to ST13 to increase the value of the unused
さらにST15にて、更新された未使用先頭アドレスレジスタ132の物理アドレス値が前のアドレス値に対して別メモリバンクに達していた場合、ST16にてページ登録/削除処理部131はメモリ電源制御部15へ更新された未使用先頭アドレスレジスタ132の示すメモリバンク3a〜3dの電源をオンする(活性化させる)ように指示する。
Further, in ST15, if the updated physical address value of the unused
以上の処理を、図13及び図14を参照して具体的に説明する。 The above process will be specifically described with reference to FIGS. 13 and 14.
図13では、メモリバンク3a内のアドレスのうち白色の部分が未使用アドレス、着色された部分は割当済アドレスを示す。図13(a)の状態では、アドレス301が未使用先頭アドレスであり、アドレス302はアドレス割当の優先順位においてアドレス301の次に位置する未使用アドレスである。図13(a)の状態において、ページ登録処理(アドレス割当処理)を行う場合は、未使用先頭アドレスであるアドレス301が割当の対象となり、図13(b)に示すように、アドレス301は割当済アドレスとなり、次の未使用アドレスであるアドレス302が新たな未使用先頭アドレスとなり、未使用先頭アドレスレジスタ132に登録される。
In FIG. 13, the white portion of the addresses in the
次に、図14について説明する。図14(a)では、メモリバンク3aにおいてアドレス301が未使用先頭アドレスであり、メモリバンク3bはすべてのアドレスが未使用である。また、メモリバンク3bのアドレス303が、アドレス割当の優先順位においてアドレス301の次の位置にある未使用アドレスである。なお、図14(a)の状態では、メモリバンク3aは電源オン状態であるが、メモリバンク3bは電源オフ状態である。ここで、ページ登録処理(アドレス割当処理)を行う場合は、未使用先頭アドレスであるアドレス301が割当の対象となり、アドレス301は割当済アドレスとなる。このため、メモリバンク3bのアドレス303が未使用先頭アドレスとなり、また、メモリバンク3bは電源オン状態となる(活性化する)。
Next, FIG. 14 will be described. In FIG. 14A, the
このように、アドレス割当の際に、未使用アドレスのうち、優先度が上位のメモリバンク内の上位のアドレスから順に割当の対象とし、優先度が上位のメモリバンク内のアドレスがすべて割当済となった場合に優先度が下位のメモリバンク内の未使用アドレスを上位のアドレスから順に割当の対象とするため、使用中のメモリバンクを優先的に使うことができ、物理アドレス空間全体にデータが点在するという事態を回避することでき、また、更新した未使用先頭アドレスが下位のメモリバンクに属する場合にのみ下位のメモリバンクを電源オンとするため、メモリ管理における省電力化を図ることができる。 In this way, when assigning addresses, among the unused addresses, the priority is assigned in order from the upper address in the higher priority memory bank, and all addresses in the higher priority memory bank are assigned. In this case, the unused addresses in the lower priority memory bank are assigned in order from the higher address, so that the memory bank in use can be used preferentially, and data is stored in the entire physical address space. It is possible to avoid the situation of being scattered, and since the lower memory bank is powered on only when the updated unused head address belongs to the lower memory bank, it is possible to save power in memory management. it can.
次にアプリケーションプログラム20が終了し、使っていたデータが不要になった場合、アプリケーションプログラム20の終了をプロセス管理部11が認識し、ページ管理データ処理部13へデータ削除を要求する。
Next, when the
ページ管理データ処理部13のページ登録/削除処理部131は、図4に示す処理フローで削除処理(アドレス解放処理)を行う。
The page registration /
すなわち、ST21にて、ページ管理データ14を参照して削除すべきページデータを検索する。登録(アドレス割当)の際、プロセスID等をページ管理データ14に格納しておけば、削除対象のプロセスIDを検索することで削除対象のページデータを見つけることが出来る。
That is, in ST21, the page data to be deleted is searched with reference to the
ページ管理データ14内の削除するエントリを見つけた場合、ST22で、対象のエントリを未使用状態に変え、すなわち解放対象となるアドレスを解放し、ST23で、削除したページの物理アドレス(解放したアドレス)と、未使用先頭アドレスレジスタ132が示す未使用先頭アドレスとを比較する。削除したページの物理アドレスのほうが小さい場合、すなわち、アドレス割当の優先順位において上位に位置する場合、ST26で、未使用先頭アドレスレジスタ132の値を削除したページの物理アドレスに更新する。
When an entry to be deleted is found in the
さらに更新前の未使用先頭アドレスレジスタ132の示すメモリバンク(更新前の未使用先頭アドレスの属するメモリバンク)と、更新後の未使用先頭アドレスレジスタ132の示すメモリバンク(解放したアドレスが属するメモリバンク)が異なる場合、ST24にて、更新前の未使用先頭アドレスレジスタ132の示すメモリバンクの物理アドレス範囲を、他で使用していないかページ管理データ14内を検索する。使用されていない場合、ST25にて、ページ登録/削除処理部131はメモリ電源制御部15へ更新前の未使用先頭アドレスレジスタ132の示すメモリバンクの電源をオフするように指示する。
Further, the memory bank indicated by the unused
以上の処理を、図15〜図17を参照して具体的に説明する。 The above process will be specifically described with reference to FIGS.
図15では、メモリバンク3a内のアドレスのうち白色の部分が未使用アドレス、着色した部分は割当済アドレスを示す。図15(a)の状態では、アドレス301が未使用先頭アドレスである。例えば、図15(b)に示すように、未使用先頭アドレスであるアドレス301よりも後方のアドレス、すなわちアドレス割当の優先順位において未使用先頭アドレスよりも下位に位置するアドレス304が解放対象になった場合は、未使用先頭アドレスはアドレス301のままである。他方、図15(c)に示すように、未使用先頭アドレスであるアドレス301よりも前方のアドレス、すなわちアドレス割当の優先順位において未使用先頭アドレスよりも上位に位置するアドレス305が解放対象になった場合は、アドレス305が新たな未使用先頭アドレスとなり、未使用先頭アドレスレジスタ132に登録される。
In FIG. 15, the white portion of the addresses in the
次に、図16について説明する。図16(a)では、メモリバンク3aの全てのアドレスが割当済であり、メモリバンク3bのアドレス301が未使用先頭アドレスである。また、メモリバンク3bでは、割当済のアドレスが存在する。図16(a)の状態では、メモリバンク3a、メモリバンク3bともに電源オンの状態である。次に、メモリバンク3aのアドレス306が解放対象となった場合には、アドレス306はアドレス割当の優先順位においてアドレス301よりも上位に位置する未使用アドレスであるため、アドレス306が新たな未使用先頭アドレスとなる。また、メモリバンク3bには割当済アドレスが存在するため、メモリバンク3bは電源オンのままである。
Next, FIG. 16 will be described. In FIG. 16A, all the addresses of the
次に、図17について説明する。図17(a)では、メモリバンク3aの全てのアドレスが割当済であり、メモリバンク3bのアドレス301が未使用先頭アドレスである。また、メモリバンク3b内は、全てが未使用アドレスである。図16(a)の状態では、メモリバンク3a、メモリバンク3bともに電源オンの状態である。次に、メモリバンク3aのアドレス307が解放対象となった場合には、アドレス307はアドレス割当の優先順位においてアドレス301よりも上位に位置する未使用アドレスであるため、アドレス307が新たな未使用先頭アドレスとなる。そして、メモリバンク3b内のアドレスは全て未使用アドレスであるため、メモリバンク3bは電源オフとなる(非活性化する)。
Next, FIG. 17 will be described. In FIG. 17A, all addresses of the
ここで、複数のアプリケーションプログラム20の動作、終了が繰り返される場合を考える。この時、複数のページ登録やページ削除がまとまって実施され、上位のメモリバンク3a内に空き領域が点在することがある。そこで定期的に空き領域を検索し、データの移動を行うことで空きメモリバンクを作る。
Here, consider a case where the operation and termination of a plurality of
図5はデータ移動の処理フローである。ST31にて、未使用先頭アドレスレジスタ132をチェックする。未使用先頭アドレスレジスタ132は常に空き領域の最上位アドレスを示しているので、この値が最下位メモリバンクアドレスを示しているのであれば、空きメモリバンクを作ることはできないため、データ移動処理を終了する。
FIG. 5 is a processing flow of data movement. In ST31, the unused
続いて、ST32にて、未使用先頭アドレスレジスタ132のアドレスが示すメモリバンクより下位のメモリバンクアドレスを示すデータが存在するか、つまりアドレス割当の優先順位において未使用先頭アドレスより下位に位置する割当済アドレスが存在するか否かを、ページ管理データ14内から検索する。もし存在すれば、ST33にて、そのページデータを未使用先頭アドレスレジスタ132の示す物理アドレスにコピーし、ST34にて、ページ管理データ14の示す物理アドレス情報を未使用先頭アドレスレジスタ132の示す値に変更する。ST35にて、次の空き領域をページ管理データ14内から検索し、未使用先頭アドレスレジスタ132の値を更新するとともにST31に戻り処理を繰り返す。
Subsequently, in ST32, whether there is data indicating a memory bank address lower than the memory bank indicated by the address of the unused
ST32で未使用先頭アドレスレジスタ132のアドレスが示すメモリバンクより下位のメモリバンクを示すデータが存在しない場合、下位のメモリバンクの電源をオフし、データ移動処理を終了する。
If there is no data indicating a memory bank lower than the memory bank indicated by the address of the unused
以上のように、ページ削除の際に、次にページ登録で割り当てるアドレスよりも削除したアドレスのほうが小さい場合には、次にページ登録で割り当てるアドレスを削除したページアドレスに変更するようにしているので、使用中のメモリバンクを優先的に使うことができ、他のメモリバンクの電源をオフすることができる。この結果、メモリ管理における省電力化を図ることできる。 As described above, when deleting a page, if the address deleted in the next page registration is smaller than the address assigned in the next page registration, the address assigned in the next page registration is changed to the deleted page address. The memory bank in use can be used preferentially, and the power of other memory banks can be turned off. As a result, power saving in memory management can be achieved.
また、ページの登録、削除の後に次に割り当てるアドレスを決めておくことで、アプリケーションプログラムからみたアドレス割付は瞬時に行えることから、例外発生時のペナルティを減らし、性能劣化を防ぐことができる。 Also, by deciding the next address to be assigned after registering and deleting a page, address assignment as seen from the application program can be performed instantaneously, so that a penalty when an exception occurs can be reduced and performance degradation can be prevented.
また、定期的に空きデータ領域を検索し、下位メモリバンクのデータを移動することで、さらに使用中のメモリバンクの利用率を高め、他のメモリバンクの電源をオフすることができる。 Further, by periodically searching for an empty data area and moving the data in the lower memory bank, it is possible to further increase the utilization rate of the memory bank in use and turn off the power to the other memory banks.
実施の形態2.
以上の実施の形態1では、オペレーティングシステム10上でデータの登録、削除を行うようにしたものであるが、次にページの割り当て処理をハードウェアで実現する実施の形態を示す。
In the first embodiment described above, data is registered and deleted on the
図6は、本実施の形態を示すハードウェア構成図である。 FIG. 6 is a hardware configuration diagram showing the present embodiment.
図において、5は物理メモリのページ単位(アドレスごと)に使用、未使用をビットフラグで示したビットマップテーブル、61aはメモリバンク3aのページを示すビットマップテーブルのうち、いずれか1つでも使用を示していたら1を示すOR回路、61bはメモリバンク3bに対応する同じ機能のOR回路、62a、62bはOR回路61a、62bの出力が1の場合に夫々メモリバンク3a、3bに給電するAND回路、63はOR回路61aと同じ入力で、すべてのビットマップテーブルが使用を示していたら1を示すAND回路、7はCPU1上で動作するオペレーティングシステム10からのページ登録、削除要求に対しフラグレジスタを設定し、ページ登録に対しては新たに割り当てた物理アドレスを応答するフラグ管理回路である。
In the figure, 5 is used for each page of the physical memory (for each address), a bitmap table indicating unused bits by bit flags, and 61a is used for any one of bitmap tables indicating pages of the
なお、図6において、電源制御回路4は電源回路の例であり、ビットマップテーブル5は割当状況テーブルの例であり、OR回路61a、OR回路61bは活性化信号出力回路の例であり、AND回路62a、AND回路62aは電力供給制御回路の例であり、AND回路63は指示信号出力回路であり、フラグ管理回路7はアドレス割当管理回路の例である。また、ビットマップテーブルにおいていずれかのアドレスが使用中であると示されていた場合にOR回路61a、61bから出力される信号は、活性化信号の例である。また、ビットマップテーブルにおいてメモリバンク3aの全てが使用中であると示された場合にAND回路63からOR回路61bに出力される信号は指示信号の例である。
In FIG. 6, the power
次に動作について説明する。 Next, the operation will be described.
オペレーティングシステム10で新たなページを登録する時、その要求をフラグ管理回路7へ通知する。フラグ管理回路7は、ビットマップテーブル5の内容を参照し、空き領域を検索する。
When a new page is registered in the
検索方法として、図7の方法をとる。すなわち、各メモリバンク3a〜3dに例えば3aから順番に使っていくように優先順位を設定し、フラグ管理回路7はメモリバンク3aに対するビットマップテーブル5から空き領域を検索する。もし空き領域が見つからなければ次にメモリバンク3bに対するビットマップテーブル5を検索するといったようにして、メモリバンク3dまでを検索する。
As a search method, the method of FIG. 7 is used. That is, the priority order is set so that the
別の検索方法として、図8の方法もある。すなわち、オペレーティングシステムやミドルウェアといった常駐するメモリ用と、アプリケーションプログラムの実行終了とともに不要となるメモリ用に検索領域を設け、オペレーティングシステムからのページ登録要求の際に常駐、非常駐メモリの要求を分けて通知する。フラグ管理回路7はそれぞれの領域に対し、アドレスの小さいほうから順に空き領域を検索する。図8の例では、オペレーティングシステムについては、優先度が上位のメモリバンクへのアドレス割当を行い、アプリケーションプログラムについては、オペレーティングシステムに割り当てるアドレスよりも下位のアドレスを割り当てるようにしている。
Another search method is the method shown in FIG. In other words, a search area is provided for the resident memory such as the operating system and middleware and the memory that becomes unnecessary when the execution of the application program is completed, and the resident and non-resident memory requests are notified separately when a page registration request is issued from the operating system. To do. The
フラグ管理回路7によって新たに割り付けるアドレスが検索された後、オペレーティングシステム10へ割り付けたアドレスを応答するとともにビットマップテーブル5の対応するビットを1に設定する。
After an address to be newly allocated is searched by the
ビットマップテーブル5をセットした結果、例えばメモリバンク3aの領域全てが使用中の状態になった場合、メモリバンク3aのビットは全て1となる。AND回路63出力は0から1に変わり(指示信号が出力され)、これによってメモリバンク3bに対応するOR回路61bが0から1に変わり(活性化信号が出力され)、さらにメモリバンク3bに対応するAND回路62bが0から1になることで、メモリバンク3bに給電が開始される。
As a result of setting the bitmap table 5, for example, when all the areas of the
また逆に、オペレーティングシステム10からページ削除要求が通知される場合、削除要求とともに削除対象のアドレスが通知される。フラグ管理回路7は通知されたアドレスに対応するビットマップテーブル5のビットをクリアし、未使用に変更する。
Conversely, when a page deletion request is notified from the
この時、例えばメモリバンク3aの領域全てが使用中の状態でメモリバンク3a上のあるページ領域が削除された場合、AND回路63出力は1から0に変わり(指示信号の出力を停止し)、メモリバンク3bに対応するOR回路61bが1から0に変わり(活性化信号の出力を停止し)、さらにメモリバンク3bに対応するAND回路62bが1から0になることで、メモリバンク3bの給電が中止される。
At this time, for example, when a page area on the
ここで、AND回路62bは図9に示すようなヒステリシス特性をもつとする。すなわち、入力が1になり給電するときは瞬時に、入力が0になり給電停止するときは時間を置いて停止動作に移る。上記示したように、メモリバンク3aの領域が全て使用中の削除と、登録した結果全て使用中になる状態が短い時間で繰り返し発生している場合、AND回路62bのヒステリシス特性によって、繰り返し中は通電が続く。
Here, it is assumed that the AND circuit 62b has hysteresis characteristics as shown in FIG. That is, when the input becomes 1 and power is supplied, the operation is instantaneous. As described above, when the deletion of all the areas in the
なお、ビットマップテーブル5、フラグ管理回路7および各論理回路は、図1に示すハードウェア構成の電源制御回路に組み込む他、メモリマネジメントユニット2やCPU1のメモリインタフェース内に組み込むこともできる。
The bit map table 5, the
以上のように、ビットマップテーブル5とフラグ管理回路7を使うことにより、オペレーティングシステムはメモリ上の空き領域の管理と物理アドレスの割り当てを行わなくなるので、CPU1の負担が減り、性能を向上させることができる。
As described above, by using the bitmap table 5 and the
また、AND回路62bにヒステリシス特性をもたせることで、メモリバンク境界で登録、削除が繰り返し実行される場合にはメモリバンクは通電が続くことで、通電開始時のオーバヘッド時間を削減できるとともに、電源オフ時の放電、オン時の充電による電流増加を解消できるので、性能向上、電力削減することができる。 Further, by providing hysteresis characteristics to the AND circuit 62b, when registration and deletion are repeatedly executed at the memory bank boundary, the memory bank continues to be energized, thereby reducing the overhead time at the start of energization and turning off the power. Since the current increase due to the discharge at the time and the charge at the time of ON can be eliminated, the performance can be improved and the power can be reduced.
実施の形態3.
以上の実施の形態では、データ登録、削除時のメモリ省電力化に関するものであるが、次にCPU1が動作していないアイドル状態の時のメモリ省電力化に関する実施の形態を示す。図10は本実施の形態を示すソフトウェア構成図である。
Embodiment 3 FIG.
The above embodiment relates to memory power saving at the time of data registration and deletion. Next, an embodiment related to memory power saving at the time of an idle state where the
図において、16はオペレーティングシステム10内に備える電力管理部、161は電力管理部16内でCPU1の動作を監視し、省電力モードと動作モードとを切替える動作モード管理部、162は動作モード管理部161のモード切替の際、バックアップ、リストア処理を行うバックアップ処理部、17はバックアップしたデータの情報を記憶しておくバックアップ管理データである。
In the figure, 16 is a power management unit provided in the
図10において、バックアップ処理部162はデータ移動管理部の例であり、メモリ電源制御部15は電力供給制御部の例である。また、バックアップ処理部162が生成するバックアップ管理データはデータ移動管理情報の例である。
In FIG. 10, a
次に動作について説明する。CPU1の処理がなくなり、外部からの入力待ちとなったときに、動作モード管理部161はタイマカウントを開始する。ある一定時間経過しても入力が発生しない場合、動作モード管理部161はCPUのモードを動作モードから省電力モードに切替えると同時に、バックアップ処理部162へバックアップ開始を要求する。
Next, the operation will be described. The operation
バックアップ処理部162は図11に示す処理シーケンスを行う。すなわち、ST41にて、未使用先頭アドレスレジスタの値をターゲットレジスタに代入し、ST42にて、ページ管理データ14から使用中(割当済)の最下位アドレスのデータを検索し、これをソースレジスタに代入する。ST43でターゲットレジスタとソースレジスタの値を比較し、同じメモリバンク3aを示していれば、ST48で下位メモリバンク3b〜3dの電源をオフしてバックアップ処理を終了する。
The
ST43でメモリバンクが異なれば、ST44でページデータのバックアップを実行する。具体的には、ソースレジスタの示すページデータをターゲットレジスタにコピー(移動)する。ST45では、例えば図12に示すようなバックアップ情報を作成し、バックアップ管理データ17に格納する。ST46およびST47でターゲットレジスタの示すアドレスを次の空き領域に変え、ST42に戻る。
If the memory bank is different in ST43, backup of page data is executed in ST44. Specifically, the page data indicated by the source register is copied (moved) to the target register. In ST 45, for example, backup information as shown in FIG. 12 is created and stored in the
もしバックアップ処理中にキー入力等の割込みが発生した場合、ただちにバックアップ処理は中止し、通常モードに戻る。また、バックアップ処理終了後、バックアップ済メモリバンクの電源がオフされた後に割込みが発生した場合、バックアップ処理部162はリストア処理に入る。すなわち、バックアップ管理データ17に従い移動先アドレスのページデータを移動元アドレスにコピー(移動)する。本作業終了後、動作モード管理部161は動作モードに戻る。
If an interrupt such as a key input occurs during the backup process, the backup process is immediately stopped and the normal mode is restored. If an interrupt occurs after the backup memory bank is turned off after the backup process is completed, the
なお、バックアップ時にはターゲットレジスタのアドレスへコピーするとしたが、この時データを圧縮しても良い。リストアの最には展開しつつ移動元アドレスへ復元することとなる。 Note that, at the time of backup, the data is copied to the address of the target register, but at this time, the data may be compressed. At the time of restoration, it is restored to the source address while expanding.
以上のように、CPU1の処理がない時に上位メモリバンクの空き領域に下位メモリバンクのデータをコピー(移動)するので、アプリケーション性能に影響を与えずにメモリバンクの電源オフを実施できる。
As described above, since the data of the lower memory bank is copied (moved) to the empty area of the upper memory bank when there is no processing by the
また、メモリバンクの電源オフは全てのバックアップを終了してから実施するので、バックアップ処理中に割込み等発生した場合には、直ちに終了し動作モードに戻ることができ、割込み応答性能を落とすことなくメモリバンクの電源オフを実施できる。 Also, since the memory bank is turned off after all backups are completed, if an interrupt occurs during the backup process, it can be immediately terminated to return to the operation mode without interrupting the interrupt response performance. The memory bank can be powered off.
なお、以上の実施の形態1〜3では、メモリバンクの活性化として、メモリバンクへの電力供給を開始する場合について述べたが、活性化の例としてDRAM(Dynamic Random Access Memory)のリフレッシュ動作を開始するようにしてもよい。また、同様に、以上の実施の形態1〜3では、メモリバンクの非活性化として、メモリバンクへの電力供給を停止する場合について述べたが、非活性化の例としてDRAMのリフレッシュ動作を停止するようにしてもよい。 In the above first to third embodiments, the case where the power supply to the memory bank is started as the activation of the memory bank has been described. However, as an example of the activation, a refresh operation of a DRAM (Dynamic Random Access Memory) is performed. You may make it start. Similarly, in the first to third embodiments, the case where the power supply to the memory bank is stopped as the deactivation of the memory bank has been described. However, the refresh operation of the DRAM is stopped as an example of deactivation. You may make it do.
ここで、以上の実施の形態1〜3で示したメモリ管理装置の特徴を以下にて再言する。 Here, the characteristics of the memory management device described in the first to third embodiments will be described again below.
実施の形態1に示すメモリ管理装置は、仮想アドレス空間でメモリ管理するオペレーティングシステムで、メモリ使用量が少ないときにメモリの一部バンクを電源オフし省電力化を図るために、以下手段を備えたことを特徴とする:
(a)ページ管理データ処理部に、未使用先頭アドレスを記憶しておくレジスタ
(b)ページ管理データ処理部の指示に従ってメモリバンクの電源をオン、オフするメモリ電源制御部
(c)ページ登録時に未使用先頭アドレスを増加させ、ページ削除時に削除した最も小さいアドレスに未使用先頭アドレスを設定するページ管理データ処理部。
The memory management device shown in the first embodiment is an operating system that manages memory in a virtual address space, and includes the following means for powering off some banks of the memory and saving power when the memory usage is low Features:
(A) A register that stores an unused head address in the page management data processing unit (b) A memory power control unit that turns on / off the power of the memory bank in accordance with an instruction from the page management data processing unit (c) At page registration A page management data processing unit that increases the unused head address and sets the unused head address to the smallest address deleted when the page is deleted.
実施の形態2に示すメモリ管理装置は、仮想アドレス空間でメモリ管理するオペレーティングシステムで、メモリ使用量が少ないときにメモリの一部バンクを電源オフし省電力化を図るために、以下手段を備えたことを特徴とする:
(a)オペレーティングシステムのメモリ割当単位毎に使用、未使用を示すビットマップテーブル
(b)同バンクメモリに対応するビットマップのいずれかが使用されていれば使用中を示すOR回路
(c)上記OR出力と電源をANDし、使用中を示すメモリバンクのみ電源供給するAND回路。
The memory management device shown in the second embodiment is an operating system that manages memory in a virtual address space, and includes the following means for powering off a part of the banks of the memory to save power when the memory usage is low Features:
(A) Bit map table indicating use / unuse for each memory allocation unit of the operating system (b) OR circuit indicating in use if any of the bit maps corresponding to the same bank memory is used (c) An AND circuit that ANDs an OR output and a power source and supplies power only to a memory bank indicating that it is in use.
実施の形態2に示すメモリ管理装置は、AND回路にヒステリシスを設け、電源オン条件に対しては瞬時に、電源オフ条件に対しては時間をおいてからオフするような特性とすることを特徴とする。 The memory management device described in the second embodiment is characterized in that hysteresis is provided in the AND circuit, and the characteristics are such that the power-on condition is instantaneously turned off and the power-off condition is turned off after a certain period of time. And
実施の形態2に示すメモリ管理装置は、OR回路と並列にAND回路を設け、次に使用されるバンクのOR回路に入力することを特徴とする。 The memory management device described in the second embodiment is characterized in that an AND circuit is provided in parallel with the OR circuit and is input to the OR circuit of the next bank to be used.
実施の形態2に示すメモリ管理装置は、オペレーティングシステムを処理するCPUとは別の処理装置を備え、オペレーティングシステムからのデータ登録、削除要求に対してビットマップを変更することを特徴とする。
The memory management device described in
実施の形態1、2に示すメモリ管理装置は、オペレーティングシステムを処理するCPUとは別の処理装置を備え、オペレーティングシステムからのデータ登録要求に対して空き領域を検索し、アドレスを応答することを特徴とする。 The memory management device shown in the first and second embodiments includes a processing device different from the CPU that processes the operating system, searches for a free area in response to a data registration request from the operating system, and responds with an address. Features.
実施の形態1、2に示すメモリ管理装置は、メモリバンク毎に優先度を設定し、高い優先順位のメモリバンクに空きがなくなった後に低い優先順位のメモリバンクを使いはじめることを特徴とする。 The memory management devices shown in the first and second embodiments are characterized in that a priority is set for each memory bank, and a low-priority memory bank starts to be used after a high-priority memory bank runs out of space.
実施の形態2に示すメモリ管理装置は、常駐するオペレーティングシステム、ミドルウェアをメモリ物理アドレス上位に、使用時のみメモリ消費するアプリケーションを下位アドレスに割当てることを特徴とする。 The memory management device shown in the second embodiment is characterized in that a resident operating system and middleware are assigned to the upper memory physical address, and an application that consumes memory only when used is assigned to the lower address.
実施の形態1に示すメモリ管理装置は、定期的に物理メモリの使用領域を検索し、下位アドレスに割り当てられているデータを上位アドレスの空き空間に再割当することを特徴とする。 The memory management device shown in the first embodiment is characterized in that it periodically searches the used area of the physical memory and reassigns the data assigned to the lower address to the free space of the upper address.
実施の形態3に示すメモリ管理装置は、CPUを省電力モードに切り替える際、メモリ物理空間の下位アドレスにあるデータを上位アドレスの空き領域にコピーし、下位アドレスのメモリバンクを電源オフし省電力化を図るために、以下手段を備えたことを特徴とする:
(a)コピーしたデータのコピー先およびコピー元アドレスを記憶するバックアップ管理データ
(b)バックアップ処理部の指示に従ってメモリバンクの電源オン、オフを制御するメモリ電源制御部
(c)CPUを省電力モードに切り替える際にバックアップを開始し、割込み要求にて元に戻す処理を行うバックアップ処理部。
When the CPU is switched to the power saving mode, the memory management device shown in the third embodiment copies the data at the lower address of the memory physical space to the empty area of the upper address and turns off the memory bank at the lower address to save power. In order to make it easier, the following means are provided:
(A) Backup management data for storing the copy destination and copy source address of the copied data (b) Memory power supply control unit for controlling power on / off of the memory bank in accordance with an instruction from the backup processing unit (c) Power-saving mode of the CPU Backup processing unit that starts backup when switching to, and restores it with an interrupt request.
実施の形態1〜3に示すメモリ管理装置は、のメモリ電源オフの代わりに、DRAMのリフレッシュ動作を停止することで省電力化を図ることを特徴とする。 The memory management devices shown in the first to third embodiments are characterized in that power saving is achieved by stopping the refresh operation of the DRAM instead of turning off the memory power.
1 CPU、2 メモリマネジメントユニット、3 メモリバンク、4 電源制御回路、5 ビットマップテーブル、7 フラグ管理回路、10 オペレーティングシステム、11 プロセス管理部、12 例外処理部、13 ページ管理データ処理部、14 ページ管理データ、15 メモリ電源制御部、16 電力管理部、17 バックアップ管理データ、20 アプリケーションプログラム、61 OR回路、62 AND回路、63 AND回路、100 計算機システム、131 ページ登録/削除処理部、132 未使用先頭アドレスレジスタ、161 動作モード管理部、162 バックアップ処理部、200 メモリ管理装置。
1 CPU, 2 memory management unit, 3 memory bank, 4 power supply control circuit, 5 bitmap table, 7 flag management circuit, 10 operating system, 11 process management unit, 12 exception processing unit, 13 page management data processing unit,
Claims (26)
アドレス割当のための優先度をメモリバンクごとに設定し、
アドレス割当の際に、メモリバンクごとの優先度及び各メモリバンク内のアドレスの序列に基づき、未使用アドレスのうち、優先度が上位のメモリバンク内の上位のアドレスから順に割当の対象とし、優先度が上位のメモリバンク内のアドレスが一定以上割当済となった場合に優先度が下位のメモリバンク内の未使用アドレスを上位のアドレスから順に割当の対象とすることを特徴とするメモリ管理装置。 A memory management device for managing a plurality of memory banks,
Set the priority for address assignment for each memory bank,
When assigning addresses, based on the priority of each memory bank and the order of the addresses in each memory bank, among the unused addresses, the priority is assigned in order from the upper address in the upper memory bank. A memory management device characterized in that, when an address in a higher-order memory bank has been assigned a certain level or more, unused addresses in a lower-priority memory bank are assigned in order from the higher-order address. .
割当済であったいずれかのアドレスが解放され、当該解放されたアドレスが、アドレス割当の優先順位において先頭に位置する未使用先頭アドレスである場合に、当該解放されたアドレスを優先してアドレス割当の対象とすることを特徴とする請求項1に記載のメモリ管理装置。 The memory management device includes:
If any of the allocated addresses is released and the released address is an unused start address located at the top in the priority order of address allocation, the allocated address is given priority. The memory management device according to claim 1, wherein
アドレス割当の度に、次回のアドレス割当時の割当対象として、アドレス割当の優先順位において先頭に位置する未使用先頭アドレスを検索し、未使用先頭アドレスの検索の結果、優先度が上位のメモリバンク内のアドレスが一定以上割当済となっており未使用先頭アドレスが下位の優先度のメモリバンクに属する場合に、当該下位の優先度のメモリバンクを活性化させることを特徴とする請求項1に記載のメモリ管理装置。 The memory management device includes:
Every time an address is assigned, a search is made for an unused start address located at the top in the priority order of address assignment as an assignment target for the next address assignment. 2. The memory bank according to claim 1, wherein when a predetermined address is allocated to a certain level or more and an unused head address belongs to a memory bank with a lower priority, the memory bank with the lower priority is activated. The memory management device described.
アドレス解放の際に、解放対象のアドレスが、当該解放対象のアドレスの解放時点でアドレス割当の優先順位において先頭に位置する未使用先頭アドレスよりもアドレス割当の優先順位において上位であるか否かを判断し、当該解放対象のアドレスがアドレス割当の優先順位において上位である場合に、当該解放対象のアドレスを未使用先頭アドレスとし、当該解放対象のアドレスが解放された後のアドレス割当の際に、当該解放対象のアドレスを割当の対象とすることを特徴とする請求項2に記載のメモリ管理装置。 The memory management device includes:
When releasing an address, whether or not the address to be released is higher in the priority order of address assignment than the unused head address located at the head in the priority order of address assignment at the time of release of the address to be released When the address to be released is higher in the address allocation priority order, the address to be released is set as an unused head address, and when the address is allocated after the address to be released is released, 3. The memory management apparatus according to claim 2, wherein the address to be released is an allocation target.
アドレス解放の際に、解放対象のアドレスが、当該解放対象のアドレスの解放時点でアドレス割当の優先順位において先頭に位置する未使用先頭アドレスよりもアドレス割当の優先順位において上位である場合に、解放対象のアドレスと未使用先頭アドレスとが同じメモリバンクに属するか否かを判断し、解放対象のアドレスと未使用先頭アドレスとが異なるメモリバンクに属する場合に、未使用先頭アドレスの属するメモリバンク内で割当済のアドレスが存在するか否かを判断し、未使用先頭アドレスの属するメモリバンク内で割当済のアドレスが存在しない場合に、未使用先頭アドレスの属するメモリバンクを非活性化させることを特徴とする請求項4に記載のメモリ管理装置。 The memory management device includes:
When an address is released, if the address to be released is higher in the address assignment priority than the first unused address in the address assignment priority at the time of release of the address to be released It is determined whether or not the target address and the unused head address belong to the same memory bank. If the target address and the unused head address belong to different memory banks, the memory address to which the unused head address belongs To determine whether or not there is an assigned address, and if there is no assigned address in the memory bank to which the unused head address belongs, the memory bank to which the unused head address belongs is deactivated. The memory management device according to claim 4, wherein:
所定の場合に、各メモリバンクの割当状況を解析し、アドレス割当の優先順位において先頭に位置する未使用先頭アドレスよりもアドレス割当の優先順位において下位に位置するアドレスが割当済である場合に、下位に位置する割当済アドレスのデータを未使用先頭アドレスに移動させることを特徴とする請求項1に記載のメモリ管理装置。 The memory management device includes:
In a predetermined case, the allocation status of each memory bank is analyzed, and when an address located at a lower position in the priority order of address assignment than an unused head address located at the top position in the priority order of address assignment is assigned, 2. The memory management device according to claim 1, wherein the data of the allocated address located in the lower order is moved to an unused head address.
未使用先頭アドレスよりもアドレス割当の優先順位において下位に位置するアドレスがすべて未使用である場合に、未使用先頭アドレスの属するメモリバンクよりも下位の優先度のメモリバンクを非活性化させることを特徴とする請求項6に記載のメモリ管理装置。 The memory management device includes:
Deactivate a memory bank with a lower priority than the memory bank to which the unused head address belongs when all addresses located lower in the address allocation priority than the unused head address are unused. The memory management device according to claim 6, wherein:
メモリバンクの活性化として、メモリバンクへの電力供給の開始及びメモリバンクに対するリフレッシュ動作の開始の少なくともいずれかを行うことを特徴とする請求項3に記載のメモリ管理装置。 The memory management device includes:
4. The memory management device according to claim 3, wherein the activation of the memory bank includes at least one of start of power supply to the memory bank and start of refresh operation for the memory bank.
メモリバンクの非活性化として、メモリバンクへの電力供給の停止及びメモリバンクに対するリフレッシュ動作の停止の少なくともいずれかを行うことを特徴とする請求項5又は7に記載のメモリ管理装置。 The memory management device includes:
8. The memory management device according to claim 5, wherein at least one of stopping power supply to the memory bank and stopping refresh operation for the memory bank is performed as deactivation of the memory bank.
アドレス割当の優先順位において先頭に位置する未使用先頭アドレスを記憶する未使用先頭アドレスレジスタと、
アドレス割当の際に、未使用先頭アドレスレジスタに記憶されている未使用先頭アドレスに対する割当を行うとともに、未使用先頭アドレスよりもアドレス割当の優先順位において下位に位置する未使用アドレスの中でアドレス割当の優先順位において先頭に位置する未使用アドレスを新たな未使用先頭アドレスとして検索し、検索した新たな未使用先頭アドレスを次回のアドレス割当時の割当対象とするため未使用先頭アドレスレジスタに新たな未使用先頭アドレスを記憶させるアドレス割当管理部とを有することを特徴とする請求項1に記載のメモリ管理装置。 The memory management device includes:
An unused head address register for storing an unused head address located at the head in the priority order of address allocation;
At the time of address allocation, allocation is performed for the unused head address stored in the unused head address register, and address allocation is performed among the unused addresses positioned lower in the priority order of address allocation than the unused head address. The new unused head address is searched for as a new unused head address, and the new head address that has been searched for is assigned to the next address assignment. The memory management device according to claim 1, further comprising an address allocation management unit that stores an unused head address.
前記アドレス割当管理部からの指示に従い、各メモリバンクへの電力供給の制御を行う電力供給制御部とを有し、
前記アドレス割当管理部は、
新たな未使用先頭アドレスの検索の結果、検索した新たな未使用先頭アドレスが、未使用先頭アドレスレジスタに記憶されている未使用先頭アドレスの属するメモリバンクと異なるメモリバンクに属する場合に、前記電力供給制御部に対して新たな未使用先頭アドレスが属するメモリバンクへの電力供給を開始するよう指示することを特徴とする請求項10に記載のメモリ管理装置。 The memory management device further includes:
A power supply control unit that controls power supply to each memory bank in accordance with an instruction from the address allocation management unit;
The address assignment management unit
As a result of a search for a new unused head address, the power is determined when the searched new unused head address belongs to a memory bank different from the memory bank to which the unused head address stored in the unused head address register belongs. 11. The memory management device according to claim 10, wherein the memory management device instructs the supply control unit to start power supply to a memory bank to which a new unused head address belongs.
アドレス解放の際に、解放対象のアドレスの解放を行うとともに、解放対象のアドレスが、未使用先頭アドレスレジスタに記憶されている未使用先頭アドレスよりもアドレス割当の優先順位において上位であるか否かを判断し、当該解放対象のアドレスがアドレス割当の優先順位において上位である場合に、当該解放対象のアドレスを次回のアドレス割当時の割当対象とするため未使用先頭アドレスレジスタに当該解放対象のアドレスを新たな未使用先頭アドレスとして記憶させることを特徴とする請求項10に記載のメモリ管理装置。 The address assignment management unit
When releasing the address, release the address to be released, and whether the address to be released is higher in the priority order of address allocation than the unused head address stored in the unused head address register When the address to be released is higher in the address allocation priority order, the address to be released is stored in the unused head address register so that the address to be released is assigned at the next address allocation. The memory management device according to claim 10, wherein: is stored as a new unused head address.
前記アドレス割当管理部からの指示に従い、各メモリバンクへの電力供給の制御を行う電力供給制御部を有し、
前記アドレス割当管理部は、
アドレス解放の際に、解放対象のアドレスが、未使用先頭アドレスレジスタに記憶されている未使用先頭アドレスよりもアドレス割当の優先順位において上位である場合に、解放対象のアドレスと未使用先頭アドレスとが同じメモリバンクに属するか否かを判断し、解放対象のアドレスと未使用先頭アドレスとが異なるメモリバンクに属する場合に、未使用先頭アドレスの属するメモリバンク内で割当済のアドレスが存在するか否かを判断し、未使用先頭アドレスの属するメモリバンク内で割当済のアドレスが存在しない場合に、前記電力供給制御部に対して未使用先頭アドレスの属するメモリバンクへの電力供給を停止するよう指示することを特徴とする請求項12に記載のメモリ管理装置。 The memory management device further includes:
In accordance with an instruction from the address allocation management unit, a power supply control unit that controls power supply to each memory bank,
The address assignment management unit
When releasing an address, if the address to be released is higher in the priority order of address allocation than the unused head address stored in the unused head address register, the address to be released and the unused head address If the addresses to be released belong to a different memory bank, and there is an allocated address in the memory bank to which the unused head address belongs If there is no allocated address in the memory bank to which the unused head address belongs, the power supply control unit is configured to stop power supply to the memory bank to which the unused head address belongs. The memory management device according to claim 12, wherein the memory management device instructs the memory management device.
所定の場合に、各メモリバンクの割当状況を解析し、未使用先頭アドレスレジスタに記憶されている未使用先頭アドレスよりもアドレス割当の優先順位において下位に位置するアドレスが割当済である場合に、下位に位置する割当済アドレスのデータを未使用先頭アドレスに移動させることを特徴とする請求項10に記載のメモリ管理装置。 The address assignment management unit
In a predetermined case, the allocation status of each memory bank is analyzed, and when an address located lower in the priority order of address allocation than the unused head address stored in the unused head address register is already allocated, 11. The memory management device according to claim 10, wherein the data of the allocated address located in the lower order is moved to an unused head address.
前記アドレス割当管理部からの指示に従い、各メモリバンクへの電力供給の制御を行う電力供給制御部を有し、
前記アドレス割当管理部は、
未使用先頭アドレスよりもアドレス割当の優先順位において下位に位置するアドレスがすべて未使用である場合に、前記電力供給制御部に対して未使用先頭アドレスの属するメモリバンクよりも下位の優先度のメモリバンクへの電力供給を停止するよう指示することを特徴とする請求項14に記載のメモリ管理装置。 The memory management device further includes:
In accordance with an instruction from the address allocation management unit, a power supply control unit that controls power supply to each memory bank,
The address assignment management unit
A memory having a lower priority than the memory bank to which the unused head address belongs to the power supply control unit when all addresses located lower in the priority order of address allocation than the unused head address are unused. The memory management device according to claim 14, wherein the memory management device instructs to stop power supply to the bank.
仮想アドレス空間でメモリ管理を行うオペレーティングシステムと、
オペレーティングシステムからのページ登録要求に対して、優先度が上位のメモリバンク内の上位のアドレスから順にアドレス割当の対象とするアドレス割当管理回路と、
各メモリバンクに対応し、アドレス割当管理回路による割当状況に基づき、対応するメモリバンク内のアドレスごとに割当有無を示す割当状況テーブルと、
各割当状況テーブルに対応し、対応する割当状況テーブルよりいずれかのアドレスが割当済であると示された場合に、メモリバンクの活性化を指示する活性化信号を出力する複数の活性化信号出力回路と、
各メモリバンクに接続され、各メモリバンクに電力を供給する電源回路と、
各メモリバンク及び各活性化信号出力回路に対応し、対応するメモリバンクと対応する活性化信号出力回路と電源回路とを接続し、対応する活性化信号出力回路から活性化信号が出力された場合に、電源回路からの電力を対応するメモリバンクに供給させる複数の電力供給制御回路とを有することを特徴とする請求項1に記載のメモリ管理装置。 The memory management device includes:
An operating system that manages memory in a virtual address space;
In response to a page registration request from the operating system, an address allocation management circuit that is a target of address allocation in order from a higher address in a memory bank having a higher priority,
Corresponding to each memory bank, based on the allocation status by the address allocation management circuit, an allocation status table indicating whether or not allocation is performed for each address in the corresponding memory bank;
Multiple activation signal outputs corresponding to each allocation status table and outputting an activation signal instructing activation of the memory bank when the corresponding allocation status table indicates that any address has been allocated Circuit,
A power supply circuit connected to each memory bank and supplying power to each memory bank;
Corresponding to each memory bank and each activation signal output circuit, when the corresponding memory bank, the corresponding activation signal output circuit and the power supply circuit are connected, and the activation signal is output from the corresponding activation signal output circuit The memory management device according to claim 1, further comprising: a plurality of power supply control circuits that supply power from a power supply circuit to a corresponding memory bank.
対応する割当状況テーブルより全てのアドレスが未使用であると示された場合に、活性化信号の出力を停止し、
電力供給制御回路のそれぞれは、
対応する活性化信号出力回路からの活性化信号の出力が停止した場合に、対応するメモリバンクへの電源回路からの電力供給を停止させることを特徴とする請求項16に記載のメモリ管理装置。 Each of the activation signal output circuits
When the corresponding allocation status table indicates that all addresses are unused, the output of the activation signal is stopped,
Each of the power supply control circuits
17. The memory management device according to claim 16, wherein when the output of the activation signal from the corresponding activation signal output circuit is stopped, the power supply from the power supply circuit to the corresponding memory bank is stopped.
電力供給の開始時には瞬時に電力供給を開始させ、電力供給の停止時には所定の時間をおいて電力供給を停止させることを特徴とする請求項17に記載のメモリ管理装置。 Each of the power supply control circuits
18. The memory management device according to claim 17, wherein when the power supply is started, the power supply is instantaneously started, and when the power supply is stopped, the power supply is stopped after a predetermined time.
各割当状況テーブルに対応し、対応する割当状況テーブルが対応しているメモリバンクの次の優先度を持つメモリバンクに対応している活性化信号出力回路に接続し、対応する割当状況テーブルより全てのアドレスが割当済であると示された場合に、接続している活性化信号出力回路に対して活性化信号の出力を指示する指示信号を出力する複数の指示信号出力回路を有し、
各活性化信号出力回路は、
接続している指示信号出力回路より指示信号が出力された場合に、対応する電力供給制御回路に対して活性化信号を出力することを特徴とする請求項16に記載のメモリ管理装置。 The memory management device further includes:
Corresponding to each allocation status table, connected to the activation signal output circuit corresponding to the memory bank having the next priority of the memory bank corresponding to the corresponding allocation status table, all from the corresponding allocation status table A plurality of instruction signal output circuits for outputting an instruction signal for instructing output of the activation signal to the connected activation signal output circuit when the address of
Each activation signal output circuit
17. The memory management device according to claim 16, wherein when an instruction signal is output from a connected instruction signal output circuit, an activation signal is output to a corresponding power supply control circuit.
オペレーティングシステム及びミドルウェアの少なくともいずれかに対しては、優先度が上位のメモリバンク内の上位のアドレスから順にアドレスを割り当て、アプリケーションプログラムに対しては、オペレーティングシステム及びミドルウェアの少なくともいずれかに割り当てられるアドレスよりもアドレス割当の優先順位において下位に位置するアドレスを割り当てることを特徴とする請求項16に記載のメモリ管理装置。 The address assignment management circuit includes:
For at least one of the operating system and middleware, addresses are assigned in order from the upper address in the memory bank having the higher priority, and for the application program, an address assigned to at least one of the operating system and middleware. 17. The memory management device according to claim 16, wherein an address located at a lower position in the priority order of address assignment is assigned.
所定の場合に、CPU(Central Processing Unit)のモードを動作モードと省電力モードとの間で切り替える動作モード管理部と、
アドレス割当の優先順位において先頭に位置する未使用先頭アドレスを記憶する未使用先頭アドレスレジスタと、
前記動作モード管理部によりCPUのモードが省電力モードに切り替わる際に、未使用先頭アドレスレジスタに記憶された未使用先頭アドレスと、割当済のアドレスのうちアドレス割当の優先順位において最下位に位置する最下位割当済アドレスとを比較し、両者が異なるメモリバンクに属する場合に、最下位割当済アドレスのデータを未使用先頭アドレスに移動させ、前記動作モード管理部によりCPUのモードが動作モードに切り替わる際に、CPUの省電力モードへの切り替え時に未使用先頭アドレスに移動させたデータを最下位割当済アドレスに移動させるデータ移動管理部とを有することを特徴とする請求項1に記載のメモリ管理装置。 The memory management device includes:
An operation mode management unit that switches a CPU (Central Processing Unit) mode between an operation mode and a power saving mode in a predetermined case;
An unused head address register for storing an unused head address located at the head in the priority order of address allocation;
When the CPU mode is switched to the power saving mode by the operation mode management unit, the unused head address stored in the unused head address register and the allocated address are positioned at the lowest in the priority order of address allocation. When the lowest assigned address is compared and both belong to different memory banks, the data of the lowest assigned address is moved to an unused head address, and the operation mode management unit switches the CPU mode to the operation mode. 2. The memory management according to claim 1, further comprising a data movement management unit that moves data moved to an unused head address when the CPU is switched to a power saving mode to a lowest allocated address. apparatus.
CPUのモードが省電力モードに切り替わる際に、移動元アドレスとして最下位割当済アドレスを示し、移動先アドレスとして未使用先頭アドレスを示すデータ移動管理情報を生成し、
CPUのモードが動作モードに切り替わる際に、データ移動管理情報を用いて、未使用先頭アドレスに移動させたデータを最下位割当済アドレスに移動させることを特徴とする請求項22に記載のメモリ管理装置。 The data movement management unit
When the CPU mode is switched to the power saving mode, data movement management information indicating the lowest allocated address as the movement source address and the unused head address as the movement destination address is generated,
23. The memory management according to claim 22, wherein when the CPU mode is switched to the operation mode, the data moved to the unused head address is moved to the lowest allocated address using the data movement management information. apparatus.
前記データ移動管理部からの指示に従い、各メモリバンクへの電力供給の制御を行う電力供給制御部を有し、
前記データ移動管理部は、
CPUのモードが省電力モードに切り替わる際に、未使用先頭アドレスと最下位割当済アドレスとを比較した結果、両者が同一のメモリバンクに属する場合に、未使用先頭アドレス及び最下位割当済アドレスの属するメモリバンクよりも下位の優先度のメモリバンクへの電力供給を停止するよう前記電力供給制御部に対して指示することを特徴とする請求項22に記載のメモリ管理装置。 The memory management device further includes:
In accordance with an instruction from the data movement management unit, a power supply control unit that controls power supply to each memory bank,
The data movement management unit
When the CPU mode is switched to the power saving mode, as a result of comparing the unused head address and the lowest allocated address, if both belong to the same memory bank, the unused head address and the lowest allocated address 23. The memory management device according to claim 22, wherein the power supply control unit is instructed to stop power supply to a memory bank having a lower priority than a memory bank to which the memory bank belongs.
アドレス割当のための優先度をメモリバンクごとに設定し、
アドレス割当の際に、メモリバンクごとの優先度及び各メモリバンク内のアドレスの序列に基づき、未使用アドレスのうち、優先度が上位のメモリバンク内の上位のアドレスから順に割当の対象とし、優先度が上位のメモリバンク内のアドレスが一定以上割当済となった場合に優先度が下位のメモリバンク内の未使用アドレスを上位のアドレスから順に割当ての対象とすることを特徴とするメモリ管理方法。 A memory management method for managing a plurality of memory banks,
Set the priority for address assignment for each memory bank,
When assigning addresses, based on the priority of each memory bank and the order of the addresses in each memory bank, among the unused addresses, the priority is assigned in order from the upper address in the upper memory bank. A memory management method characterized in that, when an address in a higher-order memory bank is assigned a certain level or more, unused addresses in a lower-priority memory bank are assigned in order from the higher-order address. .
アドレス割当のための優先度をメモリバンクごとに設定し、
アドレス割当の際に、メモリバンクごとの優先度及び各メモリバンク内のアドレスの序列に基づき、未使用アドレスのうち、優先度が上位のメモリバンク内の上位のアドレスから順に割当の対象とし、優先度が上位のメモリバンク内のアドレスが一定以上割当済となった場合に優先度が下位のメモリバンク内の未使用アドレスを上位のアドレスから順に割当ての対象とする処理をコンピュータに実行させることを特徴とするプログラム。 A program for causing a computer to execute a memory management process for managing a plurality of memory banks,
Set the priority for address assignment for each memory bank,
When assigning addresses, based on the priority of each memory bank and the order of the addresses in each memory bank, among the unused addresses, the priority is assigned in order from the upper address in the upper memory bank. When the address in the upper memory bank is assigned to a certain level or more, let the computer execute a process that assigns unused addresses in the lower priority memory bank in order from the higher address. A featured program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004000307A JP2005196343A (en) | 2004-01-05 | 2004-01-05 | Memory management device, memory management method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004000307A JP2005196343A (en) | 2004-01-05 | 2004-01-05 | Memory management device, memory management method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005196343A true JP2005196343A (en) | 2005-07-21 |
Family
ID=34816189
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004000307A Withdrawn JP2005196343A (en) | 2004-01-05 | 2004-01-05 | Memory management device, memory management method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005196343A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100941977B1 (en) * | 2006-12-05 | 2010-02-12 | 한국전자통신연구원 | Embeded system and method of page relocation for the same |
JP2010176578A (en) * | 2009-01-30 | 2010-08-12 | Kyocera Mita Corp | Memory management system, electronic device and memory management program |
JP2010204762A (en) * | 2009-02-27 | 2010-09-16 | Kyocera Mita Corp | Memory management system, electronic equipment and memory management program |
US7900018B2 (en) | 2006-12-05 | 2011-03-01 | Electronics And Telecommunications Research Institute | Embedded system and page relocation method therefor |
CN102103541A (en) * | 2011-02-28 | 2011-06-22 | 中国人民解放军国防科学技术大学 | Kernel-module memory management method for preventing memory leaks and multiple memory releases |
WO2011151963A1 (en) * | 2010-05-31 | 2011-12-08 | パナソニック株式会社 | Memory management device, memory management method, memory management program, computer-readable recording medium storing the memory management program and integrated circuit |
JP2012169010A (en) * | 2011-02-15 | 2012-09-06 | Nec Corp | Memory system, buffer memory control method, and buffer memory control program |
JP2013037746A (en) * | 2011-08-09 | 2013-02-21 | Renesas Electronics Corp | Semiconductor device |
WO2013046548A1 (en) * | 2011-09-28 | 2013-04-04 | パナソニック株式会社 | Memory control system and power control method |
US8539198B2 (en) | 2008-10-30 | 2013-09-17 | Kyocera Document Solutions Inc. | Memory management system |
JP2015172863A (en) * | 2014-03-12 | 2015-10-01 | 日本電気株式会社 | Storage device, control method for storage device, and program therefor |
US9471131B2 (en) | 2012-05-31 | 2016-10-18 | Kabushiki Kaisha Toshiba | Apparatus and machine for reducing power consumption of memory including a plurality of segment areas, method therefore and non-transitory computer readable medium |
-
2004
- 2004-01-05 JP JP2004000307A patent/JP2005196343A/en not_active Withdrawn
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7900018B2 (en) | 2006-12-05 | 2011-03-01 | Electronics And Telecommunications Research Institute | Embedded system and page relocation method therefor |
KR100941977B1 (en) * | 2006-12-05 | 2010-02-12 | 한국전자통신연구원 | Embeded system and method of page relocation for the same |
US8539198B2 (en) | 2008-10-30 | 2013-09-17 | Kyocera Document Solutions Inc. | Memory management system |
JP2010176578A (en) * | 2009-01-30 | 2010-08-12 | Kyocera Mita Corp | Memory management system, electronic device and memory management program |
JP2010204762A (en) * | 2009-02-27 | 2010-09-16 | Kyocera Mita Corp | Memory management system, electronic equipment and memory management program |
WO2011151963A1 (en) * | 2010-05-31 | 2011-12-08 | パナソニック株式会社 | Memory management device, memory management method, memory management program, computer-readable recording medium storing the memory management program and integrated circuit |
US8601232B2 (en) | 2010-05-31 | 2013-12-03 | Panasonic Corporation | Memory management device, memory management method, memory management program, computer-readable recording medium recording memory management program and integrated circuit |
JP5405663B2 (en) * | 2010-05-31 | 2014-02-05 | パナソニック株式会社 | MEMORY MANAGEMENT DEVICE, MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT PROGRAM, COMPUTER-READABLE RECORDING MEDIUM CONTAINING MEMORY MANAGEMENT PROGRAM, AND INTEGRATED CIRCUIT |
JP2012169010A (en) * | 2011-02-15 | 2012-09-06 | Nec Corp | Memory system, buffer memory control method, and buffer memory control program |
CN102103541A (en) * | 2011-02-28 | 2011-06-22 | 中国人民解放军国防科学技术大学 | Kernel-module memory management method for preventing memory leaks and multiple memory releases |
JP2013037746A (en) * | 2011-08-09 | 2013-02-21 | Renesas Electronics Corp | Semiconductor device |
US9135966B2 (en) | 2011-08-09 | 2015-09-15 | Renesas Electronics Corporation | Semiconductor device including memory capable of reducing power consumption |
WO2013046548A1 (en) * | 2011-09-28 | 2013-04-04 | パナソニック株式会社 | Memory control system and power control method |
US9471131B2 (en) | 2012-05-31 | 2016-10-18 | Kabushiki Kaisha Toshiba | Apparatus and machine for reducing power consumption of memory including a plurality of segment areas, method therefore and non-transitory computer readable medium |
JP2015172863A (en) * | 2014-03-12 | 2015-10-01 | 日本電気株式会社 | Storage device, control method for storage device, and program therefor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110321066B (en) | Electronic device, computer system, and control method thereof | |
JP4281421B2 (en) | Information processing system, control method therefor, and computer program | |
US8108629B2 (en) | Method and computer for reducing power consumption of a memory | |
US8046566B2 (en) | Method to reduce power consumption of a register file with multi SMT support | |
EP2936272B1 (en) | Reducing power consumption of volatile memory via use of non-volatile memory | |
WO2006117950A1 (en) | Power controller in information processor | |
JP2007272573A (en) | Power consumption reduction memory management method and memory management program | |
JP2005196343A (en) | Memory management device, memory management method and program | |
JP4902501B2 (en) | Power control method, computer system, and program | |
US7721052B2 (en) | System and method of reducing power consumption of a main memory | |
JP2006221381A (en) | Processor system and image forming device provided with this processor system | |
JPH04332002A (en) | Programmable controller | |
US20070006000A1 (en) | Using fine-grained power management of physical system memory to improve system sleep | |
JP2010044460A (en) | Power source control device, computer system, power source control method, power source control program and recording medium | |
JP5636677B2 (en) | Electronic device, power saving control method thereof, and program | |
JP5045163B2 (en) | Arithmetic processing device and control method of arithmetic processing device | |
KR20110103258A (en) | Hybrid memory device for reducing power consumption and method thereof | |
US20020103984A1 (en) | Information processing system, information processing method and readable-by-computer recording medium | |
JP2010108253A (en) | Apparatus using nonvolatile memory as main memory | |
JP2008262451A (en) | Memory power supply management device and memory power supply management method | |
JP2007257259A (en) | Information processor, storage region cleanup method and program | |
KR20150136811A (en) | Apparatus and Method for managing memory in an embedded system | |
JP2003263366A (en) | Swapping control method, its execution device and its processing program | |
KR20150002139A (en) | Memory including virtual cache and management method thereof | |
CN113986540B (en) | Method and device for regularly recycling linux cache |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061221 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20090316 |