JP2762467B2 - Computer system - Google Patents

Computer system

Info

Publication number
JP2762467B2
JP2762467B2 JP63184876A JP18487688A JP2762467B2 JP 2762467 B2 JP2762467 B2 JP 2762467B2 JP 63184876 A JP63184876 A JP 63184876A JP 18487688 A JP18487688 A JP 18487688A JP 2762467 B2 JP2762467 B2 JP 2762467B2
Authority
JP
Japan
Prior art keywords
storage area
garbage collection
collection device
references
garbage
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.)
Expired - Fee Related
Application number
JP63184876A
Other languages
Japanese (ja)
Other versions
JPH0233635A (en
Inventor
均 勝田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP63184876A priority Critical patent/JP2762467B2/en
Publication of JPH0233635A publication Critical patent/JPH0233635A/en
Application granted granted Critical
Publication of JP2762467B2 publication Critical patent/JP2762467B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ガーベッジコレクション装置を有する計算
機システムに関する。
Description: TECHNICAL FIELD The present invention relates to a computer system having a garbage collection device.

〔従来の技術〕[Conventional technology]

従来の計算機システムには、メモリ装置に残ってい
る、エラーのために無意味になったデータや、使用済み
になったデータ等のガーベッジを回収するガーベッジコ
レクション装置を有しているものがある。このガーベッ
ジコレクション装置によりメモリ装置からガーベッジを
回収することによって、メモリ装置に大きな空き領域を
確保し、当該メモリ装置の有効利用を図るようにしてい
る。
Some conventional computer systems include a garbage collection device that collects garbage, such as data that has become meaningless due to an error or data that has been used, remaining in a memory device. By collecting garbage from the memory device by the garbage collection device, a large empty area is secured in the memory device, and the memory device is effectively used.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

ところが上記従来の計算機システムでは、システム内
に1つのガーベッジコレクション装置を有しているのみ
で、そのガーベッジコレクション装置は、ユーザの対話
的な操作を妨げないだけの速い処理速度で、ガーベッジ
コレクションを実行しているため、メモリ装置に残って
いるガーベッジを確実に回収することができないことが
あった。
However, in the above-described conventional computer system, only one garbage collection device is provided in the system, and the garbage collection device executes garbage collection at a high processing speed that does not hinder the interactive operation of the user. As a result, the garbage remaining in the memory device may not be reliably collected.

このため、メモリ装置には、ガーベッジが多く残って
しまうことになり、当該メモリ装置の記憶容量不足によ
って、計算機システムのシステム動作が異常停止してし
まうという欠点がある。
For this reason, a large amount of garbage remains in the memory device, and the system operation of the computer system is abnormally stopped due to insufficient storage capacity of the memory device.

本発明は上記欠点を解消し、メモリ装置から確実にガ
ーベッジを回収することにより、システム動作の異常停
止を防止することのできる計算機システムを提供するこ
とを目的とする。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a computer system which solves the above-mentioned drawbacks and can prevent abnormal stop of the system operation by reliably collecting garbage from a memory device.

〔課題を解決するための手段および作用〕[Means and actions for solving the problem]

本発明は、所定量のデータと該データの参照回数とを
記憶する複数の記憶領域からなる記憶装置と、前記参照
回数に基づいて前記記憶装置のガーベッジコレクション
を行うガーベッジコレクション装置とを有する計算機シ
ステムにおいて、前記記憶領域への参照が生じたならば
該記憶領域の参照回数を加算し、前記記憶領域への参照
が消滅したならば該記憶領域の参照回数を減じ、前記記
憶装置のガーベッジコレクションを行う時点で前記参照
回数が0となる記憶領域を回収する第1のガーベッジコ
レクション装置と、前記記憶装置のガーベッジコレクシ
ョンを行う時点で、前記記憶領域の各参照回数をリセッ
トし、所定の記憶領域から順次前記記憶領域が参照する
記憶領域をたどって各記憶領域の参照回数を加算し、参
照回数が0に維持された記憶領域を回収する第2のガー
ベッジコレクション装置と、前記第1のガーベッジコレ
クション装置を起動して参照回数が0の空き記憶領域を
監視し、所望の書き込みデータが前記空きの記憶領域に
格納できない場合には、前記第2のガーベッジコレクシ
ョン装置を起動するメモリ管理装置とを具備することを
特徴とする。
The present invention provides a computer system comprising: a storage device including a plurality of storage areas for storing a predetermined amount of data and a reference count of the data; and a garbage collection device that performs garbage collection of the storage device based on the reference count. In the above, if the reference to the storage area occurs, the number of references to the storage area is added, and if the reference to the storage area disappears, the number of references to the storage area is reduced, and the garbage collection of the storage device is performed. A first garbage collection device that collects a storage area in which the number of references becomes 0 at the time of performing, and resets each number of references of the storage area at the time of performing garbage collection of the storage device, and resets a predetermined storage area. The number of references of each storage area is sequentially added by following the storage areas referenced by the storage areas, and the number of references is maintained at 0 A second garbage collection device for reclaiming the storage area, and a first garbage collection device, which start up the first garbage collection device, monitor the free storage area having a reference count of 0, and cannot store desired write data in the free storage area. In this case, a memory management device for activating the second garbage collection device is provided.

このため、所望の書き込みデータが第1のガーベッジ
コレクション装置が回収した記憶領域よりも大きな場合
には、第2のガーベッジコレクション装置を起動して記
憶領域を確保することができる。
Therefore, when the desired write data is larger than the storage area collected by the first garbage collection device, the second garbage collection device can be activated to secure the storage area.

〔実施例〕〔Example〕

以下、本発明に係る計算機システムの実施例を添附図
面を参照して説明する。
Hereinafter, embodiments of a computer system according to the present invention will be described with reference to the accompanying drawings.

第1図は本発明に係る計算機システムの一実施例を示
す要部概略構成図である。同図において、計算機システ
ムは、メモリ装置11と、ガーベッジコレクション装置12
おび13と、メモリ監視装置14とを有している。
FIG. 1 is a schematic diagram of a main part showing an embodiment of a computer system according to the present invention. In the figure, the computer system comprises a memory device 11 and a garbage collection device 12
And a memory monitoring device 14.

メモリ装置11は、第2図に示すように、各記憶領域毎
にデータを格納するデータ部11aと、各記憶領域毎に後
述するカウンタ値を記憶するリファレンスカウンタ11b
とを有している。
As shown in FIG. 2, the memory device 11 includes a data section 11a for storing data for each storage area, and a reference counter 11b for storing a counter value described later for each storage area.
And

ガーベッジコレクション装置12は、記憶領域への参照
が生じた際に、該記憶領域の対応するリファレンスカウ
ンタ11bをカウントアップするとともに、記憶領域への
参照が消滅した際に、該記憶領域に対応するリファレン
スカウンタ11bをカウントダウンし、カウント値が
「0」になったとき該当する記憶領域におけるガーベッ
ジを回収する ガーベッジコレクション装置13は、初めに全てのリフ
ァレンスカウンタ11bのカウント値を「0」にリセット
した後、ルートとなる記憶領域から、その参照している
記憶領域をたどり、該参照過程でたどった記憶領域のリ
ファレンスカウンタ11bをカウントアップする。次にガ
ーベッジコレクション装置13は、リファレンスカウンタ
11bのカウント値が「0」になっている全ての記憶領域
におけるガーベッジを回収する。なお、実施例では、ガ
ーベッジコレクション装置12は、ユーザの対話的な操作
を妨げないだけの速度でガーベッジコレクションを実行
するように設定され、かつ、ガーベッジコレクション装
置13の処理速度(例えば、アクセス時間6sec)より速い
処理速度(例えば、アクセス時間30msec)に設定されて
いる。
The garbage collection device 12 counts up a reference counter 11b corresponding to the storage area when a reference to the storage area occurs, and, when the reference to the storage area disappears, a reference corresponding to the storage area. The garbage collection device 13 counts down the counter 11b and collects garbage in the corresponding storage area when the count value becomes "0" .The garbage collection device 13 first resets the count values of all the reference counters 11b to "0". From the root storage area, the storage area being referred to is traced, and the reference counter 11b of the storage area traced in the reference process is counted up. Next, the garbage collection device 13 uses a reference counter.
The garbage in all the storage areas where the count value of 11b is “0” is collected. In the embodiment, the garbage collection device 12 is set to execute the garbage collection at a speed that does not hinder the interactive operation of the user, and the processing speed of the garbage collection device 13 (for example, the access time is 6 seconds). ) Is set to a faster processing speed (for example, access time 30 msec).

