JPS6027962A - Structure memory control system - Google Patents

Structure memory control system

Info

Publication number
JPS6027962A
JPS6027962A JP13612683A JP13612683A JPS6027962A JP S6027962 A JPS6027962 A JP S6027962A JP 13612683 A JP13612683 A JP 13612683A JP 13612683 A JP13612683 A JP 13612683A JP S6027962 A JPS6027962 A JP S6027962A
Authority
JP
Japan
Prior art keywords
memory
area
cache
block
management unit
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
JP13612683A
Other languages
Japanese (ja)
Inventor
Shinichi Habata
幅田 伸一
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Nippon Electric 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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP13612683A priority Critical patent/JPS6027962A/en
Publication of JPS6027962A publication Critical patent/JPS6027962A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To obtain a control system which makes a garbage collection at a high speed by allowing an external device to access a cache memory simultaneously access from a block control unit to a mass storage memory. CONSTITUTION:When a request to generate a structure newly is made by an external processing unit, the size of a block wherein the structure is stored is sent to a structure memory control unit 120 and a hierarchical bit map 121 is used to search for an unused area of necessary size. Simultaneously, the unit 120 makes a request to secure one unused block number to a block control unit 100 and reports this number to the external processing unit to store the requested size in a size area subsequently. The block number given to the area wherein the new structure is stored and what order an element in the block is in are designated, so that the external processing unit generates the new structure in a memory 130.

Description

【発明の詳細な説明】 本発明は、プロローグの構造体の実現、ならびに、動的
メモリ管理装置の管理方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to the implementation of a prologue structure and a management method for a dynamic memory management device.

近年、知的システムへの関心の高まりとともに、述語論
理型言語プロローグが注目されている。その理由の1つ
として、可変側の要素から構成される構造体を直接扱え
ることがあげられる。
In recent years, as interest in intelligent systems has increased, predicate logic language prologues have been attracting attention. One of the reasons for this is that structures composed of variable elements can be handled directly.

例えば、プロローグでは、かごの中に“りんご”“みか
ん”、“なし″が入っている状態を構造体温“かご” 
要素数3の構造体を使って次のように表現できる。
For example, in the prologue, the state in which there are "apples,""tangerines," and "pear" in a basket is called a "basket" with structural temperature.
It can be expressed as follows using a structure with 3 elements.

かご(りんご、みかん、なし) さらに、太部がこのかごを持っているという事実を、構
造体温°“持つ″、要素数2の構造体を用いて次のよう
に記述できる。
Basket (apples, oranges, none) Furthermore, the fact that Abe has this basket can be described as follows using a structure with a structural body temperature of ``has'' and two elements.

持つ(太部、かご(りんご、みかん、なし))プロロー
グは、このような可変側の要素を持つ構造体を用いるこ
さに、よりデータの記述を容易にしている。
The (fat part, basket (apple, orange, none)) prologue makes it easier to describe data by using a structure with variable elements like this.

一方、プロローグを実行すると多数の構造体が、動的に
生成・消滅するため、構造体の領域として多量のメモリ
セルが必要となる。そこで、メモリセルの使用効率を高
めるために、一度、使用済みとなったメモリセルを回収
し、再度、構造体を格納するのに使用するカーベージコ
レクションが行なわれる。しかし、カーベージコレクシ
ョンにかが7)処理コストは大きく、全体の処理コスト
の30%から50%以上になる場合がある。
On the other hand, when a prologue is executed, a large number of structures are dynamically created and destroyed, so a large amount of memory cells are required as an area for the structures. Therefore, in order to improve the usage efficiency of memory cells, a garbage collection is performed in which used memory cells are once collected and used to store structures again. However, the processing cost associated with garbage collection is high, and may amount to 30% to 50% or more of the total processing cost.

本発明は、このようなカーベージコレクションを高速に
処理できる構造体の管理方式を提供するものである。
The present invention provides a structure management method that can process such garbage collection at high speed.

構造体を実現するための良く知られた実現方式の1つは
、固定長の領域をポインタで複数個つなぐ方式である。
One of the well-known implementation methods for realizing a structure is to connect multiple fixed-length areas with pointers.

以下、この方式を第1の構造体実現方式と称す。h第1
図に2進木リストセル10を用いて構造体 持つ(太部、かご(りんご、みかん、なし))を表現し
た時の概念図を示す。この方式の最大の特徴は、メモリ
セルを確保する単位が固定長となっているため、未使用
領域が連続領域になくてもよい点にある。すなわち、カ
ーベージコレクションにより使用済みメモリセルを回収
する作業は固定領域(2進木リストでは2連続のメモリ
セル)をポインタで結ぶだけでよい。しかしながら、固
定長領域をポインタで接続する方式は、構造体の要素を
アクセスする際のオーバーヘッドが大きいという欠点を
持つ。例えば、構造体のn番目の要素をアクセスするた
めにはポインタをn回辿らねばならず、メモリアクセス
ネックの要因となる。
Hereinafter, this method will be referred to as the first structure realization method. h 1st
The figure shows a conceptual diagram when a binary tree list cell 10 is used to express a structure (fat section, basket (apple, orange, none)). The most important feature of this method is that the unused area does not need to be in a continuous area because the unit for securing memory cells is a fixed length. In other words, the task of collecting used memory cells through garbage collection only requires connecting fixed areas (two consecutive memory cells in a binary tree list) with a pointer. However, the method of connecting fixed-length areas with pointers has the disadvantage that there is a large overhead when accessing the elements of the structure. For example, in order to access the n-th element of a structure, the pointer must be traced n times, which causes a memory access bottleneck.

