JPH10254762A - Real time garbage collection processor - Google Patents

Real time garbage collection processor

Info

Publication number
JPH10254762A
JPH10254762A JP5676497A JP5676497A JPH10254762A JP H10254762 A JPH10254762 A JP H10254762A JP 5676497 A JP5676497 A JP 5676497A JP 5676497 A JP5676497 A JP 5676497A JP H10254762 A JPH10254762 A JP H10254762A
Authority
JP
Japan
Prior art keywords
garbage collection
page
module
memory
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5676497A
Other languages
Japanese (ja)
Inventor
Kenji Kondo
憲二 近藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP5676497A priority Critical patent/JPH10254762A/en
Publication of JPH10254762A publication Critical patent/JPH10254762A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a real time garbage collection processor which can realize high speed real time garbage collection through the use of the whole area of a physical memory. SOLUTION: The garbage collection execution part 12 of CPU 1 rewrites the conversion table 2a of a logic/physical conversion part 2 so that modules which are discrete on the physical address of a main memory 3 are arranged closely on a logical address. The garbage collection execution part 12 generates an idle page by copying the exceeding part of the module to the other page when the size of the module exceeds the page of the main memory.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は実時間ガーベジコレ
クション処理装置に関し、特にメモリのフラグメント
(fragment)を解決するガーベジコレクション
方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a real-time garbage collection processing device, and more particularly, to a garbage collection method for solving a fragment of a memory.

【0002】[0002]

【従来の技術】従来、二次記憶や大容量のメモリをもた
ない小規模/組込み装置においては、ガーベジコレクシ
ョンを行う高機能なOS(オペレーティングシステム)
を搭載して使用することが困難か、もしくは非経済的で
ある。このような装置では簡単なアルゴリズムでガーベ
ジコレクションを行うために、コピー法によるガーベジ
コレクションがよく行われる。
2. Description of the Related Art Conventionally, in a small-scale / embedded device having no secondary storage or large-capacity memory, a high-performance OS (operating system) for performing garbage collection.
Is difficult or uneconomical to use. In such an apparatus, garbage collection by a copy method is often performed in order to perform garbage collection with a simple algorithm.

【0003】コピー法によるガーベジコレクションとし
ては、特開昭63−223845号公報に開示された技
術がある。この公報記載の技術では、記憶装置上の空間
を2分し、一方の空間に未使用のために廃棄したデータ
を堆積することによって使用可能な領域がなくなるかま
たはその恐れがある時、必要なデータを他方の空間に移
送して新たな空間を得ることで使用可能な空間の拡大を
図る方式が用いられている。
As a garbage collection by the copy method, there is a technique disclosed in Japanese Patent Application Laid-Open No. 63-223845. According to the technique described in this publication, when a space on a storage device is divided into two and data that has been discarded because it is not used is accumulated in one space, there is a possibility that an available area is lost or there is a possibility that there is a danger. A method of expanding usable space by transferring data to another space to obtain a new space is used.

【0004】上記の技術ではコピー法に準拠した実時間
ガーベジコレクションを行う場合、処理系が参照する論
理的なアドレスと実際にデータが格納されているメモリ
アドレスとを分離し、それらを変換するテーブル及び新
しいデータのメモリ上への割付けやガーベジコレクショ
ンのためのデータの移動とテーブルの書換え処理を行う
ガーベジコレクション専用のプロセッサを設けること
で、実時間ガーベジコレクションを高速に行い、プログ
ラムのコードサイズをコンパクトにすることを可能とし
ている。
In the above technique, when performing real-time garbage collection based on the copy method, a logical address referred to by the processing system is separated from a memory address where data is actually stored, and a table for converting them is used. By providing a dedicated garbage collection processor that allocates new data to memory and moves data for garbage collection and rewrites tables, real-time garbage collection is performed at high speed and the code size of the program is compact. It is possible to.

【0005】[0005]

【発明が解決しようとする課題】上述した従来のコピー
法によるガーベジコレクション方式では、メモリ領域を
2つに分割して使用するため、実際に使用できるメモリ
が物理的に存在するメモリ量の半分になるという問題が
あり、また、コピー中は本来の処理が長時間停止してし
まうという問題がある。
In the garbage collection method according to the conventional copying method described above, since the memory area is divided into two and used, the actually usable memory is reduced to half of the memory amount physically existing. There is a problem that the original processing is stopped for a long time during copying.

【0006】上記の公報記載の技術のようにコピーを複
数に分ければ各回の中断時間が短縮されるが、過渡状態
の処理をソフトウェアのみで行うとすると、処理が複雑
となって本来の処理に悪影響を与える。すなわち、上記
の公報記載の技術では別プロセッサによるハードウェア
支援によってコピーを複数に分ける方式でのソフトウェ
ア処理オーバヘッドの削減を提案しているが、コピー自
体を行うことには変わりがなく、メモリ容量が2倍必要
になることは改善されていない。また、ハードウェアと
してもかなり特殊なものであり、この機能のためだけに
プロセッサを追加するのは好ましくないと考えられる。
If the copy is divided into a plurality of pieces as in the technique described in the above-mentioned publication, the interruption time for each time can be shortened. However, if the processing in the transient state is performed only by software, the processing becomes complicated and the original processing becomes difficult. Has a negative effect. In other words, the technique described in the above publication proposes a reduction in software processing overhead by a method of dividing a copy into a plurality of copies with hardware support by another processor, but there is no change in performing the copy itself, and the memory capacity is reduced. The need to double is not improved. Also, the hardware is quite special, and it is considered undesirable to add a processor solely for this function.

