JPH04149751A - Method for processing garbage collection - Google Patents

Method for processing garbage collection

Info

Publication number
JPH04149751A
JPH04149751A JP27562490A JP27562490A JPH04149751A JP H04149751 A JPH04149751 A JP H04149751A JP 27562490 A JP27562490 A JP 27562490A JP 27562490 A JP27562490 A JP 27562490A JP H04149751 A JPH04149751 A JP H04149751A
Authority
JP
Japan
Prior art keywords
area
data
processing
garbage collection
data expansion
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
JP27562490A
Other languages
Japanese (ja)
Inventor
Shuichi Nakamura
修一 中村
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP27562490A priority Critical patent/JPH04149751A/en
Publication of JPH04149751A publication Critical patent/JPH04149751A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • G06F12/0269Incremental or concurrent garbage collection, e.g. in real-time systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Abstract

PURPOSE:To execute garbage collection without damaging the real time processing of data processing by shortening the interruption time for data processing interrupted due to the execution of a garbage collection. CONSTITUTION:Differing from the garbage collection processing of copying system, an area reclamation part 14 is constructed so as to remain the identical data in the data development area 15 of a copy source during the garbage collection processing. An area management part 13 can obtain the data immediately without through a pointer 16 even when data development area 15 of the processing request destination is to be copied on the other memory area 10 to be divided according to the garbage collection when receiving the reference processing request of a data development area 15 to be issued from an instruction execution part 12 and the check processing request of the content comparison of two data development area 15. Therefore, the result value can be returned to an instruction execution part 12. Thus, the garbage collection processing can be executed without damaging the real time processing of data processing.

Description

【発明の詳細な説明】 (概要] メモリ空間を2つに分割して、一方の分割空間に展開さ
れる使用中のデータ展開域のデータを、他方の分割空間
に連続的に並べて複写していくことで、不使用のデータ
展開域の再利用を実行するガーベジコし・クション処理
方式に関し、データ処理の実時間処理を損なうことなく
、データ展開域の再利用処理を実行できるようにするこ
とを目的とし、 メモリ空間の再利用を実行する再利用部は、他方の分割
空間に複写するときに、すべての複写が終rするまでの
間、複写元のデータ展開域にも同一データを残すように
構成する−とともに、複写元と複写先との間にポインタ
を設定し、かつ、メモリ空間を管理する管理部は、デー
タを書き換えるときには、そのデータを展開するデータ
展開域の持つポインタの指すデータ展開域についても書
き換えていくとともに、2つのデータ展開域の一致性の
検査処理を行うときには、そのデータ展開域の持つポイ
ンタの指すデータ展開域を考慮して検査処理を実行して
いくように構成する。
[Detailed Description of the Invention] (Summary) A memory space is divided into two parts, and the data in the data development area in use, which is developed in one divided space, is continuously arranged and copied into the other divided space. By doing this, we aim to make it possible to reuse the data expansion area without impairing the real-time processing of data, regarding the garbage collection/action processing method that reuses the unused data expansion area. When copying to the other partitioned space, the reusing unit that reuses the memory space leaves the same data in the data expansion area of the copy source until all copies are completed. In addition, when rewriting data, the management unit that sets a pointer between the copy source and the copy destination and manages the memory space uses the data pointed to by the pointer of the data expansion area to expand the data. In addition to rewriting the expansion area, when checking the consistency of two data expansion areas, the configuration is such that the data expansion area pointed to by the pointer of the data expansion area is taken into consideration when performing the checking process. do.

〔産業上の利用分野〕[Industrial application field]