前記方式の欠点を解消する他の方式としては、構造体の
要素を連続領域に並べ、各要素へのアクセスをヘッダ部
からのオフセットで行なう方式が知られている(以下、
この方式を第2の構造体実現方式と称す。)。第2図は
、第2の方式による構造体 持つ(太部、かご(りんご、みかん、なし))を表現す
る概念図である。第2図において、20は構造体毛領域
、21は要素数頭域、22はカーベージコレクション時
に、その構造体が使用中又は、使用済みであることを示
すのに使用するマークピット、詔はデータ領域を表わす
。構造体毛領域20、要素数頭域21およびマークビッ
ト22の3つの領域を合わせて、以下、特にヘッダ領域
と称ず。
As another method to overcome the drawbacks of the above method, there is a known method in which the elements of the structure are arranged in a continuous area and each element is accessed by offset from the header (hereinafter referred to as
This method is referred to as the second structure realization method. ). FIG. 2 is a conceptual diagram expressing a structure (thick part, basket (apple, orange, pear)) according to the second method. In FIG. 2, 20 is a structure hair area, 21 is an element number area, 22 is a mark pit used to indicate that the structure is in use or has been used during garbage collection, and the edict is data. Represents an area. The three areas including the structure hair area 20, element number area 21, and mark bit 22 will not be particularly referred to as a header area hereinafter.

この方式では、構造体はヘッダ領域と構造体の各要素を
格納するデータ領域nが連続領域に割り当てられている
。したがって、構造体を要素として含むときは構造体ヘ
ッダ領域へのポインタを要素とすればよい。また、要素
へのアクセスはヘッダ領域からのオフセットを用いて高
速に行なうことができる。
In this method, a header area and a data area n for storing each element of the structure are allocated as continuous areas for the structure. Therefore, when a structure is included as an element, a pointer to the structure header area may be used as the element. Furthermore, elements can be accessed quickly using offsets from the header area.

しかしながら、この方式では構造体は可変長の連続領域
に格納される必要があるため、カーベージコレクション
のオーバーヘッドが太きいという問題点を持つ。又、構
造体の性質上1つの構造体を複数の構造体が共有する可
能性がある。第3図(1) 、 (2)は、構造体Aと
構造体Cが構造体Bを共有している時のカーベージコレ
クションによるメモリ領域の遷移を示す概念図である。
However, this method has a problem in that the overhead of garbage collection is large because the structure needs to be stored in a continuous area of variable length. Furthermore, due to the nature of structures, there is a possibility that one structure may be shared by a plurality of structures. FIGS. 3(1) and 3(2) are conceptual diagrams showing the transition of memory areas due to garbage collection when structure A and structure C share structure B. FIG.

第3図において、30はメモリ、31は使用中の構造体
領域、32は使用済みあるいは未使用の領域を示す。又
、第3図(1)はカーベージコレクションを行なう前の
メモリ状態、第3図(2)はカーベージコレクションを
行なった後のメモリ状態を表わす。
In FIG. 3, 30 is a memory, 31 is a structure area in use, and 32 is a used or unused area. Further, FIG. 3(1) shows the memory state before performing the garbage collection, and FIG. 3(2) shows the memory state after performing the garbage collection.

この方式におけるカーベージコレクションは、次のよう
にして実現される。初めζこ、現在使用中の構造体に印
をつける操作を行なう。これは、次のアルゴリズムによ
って、外部処理装置が処理を行なう時に現在使用中の構
造体の情報を格納しているスタックを調べて、スタック
から直接又は、間接に参照されている構造体のマークピ
ット領域のフラグをセットすることにより実現される。
Carbage collection in this method is realized as follows. First, perform an operation to mark the structure currently in use. This is done by using the following algorithm to check the stack that stores information about the structure currently in use when the external processing device performs processing, and check the mark pits of structures that are directly or indirectly referenced from the stack. This is achieved by setting the area flag.

スタックより指される全ての構造体について、構造体の
マークピットが既にセットされていれば何もせず、セク
トされていなければ、前記構造体のマークピットをセッ
トし、前記構造体が要素としてさらに構造体を含むとき
は要素となっている全ての構造体について処理を繰り返
す。
For all structures pointed to by the stack, if the structure's mark pit is already set, do nothing, otherwise set the structure's mark pit, and add the structure as an element. When a structure is included, the process is repeated for all structures that are elements.

上記アルゴリズムでマークピットがセットさね。The mark pit is set using the above algorithm.

なかった構造体は、使用済み領域として回収できる。し
かし、固定領域を用いた前記第1の構造体実現方式のよ
うに単ζこ使用済み領域をポインタで結ぶたけでは、次
に新しい構造体の領域として連続領域を確保することが
できない。したがって、未使用領域を連続領域上に確保
するためには、第3図(1) 、 +2)に図示しであ
るように、使用中の構造体領域31をリロケートして、
使用済領域32を集める必要がある。
The remaining structures can be collected as used space. However, just by connecting single ζ used areas with pointers as in the first structure realization method using fixed areas, it is not possible to secure a continuous area as the area for the next new structure. Therefore, in order to secure an unused area on a continuous area, as shown in FIG. 3(1), +2), the structure area 31 in use is relocated.
It is necessary to collect the used area 32.

この方式の問題点は、i遺体をリロケートする際に、リ
ロケートした構造体を指すポインタを全て書き換える必
要がある点にある。
The problem with this method is that when relocating the i body, all pointers pointing to the relocated structure must be rewritten.