メモリ監視装置14は、メモリ装置11にデータが格納さ
れていない空きの記憶領域、つまりリファレンスカウン
タ11bのカウント値が「0」になっている記憶領域を常
時監視しており、その監視結果に応じて、上記ガーベッ
ジコレクション装置12あるいはガーベッジコレクション
装置13のうちいずれか一方の装置を起動させる。
The memory monitoring device 14 constantly monitors an empty storage area in which no data is stored in the memory device 11, that is, a storage area in which the count value of the reference counter 11b is “0”. Then, one of the garbage collection device 12 and the garbage collection device 13 is started.

次に、上記計算機システムにおけるガーベッジコレク
ション動作を第3図のフローチャートに基づき説明す
る。
Next, the garbage collection operation in the computer system will be described with reference to the flowchart of FIG.

計算機システムがシステム動作すると(ステップ2
0)、メモリ監視装置14は、常時、メモリ装置11の空き
の記憶領域(つまり、リファレンスカウンタ11bのカウ
ント値が「0」になっている記憶領域)を監視するとと
もに、ガーベッジコレクション装置12を起動させ、メモ
リ装置11に残っているガーベッジを回収させる(ステッ
プ21)。
When the computer system operates (Step 2
0), the memory monitoring device 14 constantly monitors an empty storage area of the memory device 11 (that is, a storage area in which the count value of the reference counter 11b is “0”) and starts the garbage collection device 12. Then, the garbage remaining in the memory device 11 is collected (step 21).

