JPS61202250A - Data area control system - Google Patents

Data area control system

Info

Publication number
JPS61202250A
JPS61202250A JP4263785A JP4263785A JPS61202250A JP S61202250 A JPS61202250 A JP S61202250A JP 4263785 A JP4263785 A JP 4263785A JP 4263785 A JP4263785 A JP 4263785A JP S61202250 A JPS61202250 A JP S61202250A
Authority
JP
Japan
Prior art keywords
memory
garbage collection
memory blocks
blocks
disk
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
JP4263785A
Other languages
Japanese (ja)
Inventor
Masamichi Kato
加藤 正道
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP4263785A priority Critical patent/JPS61202250A/en
Publication of JPS61202250A publication Critical patent/JPS61202250A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To perform the designing and control of the answer time of a real time system with high accuracy by storing the number of used memory blocks and these memory capacities and using this information to decide whether the garbage collection should be carried out or not. CONSTITUTION:A computer system consists of a memory 1 for storage of programs and data, a processor 2, a keyboard 3, a display 4, a disk 6 and a disk controller 5. The disk 6 is used with allocation of a memory block of an optional size and then released when it is used. The numbers of these used memory blocks and their memory capacities are stored. Based on this storage information, it is decided whether the garbage collection should be carried out or not.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、計算機のデータ処理に係り、特にデータベー
ス、高級言語コンパイラ、リスト処理プログラム、テキ
スト処理、オペレーティングシステムのメモリ管理に好
適なデータ領域管理方式に関する。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to data processing in computers, and in particular to a data area management method suitable for memory management of databases, high-level language compilers, list processing programs, text processing, and operating systems. Regarding.

〔発明の背景〕[Background of the invention]

従来の方式(佐々政考:「動的記憶領域割付は法」黒用
判明=「シーケンシャルガーベージコレクション」日比
野端:「並列ガーベージコレクション」情報処理Vol
、 24. A4. 1983参照)は、使用済みメモ
リブロックの個数やメモリ量の和がメモリ上に記憶され
ていなかったために、ガーページコレクション(メモリ
領域を整理して使用済みメモリブロックを活用できるよ
うにする処理)を行うタイミングの判断ができなかった
。そのため、使用済みメモリ領域がないのにガーベージ
コレクションを実行したり使用済み領域が膨大になって
から行うため多大の処理時間を必要として、機械制御な
ど高速応答に応じられなくなっていた。ガーベージコレ
クションを行うための使用済みメモリ量の和を適性化し
、上記のような高速応答にも対応できるようにした。ガ
ーページコレクションの処理時間は、使用済みメモリ量
のサイズを=49することにより制御できる。
Conventional methods (Sasa Masako: ``Dynamic storage allocation is a law'' Kuroyo = ``Sequential Garbage Collection'' Hibino Hata: ``Parallel Garbage Collection'' Information Processing Vol.
, 24. A4. (see 1983), the number of used memory blocks and the sum of the amount of memory were not stored in memory, so Garpage collection (a process that organizes memory areas so that used memory blocks can be used) was performed. I couldn't decide when to do it. As a result, a large amount of processing time is required to perform garbage collection even when there is no used memory area, or to perform garbage collection after the used area has become enormous, making it impossible to respond to high-speed responses such as machine control. The sum of used memory for garbage collection has been optimized to support the high-speed response described above. The processing time for Garpage collection can be controlled by setting the size of the amount of used memory to =49.

なお、この稲のデータ領域管理方式では、上記公知例等
に示すように、ガーベージコレクションを実行するため
のきっかけを制御するデータについて特に触れられてい
ない。
Note that this rice data area management system does not specifically mention data that controls the trigger for executing garbage collection, as shown in the above-mentioned known examples.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、ヒープ形式のメモリ管理方式において
使用済みメモリブロックのメモリ量の和やブロックの数
をメモリ内に保持することによりガーページコレクショ
ン実施のタイミングを判断すると共に、ガーベージコレ
クションの処理時間と使用済みメモリブロックのメモリ
量の和を対応づけて、処理時間を制御できるようにする
ことにある。
An object of the present invention is to determine the timing of garbage collection by holding the sum of memory amounts of used memory blocks and the number of blocks in memory in a heap-type memory management system, and to determine the processing time of garbage collection. The purpose is to make it possible to control the processing time by associating the memory amount with the sum of the memory amount of used memory blocks.

〔発明の概安〕[Summary of the invention]

本発明は、データベースシステムに於いてディスクメモ
リ上に任意のサイズのメモリブロックを割付けて使用し
、使用済みになった時点で解放する。ディスクメモリは
、使用が進むにつれて使用済みブロックの数が増加して
効率の良いディスクメモリの使用ができなくなる。そこ
で、ガーベージコレクションを行いディスクメモリ上の
未使用ブロックを集めて有効利用できるようにする。ガ
ーベージコレクションを行う時期の判断をする手段が無
くて、使用済みメモリブロックを使用しなければ、処理
が進まない時期に至ってから初めてガーページコレクシ
ョンを行っていた。このためガーページコレクションの
処理時間が膨大になり、高速応答処理に応じられないな
どの不都合が生じていた。使用済みメモリブロックの総
量や数を記憶しておくことで、ガーベージコレクション
を行う適切な時期を見つけ出せるようにした。
The present invention allocates and uses a memory block of an arbitrary size on a disk memory in a database system, and releases it when it is no longer used. As the disk memory is used, the number of used blocks increases, making it impossible to use the disk memory efficiently. Therefore, garbage collection is performed to collect unused blocks on the disk memory so that they can be used effectively. There was no way to determine when to perform garbage collection, and garbage collection was performed only after the process reached a point where the process would not proceed unless used memory blocks were used. As a result, the processing time for Garpage collection becomes enormous, resulting in inconveniences such as the inability to respond to high-speed response processing. By remembering the total amount and number of used memory blocks, it is now possible to find the appropriate time to perform garbage collection.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の一実施例を第1図によシ説明する。第1
図は、本発明を実施する計算機システムの構成を示した
ものであ夛プログラムやデータを記憶するメモリ1と命
令やデータを取り出し演算を実行するプロセッサ2、お
よび実行する指令を入力するキーボード3、プログラム
の実行結果や入力した指令などを表示するディスプレイ
4、データやプログラムを格納したり、取り出すための
2次記憶装置であるディスク6、それを制御するディス
ク制御装置5から構成されている。
An embodiment of the present invention will be explained below with reference to FIG. 1st
The figure shows the configuration of a computer system implementing the present invention, which includes a memory 1 for storing programs and data, a processor 2 for retrieving instructions and data and executing operations, and a keyboard 3 for inputting commands to be executed. It consists of a display 4 that displays program execution results and input commands, a disk 6 that is a secondary storage device for storing and retrieving data and programs, and a disk control device 5 that controls it.

第2図は、ディスク6の中の記憶領域8の使い方を示し
たものであり、メモリブロック9(M、)。
FIG. 2 shows how to use the storage area 8 in the disk 6, including a memory block 9 (M,).

io (Mb )、11 (M−)のように任意長のブ
ロックを必要に応じて割つけて行く。領域12は、これ
から要求があったとき割付ける記憶領域を示している。
Blocks of arbitrary length, such as io (Mb) and 11 (M-), are allocated as necessary. Area 12 indicates a storage area to be allocated when a request is made in the future.

第3図は、ディスク上の記憶領域をブロック13(M、
)からブロック17(M、)までのメモリブロックとし
て割付けた状態を示したものである。このうち、ブロッ
ク14(Mb)、ブロックts(Ma)は、使用済みと
なったブロックを示しており解放されている。今、メモ
リブロック13(M、)から17(M、)までを割り付
けた状態で、さらにメモリブロック割付けの要求がある
と、使用済みメモリブロックはめるが、第2図の領域1
2のように未使用記憶領域(割付けのなされていない領
域)がないので、第4図のように記憶領域内を整理して
使用済みメモリブロックを使用できるようにする。第4
図は、記憶領域内を整理したあとの状態を示したもので
、使用中のメモリブロック18(M、)、19(M、)
、20(M、)は、記憶領域の上部に移動され、第3図
で示した使用済みメモリブロック14(Mb)、16(
M4)の分だけ領域が第4図の領域21のように使用で
きるようになる。
FIG. 3 shows the storage area on the disk in block 13 (M,
) to block 17 (M, ) are allocated as memory blocks. Among these, block 14 (Mb) and block ts (Ma) indicate used blocks and have been released. Now, with memory blocks 13 (M,) to 17 (M,) allocated, if there is a request for further memory block allocation, the used memory block will be placed in area 1 in Figure 2.
Since there is no unused storage area (unallocated area) as shown in FIG. 2, the storage area is organized as shown in FIG. 4 so that used memory blocks can be used. Fourth
The figure shows the state after organizing the storage area, and shows the memory blocks 18 (M,) and 19 (M,) in use.
, 20 (M,) are moved to the upper part of the storage area, and the used memory blocks 14 (Mb), 16 (
An area corresponding to M4) can be used as area 21 in FIG. 4.

この処理は、メモリブロックを参照するための第5図に
示すような参照用テーブル22の変更も行う。参照用テ
ーブル22は、メモリブロックの先頭を示す部分23と
ブロックの大きさを示す部分から構成されておシ、メモ
リブロックが、記憶領域25上を移動したら、メモリブ
ロックの先頭アドレスを新しいアドレスに変更してやれ
ば良い。
This process also changes the reference table 22 as shown in FIG. 5 for referencing memory blocks. The reference table 22 is composed of a part 23 indicating the beginning of the memory block and a part indicating the size of the block. When the memory block is moved on the storage area 25, the starting address of the memory block is changed to a new address. You should change it.

このように、使用済みメモリブロックに注目して記憶領
域を整理し、メモリブロック参照用テーブルを変更して
第4図の領域21のように使用できる領域を作成する処
理をガーページコレクションと呼ぶ。
The process of organizing the storage area by focusing on used memory blocks, changing the memory block reference table, and creating a usable area like area 21 in FIG. 4 is called garpage collection.

ガーベージコレクションを行うきっかけは、今まで第3
図に示すように新規に割付ける記憶領域が不足した時点
で行うとか、メモリブロックを解放する毎に行っていた
。記憶領域が不足した時点で行う方法では大容量の記憶
領域の場合、ガーベージコレクションの処理に多大な時
間を要し、機器制御など高速応答を必要とするシステム
で応答できなくなることがあった。一方、メモリブロッ
クを解放する毎にガーベージコレクションを行うのでは
、処理内容と処理時間の割に使用可能となるメモリブロ
ックの量が少なく効率が良くなかった。そこで、第6図
に示すように、使用済みメモリブロックの数26と使用
済みメモリ量−27を記憶しておき、メモリブロックが
解放する毎に更新する。第7図は、これを実施するフロ
ーチャートを示したものである。
Until now, the reason for performing garbage collection was
As shown in the figure, this was done when there was insufficient storage space to newly allocate, or every time a memory block was released. In the case of a large-capacity storage area, the method of performing garbage collection when the storage area is insufficient requires a large amount of time to process the garbage collection, and systems that require high-speed response such as device control may become unable to respond. On the other hand, if garbage collection is performed every time a memory block is released, the amount of memory blocks that can be used is small compared to the processing content and processing time, which is not efficient. Therefore, as shown in FIG. 6, the number of used memory blocks 26 and the amount of used memory -27 are stored and updated every time a memory block is released. FIG. 7 shows a flowchart for implementing this.

まず、ステップ28ではメモリプロッ°りM+を解放す
る。ステップ29で11g6図に示す、使用済みメモリ
ブロック数26を1つ増やし、つぎに使用済みメモリブ
ロックの量をステップ3oで解放量だけ増やす。ステッ
プ31では、第6図の使用済みメモリブロック数26と
使用済みメモリ量27を判定して、これらがある値以上
になったとき、ステップ32で示すガーベージコレクシ
ョンを行う。この値を調整することによシ、ガーベージ
コレクションを行う頻度、処理時間を制御することがで
きる。
First, in step 28, the memory block M+ is released. In step 29, the number of used memory blocks 26 shown in Figure 11g6 is increased by one, and then in step 3o, the amount of used memory blocks is increased by the release amount. In step 31, the number of used memory blocks 26 and the amount of used memory 27 shown in FIG. 6 are determined, and when these exceed a certain value, garbage collection shown in step 32 is performed. By adjusting this value, you can control the frequency and processing time of garbage collection.

第7図のステップ33では、ガーベージコレクションが
終了したら使用済みメモリプ西ツク数と使用済みメモリ
量をOにする。
In step 33 of FIG. 7, when the garbage collection is completed, the number of used memory chips and the amount of used memory are set to O.

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

本発明によれば、ガーベージコレクションを行う時期と
処理に要する時間を制御できるので実時間システムの応
答時間の性能設計や定量的制御が精度良く行こる効果が
あり、ガーベージコレクションを行うことによυ使用可
能となるメモリ量も正確に計算できるので記憶領域の管
理がより正確に行える効果がある。
According to the present invention, since the timing of garbage collection and the time required for processing can be controlled, performance design and quantitative control of the response time of a real-time system can be carried out with high precision. Since the amount of usable memory can be calculated accurately, storage areas can be managed more accurately.

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

第1図は本発明のデータ領域管理方式が使用される計算
機の構成を示す図、第2図はディスク上の記憶領域とそ
の領域を管理する方式を示す図、第3図は記憶領域に割
付けられたメモリブロックを示す図、第4図は記憶領域
中の使用済みメモリブロックと使用中のメモリブロック
を整理したあとの記憶領域の状態を示す図、第5図は記
憶領域中のメモリブロックを参照するテーブルと記憶領
域とメモリブロックの関係を示す図、第6図は記憶領域
中の使用済みメモリブロック数を使用済みメモリ量を記
憶するデータを示す図、第7図はメモ′fI+  図 語 2 図
Figure 1 is a diagram showing the configuration of a computer in which the data area management method of the present invention is used, Figure 2 is a diagram showing the storage area on a disk and the method for managing that area, and Figure 3 is a diagram showing the allocation to the storage area. Figure 4 is a diagram showing the state of the storage area after the used memory blocks and in-use memory blocks in the storage area have been sorted out. Figure 5 is a diagram showing the memory blocks in the storage area. A diagram showing the relationship between reference tables, storage areas, and memory blocks. Figure 6 is a diagram showing the number of used memory blocks in the storage area and data for storing the amount of used memory. Figure 7 is a memo 'fI+ figure word. 2 Figure

Claims (1)

【特許請求の範囲】[Claims] ヒープ形式のメモリ使用方式において、メモリ内に使用
済みになつたメモリブロックの数やメモリ量を記憶して
おき、この情報を用いてガーベージコレクションを行う
かどうかの判断を行うことを特徴としたデータ領域の管
理方式。
Data that is characterized by storing the number of used memory blocks and the amount of memory in memory in a heap format memory usage method, and using this information to determine whether to perform garbage collection. Area management method.
JP4263785A 1985-03-06 1985-03-06 Data area control system Pending JPS61202250A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4263785A JPS61202250A (en) 1985-03-06 1985-03-06 Data area control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4263785A JPS61202250A (en) 1985-03-06 1985-03-06 Data area control system

Publications (1)

Publication Number Publication Date
JPS61202250A true JPS61202250A (en) 1986-09-08

Family

ID=12641525

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4263785A Pending JPS61202250A (en) 1985-03-06 1985-03-06 Data area control system

Country Status (1)

Country Link
JP (1) JPS61202250A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005025727A (en) * 2003-06-09 2005-01-27 Mitsubishi Electric Corp Information storage control device, information storage control method, and information storage control program
JP2010072790A (en) * 2008-09-17 2010-04-02 Toshiba Corp Processor device, information processing apparatus and memory management method
US8919715B2 (en) 2009-02-10 2014-12-30 Sugatsune Kogyo Co., Ltd. Folding-type shelf holder

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005025727A (en) * 2003-06-09 2005-01-27 Mitsubishi Electric Corp Information storage control device, information storage control method, and information storage control program
JP2010072790A (en) * 2008-09-17 2010-04-02 Toshiba Corp Processor device, information processing apparatus and memory management method
US8919715B2 (en) 2009-02-10 2014-12-30 Sugatsune Kogyo Co., Ltd. Folding-type shelf holder

Similar Documents

Publication Publication Date Title
US8176233B1 (en) Using non-volatile memory resources to enable a virtual buffer pool for a database application
US6304866B1 (en) Aggregate job performance in a multiprocessing system by incremental and on-demand task allocation among multiple concurrently operating threads
CN102999132B (en) Administering thermal distribution among memory modules of a computing system
JPH04213129A (en) Memory control system and memory control method
JP2011191835A (en) Computer system and method of executing application program
JP2006172067A (en) Database management method, system and program
JPS61202250A (en) Data area control system
US20090132623A1 (en) Information processing device having data field and operation methods of the same
JPS63200257A (en) Program loading system for computer
JPH05224992A (en) Program test device
Shoshani et al. Coordinating simultaneous caching of file bundles from tertiary storage
JPH0271342A (en) Memory controller
JPS5835656A (en) Cell management controlling system
JPS60254342A (en) Controlling method of resources in using
JP3118348B2 (en) Program cache method
CN116880780A (en) Tree data writing method, device, machine-readable medium and memory
JP2522161B2 (en) Volume resource management method in virtual computer system
JPH0293961A (en) File deleting system
JPH0337748A (en) External storage accessing system utilizing main storage
JPS62241047A (en) Shared control method for input/output buffer by data base control system
JPH01259431A (en) Bit map management method for task
JPH03268146A (en) Fast file access system
JPH03127137A (en) File area allocating system
JPS63101946A (en) Loading processing system
JPH02293920A (en) Disk input/output system