本発明の目的は、上記第2の構造体表現実現方式の問題
点を解決し、要素へのアクセスが高速で、カッ、カーベ
ージコレクション時の構造体のりロケーションのオーバ
ヘッドが最小となるような構造体を実現する構造体メモ
リ管理方式を提供することにある。
An object of the present invention is to solve the problems of the second structure representation method described above, and to create a structure that allows fast access to elements and minimizes the overhead of structure location during garbage collection. The purpose of this invention is to provide a structure memory management method that realizes a structure.

本発明によれば、固定長のヘッダ部と可変長のデータ部
とから成る構造体を貯える大容量メモリと、前記大容量
メモリの一部を貯え、外部装置によってアクセスされる
キャッシュメモリと、前記大容量メモリの使用中領域と
未使用中領域とを識別するための情報を保持する階層化
ピットマツプと、前記大容量メモリ及び、前記キャッジ
−メモリに格納されている個々の構造体を識別するため
の番号と前記大容量メモリ上の格納番地との間の変換処
理と、前記大容量メモリに新たな構造体を格納するため
の連続領域が確保できなくなった時、前記大容量メモリ
上の構造体で使用中のものを、前記階層化ビットマツプ
の情報を使用して前記大容量メモリ中でリロケートし、
前記性たな構造体の格納領域を確保する操作を前記外部
装置が前記キャッジ−メモリを用いて処理を実行するの
と並行して行なうブロック管理ユニットと、前記キャシ
ュメモリに格納されている構造体の識別番号と前記キャ
ッシュメモリ上の格納番地間の変換と、前記キャッシュ
メモリ上に存在しない構造体を前記大容量メモリから取
ってきたり、新たに生成された構造体を前記大容量メモ
リに格納する処理を実行するキャッジ−管理ユニットと
を備え、前記ブロック管理ユニットが前記大容量メモリ
へアクセスするのと並行して、前記外部装置が前記キャ
ッジ−管理ユニットを使用して前記キャッシュメモリを
アクセスできる構造体メモリ管理方式が得られる。
According to the present invention, a large-capacity memory stores a structure including a fixed-length header section and a variable-length data section; a cache memory that stores a part of the large-capacity memory and is accessed by an external device; A hierarchical pit map that holds information for identifying a used area and an unused area of a large capacity memory, and for identifying individual structures stored in the large capacity memory and the cache memory. and the conversion process between the number and the storage address on the large-capacity memory, and when a continuous area for storing a new structure in the large-capacity memory cannot be secured, the structure on the large-capacity memory in use in the large-capacity memory using information in the layered bitmap;
a block management unit that performs an operation for securing a storage area for the various structures in parallel with the execution of processing by the external device using the cache memory, and the structures stored in the cache memory; Converting between the identification number and the storage address on the cache memory, fetching a structure that does not exist on the cache memory from the large capacity memory, or storing a newly generated structure in the large capacity memory. a cache management unit that executes processing, and a structure that allows the external device to access the cache memory using the cache management unit in parallel with the block management unit accessing the large capacity memory. A physical memory management scheme is obtained.

次に、本発明について図面を用い、詳細に説明する。Next, the present invention will be explained in detail using the drawings.

第4図は本発明の実施例の1つである構造体メモリ管理
装置のブロック図である。図において、100はブロッ
ク管理ユニットであり、101はブロック番号領域、1
02はマークピット領域、103は構造体を格納してい
るメモリ上の領域の先頭を指すポインタ領域、104は
ブロックの大きさを格納するサイズ領域である。又、1
10はキャッシュメモリを管理するキャッジ−管理ユニ
ットであり、111はキャッシュメモリ上に格納されて
いる構造体に割り付けられたブロック番号を格納するキ
ャリー用ブロック番号領域、112はキャッシュメモリ
上の未使用領域決定に用いるキャッシュ用マークピット
領域、113は構造体を格納しているキャッシュメモリ
上の領域の先頭を指すキャッジ−用ポインタ領域である
。120は構造体メモリ管理ユニットであり、121は
階層化ビットマツプである。
FIG. 4 is a block diagram of a structure memory management device that is one of the embodiments of the present invention. In the figure, 100 is a block management unit, 101 is a block number area, 1
02 is a mark pit area, 103 is a pointer area that points to the beginning of the area on the memory that stores the structure, and 104 is a size area that stores the size of the block. Also, 1
10 is a cache management unit that manages the cache memory, 111 is a carry block number area that stores the block number allocated to the structure stored on the cache memory, and 112 is an unused area on the cache memory. The cache mark pit area 113 used for determination is a cache pointer area that points to the beginning of the area on the cache memory that stores the structure. 120 is a structure memory management unit, and 121 is a hierarchical bitmap.

さらに、130はメモリであり、140はキャッシュメ
モリである。160はプロローグを実行するのに使用す
る情報が蓄積されるスタックメモリである。
Furthermore, 130 is a memory, and 140 is a cache memory. 160 is a stack memory in which information used to execute the prologue is stored.