メモリ装置11の空きの記憶領域に、新たな記憶領域の
割付けが発生した場合、つまり書込みたいデータがある
場合、メモリ監視装置14は、メモリ装置11の空きの記憶
領域と、書込みたいデータのデータ量とを比較して、当
該書込みたいデータがメモリ装置11の空きの記憶領域に
格納できるか否かを判断し(ステップ22)、格納できる
場合には、ガーベッジコレクション装置12に対して処理
を継続させる。
When a new storage area is allocated to an empty storage area of the memory device 11, that is, when there is data to be written, the memory monitoring device 14 stores the empty storage area of the memory device 11 and the data of the data to be written. It is determined whether the data to be written can be stored in an empty storage area of the memory device 11 by comparing the amount (step 22). If the data can be stored, the process is continued for the garbage collection device 12. Let it.

一方、ガーベッジコレクション装置12によって回収さ
れなかったガーベッジがメモリ装置11に多く残り、当該
メモリ装置11の空きの記憶領域に、書込みたいデータを
格納できないと判断したメモリ監視装置14は、ガーベッ
ジコレクション装置12を待機状態にさせ、代わってガー
ベッジコレクション装置13を起動させて、ガーベッジコ
レクション装置12によって回収されなかったガーベッジ
を回収させる(ステップ23)。
On the other hand, a large amount of garbage that has not been collected by the garbage collection device 12 remains in the memory device 11, and the memory monitoring device 14 that has determined that the data to be written cannot be stored in an empty storage area of the memory device 11, the garbage collection device 12 Is put into a standby state, and instead, the garbage collection device 13 is activated, and garbage not collected by the garbage collection device 12 is collected (step 23).

これにより、メモリ装置11は、大きな空きの記憶領域
を有することになり、データを格納することができるこ
とになる。
As a result, the memory device 11 has a large empty storage area, and can store data.