【0007】そこで、本発明の目的は上記の問題点を解
消し、物理メモリの全領域を使用することができるとと
もに、高速な実時間ガーベジコレクションを実現するこ
とができる実時間ガーベジコレクション処理装置を提供
することにある。
Accordingly, an object of the present invention is to provide a real-time garbage collection processing apparatus which solves the above-mentioned problems, can use the entire area of the physical memory, and can realize high-speed real-time garbage collection. To provide.

【0008】[0008]

【課題を解決するための手段】本発明による実時間ガー
ベジコレクション処理装置は、メモリの記憶領域を予め
設定された所定領域からなるページ単位に管理する際に
プログラムの処理に用いられる論理アドレスとその論理
アドレスに対応する前記メモリの実アドレスを示す物理
アドレスとを前記ページ単位に変換する変換手段を含む
情報処理装置において前記メモリの使用可能領域を確保
するためのガーベジコレクションを実行する実時間ガー
ベジコレクション処理装置であって、前記変換手段に対
応して設けられかつ前記論理アドレスと前記物理アドレ
スとの対応表を保持するアドレステーブルと、前記ガー
ベジコレクションの実行時に前記対応表を書換えて前記
論理アドレスを近接して存在させることで前記使用可能
領域を確保するガーベジコレクション実行手段とを備え
ている。
SUMMARY OF THE INVENTION A real-time garbage collection processing device according to the present invention has a logical address and a logical address used for processing a program when managing a storage area of a memory in units of pages each having a predetermined area. A real-time garbage collection for executing a garbage collection for securing an available area of the memory in an information processing apparatus including a conversion unit for converting a physical address indicating a real address of the memory corresponding to a logical address into a page unit. A processing device, wherein the address table is provided corresponding to the conversion means and holds a correspondence table between the logical address and the physical address, and the correspondence table is rewritten during execution of the garbage collection to rewrite the logical address. A gas that secures the usable area by being close to And a vegetarian collection execution means.

【0009】本発明による他の実時間ガーベジコレクシ
ョン処理装置は、上記の構成のほかに、前記ガーベジコ
レクションの対象となる前記メモリの記憶内容が前記ペ
ージを越えて記憶されている場合に当該ページを越えて
いる部分を他のページに移動することで空きページの確
保が可能か否かを判定する判定手段と、前記判定手段が
前記空きページを確保可能と判定した時に前記ページを
越えている部分を他のページに移動する手段とを具備し
ている。
In another real-time garbage collection processing device according to the present invention, in addition to the above-described configuration, when the storage content of the memory to be subjected to the garbage collection is stored beyond the page, the page is deleted. Determining means for determining whether or not a free page can be secured by moving the excess portion to another page; and a portion exceeding the page when the determining means determines that the free page can be secured. For moving to another page.

【0010】本発明による別の実時間ガーベジコレクシ
ョン処理装置は、メモリの記憶領域を予め設定された所
定領域からなるページ単位に管理する際に用いられかつ
少なくともプログラムからなるモジュールの実行時に使
用される論理アドレスと前記モジュールが記憶された前
記メモリの実アドレスを示す物理アドレスとを対応付け
て格納するアドレステーブルと、前記モジュールの実行
時に前記論理アドレスと前記物理アドレスとを前記ペー
ジ単位に変換するハードウェアとを含む情報処理装置に
おいて前記メモリの使用可能領域を確保するためのガー
ベジコレクションを実行する実時間ガーベジコレクショ
ン処理装置であって、前記ガーベジコレクションの実行
時に前記アドレステーブルの格納内容を書換えて前記論
理アドレスを近接して存在させることで前記使用可能領
域を確保するガーベジコレクション実行手段を備えてい
る。
Another real-time garbage collection processing device according to the present invention is used when managing a storage area of a memory in units of pages each including a predetermined area, and is used at least when executing a module including a program. An address table that stores a logical address and a physical address indicating the real address of the memory in which the module is stored, and a hardware that converts the logical address and the physical address into the page unit when the module is executed. A real-time garbage collection processing device that executes garbage collection for securing an available area of the memory in an information processing device including hardware, and rewrites stored contents of the address table when the garbage collection is performed. Logical address adjacent And a garbage collection execution means for securing the available area by the presence Te.