構造体メモリ管理ユニッ) 120は、前記階層化ビッ
トマソプ121、ブロック管理ユニット100、キャッ
シュ管理ユ′二、/ト110の情報を使用し、て、メモ
リ130とキャッシュメモリ140を管理し、かつ、前
記スタックメモリ160に格納されている使用中の構造
体に対応したブロック番号から、現在使用中の構造体の
マーキングを指示するユニットである。170は前記キ
ャッシュメモリ140、メモリ130、スタックメモリ
160及び、図示されていない外部処理ユニットを結合
するデータバスであり、190は前記キャッシュ管理ユ
ニ、 ト110とブロック管理ユニット100、構造体
メモリ管理ユニット120、スタックメモリ160及び
、図示されていない外部処理ユニットを結合するアドレ
スバスである。又、180はメモリ130、ブロック管
理ユニット100、構造体メモリ管理ユニット120を
結合する内部バスである。190は、キャッシュメモリ
140、キャッシュ管理ユニッl−’110 、構造体
メモリ管理ユニット120を結合する内部バスである。
The structure memory management unit 120 manages the memory 130 and the cache memory 140 using the information of the layered bitmap 121, the block management unit 100, the cache management unit 110, and This unit instructs marking of the structure currently in use based on the block number corresponding to the structure in use stored in the stack memory 160. 170 is a data bus that connects the cache memory 140, memory 130, stack memory 160, and an external processing unit (not shown); 190 is a data bus that connects the cache management unit 110, the block management unit 100, and the structure memory management unit; 120, a stack memory 160, and an address bus coupling an external processing unit (not shown). Further, 180 is an internal bus that connects the memory 130, the block management unit 100, and the structure memory management unit 120. Reference numeral 190 denotes an internal bus that connects the cache memory 140, the cache management unit l-' 110, and the structure memory management unit 120.

本実施例における構造体メモリ管理方式を図を参照しつ
つ説明する。第5図は本実施例における構造体メモリ管
理方式を説明する概念図である。
The structure memory management method in this embodiment will be explained with reference to the drawings. FIG. 5 is a conceptual diagram illustrating the structure memory management method in this embodiment.

なお、102のマークビット領域で、11″は使用中ブ
ロック、“0”は未使用ブロックを表わしている。
Note that in the 102 mark bit areas, 11'' represents a block in use, and "0" represents an unused block.

構造体が定義されていない状態では、ブロック管理ユニ
ット中のマークビット領域102は“0″である。
When no structure is defined, the mark bit area 102 in the block management unit is "0".

図示されていない外部処理ユニット(例えば、プロロー
グプロセッサ)から構造体メモリ管理ユニット120へ
、新しく構造体を作成せよという要求が出された時の構
造体メモリ管理ユニツ) 120の動作は次のようにな
る。
When a request to create a new structure is issued to the structure memory management unit 120 from an external processing unit (for example, a prologue processor) (not shown), the operation of the structure memory management unit 120 is as follows. Become.

例えば、構造体 かご(りんご、みかん、なし)をメモ
リ上に置く場合を考える。初めに、構造体を格納するた
めのブロックの大きさ4が、構造体メモリ管理ユニット
120へ送られ、構造体メモリ管理ユニット120は、
階層化ビットマツプ121を使用して、大きさ4以上の
未使用領域を捜す。未使用領域を捜す動作と並行して、
構造体メモリ管理ユニッ) 120は、ブロック管理ユ
ニット100へ、未使用ブロック番号を1つ確保するこ
とを要求する。
For example, consider storing a structure basket (apples, oranges, pears) in memory. First, the block size 4 for storing the structure is sent to the structure memory management unit 120, and the structure memory management unit 120
The hierarchical bitmap 121 is used to search for an unused area with a size of 4 or more. In parallel with searching for unused space,
The structure memory management unit) 120 requests the block management unit 100 to reserve one unused block number.

ブロック管理ユニット100は、新しい構造体のために
確保したブロック番号(第5図では、ブロック番号1)
を図示されていない外部処理ユニットへ通知する。その
後、サイズ領域に要求されたフロックのサイズを格納す
る。新しい構造体を格納する領域に与えられたブロック
番号とそのブロックの何番目の要素であるかを指定する
ことで、図示されていない外部処理ユニ、トはメモリ1
30上に新しい構造体を生成することができる。
The block management unit 100 has a block number (block number 1 in FIG. 5) secured for the new structure.
is notified to an external processing unit (not shown). After that, the requested flock size is stored in the size area. By specifying the block number given to the area to store the new structure and the element number in that block, an external processing unit (not shown) can
A new structure can be created on 30.

前記ブロック管理ユニット100が、新しい構造体を格
納する領域のために割り当てるブロック番号を決定して
いる間に、構造体メモリ管理ユニット120は階層化ビ
ットマツプ121を使用して、新しい構造体を格納でき
る未使用領域を捜し、未使用領域の先頭アドレスをフロ
ック管理ユニットiooに通知する。
While the block management unit 100 is determining the block number to allocate for the area to store the new structure, the structure memory management unit 120 can use the layered bitmap 121 to store the new structure. Search for an unused area and notify the block management unit ioo of the start address of the unused area.

前記フロック管理ユニソl−100は新しい構造体のた
めに用意された未使用領域の先頭アドレスを、新しい構
造体を格納する領域に割り当てられたブロック番号のポ
インタ領域に格納する。構造体の値としては、構造体が
格納されている領域に割り当てられたブロック番号が返
されるので、構造体“持つ(太部、かご(りんご、みか
ん、なし))”のように構造体を要素として含む構造体
は、第5図に図示したように、構造体の要素を格納する
位置に、要素となる構造′体のブロック番号を格納する
ことになる。
The flock management unit 1-100 stores the start address of the unused area prepared for the new structure in the pointer area of the block number assigned to the area storing the new structure. As the value of the structure, the block number assigned to the area where the structure is stored is returned, so if you write the structure as follows: For structures included as elements, the block number of the structure as an element is stored in the position where the element of the structure is stored, as shown in FIG.

@5図は、さらに構造体 持つ(花子、かご(りんご、みかん、なし))が構造体 かご(りんご、みかん、なし) を共有している状態を示す。@Figure 5 further shows the structure Has (hanako, basket (apples, oranges, pears)) is a structure Basket (apples, oranges, pears) Indicates a shared state.

新しい構造体が次々と生成されていくと、構造体メモリ
管理装置120が、新しい構造体を格納できる大きさの
未使用領域を確保できない状態が先生し、ガーベージコ
レクション処理を開始する。
As new structures are generated one after another, the structure memory management device 120 finds itself unable to secure an unused area large enough to store the new structures, and starts garbage collection processing.

ガーベージコレクションが開始されると、はじめにマー
クビット102の値を全て“0”をこセットする。同時
に、構造体メモリ管理ユニット120上の階層化ヒツト
マツプ121の値も“0”にする。次にスタックメモリ
160におかれている構造体を格納している領域の各ブ
ロック番号に対して、次のアルゴリズムに従って使用中
ブロックのマーキンクを行なう。
When garbage collection is started, all the values of the mark bits 102 are first set to "0". At the same time, the value of the hierarchical hit map 121 on the structure memory management unit 120 is also set to "0". Next, each block number of the area storing the structure stored in the stack memory 160 is marked as a block in use according to the following algorithm.

(1)マークビット102を“1”にセリトンた後、ポ
インタ領域103が指すアドレスの次のアドレスから、
構造体の要素数だけザーチし、ブロック番号を値とする
要素に対して、(2)の操作を行なう。こノ時、ポイン
タ領域103におかれているアドレスから、サイズ領域
104に格納されている大きさだけの連続領域は使用中
であることを階層化ビットマツプ121にセットしてや
る。マークピッ)・102のセットと、階層化ビットマ
ツプ121のセットは、夫々ブロック管理ユニッ) 1
00と構造体メモリ管理ユニット120により並行して
行なわ才lる。
(1) After setting the mark bit 102 to “1”, from the address next to the address pointed to by the pointer area 103,
Search for the number of elements in the structure, and perform the operation (2) on the elements whose value is the block number. At this time, from the address stored in the pointer area 103, it is set in the hierarchical bitmap 121 that a continuous area of the size stored in the size area 104 is in use. The set of mark bitmaps 102 and the set of hierarchical bitmaps 121 are respectively block management units) 1
00 and the structure memory management unit 120 in parallel.

(2)対応するブロックのマークピッI−,102の値
が“I IIなら、スタックメモリ160上の次のブロ
ック番号に対して、(1)の処理を行なう。マークピッ
ト102の値が“O”ならば、そのブロックに対して(
1)の処理を行なう。
(2) If the value of the mark pit I-, 102 of the corresponding block is "I II", perform the process (1) for the next block number on the stack memory 160. The value of the mark pit 102 is "O" Then, for that block (
Perform the process 1).

この結果、ブロック9mユニット100上ζこは、現在
使用中のブロック番号のマークピッi・領域102のみ
に、41″′がセットさnている。さらに、構造体メモ
リ管理ユニット120上の階層化ビットマツプ121上
には、メモリ130における1吏用中領域と未使用領域
の情報がセットされている。
As a result, on the block 9m unit 100, 41'' is set only in the mark pitch area 102 of the block number currently in use.Furthermore, the hierarchical bitmap on the structure memory management unit 120 121 is set with information about the middle area for one person and the unused area in the memory 130.

次に階層化ビットマツプ121の使用中領域の情報を使
用して、使用中領域のりロケーションを行なう。この時
、使用中領域のりロケーションはブロック単位で行なっ
ていく。使用中領域のりロケーションと並行して、ブロ
ック管理ユニット100のポインタ領域103が更新さ
れる。例えば、第5図のメモリ状態でのりロケーション
処理でブロック3がリロケートされた状態が第6図であ
る。ブロック単位に使用中領域をリロケートしていくと
、リロケーションが進むにつれて、使用済領域の大きさ
が増していく。使用済領域の大きさが、ガーベージコレ
クションの原因となった新しく生成される構造体を格納
するに充分な大きさになった時点で、その使用済領域を
新しい構造体に割り当てられたブロック番号の領域とし
て登録し、外部処理ユニットに処理再開の許可を与える
Next, using the information on the currently used area of the hierarchical bitmap 121, the currently used area is located. At this time, the location of the currently used area is performed in units of blocks. In parallel with the location of the in-use area, the pointer area 103 of the block management unit 100 is updated. For example, FIG. 6 shows a state in which block 3 has been relocated by the paste location process in the memory state of FIG. 5. When the used area is relocated block by block, the size of the used area increases as the relocation progresses. Once the used space is large enough to accommodate the newly generated structure that caused the garbage collection, the used space is allocated to the block number assigned to the new structure. Register it as an area and give permission to the external processing unit to resume processing.

外部処理ユニットは、新しい構造体の生成が終了すると
、キャッシュメモリ140を使用して処理を再開する。
When the external processing unit finishes generating the new structure, it resumes processing using the cache memory 140.

構造体メモリ管理ユニット120は外部処理ユニットが
新しい構造体の生成を終了し、キャッシュメモリ140
を使用して処理を再開したのを確認すると、中断してい
たりロケーション処理を再開する。
The structure memory management unit 120 allows the external processing unit to complete the generation of a new structure and transfer it to the cache memory 140.
If you confirm that the process has been resumed using

次に、新しい構造体を格納する領域を捜したり、リロケ
ーション処理で使用中領域の情報を提供する階層化ビッ
トマツプ121について説明する。
Next, a description will be given of the hierarchical bitmap 121 that searches for an area to store a new structure and provides information on areas in use during relocation processing.

第7図は、ビットマツプ300を用いてメモリ310の
使用領域情報を管理する実施例の概念図である。第7図
ではビットマツプ300上の1ビツトをメモリ310上
の2セルに対応させており、ビットマツプ300上のビ
ットを調べることで対応するメモリ310上の2セルが
、使用中であるが、又は未使用であるかの情報を得るこ
とができるようになりている。
FIG. 7 is a conceptual diagram of an embodiment in which information on the used area of the memory 310 is managed using the bitmap 300. In FIG. 7, one bit on the bitmap 300 corresponds to two cells on the memory 310, and by checking the bits on the bitmap 300, it can be determined whether the corresponding two cells on the memory 310 are in use or not. It is now possible to get information on whether it is used or not.

第7図では、ビットマツプ300のビットの値が“0”
の時は、対応するメモリ310上の2セルが未使用領域
であることを表わし、ビットの値が“1″の時は、対応
するメモリ310上の2セルは使用中領域であることを
表わす。
In FIG. 7, the value of the bit of bitmap 300 is “0”.
When the bit value is "1", it means that the two cells on the corresponding memory 310 are unused areas, and when the bit value is "1", it means that the two cells on the corresponding memory 310 are the used area. .

従って、未使用領域の割り付けを要求された時は、要求
された大きさの領域に相当する長さだけ連続して“O′
であるビット列を、ビットマツプ300上で捜し、その
先頭アドレスを出力してやる。
Therefore, when a request is made to allocate an unused area, it is necessary to continuously
A bit string is searched for on the bit map 300, and its start address is output.

要求された大きさの領域に相当する長さだけ連続して“
O”であるビット列が、ビットマツプ300上に存在し
ない時は、ガーベージコレクション処理を要求する。

When the bit string of "O" does not exist on the bitmap 300, garbage collection processing is requested.

本構造体メモリ管理方式で使用されている階層化ビット
マツプは、第7図のビットマツプ3ooを用いて未使用
領域を捜す処理を高速化するために、複数のビットマツ
プを階層化して、上方に位置するビットマツプの1ビツ
トが、下方に位置するビットマツプの連続する数ビット
の状態に関する情報を持つようにして、大きな使用領域
の存在によるビットマツプのアクセス回数増加を抑える
ことを実現している。
The layered bitmap used in this structure memory management method is created by layering multiple bitmaps to speed up the process of searching for unused areas using bitmap 3oo in Figure 7. One bit of the bitmap has information regarding the status of several consecutive bits of the bitmap located below, thereby suppressing the increase in the number of bitmap accesses due to the existence of a large used area.

第8図は、階層化ビットマツプの実施例の概念図である
。410.420.430.440は、各々ビットマ。
FIG. 8 is a conceptual diagram of an embodiment of a layered bitmap. 410.420.430.440 are each bitma.

プであり、450はメモリである。ビットマツプ410
上の1ビツトはビットマツプ420上の4ビツトの状態
に対する情報を持っており、ビットの値の意味は次のよ
うになっている。
450 is a memory. Bitmap 410
The upper 1 bit has information regarding the status of 4 bits on the bitmap 420, and the meanings of the bit values are as follows.

ti> ビットマツプ440上のビットは値が“0”の
時は、対応するメモIJ 450上の2セルが未使用で
あることを表わし、 値が“1”の時は、対応するメモIJ 450上の2セ
ルが使用中であることを表わす。
ti> When the value of the bit on the bit map 440 is “0”, it indicates that two cells on the corresponding memo IJ 450 are unused, and when the value is “1”, it indicates that the two cells on the corresponding memo IJ 450 are unused. 2 cells are in use.

(2)ビットマツプ410,420,430上のビット
は、値が“1”の時は、対応する一段下方のビットマツ
プ上の連続した4ビツトの値が全て“1″であることを
表わす。
(2) When the value of the bits on the bitmaps 410, 420, and 430 is "1", it means that the values of consecutive 4 bits on the corresponding bitmap one level below are all "1".

値カ“0”の時は、対応する下方のビットマツプ上の連
続した4ビツトの値の内、少なくきも1っは“0”であ
ることを示す。
When the value is "0", it indicates that at least one of the consecutive 4-bit values on the corresponding lower bitmap is "0".

階層化ビットマツプを用いて、未使用領域を捜す方式は
、次のアルゴリズムに従う。
The method of searching for an unused area using a hierarchical bitmap follows the following algorithm.

(1)最上方のビットマツプ410を使って、値が“0
″であるビットを捜す。この時、メモリ450の第0番
地(第8図最右端)を担当するビット411から調べる
。これは、ガーベージコレクション処理の時に行なわわ
るリロケーションにより、メモリ450の第0番地側に
、常に使用される構造体が格納される可能性が高くなる
ためである。値が“θ″であるビットを見つけたら、処
理(2)へ移る。
(1) Using the uppermost bitmap 410, the value is “0”.
''. At this time, the bit 411 that is in charge of address 0 of the memory 450 (the rightmost end in FIG. 8) is searched. This is because there is a high possibility that a structure that is always used will be stored on the side.If a bit whose value is "θ" is found, the process moves to process (2).

(2)上方のビットマツプから送られてきた、値が“0
”の上方のビットマツプ上のビットの位置から、そのビ
ットに対応する連続した4ビツトを訓べる。
(2) The value sent from the upper bitmap is “0”
From the position of the bit on the bitmap above ``, we can learn the consecutive 4 bits corresponding to that bit.

要求された未使用領域の大きさが、現在調べているビッ
トマツプ上のビットに対応するメモリ450上の領域の
大きさより大きい時は、処理(3)を行なう。値が“0
″のビットを捜し、下方のビットマツプに対し、処理(
2)を行なう。
When the size of the requested unused area is larger than the size of the area on the memory 450 corresponding to the bit on the bitmap currently being examined, process (3) is performed. The value is “0”
″ bit, and perform the processing (
Do 2).

(3)要求された未使用領域の大きさに相当する、値が
全て“0″のビット列を捜し、そのビット列の先頭ビッ
トの位置をめ、下方のビットマツプに対し処理(2)を
行なう。但し、現在調べているビットマツプがビットマ
ツプ440の時は、見つかったビット列の先頭ビット位
置からメモIJ 450上の未使用領域の先頭アドレス
をめ出力する。
(3) Search for a bit string whose values are all "0", which corresponds to the size of the requested unused area, locate the first bit of that bit string, and perform process (2) on the lower bitmap. However, when the bitmap currently being examined is the bitmap 440, the starting address of the unused area on the memo IJ 450 is calculated and output from the starting bit position of the found bit string.

本構造体メモリ管理方式により、プロローグの実行時に
行なわれる多数の構造体の動的生成・消滅操作の結果生
じる一度使用済みとなったメモリセルを回収するガーベ
ージコレクション処理ヲ外部装置の負荷から切り離し、
構造体メモリを使用している外部装置からみたガーベー
ジコレクション処理時間を短縮することができる。
This structure memory management method separates the load on external devices from the garbage collection process that collects used memory cells that occur as a result of the dynamic creation and destruction of a large number of structures during prologue execution.
Garbage collection processing time seen from an external device using structure memory can be reduced.

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

第1図は、構造体を固定領域を使って実現した時の一例
を示す概念図、第2図は、構造体を可変現した時のガー
ベージコレクションの一例を示す概念図、第4図は、本
発明の一実施例である構造体メモリ管理装置のブロック
図である。また、第5図、第6図は、本発明のガーベー
ジコレクション方式を説明する概念図であり、第7図、
第8図、4話鉢跡は、本発明の階層化ビットマツプを説
明する概念図である。 図において、lOは2進木リストセル、20は構造体毛
領域、21は要素数領域、22はマークビット、詔はデ
ータ領域、30はメモリ、31は使用中の構造体領域、
32は使用済み領域、iooはブロック管理ユニッ+−
,ioiはブロック番号領域、102はマークビット領
域、103はポインタ領域、104はサイズ領域、11
0はキャッジ−管理メモリ、111はキャッシュ用ブロ
ック番号領域、112はキャッシュ用マークビット領域
、113はキャッシュ用ポインタ領域、120は構造体
メモリ管理ユニット、121は階層化ビットマツプ、1
30はメモリ、140はキャッシュメモリ、160はス
タックメモリ、170はデータバス、180は内部バス
、190はアドレスバス、131は使用中領域、132
,134は使用済領域、300.410,420,43
0,440はビットマツプ、310.450はメモリで
あり、411はビットマツプ410の1ビツトを表わし
ている。 第1図 n 第 2 図 第3図 (+) (2) 躬4図 第5図 第6図 第7図 300 第 8 図 手続補正書軸発) 59、10122 昭和 年 月 日 1、 iJl’l、の表示 昭和58年 特詐 願第1
36126号2、発明の名称 構造体メモリ管理方式3
、補正をする者 事件との関係 出 願 人 東京都港区芝IL丁「」33番1号 4、代理人 5、補正の対象 明細書の発明の詳細な説明の欄 図面 6、補正の内容 1)明細書第11頁第16行目に「190は、」とある
のを「200は、」と補正する。 2)本願添付図面の第4図を別紙図面のように補正する
。 代理人 弁理士 内 原 ヨ
Figure 1 is a conceptual diagram showing an example of when a structure is realized using a fixed area, Figure 2 is a conceptual diagram showing an example of garbage collection when a structure is expressed mutably, and Figure 4 is 1 is a block diagram of a structure memory management device that is an embodiment of the present invention. FIG. Further, FIGS. 5 and 6 are conceptual diagrams explaining the garbage collection method of the present invention, and FIGS.
FIG. 8, Episode 4, is a conceptual diagram illustrating the hierarchical bitmap of the present invention. In the figure, IO is a binary tree list cell, 20 is a structure area, 21 is an element number area, 22 is a mark bit, the edict is a data area, 30 is a memory, 31 is a structure area in use,
32 is used area, ioo is block management unit +-
, ioi is a block number area, 102 is a mark bit area, 103 is a pointer area, 104 is a size area, 11
0 is a cache management memory, 111 is a cache block number area, 112 is a cache mark bit area, 113 is a cache pointer area, 120 is a structure memory management unit, 121 is a hierarchical bitmap, 1
30 is a memory, 140 is a cache memory, 160 is a stack memory, 170 is a data bus, 180 is an internal bus, 190 is an address bus, 131 is an area in use, 132
, 134 is used area, 300.410, 420, 43
0,440 is a bitmap, 310,450 is a memory, and 411 represents one bit of the bitmap 410. Figure 1 n Figure 2 Figure 3 (+) (2) Figure 4 Figure 5 Figure 6 Figure 7 300 Figure 8 Procedural Amendments Axis) 59, 10122 Showa Year Month Day 1, iJl'l Display of 1981 Special Fraud Application No. 1
No. 36126 2, Title of invention Structure memory management method 3
, Relationship with the case of the person making the amendment Applicant: 33-1-4, Shiba IL-cho, Minato-ku, Tokyo, Agent 5, Column for detailed description of the invention in the specification to be amended, Drawing 6, Contents of the amendment 1) On page 11, line 16 of the specification, "190 is" is amended to "200 is". 2) Figure 4 of the drawings attached to this application is amended to look like an attached drawing. Agent Patent Attorney Yo Uchihara