本発明は、メモリ空間を2つに分割して、一方の分割空
間に展開される使用中のデータ展開域のデータを、他方
の分割空間に連続的に並べて複写してい(ことで、不使
用のデータ展開域の再利用を実行するガーベジコレクシ
ジン処理方式に関し、特に、データ処理の実時間処理を
損なうことなく、このデータ展開域の再利用処理を実行
できるようにするガーベジコレクシジン処理方式に関す
るものである。
The present invention divides a memory space into two parts, and copies the data in the currently used data expansion area expanded into one divided space to the other divided space in a continuous manner. The present invention relates to a garbage collection processing method that reuses a data expansion area, and particularly relates to a garbage collection processing method that enables reuse processing of this data expansion area without impairing real-time data processing. It is something.

L、 l S P言語等のようなデータ領域を実行時に
獲得し、て管理していくようなタイプの言語では、2メ
モリ空間上に残されでいく不要となったメモリ領域を自
動的に回収して再利用に供するガーベジコレクションを
実行していくことになる。このガー\、2゛コレクシッ
ンは、本来のデータ処理の実行が妨げられることなく実
行されるように構成していく必要がある。
In languages such as L, l S P languages that acquire and manage data areas at runtime, memory areas that are no longer needed and are left in the 2 memory space are automatically reclaimed. Then, garbage collection will be performed to make it available for reuse. This Gar\,2 correction must be configured so that the original data processing can be executed without being hindered.

[従来の技術] ガーベジコレクションには、大きく分けて、フリ−リス
ト力弐とコピ一方式とがある。
[Prior Art] Garbage collection can be roughly divided into two types: free list type and copy type.

このフリーリスト方式のガーベジコレクションは、飛び
飛びになっている再利用11J能な空き領域を順にポイ
ンタでつないで、フリーリストにして管理していく方法
である。すなわち、第3図に示すように、使用ポインタ
を順に辿ることで使用中のメモリ領域を特定して使用中
である旨の記録を付け、続いて、この使用中の記録の付
かない不要なメモリ領域を選び出して、これらの不要な
メモリ領域を空きポインタでつなぐことでフリーリスト
を作成する。そして、新たにメモリ領域が必要になると
きには、このフリーリストから割り付けを行うように構
成するのである。
This free list garbage collection is a method in which scattered free areas that can be reused are successively connected with pointers and managed as a free list. In other words, as shown in Figure 3, by sequentially following the usage pointers, the memory area in use is identified and a record indicating that it is in use is added, and then unnecessary memory areas with no record of being in use are identified. A free list is created by selecting areas and connecting these unnecessary memory areas with free pointers. Then, when a new memory area is required, it is configured to be allocated from this free list.

このフリーリスト方式のガーベジコレクションでは、使
用ポインタを辿る処理もフリーリストを作成する処理も
、通常のデータ処理の合間に少しずつ行うことができる
。そして、メモリ領域の移動処理をiテわないので、ガ
ーベジコレクノツンの途中であってもデータを参照でき
ることになる。
In this free list-based garbage collection, both the process of following usage pointers and the process of creating a free list can be performed little by little during normal data processing. Since the process of moving the memory area is not required, the data can be referenced even during garbage collection.

但し、データの書き換えの場合には、既に走査済みのメ
モリ領域から未走査のメモリ領域を指すポインタを作ら
ないようにするために、スタック−・登録する等の処理
が必要になるが、参照処理に比べて書き換え処理の出現
頻度は低いことから、この処理も大きな負担とはならな
い、これから、このフリーリスト方式のガーベジコレク
ションに従うと、5データ処理の実時間処理を損なうこ
となくガーベジコレクションを実行できるという利点が
あるとともに、オーバヘッドも小さいという利点がある
、更に、これに加えて、汎用機上で効率良く実行できる
という利点もある。
However, in the case of data rewriting, processing such as stack registration is required in order to avoid creating a pointer pointing to an unscanned memory area from an already scanned memory area, but reference processing Since the frequency of rewriting processing is low compared to , this processing is not a big burden.If you follow this free list method of garbage collection from now on, you will be able to perform garbage collection without impairing the real-time processing of 5 data processing. In addition to this, there is also the advantage that the overhead is small.In addition to this, there is also the advantage that it can be executed efficiently on a general-purpose machine.

しかしながら、フリーリスト方式のガーベジコレクショ
ンでは、メモリ領域の移動を行わないので、使用可能と
なるメモリ領域が細分化されてフリーリストにつなげら
れLしまうために、大きなメモリ領域の獲得要求に対し
て対応できないという問題点がある。
However, free list garbage collection does not move the memory area, so the usable memory area is fragmented and connected to the free list, so it cannot handle large memory area acquisition requests. The problem is that it cannot be done.

これに対して、コピ一方式のガーベジコレクションは、
メモリ空間を2つに分割して、一方のメモリ分割空間の
使用状況が所定状態に達するときに、使用中のメモリ領
域のデータを他方のメモリ分割空間に連続的に並べて複
写していくことで、不使用のメモリ領域の再利用を図っ
ていく方法である。すなわち、第4図に示すように、使
用ポインタを順に辿ることで使用中のメモリ領域を順次
選択して、他方のメモリ分割空間に連続的に並べて複写
していく、このとき、複写元のメモリ領域に複写された
ものである旨の記録(複写マークの記録)を付けるとと
もに、複写先へのポインタを設定していく、続いて、す
べて−の複写処理が完了したら、複写元となったメモリ
分割空間へのポインタを切断していく、そして、新たに
メモリ領域が必要になるときには、この整理された使用
中のメモリ領域に続く連続の空きのメモリ領域から割り
付けを行うように構成するのである。
In contrast, copy-only garbage collection
By dividing the memory space into two parts, and when the usage status of one memory division space reaches a predetermined state, the data in the memory area in use is continuously arranged and copied to the other memory division space. This is a method of reusing unused memory areas. That is, as shown in FIG. 4, the memory areas in use are sequentially selected by sequentially following the use pointers, and the memory areas in use are successively arranged and copied to the other memory partition space. A record indicating that it has been copied (copy mark record) is added to the area, and a pointer to the copy destination is set. After all copy processing is completed, the memory that was the copy source is The pointer to the divided space is disconnected, and when a new memory area is needed, the configuration is such that allocation is made from the continuous free memory area following this organized memory area in use. .

このコピ一方式のガーベジコレクションでは、フリーリ
スト方式と異なって、使用可能となるメモリ領域がまと
められていることから、大きなメモリ領域の獲得要求に
対応できるという利点がでてくることになる。そして、
ポインタ順に複写されているので、線型性も向上してい
る。また、汎用機上で効率良く実行できるという利点も
残されている。
Unlike the free list method, this one-copy garbage collection has the advantage of being able to respond to requests for acquisition of large memory areas because the available memory areas are grouped together. and,
Since the copies are made in the order of pointers, linearity is also improved. It also has the advantage that it can be executed efficiently on a general-purpose machine.

しかしながら、ガーベジコレクションの途中では、ガー
ベジコレクシ式ン専用のポインタが張られることになる
ことから、通常のデータ処理を実行することができない
という問題点がある。すなわち、ガーベジコレクション
を実行するときには、本来のデータ処理を中断しなけれ
ば會−ならず、実時間処理の要求されるデータ処理装置
には実装できないという問題点があったのである。
However, there is a problem in that during garbage collection, a pointer dedicated to the garbage collection is set, so normal data processing cannot be performed. That is, when garbage collection is executed, it cannot be performed without interrupting the original data processing, and there has been a problem that it cannot be implemented in a data processing device that requires real-time processing.

このようなコピ一方式のガーベジコレクションの持つ欠
点を解消するために、通常のデータ処理の実行時にポイ
ンタを辿っていくときに、ガーベジコレクション途中に
記録される複写マークがあることを検出すると、その複
写マークの付けられたメモリ領域の持つポインタについ
ても辿るようにする従来技術もある。このようにすると
、コピ一方式のガーベジコレクションを少しずつ行うこ
とが可能になり、通常のデータ処理の中断を短時間にし
て、ガーベジコレクションを実行できることになる。
In order to eliminate the disadvantages of such copy-only garbage collection, when following a pointer during normal data processing, if a copy mark recorded during garbage collection is detected, the There is also a conventional technique that also traces a pointer held by a memory area to which a copy mark is attached. In this way, copy-only garbage collection can be performed little by little, and garbage collection can be performed with a short interruption of normal data processing.

〔発明が解決しようとするtlff) しかしながら、ガーベジコレクション途中に記録される
複写マークも考慮してポインタを辿っていく方法を採る
と、ポインタを参照する度毎に、ガーベジコレクション
処理により記録される複写マークが記録されているか否
かの検査処理を実行して、その検査結果に従って、更に
ポインタを辿る処理を実行しなくてはならないことにな
る。これから、本来のデータ処理の性能を大きく劣化さ
せることで実時間処理を損なうことになるという問題点
が残されているのである。
[tlff to be solved by the invention] However, if a method is adopted in which the pointer is followed by taking into account the copy mark recorded during garbage collection, each time the pointer is referenced, the copy recorded by the garbage collection process is This means that it is necessary to perform a process of checking whether or not a mark is recorded, and then, according to the result of the check, a process of following the pointer. The problem remains that real-time processing is impaired by significantly degrading the performance of the original data processing.