またガーベッジコレクション装置13がガーベッジコレ
クション処理を終了すると、メモリ監視装置14は、ステ
ップ20にもどり、このステップ以降を実行する、すなわ
ち、ガーベッジコレクション装置13を待機状態にし、代
わってガーベッジコレクション装置12を起動させる。
When the garbage collection device 13 finishes the garbage collection process, the memory monitoring device 14 returns to step 20 and executes the steps after this step, that is, puts the garbage collection device 13 into a standby state, and starts the garbage collection device 12 instead. Let it.

なお、上記実施例では、ガーベッジコレクション装置
13(遅いガーベッジコレクション)は、メモリ装置11に
対する新しい記憶領域の割付け要求があった際に、メモ
リ監視装置14の判断結果に応じて、ガーベッジコレクシ
ョンを実行するようにしたが、本発明はこれに限定され
ることなく、予め設定されたタイミングで定期的にガー
ベッジコレクションを実行するようにしても良い。
In the above embodiment, the garbage collection device
13 (slow garbage collection) executes garbage collection in response to the judgment result of the memory monitoring device 14 when a request for allocating a new storage area to the memory device 11 is made. Without being limited, garbage collection may be executed periodically at a preset timing.

上記実施例によれば、ガーベッジコレクション装置12
によって回収されなかったガーベッジを、ガーベッジコ
レクション装置13によって回収するようにしたので、メ
モリ装置11にガーベッジが残るようなことはなく、メモ
リ装置11を有効に利用することができる。また、ガーベ
ッジがたまってメモリ装置11がメモリ不足となるような
ことが極めて少ないので、計算機システムのシステム動
作が異常停止するのを最小限に抑えることができる。
According to the above embodiment, the garbage collection device 12
The garbage that has not been collected by the garbage collector 13 is collected by the garbage collection device 13, so that garbage does not remain in the memory device 11, and the memory device 11 can be used effectively. Moreover, since it is extremely unlikely that the memory device 11 runs out of memory due to accumulation of garbage, abnormal stop of the system operation of the computer system can be minimized.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明によれば、第1のガーベ
ッジコレクション装置によって回収されなかった記憶装
置に残っているガーベッジを、第2のガーベッジコレク
ション装置で回収するよう構成したので、記憶装置上の
不要なガーベッジを低減し、記憶装置を有効利用するこ
とができる。
As described above, according to the present invention, garbage remaining in the storage device that has not been collected by the first garbage collection device is configured to be collected by the second garbage collection device. Unnecessary garbage can be reduced, and the storage device can be used effectively.

また、記憶装置にガーベッジが多く残ることが極めて
少ないため、当該記憶装置のメモリ不足による計算機シ
ステムの異常停止を最小限に抑えることが可能となる。
In addition, since it is extremely unlikely that a large amount of garbage remains in the storage device, it is possible to minimize the abnormal stop of the computer system due to a shortage of memory in the storage device.

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