【0011】本発明によるさらに別の実時間ガーベジコ
レクション処理装置は、上記の構成のほかに、前記モジ
ュールが前記ページを越えて前記メモリに記憶されてい
る場合に前記モジュールの前記ページを越えている部分
を他のページに移動することで空きページの確保が可能
か否かを判定する判定手段と、前記判定手段が前記空き
ページを確保可能と判定した時に前記モジュールの前記
ページを越えている部分を他のページに移動する手段と
を具備している。
[0011] Still another real-time garbage collection processing device according to the present invention, in addition to the above-described configuration, is provided that the module is stored in the memory beyond the page and that the module is over the page of the module. Determining means for determining whether a free page can be secured by moving a portion to another page; and a portion of the module exceeding the page when the determining means determines that the free page can be secured. For moving to another page.

【0012】すなわち、本発明の実時間ガーベジコレク
ション処理装置は、論理物理変換部と、ソフトウェアモ
ジュールロード/実行部と、メモリ管理部と、モジュー
ル管理部と、ガーベジコレクション実行部とを備えてい
る。
That is, the real-time garbage collection processing device of the present invention includes a logical-physical conversion unit, a software module load / execution unit, a memory management unit, a module management unit, and a garbage collection execution unit.

【0013】論理物理変換部は、通常ページと呼ばれる
小さな単位で論理アドレスと物理アドレスとを変換する
ハードウェアであり、通常、仮想記憶メカニズムを採用
するCPU(中央処理装置)に実装されている。
The logical-physical conversion unit is hardware for converting a logical address and a physical address in small units usually called pages, and is usually mounted on a CPU (central processing unit) employing a virtual storage mechanism.

【0014】ソフトウェアモジュールロード/実行部
は、ソフトウェア実行モジュールを論理アドレス上のど
の連続領域に配置しても、実行可能になるような形式で
コンパイル/リンクするソフトウェアモジュール作成ツ
ールであり、多くのソフトウェアモジュール作成ツール
が本機能を実現している。
The software module loading / executing unit is a software module creation tool that compiles / links a software execution module in a format that can be executed even if it is placed in any continuous area on a logical address. The module creation tool realizes this function.

【0015】メモリ管理部は各論理ページについてその
物理アドレスと、そのページが現在使用されているかど
うかを示すフラグと、使用されている場合にそのページ
に存在しているモジュールが現在実行/参照されている
かどうかを示すフラグとを管理するソフトウェアであ
る。
The memory management unit refers to the physical address of each logical page, a flag indicating whether or not the page is currently used, and, if used, the module existing in the page is currently executed / referenced. Software that manages a flag indicating whether the

【0016】モジュール管理部はメモリ上にある各モジ
ュールについてそのモジュール名と、先頭論理アドレス
及びサイズと、モジュールが現在実行/参照されている
かどうかを示すフラグとを管理するソフトウェアであ
る。
The module management unit is software for managing a module name, a leading logical address and size of each module on the memory, and a flag indicating whether the module is currently executed / referenced.

【0017】ガーベジコレクション実行部はCPUの空
き時間にメモリ管理部の情報を基に論理物理変換部が保
持している変換情報を書換えることによって、論理アド
レス上で実時間ガーベジコレクション処理を行うソフト
ウェアである。また、ガーベジコレクション実行部はペ
ージサイズが比較的大きい場合はページ間で必要最小限
のコピーを行うことによって、アドレス変換によるガー
ベジコレクション処理の効果を大きくする作業を実施す
る。
The garbage collection execution unit rewrites the conversion information held by the logical-physical conversion unit based on the information of the memory management unit during the idle time of the CPU, thereby performing real-time garbage collection processing on the logical address. It is. When the page size is relatively large, the garbage collection execution unit performs a task of increasing the effect of the garbage collection process by performing the address conversion by performing a necessary minimum copy between pages.

【0018】[0018]

【発明の実施の形態】次に、本発明の一実施例について
図面を参照して説明する。図1は本発明の一実施例の構
成を示すブロック図である。図において、CPU(中央
処理装置)1はデータバス100を介して主メモリ3に
接続されている。CPU1がメモリ3にアクセスする際
に出力する論理アドレスは論理物理変換部2にてそれに
対応する物理アドレスに変換されて主メモリ3に供給さ
れる。
Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of one embodiment of the present invention. In the figure, a CPU (Central Processing Unit) 1 is connected to a main memory 3 via a data bus 100. The logical address output when the CPU 1 accesses the memory 3 is converted into a physical address corresponding to the logical address by the logical-physical conversion unit 2 and supplied to the main memory 3.

【0019】また、CPU1はソフトウェアモジュール
ロード/実行部11と、ガーベジコレクション実行部1
2と、メモリ管理部13と、モジュール管理部14とを
備えており、これら各部はソフトウェアにて実現され
る。ここで、ガーベジコレクション実行部12はコピー
スクリプト12aを備え、メモリ管理部13はページ管
理テーブル13aを備え、モジュール管理部14aはモ
ジュール管理テーブル14aを備え、論理物理変換部2
は変換テーブル2aを備えている。
The CPU 1 includes a software module loading / executing unit 11 and a garbage collection executing unit 1.
2, a memory management unit 13, and a module management unit 14, and these units are realized by software. Here, the garbage collection execution unit 12 includes a copy script 12a, the memory management unit 13 includes a page management table 13a, the module management unit 14a includes a module management table 14a, and the logical-physical conversion unit 2
Has a conversion table 2a.

【0020】ソフトウェアモジュールロード/実行部1
1はアプリケーションソフトウェアモジュール(以下、
モジュールとする)をネットワーク(図示せず)からダ
ウンロードし、そのモジュールの管理/実行を行う。こ
こで、モジュールが「使用」されているということはメ
モリ上のモジュールがあり(もしくはダウンロード
中)、それが現在実行中(または参照中)もしくは今後
実行(または参照)される可能性があるということを意
味している。
Software module loading / executing unit 1
1 is an application software module (hereinafter, referred to as an application software module).
Module) is downloaded from a network (not shown), and the module is managed / executed. Here, the fact that a module is "used" means that there is a module in memory (or downloading), which may be currently executing (or referencing) or executing (or referencing) in the future. Means that.

【0021】また、モジュールが「実行」されていると
いうことはそのモジュールが現在実行中(または参照
中)で、リロケーションすることが不可能であるという
意味である。モジュールの管理状況はモジュール管理部
14によって管理され、その情報を基にメモリ管理部1
3が各論理ページの使用状況/実行状況を管理するペー
ジ管理テーブル13aを維持する。このページ管理テー
ブル13aはほかに論理物理変換部2が参照する変換テ
ーブル2aの論理物理ページ対応表(もしくはそのコピ
ー)を含んでいる。ガーベジコレクション実行部12は
CPU1の空き時間に起動され、ガーベジコレクション
を実行する。
The fact that a module is "executed" means that the module is currently being executed (or being referred to) and cannot be relocated. The management status of the module is managed by the module management unit 14, and based on the information, the memory management unit 1
3 maintains a page management table 13a for managing the usage / execution status of each logical page. The page management table 13a further includes a logical-physical page correspondence table (or a copy thereof) of the conversion table 2a referred to by the logical-physical conversion unit 2. The garbage collection execution unit 12 is activated during the idle time of the CPU 1, and executes garbage collection.

【0022】図2及び図3は本発明の一実施例によるガ
ーベジコレクション動作の一例を示す図であり、図4は
図1のガーベジコレクション実行部12の処理動作を示
すフローチャートである。図2はあるモジュール1,
2,3が順にダウンロードされ、その後モジュール2が
使用されなくなって解放された後に論理物理変換による
ガーベジコレクションを実行した後の状態を示してい
る。この場合、モジュールをコピーした後に、元のモジ
ュールを無効とするコピー処理は未処理である。最初、
連続的にとられていた主メモリ3の記憶領域にモジュー
ル2の部分の空きができ、物理アドレス上ではフラグメ
ントが発生しているが、論理物理変換によるガーベジコ
レクション機能が動作し、図2に示すように、その対応
を変えることで論理アドレス上では主メモリ3の無駄を
少なくすることができる。
FIGS. 2 and 3 are diagrams showing an example of the garbage collection operation according to one embodiment of the present invention, and FIG. 4 is a flowchart showing the processing operation of the garbage collection execution unit 12 of FIG. FIG. 2 shows a certain module 1,
This shows a state after garbage collection by logical-physical conversion has been performed after modules 2 and 3 have been sequentially downloaded and the module 2 is no longer used and released. In this case, the copy processing for invalidating the original module after copying the module has not been performed. the first,
A garbage collection function by logical-physical conversion operates, although a part of the module 2 is made free in the storage area of the main memory 3 which has been continuously taken and a fragment occurs on a physical address, as shown in FIG. Thus, by changing the correspondence, waste of the main memory 3 can be reduced on the logical address.

【0023】図3はコピー処理によってさらにこの効果
を増した後の状況を示している。すなわち、図3の破線
で示したモジュール3の一部分のコピーをモジュール1
の一部を含むページに行い、さらに変換テーブル2aの
論理アドレスを連続的、つまりモジュール3の論理アド
レスがモジュール1の論理アドレスに近接するように変
更することによって、より大きな連続領域を獲得するこ
とができる。尚、モジュール2が解放された状態から図
2を経て図3に遷移する間で、実際にガーベジコレクシ
ョンが行われている場合にはモジュール3が実行されて
いないことが必要である。
FIG. 3 shows the situation after this effect has been further increased by the copying process. That is, a copy of a part of the module 3 indicated by the broken line in FIG.
To a page including a part of the logical address of the conversion table 2a, and further, by changing the logical addresses of the conversion table 2a so that the logical addresses of the module 3 are close to the logical addresses of the module 1, to obtain a larger continuous area. Can be. During the transition from the released state of the module 2 to FIG. 3 through FIG. 2, it is necessary that the module 3 is not executed when garbage collection is actually performed.