Claims (1)

【特許請求の範囲】[Claims] 固定長のヘッダ部と可変長のデータ部とから成る構造体
を貯える大容量メモリと、前記大容量メモリの一部を貯
え、外部装置によってアクセスされるキャッシュメモリ
と、前記大容量メモリの使用中領域と未使用中領域とを
識別するための情報を保持する階層化ビットマツプと、
前記大容量メモリ及び、前記キャッシュメモリに格納さ
れている個々の構造体を識別するための番号と前記大容
量メモリ上の格納番地との間の変換処理と、前記大容量
メモリに新たな構造体を格納するための連続領域が確保
できなくなった時、前記大容量メモリ上の構造体で使用
中のものを、前記階層化ビットマツプの情報を使用して
前記大容量メモリ中でリロケートし、前記新たな構造体
の格納領域を確保する操作を前記外部装置が前記キャッ
ジ−メモリを用いて処理を実行するのと並行して行なう
ブロック管理ユニットと、前記キャッジ−メモリに格納
されている構造体の識別番号と前記キャッシュメモリ上
の格納番地間の変換と、前記キャッシュメモリ上に存在
しない構造体を前記大容量メモリから取ってきたり、新
たに生成された構造体を前記大容量メモリに格納する処
理を実行するキャッジ−管理ユニットとを備え、前記ブ
ロック管理ユニットが前記大容量メモリへアクセスする
のと並行して、前記外部装置が前記キャッシュ管理ユニ
ットを使用して前記キャッシュメモリをアクセスできる
ことを特徴とする構造体メモリ管理方式。
a large-capacity memory that stores a structure consisting of a fixed-length header part and a variable-length data part; a cache memory that stores a part of the large-capacity memory and is accessed by an external device; and a cache memory that stores a part of the large-capacity memory and is accessed by an external device; a layered bitmap that holds information for identifying areas and unused areas;
the large capacity memory; a conversion process between a number for identifying each structure stored in the cache memory and a storage address on the large capacity memory; and a new structure in the large capacity memory. When it is no longer possible to secure a contiguous area to store the structure in the large capacity memory, the structure in use in the large capacity memory is relocated in the large capacity memory using the information in the layered bitmap, and the structure in the new large capacity memory is relocated. a block management unit that performs an operation for securing a storage area for a structure in parallel with the execution of processing by the external device using the cache memory; and identification of the structure stored in the cache memory. conversion between a number and a storage address on the cache memory, fetching a structure that does not exist on the cache memory from the large capacity memory, and storing a newly generated structure in the large capacity memory. and a cache management unit that executes the cache management unit, and the external device can access the cache memory using the cache management unit in parallel with the block management unit accessing the large capacity memory. Structure memory management method.
JP13612683A 1983-07-26 1983-07-26 Structure memory control system Pending JPS6027962A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13612683A JPS6027962A (en) 1983-07-26 1983-07-26 Structure memory control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13612683A JPS6027962A (en) 1983-07-26 1983-07-26 Structure memory control system

Publications (1)

Publication Number Publication Date
JPS6027962A true JPS6027962A (en) 1985-02-13

Family

ID=15167909

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13612683A Pending JPS6027962A (en) 1983-07-26 1983-07-26 Structure memory control system

Country Status (1)

Country Link
JP (1) JPS6027962A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61105653A (en) * 1984-07-31 1986-05-23 テキサス インスツルメンツ インコ−ポレイテツド Computer memory having parallel garbage correcting function independent of user's processor connected

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61105653A (en) * 1984-07-31 1986-05-23 テキサス インスツルメンツ インコ−ポレイテツド Computer memory having parallel garbage correcting function independent of user's processor connected

Similar Documents

Publication Publication Date Title
EP0127753B1 (en) Method for executing a distribution sort
EP2817741B1 (en) Method and apparatus utilizing non-uniform hash functions for placing records in non-uniform access memory
US4758946A (en) Page mapping system
US9740706B2 (en) Management of intermediate data spills during the shuffle phase of a map-reduce job
AU2010265984C1 (en) Scalable indexing in a non-uniform access memory
US6401181B1 (en) Dynamic allocation of physical memory space
US20080243966A1 (en) System and method for managing temporary storage space of a database management system
CN111984425B (en) Memory management method, device and equipment for operating system
US11061676B2 (en) Scatter gather using key-value store
JPS63116232A (en) Method of memorizing and retrieving data using computer
CN113609310B (en) Single-machine large-scale knowledge map embedding system and method
JPH06105435B2 (en) Storage management mechanism by information processing device
JPS6027962A (en) Structure memory control system
CN106293510A (en) A kind of data sharing method towards MVS and system
Cockshott Addressing mechanisms and persistent programming
JP3875358B2 (en) Storage device, storage method, and recording medium
Lv et al. RotaryDS: fast storage for massive data streams via a rotation storage model
Cheng et al. Design and Implementation of Dynamic Memory Allocation Algorithm in Embedded Real-Time System
JPS59158459A (en) Structure memory recovery system
JP2001022640A (en) Memory managing method
CN118860669B (en) Memory allocation method, product, equipment and storage medium
JPS6084647A (en) Structure memory controller
JPS61184651A (en) Storage-area control system
JP3570050B2 (en) file server
JPH01191229A (en) File control system