第1図は本発明に係る計算機システムの一実施例を示す
要部概略構成図、第2図はメモリ装置を示す概略構成
図、第3図は第1図に示した計算機システムにおけるガ
ーベッジコレクション動作を示すフローチャートであ
る。 11……メモリ装置、12、13……ガーベッジコレクション
装置、14……メモリ監視装置。
FIG. 1 is a schematic configuration diagram of a main part showing an embodiment of a computer system according to the present invention, FIG. 2 is a schematic configuration diagram showing a memory device, and FIG. 3 is a garbage collection operation in the computer system shown in FIG. It is a flowchart which shows. 11 ... memory device, 12, 13 ... garbage collection device, 14 ... memory monitoring device.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】所定量のデータと該データの参照回数とを
記憶する複数の記憶領域からなる記憶装置と、前記参照
回数に基づいて前記記憶装置のガーベッジコレクション
を行うガーベッジコレクション装置とを有する計算機シ
ステムにおいて、 前記記憶領域への参照が生じたならば該記憶領域の参照
回数を加算し、前記記憶領域への参照が消滅したならば
該記憶領域の参照回数を減じ、前記記憶装置のガーベッ
ジコレクションを行う時点で前記参照回数が0となる記
憶領域を回収する第1のガーベッジコレクション装置
と、 前記記憶装置のガーベッジコレクションを行う時点で、
前記記憶領域の各参照回数をリセットし、所定の記憶領
域から順次前記記憶領域が参照する記憶領域をたどって
各記憶領域の参照回数を加算し、参照回数が0に維持さ
れた記憶領域を回収する第2のガーベッジコレクション
装置と、 前記第1のガーベッジコレクション装置を起動して参照
回数が0の空き記憶領域を監視し、所望の書き込みデー
タが前記空きの記憶領域に格納できない場合には、前記
第2のガーベッジコレクション装置を起動するメモリ管
理装置と を具備することを特徴とする計算機システム。
1. A computer comprising: a storage device including a plurality of storage areas for storing a predetermined amount of data and a reference count of the data; and a garbage collection device that performs garbage collection of the storage device based on the reference count. In the system, if a reference to the storage area occurs, the number of references to the storage area is added, and if the reference to the storage area disappears, the number of references to the storage area is reduced, and the garbage collection of the storage device is performed. A garbage collection device that collects a storage area in which the number of references becomes 0 at the time of performing the garbage collection;
The number of references of the storage area is reset, the storage area sequentially referred to by the storage area is sequentially traced from a predetermined storage area, the number of references of each storage area is added, and the storage area in which the number of references is maintained at 0 is collected. Activating the first garbage collection device and monitoring the free storage area where the reference count is 0, and if desired write data cannot be stored in the free storage area, A memory management device for activating a second garbage collection device.
JP63184876A 1988-07-25 1988-07-25 Computer system Expired - Fee Related JP2762467B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63184876A JP2762467B2 (en) 1988-07-25 1988-07-25 Computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63184876A JP2762467B2 (en) 1988-07-25 1988-07-25 Computer system

Publications (2)

Publication Number Publication Date
JPH0233635A JPH0233635A (en) 1990-02-02
JP2762467B2 true JP2762467B2 (en) 1998-06-04

Family

ID=16160861

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63184876A Expired - Fee Related JP2762467B2 (en) 1988-07-25 1988-07-25 Computer system

Country Status (1)

Country Link
JP (1) JP2762467B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63231643A (en) * 1987-03-20 1988-09-27 Fujitsu Ltd Real-time garbage collection system

Also Published As

Publication number Publication date
JPH0233635A (en) 1990-02-02

Similar Documents

Publication Publication Date Title
US4849879A (en) Data processor performance advisor
US5062055A (en) Data processor performance advisor
US20020156939A1 (en) Method and apparatus to monitor the run state of a multi-partitioned computer system
JP2002041304A (en) Automatic imparting method of backup resource of logical section and logical section based computer system
US5640604A (en) Buffer reallocation system
JPH07117863B2 (en) Online system restart method
JPH0423144A (en) Journal system
US7840725B2 (en) Capture of data in a computer network
JPS6363933B2 (en)
CN114564284A (en) Data backup method of virtual machine, computer equipment and storage medium
EP1652086B1 (en) Kernel-level method of flagging problems in applications
JP2762467B2 (en) Computer system
CN116127494A (en) Control method and related device for concurrent access of users
US20070234114A1 (en) Method, apparatus, and computer program product for implementing enhanced performance of a computer system with partially degraded hardware
CN111125070A (en) Data exchange method and platform
JPH09179754A (en) Task monitoring device and its method
JP2003223335A (en) Out-sourcing system, out-sourcing method, and program for out-sourcing
JPS6336538B2 (en)
CN113742381B (en) Cache acquisition method, device and computer readable medium
JPH0619858A (en) Automatic return system for common resources
JPH06243011A (en) Automatic maintenance system for data base
JPS63141148A (en) Automatic release control system for shared data area
JP2001282553A (en) Multithread control method, multithread controller, recording medium and program
JP2734088B2 (en) Logging file processing method
JPH0764811A (en) Computer backup system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees