JPS60221847A - Adaptive garbage collection system - Google Patents

Adaptive garbage collection system

Info

Publication number
JPS60221847A
JPS60221847A JP7807684A JP7807684A JPS60221847A JP S60221847 A JPS60221847 A JP S60221847A JP 7807684 A JP7807684 A JP 7807684A JP 7807684 A JP7807684 A JP 7807684A JP S60221847 A JPS60221847 A JP S60221847A
Authority
JP
Japan
Prior art keywords
memory
data
area
garbage collection
data type
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
JP7807684A
Other languages
Japanese (ja)
Inventor
Masashi Niwa
雅司 丹羽
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 JP7807684A priority Critical patent/JPS60221847A/en
Publication of JPS60221847A publication Critical patent/JPS60221847A/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

Landscapes

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

Abstract

PURPOSE:To improve a memory utilization factor, and to reduce the frequency of garbage collection by distributing and assigning a main storage in accordance with a memory consumption quantity with regard to each data type. CONSTITUTION:An arithmetic processing, interchange of a data to a main storage 2, and interchange of a data to an I/O control device under the control of a channel are executed at a main arithmetic part 1 of a data control device. Also, in order to control a garbage collector system, a useful data and a useless data are distributed and compressed by using a memory compressing circuit 8, and the useful data is shunted to a safe area. Also, an area is reassigned by controlling a memory size register 3 for designating a size of each area which has distributed each area of the storage 2 to each data type. Subsequently, the assignment of the area is determined by controlling a memory scanning circuit 4 for executing an access to a memory consumption quantity counter 5, memory consumption quantity forecasting circuit 6, the previous forecasting quantity holding circuit 7 and the storage 2.

Description

【発明の詳細な説明】 く分野) 本発明はデータ処理装置におけるガーベジコレクション
に係り、特に対象となるメモリの中をデて互換利用出来
ない)各種のデータ領域に分割した形式で利用するガー
ベジコレクタを有するデータ処理装置における各メモリ
領域に対する領域分配制御に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to garbage collection in data processing devices, and in particular to a garbage collector that divides the target memory into various data areas (which cannot be used interchangeably). The present invention relates to area distribution control for each memory area in a data processing device having.

〈従来技術と背景) 従来のこうしたデータ処理装置におけるガーベジコレク
ションにおいては、データ処理をさせるために使用する
プログラムの形式毎に、またよりこまかくは対象として
あつかう仕事毎に各データタイプ別に見たメモリ消費量
が異ることはある程度気付いた人もいるのであろうが、
通常こうしてメモリサイズの割り付けは固定であってど
れか一つのデータタイプに割付けたメモリ領域が−ばい
になることによりガーベジコレクトが起動されるので割
り付けが適当でないと、どれかネックになるデータタイ
プに対応する領域がフルになるたびに、他の領域はかな
り未だ空いた状態でガーベジコレクションを行うことに
なり、回数も頻繁になってデータ処理を実行する効率を
低下させると云う問題があった。なお、こうした効率を
低下させないためには割り付は配分をうまく行い、メモ
リ消費量に合わせて割り付けることが出来れば良いのだ
が、汎用のデータ処理装置では、仕事も使用プログラム
も限定出来ず、あらかじめ予測しておいて各データタイ
プに対するメモリサイズを最適に決定すること、すなわ
ち割り付けることは条件側が不確定であるため固定では
困難であった。
<Prior art and background> In conventional garbage collection in such data processing devices, memory consumption is calculated for each type of program used for data processing, or more specifically for each type of data for each task handled. Some people may have noticed that the amounts are different, but
Normally, the memory size allocation is fixed, and garbage collection is activated when the memory area allocated to any one data type becomes empty, so if the allocation is inappropriate, some data type will cause a bottleneck. There is a problem in that each time the corresponding area becomes full, garbage collection is performed while other areas are still quite empty, which increases the frequency of garbage collection and reduces the efficiency of data processing. Note that in order to avoid such a drop in efficiency, it would be good if the allocation could be done well and allocated according to the amount of memory consumed, but with general-purpose data processing equipment, it is not possible to limit the work or the programs used, and it is necessary to allocate the allocation in advance. It has been difficult to predict and optimally determine the memory size for each data type, that is, to allocate it, because the conditions are uncertain.

く目的と特徴〉 本発明の目的は上記にかんがみメモリサイズの割り付け
をアダプティブに行うことによりメモリの利用効率を向
上させてガーベジコレクトの起動回数を少くし、したが
ってデータ処理効率を向上させる方法を提供することに
あり、本発明の目的は上記目的を実現するため、ガーベ
ジコレクタを有しガーベジコレクシコン制御を行う情報
処理において、管理対象としての各データタイプ別に割
り付けた領域サイズを設定する手段と各データタイプ別
にメモリ消費量を監視する手段と、少くとも前回のガー
ベジコレクション時における各データタイプ別のメモリ
消費量を記憶する手段とこれらの制御手段を有し、ある
時点でガーベジコレクションが実行された際に、次の領
域サイズの配分設定を今回および又は過去のメモリ消費
量のデータより外挿予測して分配設定することである。
Purpose and Features> In view of the above, an object of the present invention is to provide a method of adaptively allocating memory size to improve memory usage efficiency and reduce the number of garbage collection activations, thereby improving data processing efficiency. In order to achieve the above object, an object of the present invention is to provide a means for setting an allocated area size for each data type to be managed in information processing that has a garbage collector and performs garbage collector control. A means for monitoring memory consumption by data type, a means for storing memory consumption by each data type at least at the time of the previous garbage collection, and a means for controlling these, and the garbage collection is performed at a certain point in time. In this case, the distribution setting for the next area size is performed by extrapolating and predicting the current and/or past memory consumption data.

すなわち本発明は外挿型式での対応であるが割り付けた
メモリサイズに比してメモリ消費量の大きいデータタイ
プについては次回の分のメモリサイズを拡大し、小さい
分の方は縮小すると云う対応処理をガーベジコレクトの
たびに行うことである。
In other words, the present invention uses an extrapolation method, but for data types that consume a large amount of memory compared to the allocated memory size, the memory size for the next time is expanded, and for data types that are smaller than the allocated memory size, it is reduced. This is done every time garbage collection is performed.

〈実施例) 図は本発明の一実施例の説明図である。なを図はカーベ
ジコレクタとコレクションの対象となるメインストレー
ジ(MS)2−tのまわりの構成を示すものでデータ処
理装置の主演算部(CPU)1は演算処理、MS2に対
するデータのやりとり、チャネルの制御によるI10装
置とのデータのやりとりの外に、ガーベジコレクタ系の
制御、すなはちメモリ圧縮回路8をつかって有用データ
と不用データをふりわけ圧縮して有用データを安全な領
域にたいひさせるとともにMS2の領域を各データタイ
プ別に分配した各領域の大きさく領域番地)を指定する
メモリサイズレジスタ3を制御し領域の再割りイ」げを
行う。そしてこの割りf]けを決定するためメモリ消費
量カウンタ5.メモリ消費量予測回路6.前回の予測値
保持回路7を制御するとともに演算処理のため、MS2
をアクセスするためのメモリスキャン回路4.ガーベジ
コレクションを行い領域分割外挿予測値に領域を分割し
たあとMS2内のクリアされた再利用可能な領域と未だ
利用する有用データの格納領域を編集するメモリ圧縮回
路8を制御している。以上の構成において、まず最初に
メモリサイズレジスタ3をセットして各データタイプ毎
のメモリサイズを決定してMS2を分割した状態でデー
タ処理を進行させると、処理の進行とともに、MS2が
アクセスされ空き領域が利用されていく実績は、メモリ
スキャン回路4を経由してメモリ消費量カウンタ5で各
データタイプ別にメモリを消費した量(実績)をカウン
トしており、この値とメモリサイズレジスタ3の値を比
較し、いづれががフルに達したらガーベジコレクション
を行い、不要データはメモリ圧縮回路8でクリアし、ま
た有用データは再編集してその後の処理をつづけるので
あるが、本実施例ではフルになってガーベジコレクショ
ン作業を行うたびにメモリ消費量予測回路6において、
メモリ消費量カウンタ5に蓄積した消費実績と、前回の
予測値を保持していた予測値保持回路7の記憶していた
前回の配分値をもとにして各データタイプ毎にメモリ消
費量の予測値を作成し、作成した値を予測値保持回路7
に保持するとともに作成した値でメモリサイズレジスタ
3でセットして領域の再配分を行うわけである。なを本
当の最初はメモリサイズレジスタ3の値と予測値保持回
路7の値はメモリサイズレジスタと同じくあらがしめ適
当に定めた値にセットしておくものとする。
<Embodiment> The figure is an explanatory diagram of an embodiment of the present invention. The figure shows the configuration around the garbage collector and the main storage (MS) 2-t that is the object of collection. In addition to exchanging data with the I10 device by controlling the channel, it also controls the garbage collector system, that is, uses the memory compression circuit 8 to separate and compress useful data and unnecessary data, and to store useful data in a safe area. At the same time, it controls the memory size register 3 which specifies the size (area address) of each area in which the area of MS2 is distributed according to each data type, thereby re-allocating the area. To determine this allocation, a memory consumption counter 5. Memory consumption prediction circuit 6. MS2 controls the previous predicted value holding circuit 7 and performs arithmetic processing.
Memory scan circuit for accessing 4. It controls a memory compression circuit 8 that edits cleared reusable areas and storage areas for useful data that are still to be used in the MS 2 after performing garbage collection and dividing the area into area division and extrapolated predicted values. In the above configuration, if you first set the memory size register 3 to determine the memory size for each data type and proceed with data processing with MS2 divided, as the processing progresses, MS2 will be accessed and become free. The actual amount of memory consumed by each data type is counted by the memory consumption counter 5 via the memory scan circuit 4, and the actual amount of memory used is calculated using this value and the value of the memory size register 3. are compared, and when either of them is full, garbage collection is performed, unnecessary data is cleared by the memory compression circuit 8, useful data is re-edited, and subsequent processing is continued. Every time garbage collection is performed, the memory consumption prediction circuit 6
The memory consumption is predicted for each data type based on the consumption record accumulated in the memory consumption counter 5 and the previous allocation value stored in the predicted value holding circuit 7 that held the previous predicted value. Create a value and store the created value in the predicted value holding circuit 7
The memory size register 3 is held at the same time as the created value and set in the memory size register 3 to reallocate the area. Actually, initially, the value of the memory size register 3 and the value of the predicted value holding circuit 7 are set to appropriately determined values in the same way as the memory size register.

そしてこの様な制御を行うとガーベジコレクシコンが作
動するたびに実績に応じて配分がアダプティブに更新さ
れてゆくので完全に同時にフルになるとは云わないまで
も、配分が消費量に合わせて均等化されてメモリの利用
効率が上がり(作業回数が減少し)データ処理効率が向
上するわけである。
With this kind of control, the distribution will be adaptively updated according to the actual performance each time the garbage collector operates, so even if it is not full at the same time, the distribution will be equalized according to the consumption amount. This increases memory usage efficiency (reduces the number of operations) and improves data processing efficiency.

なをメモリ消費量予測回路の予測外挿演算作業の内容に
ついてより具体的に例示するとMS2の全体のサイズ(
領域の大きさ)をM、各データタイプ毎のメモリ消費量
の実績値(メモリ消′R量カウンタ5で数えた値)を夫
夫U(J)iとし、対応するメモリ消費量の予測値をし
U(jliとし対応するアクチブな(有用なデータをた
くねえた)メモリセル量をa (jl iと定義し、サ
フィックスのjは分配の版数、サフィックスiは夫々の
データタイプを示すものと定義し、さらにパラメータと
して外挿の追従変化の程度を示す平滑化係数をα(0≦
α≦1)安全係数をβ(β≧0)と定義するとメモリ消
RIM予測回路6では予測値保持回路7に保持していた
前回の予測値U(jl)iと今回の実績値LJ(j)i
を用いてU(j)i=α・U(j)i+(1−α)・U
(j−1)iをめる演算を行ない、これらの比に対応さ
せてアクティブでない再利用する領域を分配するため、
外挿パラメータt(jlをtO)−(M−(1+β)・
苓a(J)i)/苓UU)iの形式の演算でめ、これら
のめた値をもとにアクチブセルと再利用セルを含めた各
データタイプ別の配分メモリセル量5(j)iを、5(
j)i−(1+β)・a fj) i + t (J)
・U(jliの形式の演算でめ、この値を予測値保持回
路7に記憶させるとともに、メモリサイズレジスタ3に
セットして、あらたに割り付げされた夫々の領域に有用
データを戻してガーベジコレクションの作業と、領域再
分配が完了する。なを上記パラメータについてはαにつ
いては同一のプログラムで同一のあるいは類似の仕事を
する間に次第に分配はある値におちついて来るので、初
期セントで0.5あとは0.1程度、安全係数βについ
ては0.5以上の値を取っておけばまず実用上さしつか
えない。
To give a more specific example of the contents of the predictive extrapolation operation of the memory consumption prediction circuit, the overall size of MS2 (
The actual value of memory consumption for each data type (the value counted by memory consumption counter 5) is U(J)i, and the corresponding predicted value of memory consumption is Let U(jli be the corresponding amount of active (stored useful data) memory cells and define it as a(jl i, where the suffix j is the distribution version number and the suffix i indicates the respective data type. In addition, α (0≦
α≦1) When the safety factor is defined as β (β≧0), the memory erase RIM prediction circuit 6 calculates the previous predicted value U(jl)i held in the predicted value holding circuit 7 and the current actual value LJ(j )i
Using U(j)i=α・U(j)i+(1−α)・U
In order to perform an operation to increase (j-1)i and distribute inactive areas to be reused in accordance with these ratios,
Extrapolation parameter t(jl to tO)-(M-(1+β)・
The amount of allocated memory cells for each data type, including active cells and reusable cells, is determined by calculation in the form 蓓(J)i)/蓓UU)i based on these values. , 5(
j) i-(1+β)・a fj) i + t (J)
・This value is stored in the predicted value holding circuit 7 and set in the memory size register 3, and useful data is returned to each newly allocated area for garbage disposal. The collection work and area redistribution are completed.As for the above parameters, α gradually settles down to a certain value while the same program does the same or similar work, so the initial cent is 0. As long as the value of .5 is about 0.1 and the safety factor β is 0.5 or more, it is practically acceptable.

なを、これらの値は例示であるが、これらのパラメータ
がたとえ適当でなかったとしてもメモリの利用効率がそ
れにつれて低下するだけでプログラムあるいは仕事の実
行に対し停止するとか誤動作するとか云った影響は引き
おこさない。
Please note that these values are just examples, but even if these parameters are not appropriate, the memory usage efficiency will decrease accordingly, and the execution of the program or work may be affected by stopping or malfunctioning. does not occur.

〈効果〉 以上説明した如く本発明によれば各データタイプについ
て夫夫メモリ消費量に応じてメインストレージを配分し
てわりあてることが出来るのでメモリ利用効率を向上さ
せガーベジコレクションの h作動類度をへらすことに
よりデータ処理の能力を向上させることが出来る。
<Effects> As explained above, according to the present invention, the main storage can be allocated according to the amount of memory consumed for each data type, thereby improving memory usage efficiency and reducing the degree of garbage collection operation. Data processing ability can be improved by reducing the amount of data.

【図面の簡単な説明】 図は本発明の一実施例の説明図である。 図中1は主演算部、2はメイン女トレージ、3はメモリ
サイズレジスタ、4はメモリスキャン回路、5はメモリ
消費量カウンタ、6はメモリ消費量予測回路、7は予測
値保持回路、8はメモリ圧縮回路を示す。
BRIEF DESCRIPTION OF THE DRAWINGS The figure is an explanatory diagram of an embodiment of the present invention. In the figure, 1 is the main processing unit, 2 is the main female storage, 3 is the memory size register, 4 is the memory scan circuit, 5 is the memory consumption counter, 6 is the memory consumption prediction circuit, 7 is the predicted value holding circuit, and 8 is the A memory compression circuit is shown.

Claims (1)

【特許請求の範囲】[Claims] ガーベジコレクタを有しガーベジコレクション制御を行
う情報処理装置において、管理対象としての各データタ
イプ別に割り付けた領域サイズを設定する手段と各デー
タタイプ別にメモリ消費量を監視する手段と、少くとも
前回のガーベジコレクション時における各データタイプ
別のメモリ消費量を記憶する手段とこれらの制御手段を
有し、ある時点でガーベジコレクションが実行された際
に、次の領域サイズの配分設定を今回および又は過去の
メモリ消費量のデータより外挿予測して分配設定するこ
とを特徴とするアダプティブガ−ベジコレクション方式
In an information processing device that has a garbage collector and performs garbage collection control, there is provided a means for setting an allocated area size for each data type to be managed, a means for monitoring memory consumption for each data type, and at least a previous garbage collection. It has a means for storing memory consumption for each data type at the time of collection and a means for controlling these, and when garbage collection is executed at a certain point, the next area size allocation setting is set based on the current and/or past memory consumption. An adaptive garbage collection method characterized by extrapolating and predicting consumption data and setting the distribution.
JP7807684A 1984-04-18 1984-04-18 Adaptive garbage collection system Pending JPS60221847A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7807684A JPS60221847A (en) 1984-04-18 1984-04-18 Adaptive garbage collection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7807684A JPS60221847A (en) 1984-04-18 1984-04-18 Adaptive garbage collection system

Publications (1)

Publication Number Publication Date
JPS60221847A true JPS60221847A (en) 1985-11-06

Family

ID=13651747

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7807684A Pending JPS60221847A (en) 1984-04-18 1984-04-18 Adaptive garbage collection system

Country Status (1)

Country Link
JP (1) JPS60221847A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016525249A (en) * 2013-11-14 2016-08-22 華為技術有限公司Huawei Technologies Co.,Ltd. Method and storage device for collecting garbage data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016525249A (en) * 2013-11-14 2016-08-22 華為技術有限公司Huawei Technologies Co.,Ltd. Method and storage device for collecting garbage data
JP2017123177A (en) * 2013-11-14 2017-07-13 華為技術有限公司Huawei Technologies Co.,Ltd. Method and storage device for collecting garbage data
US10303600B2 (en) 2013-11-14 2019-05-28 Huawei Technologies Co., Ltd. Method and storage device for collecting garbage data

Similar Documents

Publication Publication Date Title
US7165255B2 (en) Method and apparatus for managing surplus memory in multitasking system
US9836394B2 (en) Optimizing memory usage across multiple garbage collected computer environments
US6070202A (en) Reallocation of pools of fixed size buffers based on metrics collected for maximum number of concurrent requests for each distinct memory size
US7231504B2 (en) Dynamic memory management of unallocated memory in a logical partitioned data processing system
US7519639B2 (en) Method and apparatus for dynamic incremental defragmentation of memory
US6363468B1 (en) System and method for allocating memory by partitioning a memory
KR100608606B1 (en) Method for adaptive garbage collection and device employing the method
JP2000222281A5 (en)
CN104281528A (en) Data storage method and device
CN111638953B (en) Method, device and storage medium for realizing GPU virtualization
JPS60221847A (en) Adaptive garbage collection system
CN113010262A (en) Memory optimization method based on cloud computing
US6842838B2 (en) Preemptive memory-block splitting
Bendersky et al. Space overhead bounds for dynamic memory management with partial compaction
CN117435343A (en) Memory management method and device
CN115033378B (en) Management method for volatile memory
CN110750330A (en) Virtual machine creating method, system, electronic equipment and storage medium
CN109582597A (en) A kind of internal storage management system based on MIC architecture processor
KR20150136811A (en) Apparatus and Method for managing memory in an embedded system
CN112000471B (en) Memory optimization method and device
JP2642576B2 (en) Automatic page number management method for multiple page size system
JPH06266619A (en) Page saving/restoring device
CN115905231A (en) Real-time data processing method, system, terminal and storage medium
CN116962186A (en) Cluster resource scheduling method and device, storage medium and electronic equipment
CN117591280A (en) Method and device for optimizing memory space utilization rate