これに対処するために、ハードディスク制御装置等で実
装されている透明ポインタのハードウェア機構を備えて
いくことが考えられる。この透明ポインタのハードウェ
ア機構を備えれば、有効アドレスの決定において、複写
元のメモリ領域を参照すると、自動的に複写先のメモリ
領域に切り換えられるようになることから、ポインタを
2回辿ることによる性能劣化を防ぐことができるのであ
る。しかしながら、このような透明ポインタを実装する
ためには、特別なハードウェア機構を備えていかなくて
はならないことから、汎用機には実装できないという新
たな問題点がでてくることになる。
In order to deal with this, it is conceivable to provide a transparent pointer hardware mechanism implemented in a hard disk control device or the like. If this transparent pointer hardware mechanism is provided, when the effective address is determined, when the copy source memory area is referenced, it will be possible to automatically switch to the copy destination memory area, so the pointer will not be traced twice. This can prevent performance deterioration due to However, in order to implement such a transparent pointer, a special hardware mechanism must be provided, which creates a new problem that it cannot be implemented on a general-purpose machine.

本発明はかかる事情に鑑みてなされたものであって、メ
モリ空間を2つに分割して、一方の分割空間に展開され
る使用中のデータ展開域のデータを他方の分割空間に連
続的に並べて複写していくことで、不使用のデータ展開
域の再利用を実行するコピ一方式のガーベジコレクシジ
ン処理方式にあって、データ処理の実時間処理を損なう
ことなく、ガーベジコレクシジン処理を実行できるよう
にする新たなガーベジコレクション処理方式の提供を目
的とするものである。
The present invention has been made in view of the above circumstances, and consists of dividing the memory space into two parts, and continuously transferring the data in the data expansion area in use that is expanded to one divided space to the other divided space. Garbage collection processing is performed without compromising real-time data processing in a copy-one garbage collection processing method that reuses unused data development areas by copying them side by side. The purpose is to provide a new garbage collection processing method that makes it possible to

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の原理構成図である。 FIG. 1 is a diagram showing the principle configuration of the present invention.

図中、1は本発明を具備するデータ処理装置である。こ
のデータ処理装置1は、メモリ領域10、プログラム展
開部11、命令実行部12、領域管理部13及び領域再
利用部14を備える。
In the figure, 1 is a data processing device equipped with the present invention. This data processing device 1 includes a memory area 10, a program development section 11, an instruction execution section 12, an area management section 13, and an area reuse section 14.

このメモリ領域10は、処理対象データを記憶するデー
タ展開域15を展開し、プログラム展開部11ば、所定
のデータ処理ll能を発揮するアプリケージぢンプログ
ラムを展開し、命令実行部12は、プログラム展開部1
1の展開するプログラム記述を解読して実行し、領域管
理部13は、メモリ領域10の管理処理を実行し、g域
再利用部14は、例えば、メモリ領域10の使用状況が
規定状態に達するときに、メモリ領域lOの再利用を回
るべくコピ一方式のガーベジコレクシジン処理を実行す
る。
This memory area 10 develops a data development area 15 for storing data to be processed, a program development section 11 develops an application engine program that exhibits a predetermined data processing function, and an instruction execution section 12, Program development part 1
The area management unit 13 executes management processing of the memory area 10, and the g area reuse unit 14 decodes and executes the expanded program description of the memory area 10, for example. Sometimes, a copy-only garbage collection process is executed to reuse the memory area IO.

命令実行部12は、領域管理部13に対して、データ展
開域15の参照処理や、データ展開域15の作成処理や
、データ展開域15の書き換え処理や、2つのデータ展
開域15の内容比較の検査処理や、2つのデータ展開域
15の一致性の検査処理を要求する。
The instruction execution unit 12 provides the area management unit 13 with reference processing for the data expansion area 15, processing for creating the data expansion area 15, processing for rewriting the data expansion area 15, and comparison of the contents of two data expansion areas 15. , and the matching of the two data development areas 15 is requested.

領域管理部13は、命令実行部12から要求される処理
を実行して、その結果値を命令実行部12に応答する。
The area management unit 13 executes the processing requested by the instruction execution unit 12 and responds to the instruction execution unit 12 with the result value.

領域再利用部14は、メモリ領域10を2つに分割して
、一方のメモリ領域10に展開される使用中のデータ展
開域15のデータを、他方のメモリ領域10に連続的に
並べて複写していくことで、不使用のデータ展開域15
の再利用を実行する。
The area reusing unit 14 divides the memory area 10 into two and copies the data in the currently used data expansion area 15 that is expanded in one memory area 10 to the other memory area 10 in a continuous manner. By doing so, the unused data expansion area 15
Execute reuse.

この処理の実行にあたって、領域再利用部14は、他方
のメモリ領域10へのすべての複写処理が終了するまで
の間、複写元のデータ展開域15にも同一データを残す
ように処理するとともに、複写元のデータ展開域15と
複写先のデータ展開域15との間にポインタ16を設定
する。このポインタ16は、好ましくは、主従の関係を
持たないで相互に相手方のデータ展開域15を指す相互
ポインタでもって構成されることになる。
In executing this process, the area reusing unit 14 processes so that the same data remains in the data expansion area 15 of the copy source until all copying processes to the other memory area 10 are completed, and A pointer 16 is set between the data development area 15 of the copy source and the data development area 15 of the copy destination. Preferably, the pointers 16 are mutual pointers that point to the data development area 15 of the other party without having a master-slave relationship.

このように、領域再利用部14は、他方のメモリ領域1
0へのすべての複写処理が終了するまでの間、複写元の
データ展開域15にも同一データを残すように処理する
ことから、領域管理部13は、領域再利用部14の処理
途中であっても自処理を実行できるようになり、これが
ために、領域再利用部14は、命令実行部12の処理と
並行して少しずつメモリ領域の再編成処理を実行できる
ようになる。
In this way, the area reusing unit 14 uses the other memory area 1
Since the same data is left in the data expansion area 15 of the copy source until all copy processing to 0 is completed, the area management unit 13 is configured to keep the same data in the area reuse unit 14 during processing. Therefore, the area reuse unit 14 can execute memory area reorganization processing little by little in parallel with the processing of the instruction execution unit 12.

C作用〕 本発明では、従来のコピ一方式のガーー、ジコレクショ
ン処理と異なって、7領域再利用部14は、ガーベジコ
レクンランの処理中、複写元のデータ展開域15にも同
一データを残すように構成する。
C Effect] In the present invention, unlike the conventional copy-one-type garbage collection processing, the 7 area reuse unit 14 also stores the same data in the data development area 15 of the copy source during the garbage collection processing. Configure it to remain.

このように構成されるものであることから、領域管理部
13は、命令実行部12から発行されるデータ展開域1
5の参照処理要求や、2つのブタ展開域15の内容比較
の検査処理要求を受は取るときに、その処理要求先のデ
ータ展開域15が、ガーベジコレクン5ン途中に従って
もう一方の分割されるメモリ領域10に複写されるもの
であっても、ポインタを辿ることな(直ちにそのデータ
を得ることができるので、発行される処理要求に対して
直ちに結果値を命令実行部12に返すことができるよう
になる。
Since it is configured in this way, the area management unit 13 is configured to handle the data expansion area 1 issued from the instruction execution unit 12.
When receiving a request for reference processing in 5 or a request for inspection processing to compare the contents of two pig expansion areas 15, the data expansion area 15 that is the processing request destination is divided into the other one along the middle of the garbage collection area 5. Even if the data is copied to the memory area 10, it is possible to immediately return the result value to the instruction execution unit 12 in response to the issued processing request without following the pointer (the data can be obtained immediately). become able to.

一方、領域管理部13は、命令実行部12から発行され
るデータ展開域15の書き換え処理要求を受は取るとき
には、複写元のデータ展開域15と複写先のデータ展開
域15とが同一データを管理する構成を採っていること
に整合させて、書き換え要求のあるデータ展開域15が
ポインタ16を持っているときには、そのポインタ16
の指すデータ展開域15についても同一データに書き換
えていくように処理する。
On the other hand, when the area management unit 13 receives a request for rewriting the data expansion area 15 issued from the instruction execution unit 12, the area management unit 13 determines that the copy source data expansion area 15 and the copy destination data expansion area 15 have the same data. Consistent with the management configuration, if the data development area 15 for which a rewriting request is requested has a pointer 16, the pointer 16 is
Processing is performed so that the data development area 15 pointed to by is also rewritten to the same data.

また、領域管理部13は、命令実行部12から発行され
る2つのデータ展開域15の一致性の検査処理要求を受
は取るときには、複写元のデータ展開域15と複写先の
データ展開域15とが同一データを管理する構成を採っ
ていることに対応させて、先ず最初に、検査要求のある
2つのデータ展開域15が同一のデータ展開域15であ
るか否かを判断し、この判断処理により、同一のデータ
展開域15でないと判断するときには、次に、ポインタ
16の指すデータ展開域15も青酸して、検査要求のあ
る2つのデータ展開域15が同一のデータ展開域15で
あるか否かを判断していく。
Furthermore, when the area management unit 13 receives a request for checking the consistency of the two data expansion areas 15 issued from the instruction execution unit 12, the area management unit 13 performs a check on the data expansion area 15 of the copy source and the data expansion area 15 of the copy destination. In response to the fact that the two data development areas 15 that are requested to be inspected are configured to manage the same data, it is first determined whether or not the two data expansion areas 15 that are requested to be inspected are the same data expansion area 15. When it is determined through the process that they are not the same data expansion area 15, the data expansion area 15 pointed to by the pointer 16 is also cyanide, and the two data expansion areas 15 for which inspection is requested are the same data expansion area 15. We will decide whether or not.

例えば、ポインタ16が、2つのデータ展開域15を複
写先*Sと複写元領域という主従関係を持つもので管理
する構成を採る場合には、検査対象のデータ展開[15
が複写元領域の場合には、その複写先領域を求めて、こ
の複写先領域のデータ展開域15同士が同一のデータ展
開域15となるものであるか否かにより、検査要求のあ
る2つのデータ展開域15が同一のデータ展開域15で
あるか否かを判断していくことになる。このとき、ポイ
ンタ16を主従関係のない相互ポインタで構成すれば、
検査要求のある2つのデータ展開域15のいずれか一方
についてのみ相互ポインタの指すデータ展開域15を特
定して、この特定してデータ展開域15と、検査要求の
ある残りのデータ展開域15との同一性の検査処理を実
行することで一致性の検査処理を実行できるので、複写
先領域への正規化処理に基づくオーバヘッドをなくすこ
とができる。
For example, if the pointer 16 adopts a configuration in which the two data expansion areas 15 are managed in a master-slave relationship of a copy destination *S and a copy source area, the data expansion area to be inspected [15
is the copy source area, find the copy destination area, and check whether the two data development areas 15 of the copy destination area are the same data development area 15 or not. It is determined whether the data development areas 15 are the same data development area 15 or not. At this time, if the pointer 16 is configured with mutual pointers without a master-slave relationship,
The data expansion area 15 pointed to by the mutual pointer is specified for only one of the two data expansion areas 15 for which an inspection request is made, and this specified data expansion area 15 and the remaining data expansion area 15 for which an inspection request is made are identified. Since the consistency checking process can be executed by executing the sameness checking process, it is possible to eliminate the overhead based on the normalization process for the copy destination area.

このように、本発明によれば、領域再利用部14による
ガーベジコレクシジンの途中であっても、領域管理部1
3は、命令実行部12からの処理要求を実行できるとと
もに、最も頻繁に要求されるデータの参照処理要求に対
して、ポインタの追跡処理を実行せずに直ちにデータを
読み出せるようになることから、本来のデータ処理の性
能の劣化を最小限に止められることになるのである。
As described above, according to the present invention, even if the area reusing unit 14 is in the middle of garbage collection, the area managing unit 1
3 is because it is possible to execute processing requests from the instruction execution unit 12 and to read data immediately without executing pointer tracking processing in response to the most frequently requested data reference processing request. This means that the deterioration of the original data processing performance can be minimized.

[実施例] 以下、実施例に従って本発明の詳細な説明する。[Example] Hereinafter, the present invention will be explained in detail according to examples.

第2図に、第1図で説明した領域再利用部14が実行す
る本発明に係るコピ一方式のガーベジコレクシジンの一
実施例を図示する。この図において、左側の部分が、ガ
ーベジコレクシジンの処理途中のメモリ空間状態を図示
しており、右側の部分が、ガーベジコレクシジンの完了
後のメモリ空間状態を図示しである。ここで、左側の部
分では、ポインタの線が煩雑になるのを防ぐために、便
宜上、分割される2つのメモリ空間を離して図示しであ
る。
FIG. 2 illustrates an embodiment of the copy-only garbage collector according to the present invention executed by the area reusing unit 14 described in FIG. 1. In this figure, the left part shows the state of the memory space during the garbage collection process, and the right part shows the state of the memory space after the garbage collection process is completed. Here, in the left part, in order to prevent the pointer lines from becoming complicated, the two divided memory spaces are illustrated separated for convenience.

この図に示すように、本発明では、ガーベジコレクシジ
ンの実行に従って、旧空間(左側の分割メモリ空間)か
ら新空間(右側の分割メモリ空間)への複写を実行する
ときに、領域再利用部14は、旧空間の複写元の領域に
ついても、すべての領域についての複写処理が完了する
までの間、同一データを残すように処理することを特徴
としている。
As shown in this figure, in the present invention, when copying from the old space (divided memory space on the left) to the new space (divided memory space on the right) according to the execution of garbage collection, the area reuse unit No. 14 is characterized in that processing is performed so that the same data remains in the copy source area of the old space until the copy processing for all areas is completed.

そして、領域再利用部14は、この2つの複写元の領域
と複写先の領域とが、主従の関係を持たないで相互に相
手方の領域を指す相互ポインタ20(図中の太線のポイ
ンタ)を持つように処理することを特徴としている。こ
の相互ポインタ20は、ガーベジコレクシジンの処理途
中であっても複写されていない領域では使用されること
はなく、また、ガーベジコレクシジンの処理途中以外で
は使用されることはないので、そのようなときには、図
中にも示すように、自らの領域自身を指すように設定さ
れることになる。
Then, the area reuse unit 14 creates a mutual pointer 20 (thick line pointer in the figure) between the two copy source areas and the copy destination area that points to the other's area without having a master-slave relationship. It is characterized by being processed as if it were held. This mutual pointer 20 is not used in areas that are not copied even during garbage collection processing, and is not used outside of garbage collection processing, so such Sometimes, as shown in the figure, it is set to point to its own area itself.

この構成を採るものであることから、第1図で説明した
領域管理部13は、メモリ空間を参照する必要がある場
合に、その参照先の領域がガーベジコレクシジンによる
複写中の領域であるものであっても、直ちに参照すべき
データを得ることができるようになるのである。そして
、例えば、第2図の処理途中の図において、右側の分割
メモリ空間の「A」からも「C」が得られ、左側の分割
メモリ空間の「A」からも「C」が得られるというよう
に、複写元の領域を指しているポインタを辿っても、複
写先の領域を指しているポインタを辿っても、本来必要
となる同一内容のデータを得ることができるようになる
のである。
Since this configuration is adopted, the area management unit 13 explained in FIG. However, you will be able to immediately obtain the data you need to refer to. For example, in the diagram in the middle of processing in Figure 2, "C" can be obtained from "A" in the divided memory space on the right, and "C" can also be obtained from "A" in the divided memory space on the left. Thus, whether you follow the pointer pointing to the copy source area or the pointer pointing to the copy destination area, you can obtain the same data that is originally required.

一方、この構成を採ることに合わせて、領域管理部13
は、領域の書き換えを行う場合には、複写元の領域を書
き換えるときには複写先の領域についても書き換え、複
写先の領域を書き換えるときには複写元の領域について
も書き換えるように処理することになる。また、フリー
リスト方式のガーベジコレクションと同様に、走査済み
の領域から旧字間を指すポインタを作らないようにする
ために、指す先の領域を新空間に複写してそれへのポイ
ンタを格納していくことになる。
On the other hand, in conjunction with adopting this configuration, the area management section 13
When rewriting an area, the copy destination area is also rewritten when the copy source area is rewritten, and the copy source area is also rewritten when the copy destination area is rewritten. Also, similar to free list garbage collection, in order to avoid creating pointers between old characters from scanned areas, the area to be pointed to is copied to a new space and a pointer to it is stored. I'm going to go there.

そして、この構成を採ることに合わせて、領域管理部1
3は、領域自体の一致性の検査処理を行う場合、検査対
象のポインタ同士を比較するだけてはなくて、相互ポイ
ンタ20も考慮して比較処理を行っていくことになる。
In addition to adopting this configuration, the area management section 1
3, when performing the matching process of the area itself, the comparison process is performed not only by comparing the pointers to be tested, but also by taking mutual pointers 20 into consideration.

次に、LISP言語の処理系を例にして、領域管理部1
3と領域再利用部14の実行する処理について説明する
Next, using the LISP language processing system as an example, the area management section 1
3 and the processing executed by the area reuse unit 14 will be explained.

領域管理部13は、第1図で説明した命令実行部12か
ら新領域の獲得処理要求であるrconS」の発行を受
は取ると、 (1,1)ガーベジコレクション中の場合は、後述する
(6)で説明するガーベジコレクションの続行処理を行
う。
When the area management unit 13 receives the issuance of ``rconS'' which is a new area acquisition process request from the instruction execution unit 12 explained in FIG. The garbage collection continuation process described in 6) is performed.

(1,2)ガーベジコレクション中ではないが、4現空
間に空きがない場合には、後述する(5)で説明するガ
ーベジコレクションの起動処理を行う。
(1, 2) Garbage collection is not in progress, but if there is no free space in the current space, garbage collection startup processing is performed as described in (5) below.

(1,3)現空間中に要求の領域を割り付ける。(1, 3) Allocate the requested area in the current space.

という処理を実行していく、ガーベジコレクションは、
後述するように、領域管理部13の処理の中断時間が規
定値に達すると中断されることになるので、(1,1)
 (1,2)の処理時点からその規定値の中断時間に達
すると、(1,3)の処理の実行に入ることになる。こ
のようにして、新領域の獲得要求毎にガーベジコレクシ
ョンが少しずつ実行されていくことになる。
Garbage collection executes the process of
As will be described later, the processing of the area management unit 13 will be interrupted when the interruption time reaches the specified value, so (1, 1)
When the specified interruption time is reached from the time point of processing (1, 2), execution of processing (1, 3) begins. In this way, garbage collection is executed little by little for each new area acquisition request.

領域管理部13は、命令実行部12から、指定されるポ
インタの指す領域の参照処理要求であるr(ar」’r
edr」の発行を受は取ると、(2,1)その参照要求
先の領域のcar部/ c d r部を参照して、命令
実行部12に返す。
The area management unit 13 receives from the instruction execution unit 12 a request for reference processing of the area pointed to by the designated pointer r(ar'''r
edr", (2, 1) refers to the CAR section/CDR section of the area to which the reference request is made and returns it to the instruction execution unit 12.

という処理を実行する。上述したように、本発明では、
ガーベジコレクション途中の複写元の領域についてもデ
ータを残すように構成していることから、参照要求先の
領域が旧字間にあるものであっても、更にポインタを辿
ることなく直ちに所望のデータを参照できるのである。
Execute the process. As mentioned above, in the present invention,
Since the configuration is such that data is left even in the copy source area during garbage collection, even if the reference request destination area is between old characters, the desired data can be retrieved immediately without following the pointer further. You can refer to it.

領域管理部13は、命令実行部12がら、指定されるポ
インタの根元の領域の領域内容の書き換え処理要求であ
るrrplaca」 rrplacd」の発行を受は取
ると、 (3,1)ガーベジコレクション中でない場合は、書き
換え要求のある領域を新内容に書き換える処理を行う。
When the area management unit 13 receives from the instruction execution unit 12 the issuance of ``rrplaca'' and ``rrplacd'', which are requests to rewrite the area contents of the area at the root of the specified pointer, (3, 1) Garbage collection is not in progress. If so, the area with the rewrite request is rewritten with new content.

(3,2)ガーベジコレクション中の場合は、次の処理
を行う。
(3, 2) If garbage collection is in progress, perform the following processing.

(3,2,1)書き換え要求のある領域が新空間の走査
済み領域であり、指定のポインタが旧空間内の領域を指
すとき、その旧字間の領域の複写処理を行って、その指
定のポインタが新空間内を指すものに変える。このとき
の複写処理は、後述する(7)の処理に従って実行され
る6 (3,2,2)書き換え要求のある領域を新内容に書き
換える。
(3, 2, 1) When the area for which the rewrite request is requested is a scanned area in the new space and the specified pointer points to an area in the old space, the area between the old characters is copied and the specified Change the pointer to point within the new space. The copying process at this time is executed according to the process (7) described later. 6 (3, 2, 2) The area in which the rewrite request is requested is rewritten with new content.

(3゜2.3) ?1写相手のポインタを辿って、もう
一方の領域も新内容で書き換える。
(3°2.3)? Follow the pointer of the other person and rewrite the other area with new content.

という処理を実行する。Execute the process.

領域管理部13は、命令実行部12がら、指定される2
つのポインタの指す領域の一致性の検査処理要求である
’eQJの発行を受は取ると、(4,1)指定の2つの
ポインタの指す領域を比較して、同一領域を指していれ
ば真と判断して命令実行部12に返す。
The area management unit 13, from the instruction execution unit 12,
Upon receiving the issuance of 'eQJ, which is a processing request for checking the consistency of the areas pointed to by two pointers, (4, 1) compares the areas pointed to by the two specified pointers, and if they point to the same area, the result is true. It is returned to the instruction execution unit 12.

(4,2) (4,1)の判断で、同一領域を指してい
ないと判断するときには、いずれか一方の領域の持つ相
互ポインタ20が他方の領域を指しているか否かを比較
して、同一領域を指していれば真と判断して命令実行部
12に返す。
(4, 2) When determining in (4, 1) that they do not point to the same area, compare whether the mutual pointer 20 of one of the areas points to the other area, If they point to the same area, it is determined to be true and is returned to the instruction execution unit 12.

(4,3)それ以外は偽と判断して、命令実行部12に
返す。
(4, 3) Otherwise, it is determined to be false and returned to the instruction execution unit 12.

という処理を実行する。〔作用〕の欄で説明したように
、複写元と複写先の領域とを主従関係のない相互ポイン
タ20でもってポイントしているので、領域管理部I3
は、このN域自体の一致性検査処理を少ないオーバヘッ
ドでもって実行できるようになる。
Execute the process. As explained in the [Operation] column, since the copy source and copy destination areas are pointed by the mutual pointer 20 with no master-slave relationship, the area management unit I3
This makes it possible to execute the consistency check process for the N area itself with little overhead.

領域再利用部14は、領域管理部13からガーベジコレ
クションの起動処理要求を受は取ると、(5,1)現空
間を旧交間とし、もう1つの空間を現空間に設定する。
When the area reuse unit 14 receives a garbage collection startup processing request from the area management unit 13, it sets (5, 1) the current space as the old space and sets another space as the current space.

(5,2)走査済み領域を無しに初期設定する。(5, 2) Initialize scanned area to none.

(5,3)ルート(最も根元になる領域を指す)が指す
領域について複写処理を行う、このときの複写処理は、
後述する(7)の処理に従って実行される。
(5, 3) Copy processing is performed on the area pointed to by the root (pointing to the most root area).The copy processing at this time is as follows:
This is executed according to the process (7) described later.

(5,4)状態を“複写中1にセントする。(5,4) Set the status to “Copying 1 cent.

(5,5)ガーベジコレクションの続行処理を行う。(5, 5) Continue garbage collection processing.

このときの続行処理は、後述する(6)の処理に従って
実行される。
The continuation process at this time is executed according to the process (6) described later.

という処理を実行する。Execute the process.

領域再利用部14は、ガーベジコレクションの超勤続行
要求を受は取ると、 (6,INJI域管理部13の処理の中断時間が許容範
囲に収まるまでの回数、以下の処理を行う。
When the area reusing unit 14 receives a request to continue overtime for garbage collection, (6) performs the following process as many times as necessary until the processing interruption time of the INJI area management unit 13 falls within the allowable range.

(6,2)状態が“複写中”の場合、未走査領域を1つ
選択して次の処理を行う。
(6, 2) If the status is "copying", select one unscanned area and perform the next process.

(6,2,1)その未走査開城から指す領域を複写処理
し、新領域を指すように更新する。このときの複写処理
は、後述する(7)の処理に従って実行される。
(6, 2, 1) The area pointed from the unscanned castle is copied and updated to point to a new area. The copying process at this time is executed according to the process (7) described later.

(6,2,2)その未走査領域を走査済み領域とする。(6, 2, 2) The unscanned area is set as the scanned area.

(6,2,3)未走査領域が無くなれば、状態を”後始
末中”にセットして、全領域を未走査領域とする。
(6, 2, 3) When there are no more unscanned areas, the status is set to "cleaning up" and the entire area becomes an unscanned area.

(6,3)状態が“後始末中2の場合、未走査領域を1
つ選択して次の処理を行う。
(6, 3) If the status is “Cleaning up 2”, the unscanned area is
Select one and perform the next process.

(6,3,1)複零相手を指す相互ポインタ20を自分
自身を指すように変える。
(6, 3, 1) Change the mutual pointer 20 pointing to the multi-zero partner to point to itself.

(6,3,2)この領域を走査済み領域とする。(6, 3, 2) This area is defined as a scanned area.

(6,3,3)未走査領域が無くなった場合、ガーベジ
コレクシッン終了とする。
(6, 3, 3) When there are no more unscanned areas, garbage collection ends.

という処理を実行する。Execute the process.

領域再利用部14は、複写処理要求を受は取ると、 (7,1) (7,2) 複写要求のある領域が新空間にある場合は、何もせず、
そのままの領域のポインタを返す。
When the area reuse unit 14 receives a copy processing request, (7, 1) (7, 2) If the area with the copy request is in the new space, it does nothing,
Returns a pointer to the area as is.

複写要求のある領域が旧交間にあるが、既に複写相手を
持っている場合、複写相手へのポインタを返す。
If the area requested to be copied is in the old intersection, but already has a copy partner, a pointer to the copy partner is returned.

(7,3)その他の場合、次の処理を行う。(7, 3) In other cases, perform the following processing.

(7,3,1)新空間に領域を確保し、内容を該領域か
ら複写する。このとき、旧交間の複写元の領域にも内容
をそのまま残しておく。
(7, 3, 1) Allocate an area in the new space and copy the contents from the area. At this time, the contents are left as they are in the copy source area of the old relationship.

(7,3,2)新空間の領域は未走査領域きする。(7, 3, 2) The area of the new space is an unscanned area.

(7,3,3)複写相手との間に相互ポインタ20を設
定する。
(7, 3, 3) A mutual pointer 20 is set with the copying partner.

(7,3,4)新領域を指すポインタを返す。(7, 3, 4) Returns a pointer to the new area.

という処理を実行する。Execute the process.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば、コピー方式のガ
ーベジコレクション処理方式を実装していく場合、ガー
ベジコレクションの実行のために中断されるデータ処理
の中断時間を極めて短いものにできるようになる。これ
から、データ処理の実時間処理を損なうことなく、ガー
ベジコレクシボンを実行できるようになるのである。
As explained above, according to the present invention, when a copy-based garbage collection processing method is implemented, the interruption time of data processing that is interrupted for garbage collection execution can be made extremely short. . Now, garbage collection can be performed without compromising real-time data processing.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の原理構成図、 第2図は本発明の一實施例、 第3図はフリーリスト方式ガーベジコレクションの説明
図、 第4図はコピ一方式ガーベジコレクションの説明図であ
る。 回申、1はデータ処理装置、10はメモリ領域、11は
プログラム展開部、12は命令実行部、13は領域管理
部、14は領域再利用部、15はデータ展開域、16は
ポインタ、20は相互ポインタである。
FIG. 1 is a diagram showing the basic configuration of the present invention, FIG. 2 is a practical example of the present invention, FIG. 3 is an explanatory diagram of free list type garbage collection, and FIG. 4 is an explanatory diagram of copy one type garbage collection. 1 is a data processing device, 10 is a memory area, 11 is a program expansion unit, 12 is an instruction execution unit, 13 is an area management unit, 14 is an area reuse unit, 15 is a data expansion area, 16 is a pointer, 20 is a mutual pointer.

Claims (2)

【特許請求の範囲】[Claims] (1)メモリ空間を管理する領域管理部(13)と、該
メモリ空間を再編成する領域再利用部(14)とを備え
、該領域再利用部(14)が、メモリ空間を2つに分割
して、一方の分割空間に展開される使用中のデータ展開
域のデータを、他方の分割空間に連続的に並べて複写し
ていくことで、不使用のデータ展開域の再利用を実行す
るように構成されるデータ処理装置において、 上記領域再利用部(14)は、他方の分割空間にデータ
を複写するときに、該分割空間へのすべての複写処理が
終了するまでの間、複写元のデータ展開域にも同一デー
タを残すように構成するとともに、複写元のデータ展開
域と複写先のデータ展開域との間にポインタ(16)を
設定するよう構成し、かつ、上記領域管理部(13)は
、データを書き換えるときには、該データを展開するデ
ータ展開域の持つ上記ポインタ(16)の指すデータ展
開域についても同一データに従って書き換えていくとと
もに、2つのデータ展開域の一致性の検査処理を行うと
きには、該データ展開域の持つ上記ポインタ(16)の
指すデータ展開域を考慮して一致性の検査処理を実行し
ていくように構成されてなることを、特徴とするガーベ
ジコレクション処理方式。
(1) An area management unit (13) that manages a memory space, and an area reuse unit (14) that reorganizes the memory space, and the area reuse unit (14) divides the memory space into two. The unused data expansion area can be reused by dividing the data in the currently used data expansion area and expanding it into one divided space, and then sequentially arranging and copying the data in the other divided space. In the data processing device configured as follows, when copying data to the other divided space, the area reusing unit (14) stores data from the copy source until all copy processing to the divided space is completed. The same data is left in the data development area of the copy source, and a pointer (16) is set between the data development area of the copy source and the data development area of the copy destination, and the area management unit (13) When rewriting data, the data expansion area pointed to by the pointer (16) of the data expansion area that expands the data is also rewritten according to the same data, and the consistency of the two data expansion areas is checked. Garbage collection processing characterized in that when performing the processing, a consistency check process is executed in consideration of the data development area pointed to by the pointer (16) of the data development area. method.
(2)請求項(1)記載のガーベジコレクション処理方
式において、 複写元のデータ展開域と複写先のデータ展開域との間に
設定されるポインタ(16)が、主従の関係を持たない
で相互に相手方のデータ展開域を指す相互ポインタでも
って構成され、 領域管理部(13)は、2つのデータ展開域の一致性の
検査処理を行うときにあって、検査要求のある2つのデ
ータ展開域が同一のデータ展開域でないと判断するとき
には、いずれか一方のデータ展開域の持つ上記相互ポイ
ンタを特定して、その特定された相互ポインタの指すデ
ータ展開域と、検査要求のある残りのデータ展開域とが
同一のデータ展開域であるのか否かを検査していくこと
で、検査要求のある2つのデータ展開域の一致性の判断
処理を実行していくよう構成されてなることを、特徴と
するガーベジコレクション処理方式。
(2) In the garbage collection processing method according to claim (1), the pointers (16) set between the data expansion area of the copy source and the data expansion area of the copy destination are mutually connected without having a master-slave relationship. The area management unit (13) is configured with a mutual pointer that points to the other party's data expansion area, and when performing a consistency check process between two data expansion areas, the area management unit (13) When it is determined that the two data expansion areas are not the same data expansion area, the above mutual pointer of either data expansion area is specified, and the data expansion area pointed to by the specified mutual pointer and the remaining data expansion area for which inspection is requested are performed. The present invention is characterized in that it is configured to execute a process of determining the consistency of two data expansion areas for which inspection is requested by checking whether or not the two data expansion areas are the same data expansion area. garbage collection processing method.
JP27562490A 1990-10-15 1990-10-15 Method for processing garbage collection Pending JPH04149751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27562490A JPH04149751A (en) 1990-10-15 1990-10-15 Method for processing garbage collection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27562490A JPH04149751A (en) 1990-10-15 1990-10-15 Method for processing garbage collection

Publications (1)

Publication Number Publication Date
JPH04149751A true JPH04149751A (en) 1992-05-22

Family

ID=17558049

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27562490A Pending JPH04149751A (en) 1990-10-15 1990-10-15 Method for processing garbage collection

Country Status (1)

Country Link
JP (1) JPH04149751A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005045683A1 (en) * 2003-11-05 2005-05-19 Electronics And Telecommunications Research Institute Apparatus and method for garbage collection

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005045683A1 (en) * 2003-11-05 2005-05-19 Electronics And Telecommunications Research Institute Apparatus and method for garbage collection
GB2423172A (en) * 2003-11-05 2006-08-16 Korea Electronics Telecomm Apparatus and method for garbage collection
GB2423172B (en) * 2003-11-05 2007-02-28 Korea Electronics Telecomm Apparatus and method for garbage collection
US7797498B2 (en) 2003-11-05 2010-09-14 Electronics And Telecommunications Research Institute Apparatus and method for garbage collection

Similar Documents

Publication Publication Date Title
US6430580B1 (en) Method of replication-based garbage collection in a multiprocessor system
JP5021677B2 (en) Managing state with delta pager
US7107294B2 (en) Method and apparatus for interrupting updates to a database to provide read-only access
US5418940A (en) Method and means for detecting partial page writes and avoiding initializing new pages on DASD in a transaction management system environment
KR100404555B1 (en) Data processor storage systems with dynamic resynchronization of mirrored logical data volumes subsequent to a storage system failure
JP2778786B2 (en) Data update / restoration processing method
KR100238925B1 (en) A recoverable disk control system with a non-volatile memory
US20100030959A1 (en) Snapshot system
US20040236793A1 (en) Transactional file system for realizing atomic update of plural files by transactions
KR970022782A (en) Systems and methods for managing distributed object resources
US5504857A (en) Highly available fault tolerant relocation of storage with atomicity
KR20060044631A (en) Communication-link-attached persistent memory system
JPH08129457A (en) Method and apparatus for expansion,reduction and redistribution of external storage structure
JPH05250191A (en) Digital data processor having improved check point and branch operations
JPH0279141A (en) Virtual index mechanism
KR970016917A (en) Method and system for updating mass storage configuration records
US4779191A (en) Method and apparatus for expanding the address space of computers
JPH05134812A (en) Method and apparatus for controlling memory device in mirror mode
US5758339A (en) Method of identifying shared and unshared information using system chapters, a sysplex chapter, a table of contents, and a header
US8082402B2 (en) System and method for using virtual memory for redirecting auxiliary memory operations
JPH04149751A (en) Method for processing garbage collection
US7107404B2 (en) Method and system for data processing for controlling a cache memory
JPH07201190A (en) Nonvolatile memory file system
JPH0644129A (en) Information processor
JPH06161864A (en) Object storage managing method