【0024】図4を用いてガーベジコレクション実行部
12の処理動作について説明する。ガーベジコレクショ
ンが起動されると、ガーベジコレクション実行部12は
モジュール構成/実行状況の更新の有無をチェックする
(通常、最初のチェックでは更新されている)(図4ス
テップS1)。モジュール構成/実行状況が更新されて
いる場合、ガーベジコレクション実行部12はコピーを
行わずに実現することができる論理物理変換ガーベジコ
レクションの計画を作成する(図4ステップS2)。未
更新の場合には、前回作成した計画が無効となる。計画
作成のアルゴリズムは単に使用中でかつ実行中でないモ
ジュールを使用中ページの間にある未使用ページに移動
するというものである。
The processing operation of the garbage collection execution unit 12 will be described with reference to FIG. When the garbage collection is started, the garbage collection execution unit 12 checks whether or not the module configuration / execution status has been updated (usually, the first check is updated) (step S1 in FIG. 4). If the module configuration / execution status has been updated, the garbage collection execution unit 12 creates a plan for the logical-physical conversion garbage collection that can be realized without copying (step S2 in FIG. 4). If not updated, the previously created plan will be invalid. The planning algorithm simply moves modules that are in use and not running to unused pages that are between busy pages.

【0025】計画作成が完了すると、ガーベジコレクシ
ョン実行部12は他の処理が一切動作しないようにロッ
クをかけ、再度モジュール構成/実行状況の更新の有無
(計画がまだ有効かどうか)をチェックし(図4ステッ
プS1)、更新が行われていなければ論理物理変換部2
に対してガーベジコレクションを実行する(図4ステッ
プS3,4)。処理実行時にはモジュール構成情報を更
新する。
When the creation of the plan is completed, the garbage collection execution unit 12 locks so that no other processing operates, and checks again whether the module configuration / execution status has been updated (whether the plan is still valid) ( Step S1 in FIG. 4, if the update has not been performed, the logical-physical conversion unit 2
The garbage collection is executed for (steps S3 and S4 in FIG. 4). At the time of processing execution, the module configuration information is updated.

【0026】論理物理変換によるガーベジコレクション
が不可能な場合(一度、ガーベジコレクションが実行さ
れると、モジュール構成/実行状況が更新されない限り
新しい有効なガーベジコレクションは実行できなくな
る)、ガーベジコレクション実行部12はコピー処理に
よって使用領域の内部に空きページを作り出すことが可
能かどうかをチェックする(図4ステップS5)。この
時の1回あたりのコピーサイズは最大でもページサイズ
の半分となる。
When garbage collection by logical-physical conversion is not possible (once garbage collection is executed, a new valid garbage collection cannot be executed unless the module configuration / execution status is updated), the garbage collection execution unit 12 Checks whether it is possible to create a free page inside the used area by the copy process (step S5 in FIG. 4). At this time, the copy size per one time is at most half of the page size.

【0027】チェックが終了すると、ガーベジコレクシ
ョン実行部12は他の処理が一切動作しないようにロッ
クをかけ、もう一度モジュール構成/実行状況の更新の
有無(計画がまだ有効かどうか)をチェックする(図4
ステップS6)。更新が行われていなければガーベジコ
レクション実行部12は1回のコピー処理を実行し、モ
ジュール構成情報を更新した後(図4ステップS7,S
8)、ステップS1に戻る。この場合、新規に有効な論
理物理変換ガーベジ処理が実行できるようになっている
可能性が高い。また、有効なコピー処理がなかった場合
にはガーベジコレクションがもはや不可能であるので、
その処理を終了する。モジュール構成/実行状況が変化
した場合には、再度この処理が呼ばれる可能性が発生す
る。
When the check is completed, the garbage collection execution unit 12 locks so that no other processing operates, and checks again whether the module configuration / execution status is updated (whether the plan is still valid) (FIG. 4
Step S6). If the update has not been performed, the garbage collection execution unit 12 executes one copy process to update the module configuration information (steps S7 and S7 in FIG. 4).
8) Return to step S1. In this case, there is a high possibility that a new effective logical-physical conversion garbage process can be executed. Also, garbage collection is no longer possible without a valid copy process,
The process ends. When the module configuration / execution status changes, there is a possibility that this process is called again.

【0028】ネットワーク端末装置においては、通常ハ
ードディスク装置等の二次記憶を持たず、また最小限の
メモリを搭載し、それを効率的に使用することが経済的
に望ましい。これらの端末装置ではユーザ毎に異なる要
求を処理するため、一般に、端末装置自体にはネットワ
ーク通信ソフトウェアのみを搭載し、モジュールはセン
タ(図示せず)から必要な時に随時、ダウンロードして
使用するのが通例である。
It is economically desirable that a network terminal device usually has no secondary storage such as a hard disk device, has a minimum memory, and uses it efficiently. In order to process different requests for each user in these terminal devices, generally, only the network communication software is installed in the terminal device itself, and modules are downloaded from a center (not shown) and used whenever necessary. Is customary.

【0029】このようなネットワーク端末装置において
は、ダウンロードされるモジュールのサイズやダウンロ
ードの順序が不定であり、またその解放の順序やタイミ
ングも不定であるため、本発明で取り上げているメモリ
のフラグメント現象が起きやすい。また、このような端
末装置ではダウンロードの際のネットワーク通信処理時
間やユーザの入力待ち時間等のCPU待ち時間が発生し
やすく、またモジュールの使用状況が管理しやすいた
め、本発明を適用して効果を上げることが容易である。
さらに、一般にダウンロードされるモジュールは論理ア
ドレス上のどのアドレスに置いても動作する(リロケー
タブル)ことが必須条件であり、これも本発明の条件に
合致している。
In such a network terminal device, the size of modules to be downloaded and the order of download are undefined, and the order and timing of their release are also undefined. Is easy to occur. Further, in such a terminal device, CPU waiting time such as network communication processing time and user input waiting time at the time of downloading is easily generated, and the use state of the module is easily managed. Is easy to raise.
Furthermore, it is an essential condition that generally downloaded modules operate at any address on a logical address (relocatable), which also meets the conditions of the present invention.

【0030】本発明の一実施例の具体例としてはVOD
(ビデオonデマンド)端末装置があげられる。これら
の端末装置においてはダウンロードされるモジュールが
各サーバが提供するサービスの階層メニューになってい
る。例えば、オンラインショッピングサービスを提供す
るサーバにおいては初期メニューで商品の分類を選択す
るようなメニューを出し、その各項目について、さらに
内部的なメニュー階層を持つことがある。
As a specific example of one embodiment of the present invention, VOD
(Video on demand) terminal devices. In these terminal devices, the module to be downloaded is a hierarchical menu of services provided by each server. For example, a server that provides an online shopping service may provide a menu for selecting a product category in an initial menu, and each item may have a more internal menu hierarchy.

【0031】この場合、ソフトウェアモジュールのダウ
ンロード及び解放の方法は次のようにして行われる。
ユーザは初期メニュー(モジュール1)から服メニュー
(モジュール2)を選択する。モジュール2がモジュ
ール1の後にダウンロードされる。思い直して初期メ
ニューに戻る。初期メニューから家電品メニュー(モ
ジュール3)を選択する。モジュール3がモジュール
2の後にダウンロードされる。
In this case, the method of downloading and releasing the software module is performed as follows.
The user selects the clothes menu (module 2) from the initial menu (module 1). Module 2 is downloaded after Module 1. Think back and return to the initial menu. Select the home appliance menu (module 3) from the initial menu. Module 3 is downloaded after Module 2.

【0032】この時点で服のメニュー(モジュール2)
は不要となり、図2に示すような状況となる。各メニュ
ーのサイズはその内部にどれだけのイメージデータ(静
止画,動画)を含むかによるが、マルチメディア端末装
置では通常少なくとも数百キロバイトのイメージデータ
を含むのが普通であり、論理物理変換のページのサイズ
は100キロバイト程度でも十分な効果をあげることが
できる。最近の通常のCPUではページサイズはキロバ
イトからメガバイトのオーダで選択可能なものが多く
(例えば、VOD端末装置でよく使われているPPC4
03では、最小1Kバイトから最大16Mバイトまで選
択可能)、本発明のガーベジコレクションの要求に十分
答えることができる。また、ページサイズを適正なもの
とすることによって、ガーベジコレクションの詳細度を
制御することができ、性能及び機能のバランスをとるこ
とが可能である。
At this point, the clothes menu (module 2)
Becomes unnecessary, and the situation as shown in FIG. 2 results. The size of each menu depends on how much image data (still image, moving image) is included in the menu. However, multimedia terminal devices usually include at least several hundred kilobytes of image data. Even if the page size is about 100 kilobytes, a sufficient effect can be obtained. In many recent ordinary CPUs, the page size can be selected in the order of kilobytes to megabytes (for example, PPC4 which is often used in VOD terminal devices).
03, it is possible to select from a minimum of 1 Kbyte to a maximum of 16 Mbytes), which can sufficiently respond to the garbage collection request of the present invention. Further, by setting the page size to an appropriate value, it is possible to control the level of detail of garbage collection, and it is possible to balance performance and functions.

【0033】この実施例では、例えばユーザが家電品の
メニューから再び初期メニューに戻った際に、ユーザが
メニュー選択を行っている入力待ち時間を利用して、家
電品メニューモジュール(モジュール3)を図3に示す
ように移動することも可能である。こうしておけば、移
動後に家電品メニューが再度選択されて起動された場合
でも、メモリフラグメントがほとんどない状態で、ダウ
ンロードなしで家電品メニューを表示することができ
る。
In this embodiment, for example, when the user returns from the home appliance menu to the initial menu again, the home appliance menu module (module 3) is used by utilizing the input waiting time during which the user selects the menu. It is also possible to move as shown in FIG. By doing so, even if the home appliance menu is selected again after the movement and is started, the home appliance menu can be displayed without downloading with little memory fragment.

【0034】このように、CPU1のガーベジコレクシ
ョン実行部12が起動された時に、論理物理変換部2の
変換テーブル2aのモジュール構成情報を、つまり変換
テーブル2aの論理アドレスを書換えて論理アドレスを
近接して存在させることによって、最小限のコピー処理
でガーベジコレクションを行うことができるので、専用
のハードウェアを新規に追加することなく、物理メモリ
の全領域を使用することができるとともに、高速な実時
間ガーベジコレクションを実現することができる。
As described above, when the garbage collection execution unit 12 of the CPU 1 is started, the module configuration information of the conversion table 2a of the logical-physical conversion unit 2, that is, the logical address of the conversion table 2a is rewritten to make the logical addresses close to each other. Garbage collection can be performed with minimal copy processing, so that the entire area of physical memory can be used without adding new dedicated hardware, and high-speed real-time Garbage collection can be realized.

【0035】[0035]

【発明の効果】以上説明したように本発明によれば、少
なくともプログラムを含むモジュールの実行に用いられ
る論理アドレスと当該モジュールが格納されているメモ
リの実アドレスを示す物理アドレスとを対応付けて格納
するアドレステーブルの内部を、メモリの使用可能領域
を確保するためのガーベジコレクションの実行時に書換
えて論理アドレスを近接して存在させることによって、
メモリの全領域を使用することができるとともに、高速
な実時間ガーベジコレクションを実現することができる
という効果がある。
As described above, according to the present invention, at least a logical address used for executing a module including a program and a physical address indicating a real address of a memory in which the module is stored are stored in association with each other. By rewriting the inside of the address table to perform garbage collection to secure a usable area of the memory so that the logical addresses are close to each other,
There is an effect that the entire area of the memory can be used and high-speed real-time garbage collection can be realized.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施例の構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】本発明の一実施例によるガーベジコレクション
動作の一例を示す図である。
FIG. 2 is a diagram illustrating an example of a garbage collection operation according to an embodiment of the present invention.

【図3】本発明の一実施例によるガーベジコレクション
動作の一例を示す図である。
FIG. 3 is a diagram illustrating an example of a garbage collection operation according to an embodiment of the present invention.

【図4】図1のガーベジコレクション実行部の処理動作
を示すフローチャートである。
FIG. 4 is a flowchart illustrating a processing operation of a garbage collection execution unit in FIG. 1;

【符号の説明】[Explanation of symbols]

1 CPU 2 論理物理変換部 2a 変換テーブル 3 主メモリ 11 ソフトウェアモジュールロード/実行部 12 ガーベジコレクション実行部 12a コピースクリプト 13 メモリ管理部 13a ページ管理テーブル 14 モジュール管理部 14a モジュール管理テーブル DESCRIPTION OF SYMBOLS 1 CPU 2 Logical-physical conversion part 2a Conversion table 3 Main memory 11 Software module load / execution part 12 Garbage collection execution part 12a Copy script 13 Memory management part 13a Page management table 14 Module management part 14a Module management table

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 メモリの記憶領域を予め設定された所定
領域からなるページ単位に管理する際にプログラムの処
理に用いられる論理アドレスとその論理アドレスに対応
する前記メモリの実アドレスを示す物理アドレスとを前
記ページ単位に変換する変換手段を含む情報処理装置に
おいて前記メモリの使用可能領域を確保するためのガー
ベジコレクションを実行する実時間ガーベジコレクショ
ン処理装置であって、前記変換手段に対応して設けられ
かつ前記論理アドレスと前記物理アドレスとの対応表を
保持するアドレステーブルと、前記ガーベジコレクショ
ンの実行時に前記対応表を書換えて前記論理アドレスを
近接して存在させることで前記使用可能領域を確保する
ガーベジコレクション実行手段とを有することを特徴と
する実時間ガーベジコレクション処理装置。
1. A logical address used for processing a program when a storage area of a memory is managed in units of pages each including a predetermined area, and a physical address indicating a real address of the memory corresponding to the logical address. Is a real-time garbage collection processing device that executes garbage collection for securing an available area of the memory in an information processing apparatus including a conversion unit that converts the And an address table for holding a correspondence table between the logical address and the physical address, and a garbage for reserving the correspondence table at the time of executing the garbage collection so that the logical addresses are present in close proximity to secure the usable area. Real-time garbage having collection execution means Collection processing device.
【請求項2】 前記ガーベジコレクションの対象となる
前記メモリの記憶内容が前記ページを越えて記憶されて
いる場合に当該ページを越えている部分を他のページに
移動することで空きページの確保が可能か否かを判定す
る判定手段と、前記判定手段が前記空きページを確保可
能と判定した時に前記ページを越えている部分を他のペ
ージに移動する手段とを含むことを特徴とする請求項1
記載の実時間ガーベジコレクション処理装置。
2. When the storage contents of the memory to be subjected to the garbage collection are stored beyond the page, a portion beyond the page is moved to another page to secure a free page. The apparatus according to claim 1, further comprising: a determination unit configured to determine whether or not the available page is available, and a unit configured to move a portion exceeding the page to another page when the determination unit determines that the empty page can be secured. 1
A real-time garbage collection processor as described.
【請求項3】 メモリの記憶領域を予め設定された所定
領域からなるページ単位に管理する際に用いられかつ少
なくともプログラムからなるモジュールの実行時に使用
される論理アドレスと前記モジュールが記憶された前記
メモリの実アドレスを示す物理アドレスとを対応付けて
格納するアドレステーブルと、前記モジュールの実行時
に前記論理アドレスと前記物理アドレスとを前記ページ
単位に変換するハードウェアとを含む情報処理装置にお
いて前記メモリの使用可能領域を確保するためのガーベ
ジコレクションを実行する実時間ガーベジコレクション
処理装置であって、前記ガーベジコレクションの実行時
に前記アドレステーブルの格納内容を書換えて前記論理
アドレスを近接して存在させることで前記使用可能領域
を確保するガーベジコレクション実行手段を有すること
を特徴とする実時間ガーベジコレクション処理装置。
3. A logical address used when managing a storage area of a memory in units of pages each including a predetermined area, and at least a logical address used when executing a module including a program and the memory storing the module. The information processing apparatus includes an address table that stores physical addresses indicating physical addresses of the modules in association with each other, and hardware that converts the logical addresses and the physical addresses into the page units when the module is executed. A real-time garbage collection processing device that performs garbage collection for securing an available area, wherein the content stored in the address table is rewritten at the time of performing the garbage collection so that the logical addresses are close to each other. Garbage to secure usable area A real-time garbage collection processing device comprising a collection execution unit.
【請求項4】 前記モジュールが前記ページを越えて前
記メモリに記憶されている場合に前記モジュールの前記
ページを越えている部分を他のページに移動することで
空きページの確保が可能か否かを判定する判定手段と、
前記判定手段が前記空きページを確保可能と判定した時
に前記モジュールの前記ページを越えている部分を他の
ページに移動する手段とを含むことを特徴とする請求項
3記載の実時間ガーベジコレクション処理装置。
4. When the module is stored in the memory beyond the page, whether or not a free page can be secured by moving a portion of the module beyond the page to another page Determining means for determining
4. The real-time garbage collection process according to claim 3, further comprising: means for moving a portion of the module beyond the page to another page when the determination means determines that the empty page can be secured. apparatus.
JP5676497A 1997-03-12 1997-03-12 Real time garbage collection processor Pending JPH10254762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5676497A JPH10254762A (en) 1997-03-12 1997-03-12 Real time garbage collection processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5676497A JPH10254762A (en) 1997-03-12 1997-03-12 Real time garbage collection processor

Publications (1)

Publication Number Publication Date
JPH10254762A true JPH10254762A (en) 1998-09-25

Family

ID=13036572

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5676497A Pending JPH10254762A (en) 1997-03-12 1997-03-12 Real time garbage collection processor

Country Status (1)

Country Link
JP (1) JPH10254762A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002007587A (en) * 2000-06-22 2002-01-11 Yamaha Corp Server device for information transmission, client device for information reception, system and method for information transmission and reception, and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002007587A (en) * 2000-06-22 2002-01-11 Yamaha Corp Server device for information transmission, client device for information reception, system and method for information transmission and reception, and storage medium

Similar Documents

Publication Publication Date Title
US6182111B1 (en) Method and system for managing distributed data
US6314567B1 (en) Apparatus and method for transferring state data when performing on-line replacement of a running program code and data
US5560003A (en) System and hardware module for incremental real time garbage collection and memory management
US6862674B2 (en) Methods and apparatus for performing a memory management technique
US5931935A (en) File system primitive allowing reprocessing of I/O requests by multiple drivers in a layered driver I/O system
US6269442B1 (en) Apparatus and method for on-line replacement of a running program code and data using checkpoints
JP2004127205A (en) Method and apparatus for storing data in nonvolatile memory
US20060136779A1 (en) Object-based storage device with low process load and control method thereof
JP2010129080A (en) Software executing system and software executing method
KR20010007010A (en) Relation-based ordering of objects in an object heap
KR20110128846A (en) Programming model for synchronizing browser caches across devices and web services
JP3527765B2 (en) Program cache device
CN109324893B (en) Method and device for allocating memory
US20040107291A1 (en) Data processing system, data processing method, informaton processing device and information processing method, and storage medium
KR100725393B1 (en) System and method for reducing execution time of byte code at java virtual machine
TW200417857A (en) Allocating cache lines
US6434553B1 (en) File prefetch control method for computer system
KR100493893B1 (en) System and method of shortening class loading process in java program
Kermarrec et al. Design, implementation and evaluation of ICARE: an efficient recoverable DSM
CN117914675A (en) Method and device for constructing distributed cache system
JP3639366B2 (en) Address space sharing system
JPH10254762A (en) Real time garbage collection processor
US7389515B1 (en) Application deflation system and method
US6804754B1 (en) Space management in compressed main memory
JP4060890B2 (en) File system primitives that allow reprocessing of I / O requests by multiple drivers in a hierarchical driver I / O system