[go: up one dir, main page]

JPH06161864A - Object storage managing method - Google Patents

Object storage managing method

Info

Publication number
JPH06161864A
JPH06161864A JP4310381A JP31038192A JPH06161864A JP H06161864 A JPH06161864 A JP H06161864A JP 4310381 A JP4310381 A JP 4310381A JP 31038192 A JP31038192 A JP 31038192A JP H06161864 A JPH06161864 A JP H06161864A
Authority
JP
Japan
Prior art keywords
garbage collection
pointer
area
processor element
processor
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
JP4310381A
Other languages
Japanese (ja)
Inventor
Toshinari Takahashi
俊成 高橋
Toshio Okamoto
利夫 岡本
Ichiro Tomota
一郎 友田
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP4310381A priority Critical patent/JPH06161864A/en
Publication of JPH06161864A publication Critical patent/JPH06161864A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Memory System (AREA)

Abstract

(57)【要約】 【目的】 本発明は、アプリケーションの記述時にガベ
ージ・コレクションの動作を意識することなく、効率良
いオブジェクト参照ができるオブジェクト記憶管理方法
を提供する。 【構成】 プロセッサ・エレメント41、42の持つ記
憶領域の一部をガベージ・コレクション対象領域51、
52とし、これら領域51、52のアクセスをページャ
ーで管理することで、これらアクセスを一時的に禁止す
るようにしている。
(57) [Summary] [Object] The present invention provides an object storage management method capable of efficiently referring to an object without paying attention to the operation of garbage collection when writing an application. [Arrangement] A part of the storage area of the processor elements 41, 42 is a garbage collection target area 51,
52, the access to these areas 51 and 52 is managed by a pager so that these accesses are temporarily prohibited.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、計算機のネットワーク
・ファイル・システムなどの分散データ・ベースに用い
られるオブジェクト記憶管理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an object storage management method used for a distributed database such as a network file system of a computer.

【0002】[0002]

【従来の技術】一般に、インクリメンタルなガベージ・
コレクションの基本はBakerのアルゴリズム(Li
st Processing in Real Tim
e on a Serial Computer,Co
mmunications of the ACM,V
ol.21,No.4,pp.280−294,197
8)による。そして、分散・並列型のシステムにおける
ガベージ・コレクションは、Bakerのアルゴリズム
の拡張により実現できる。
2. Description of the Related Art Generally, incremental garbage
The basis of the collection is Baker's algorithm (Li
st Processing in Real Tim
e on a Serial Computer, Co
mmunications of the ACM, V
ol. 21, No. 4, pp. 280-294, 197
According to 8). Garbage collection in a distributed / parallel system can be realized by extending Baker's algorithm.

【0003】ここで、Bakerのアルゴリズムは複写
方式であり、利用可能な記憶領域を大きく2つに分け、
オブジェクトの探索をしながら、訪問したオブジェクト
を順に新しい領域に複写するようにしている。
Here, Baker's algorithm is a copying method, and the usable storage area is roughly divided into two.
While searching for objects, the visited objects are sequentially copied to a new area.

【0004】しかして、従来では、図12に示すように
オブジェクト領域をfromspace131とtos
pace132の2つに分けていて、最初は全てのオブ
ジェクトがfromspace131にあるものとす
る。そして、fromspace131を使い切った時
にガベージ・コレクションが開始される。すなわち、未
使用領域の先頭を指すポインタ133(以下Bと書く)
がガベージ・コレクション中に作成されたオブジェクト
の先頭へのポインタ134(以下Tと書く)にぶつかっ
たときにガベージ・コレクションが開始される。ここ
で、130はオブジェクトのセルから他のオブジェクト
を参照するポインタである。図13はガベージ・コレク
ションが開始され、オブジェクトがtospace13
2に移動を始めた様子を示したものである。
However, in the past, as shown in FIG. 12, the object area is defined as the fromspace 131 and the tos.
It is assumed that all objects are in the space 132 and that all objects are initially located in the fromspace 131. Then, when the fromspace 131 is used up, garbage collection is started. That is, a pointer 133 that points to the beginning of an unused area (hereinafter referred to as B)
Garbage collection is started when hits a pointer 134 (hereinafter referred to as T) to the head of the object created during garbage collection. Here, 130 is a pointer that refers to another object from the cell of the object. In Fig. 13, garbage collection is started, and the object is tospace13.
It shows how the movement started in 2.

【0005】まず、B133および走査用のポインタ1
35(以下Sと書く)がtospace132の先頭を
指し、T134がtospace132の底を指すよう
にする。そして、オブジェクトの参照のルートとなるオ
ブジェクトを全てtospace132に先頭からコピ
ーして、その分B133を下に移動する。次に、S13
5を下向きに走査し、fromspace131への参
照があれば、そのオブジェクトをtospace132
にコピーする。この操作を続け、S135がB133ま
で達した時、有効なオブジェクトのtospace13
2へのコピーが終了する。
First, B133 and the pointer 1 for scanning
35 (hereinafter referred to as S) points to the head of the tospace 132, and T134 points to the bottom of the tospace 132. Then, all the objects that are the reference routes of the objects are copied to the tospace 132 from the beginning, and B133 is moved downward by that amount. Next, S13
5 downwards, and if there is a reference to fromspace131, then that object is tospace132
To copy. When this operation is continued and S135 reaches B133, the valid object tospace13
Copying to 2 is complete.

【0006】ところで、このようなガベージ・コレクシ
ョンが実行されている間、これ以外の処理も続行される
ことがあり、このため新たなオブジェクトを生成する必
要がある。この場合は、B133の指す未使用領域を作
り、B133を下に移動するのではなく、T134で指
されている所に配置し、その分T134を上に移動す
る。これは、新たに作られたオブジェクトを再びS13
5で走査する無駄を省くためである。また、B133の
指すところに新しいオブジェクトを配置すると、ガベー
ジ・コレクタとその他の処理が交互にB133を動かす
ので、新たに作られたオブジェクトが記憶領域上の飛び
飛びの場所に配置されることになり、データのローカリ
ティが阻害されるためでもある。
By the way, while such a garbage collection is being executed, other processing may be continued, so that it is necessary to generate a new object. In this case, the unused area pointed to by B133 is created, and B133 is not moved downward, but is placed at the position pointed to by T134, and T134 is moved upward accordingly. This recreates the newly created object in S13.
This is because the waste of scanning in 5 is omitted. Also, if a new object is placed at the location pointed to by B133, the garbage collector and other processing alternately move B133, so the newly created object will be placed in a scattered place on the storage area. This is also because the locality of data is hindered.

【0007】ガベージ・コレクションの終了後、tos
pace132を使いきると(B133がT134に達
する)、今度はfromspace131とtospa
ce132を逆にして同様の操作を行う。ここで、アル
ゴリズムを実行中に、他の処理も同時に動いているにも
かかわらず、正しくガベージ・コレクションが行われる
理由は以下のとおりである。
After the garbage collection, tos
When space 132 is used up (B133 reaches T134), this time fromspace131 and tospa
The same operation is performed by reversing ce132. Here, the reason why the garbage collection is correctly performed while the other processes are simultaneously operating during the execution of the algorithm is as follows.

【0008】ここで「セル」とはオブジェクトまたはそ
の1部であり、他のオブジェクトを参照するポインタを
持っている場合があるようなもののことを呼ぶ。まず、
既にS135で走査されたセルは、それが直接指すセル
もtospace132に移動している。これを「黒
い」セルと呼ぶことにする。T134の下に新たに作ら
れたセルも黒いセルである。また、tospace13
2にはコピーされたが、まだS135で走査されていな
いセルは、fromspace131のセルを指してい
る可能性がある。これを「灰色」のセルと呼ぶことにす
る。有効な領域であるにもかかわらずまだfromsp
ace131にあるセルを「白い」セルと呼ぶ。この
時、次の3点を守りながら処理を進めればよい。 (1)各々のセルは順に「黒く」なっていき「白く」変
化することはない。 (2)黒いセルは決して白いセルを参照しない。 (3)ガベージ・コレクタ以外の処理からは黒いセルと
灰色のセルしか直接には見えない。
Here, the "cell" is an object or a part of the object, which may have a pointer for referencing another object. First,
For the cell already scanned in S135, the cell directly pointed to has also moved to tospace 132. We will call this the "black" cell. The cell newly created under T134 is also a black cell. Also, tospace13
Cells that have been copied to 2 but not yet scanned in S135 may point to the cells in fromspace131. We will call this the "gray" cell. Despite being a valid area, fromsp still
The cell in ace131 is called the "white" cell. At this time, the processing may be advanced while observing the following three points. (1) Each cell becomes “black” in sequence and does not change to “white”. (2) Black cells never refer to white cells. (3) Only black cells and gray cells can be directly seen by processes other than the garbage collector.

【0009】この3点を守るのはガベージ・コレクタ側
からは容易であるが、一般の処理からは難しい。まず、
オブジェクトの中身を参照する場合は、それが指してい
る先が何色のセルであるかを判定して、白いセルであれ
ばtospace132にコピーして灰色のセルにしな
ければならない。なぜなら、これをしないと、先の
(3)に反する場合があるからである。白いセルが見え
てしまうと、fromspace131にも有効なセル
が残ってしまい、fromspace131とtosp
ace132との切り替えができないので、次回のガベ
ージ・コレクションが行えない。
It is easy for the garbage collector to protect these three points, but it is difficult for general processing. First,
When referencing the contents of an object, it is necessary to determine what color the cell to which it points and if it is a white cell, copy it to tospace 132 to make it a gray cell. This is because if this is not done, it may go against (3) above. When the white cells are visible, valid cells remain in the fromspace131, and the fromspace131 and tosp
The next garbage collection cannot be performed because it cannot be switched to the ace132.

【0010】次に、オブジェクトの中身に持つポインタ
を書き換える場合は、全く気にする必要がない。その理
由は以下のとおりである。仮にpの中身をqに変えると
する。pとqは共に黒いセルまたは灰色のセルである。
まず、pが黒いセルでqが灰色のセルである場合は、後
にqがS135で走査されるので問題ない。また、qが
黒いセルでpが灰色のセルの場合は、まだS135に走
査されていないもの(pの中身)を捨てることになる
が、これも問題がない。なぜなら、もしそれが黒いセル
に指されていたとすると既にコピーされているし、そう
でないなら無効オブジェクトでない限り後にS135で
走査されるからである。また、pとqが共に黒いセルま
たは共に灰色のセルである場合は明らかである。
Next, when rewriting the pointer held in the contents of the object, there is no need to worry at all. The reason is as follows. Suppose that the contents of p are changed to q. Both p and q are black cells or gray cells.
First, if p is a black cell and q is a gray cell, there is no problem because q is scanned later in S135. If q is a black cell and p is a gray cell, the unscanned contents (contents of p) are discarded in S135, but there is no problem. This is because if it was pointed to a black cell it has already been copied, otherwise it will be scanned later in S135 unless it is an invalid object. It is also clear that both p and q are black cells or gray cells.

【0011】以上のようなアルゴリズムは、ガベージ・
コレクション自体の処理は容易であるかわりに、ガベー
ジ・コレクション以外の処理に大きな負担をかけること
を意味しており、このため計算機に十分な性能がない場
合や、実時間処理に重要性がない場合には向いていな
い。
The above algorithm is
It means that the processing of the collection itself is easy, but it imposes a heavy load on the processing other than garbage collection. Therefore, when the computer does not have sufficient performance or when real-time processing is not important. Not suitable for

【0012】そこで、分散・並列型のシステムにおいて
は、ガベージ・コレクションのために全ての処理を一時
停止することが考えられる。しかし、このように全ての
処理を一時停止することは、その間、計算機ユーザーの
業務が停止してしまうという問題があるため、次のよう
なアルゴリズムを基礎とした方法がとられているのが普
通である。
Therefore, in a distributed / parallel system, it is possible to suspend all the processes for garbage collection. However, suspending all processing in this way has the problem that the work of the computer user is suspended during that time, so the method based on the following algorithm is usually adopted. Is.

【0013】分散ガベージ・コレクションは、多数のプ
ロセッサ・エレメントを結合したマルチ・プロセッサ上
でガベージ・コレクションを行うものである。図14
は、マルチ・プロセッサのアーキテクチャを示してお
り、ネットワーク141に複数のプロセッサ・エレメン
ト142を接続し、これらプロセッサ・エレメント14
2にそれぞれローカルな記憶装置143を接続するよう
にしている。
Distributed garbage collection is garbage collection on a multi-processor in which a large number of processor elements are combined. 14
Shows a multi-processor architecture, connecting a plurality of processor elements 142 to a network 141,
A local storage device 143 is connected to each of the two.

【0014】ところで、各プロセッサ・エレメント14
2の記憶装置143への参照は、自己の記憶装置143
の参照に比べ、他の記憶装置143の参照がはるかに遅
いことから、プロセッサ・エレメント142を結ぶネッ
トワーク141がボトルネックとなる。そして、ガベー
ジ・コレクションは記憶装置143間の参照などの小さ
なデータを発生させることがあるので、同一のプロセッ
サ・エレメント142へのメッセージをできるだけまと
めて、1つの大きなメッセージにすることによって、ネ
ットワーク141への負担を軽減することが考えられて
いる。
By the way, each processor element 14
The reference to the second storage device 143 refers to the own storage device 143.
Since the reference of the other storage device 143 is much slower than the reference of (1), the network 141 connecting the processor elements 142 becomes a bottleneck. Since garbage collection may generate a small amount of data such as a reference between the storage devices 143, the messages to the same processor element 142 are combined as much as possible into one large message, and the data is sent to the network 141. It is considered to reduce the burden of.

【0015】分散ガベージ・コレクションを容易にする
方法のひとつは、ガベージ・コレクションをインクリメ
ンタルに行わないことである。この条件下で複数のプロ
セッサ・エレメントで並列にガベージ・コレクションを
実行する方法として、Crammond(A Garb
age Collection Algorithmf
or Shared Memory Parallel
Processors,Intemational
Journal of ParallelProgra
mming.Vol.17,No.6,pp.497−
522,1988)や、KL1(共有メモリマルチプロ
セッサにおけるガベージコレクションの並列実行と評
価,情報処理学会論文誌,Vol.33,No.3,p
p.298−305,1992)などが知られている。
One way to facilitate distributed garbage collection is to not perform garbage collection incrementally. As a method of executing garbage collection in parallel on a plurality of processor elements under this condition, Crammond (A Garb
age Collection Algorithm
or Shared Memory Parallel
Processors, Informational
Journal of Parallel Program
mming. Vol. 17, No. 6, pp. 497-
522, 1988) and KL1 (Parallel execution and evaluation of garbage collection in shared memory multiprocessor, Information Processing Society of Japan, Vol.33, No.3, p.
p. 298-305, 1992) and the like are known.

【0016】また、インクリメンタル分散ガベージ・コ
レクションのアルゴリズムとしてはRudalicsの
ものが知られている(Distributed Cop
ying Garbage Collection,p
roc.of the ACM Conference
on Lisp and FunctionalPr
ogramming 1986)。
Also, as an algorithm for incremental distributed garbage collection, Rudalics' algorithm is known (Distributed Cop).
ying Garbage Collection, p
roc. of the ACM Conference
on Lisp and Functional Pr
programming 1986).

【0017】そして、ローカルな記憶装置143は、図
15に示すように、root space151、fr
omspace131、tospace132の3つの
部分から成り立っている。root space151
は他のプロセッサ・エレメント142から参照されてい
るポインタを格納している。rootはオブジェクト本
体へのポインタである。fromspace131とt
ospace132はオブジェクトを格納する領域であ
り、それぞれ普通のオブジェクト(normal ob
ject)152、154と他のプロセッサ・エレメン
ト142の記憶装置143へのポインタ(remote
pointer)153、156を格納している。記
憶装置143内のセルから、他のプロセッサ・エレメン
ト142の記憶装置143のオブジェクトへのポインタ
を張る場合は、remote pointerを介して
行う。なお、155はfree areaである。
The local storage device 143, as shown in FIG. 15, has root spaces 151 and fr.
It consists of three parts, omspace131 and tospace132. root space151
Stores a pointer referenced by another processor element 142. Root is a pointer to the object body. fromspace131 and t
The osspace 132 is an area for storing objects, each of which is a normal object (normal object).
objects 152 and 154 and a pointer (remote) to the storage device 143 of the other processor element 142.
Pointer) 153 and 156 are stored. When a pointer from a cell in the storage device 143 to an object in the storage device 143 of another processor element 142 is set, it is performed via a remote pointer. In addition, 155 is a free area.

【0018】あるプロセッサ・エレメント142の記憶
装置143内のセルから、他のプロセッサ・エレメント
142の記憶装置143内のオブジェクトへのポインタ
は、図16のように3段階の間接参照を行う。図におい
て、161は他のプロセッサ・エレメント142を参照
するポインタを持つプロセッサ・エレメント、161は
他のプロセッサ・エレメント142から参照されるポイ
ンタを持つプロセッサ・エレメント、163はオブジェ
クトのセルから他のプロセッサ・エレメント142への
参照テーブルを指すポインタ、164は他のプロセッサ
・エレメント142への参照テーブルから、他のプロセ
ッサ・エレメント142へのポインタ、165は他のプ
ロセッサ・エレメント142からの参照テーブルからロ
ーカルなオブジェクトへのポインタである。そして、こ
こでは、記憶装置143の外への参照は少ないという予
想に基づいている。
A pointer from a cell in the storage device 143 of one processor element 142 to an object in the storage device 143 of another processor element 142 makes indirect reference in three stages as shown in FIG. In the figure, 161 is a processor element that has a pointer that references another processor element 142, 161 is a processor element that has a pointer that is referenced by the other processor element 142, and 163 is another processor element from the object cell. A pointer to a reference table to the element 142, 164 is a pointer from a reference table to another processor element 142, and a pointer to another processor element 142 is a local object from a reference table from another processor element 142. Is a pointer to. And, here, it is based on the expectation that there are few references to the outside of the storage device 143.

【0019】グローバルなガベージ・コレクションは、
global rootを持っているプロセッサ・エレ
メント142により開始される。まず、global
rootに指定されているrootsをマークする。あ
るプロセッサ・エレメント142でガベージ・コレクシ
ョンが開始されると、プロセッサ・エレメント142の
状態(State:FlipまたはScan)はSca
nに変わり、Bakerのアルゴリズムと同様、マーク
されたものが指しているオブジェクトをtospace
132にコピーしていく。ここで、図15中で157は
コピの終了したオブジェクト領域を操作するポインタ、
158はコピの終了したオブジェクト領域の先頭のポイ
ンタである。
Global garbage collection is
It is started by the processor element 142 which has a global root. First, global
Mark the roots specified in root. When garbage collection is started in a certain processor element 142, the state (State: Flip or Scan) of the processor element 142 becomes Sca.
change to n, and the object pointed by is marked tospace as in Baker's algorithm.
Copy it to 132. Here, in FIG. 15, 157 is a pointer for operating the object area for which copying has ended,
Reference numeral 158 is a pointer at the beginning of the object area for which copying has ended.

【0020】走査が終わると、次にremote po
interのうちコピーの終了したremote po
interの領域の先頭へのポインタ159(T)とコ
ピーの終了したremote pointerを走査す
るポインタ160(ST)との間にあるものについて、
それが指している先のプロセッサ・エレメント142へ
マーキングの要求を送る。その際、同一のプロセッサ・
エレメント142へのマーキングの要求はなるべく一つ
にまとめる。また、送られたマーキング・メッセージの
分だけMsgCountを増やす。
After the scanning is completed, next, remote po
remote po that has been copied out of the inter
For a pointer between the pointer 159 (T) to the beginning of the inter area and the pointer 160 (ST) that scans the remote pointer that has been copied,
It sends a request for marking to the processor element 142 to which it points. At that time, the same processor
The requirements for marking the element 142 should be combined as much as possible. Also, the MsgCount is increased by the amount of the marking message sent.

【0021】一方、マーキング・メッセージを受け取っ
たプロセッサ・エレメント142はStateをSca
nに変え、ガベージ・コレクションの終了後に、マーキ
ング・メッセージを送って来たプロセッサ・エレメント
142に完了メッセージを送る。
On the other hand, the processor element 142 receiving the marking message sets State to Sca.
After the garbage collection, the completion message is sent to the processor element 142 which sent the marking message.

【0022】完了メッセージを受けたプロセッサ・エレ
メント142はMsgCountを減らし、これが0に
なった時、そのScanは終了する。Global r
ootを持つプロセッサ・エレメント142のMsgC
ountが0になると、そこから他の全てのプロセッサ
・エレメント142にFlipメッセージを送ることに
より、全てのプロセッサ・エレメントのStateをF
lipに変え、全プロセッサ・エレメント142のガベ
ージ・コレクションが終了する。
Upon receiving the completion message, the processor element 142 decrements MsgCount, and when it becomes 0, the Scan ends. Global r
MsgC of processor element 142 with boot
When the count reaches 0, the Flip message is sent from all the other processor elements 142 to set the State of all the processor elements to F.
Then, the garbage collection of all the processor elements 142 is completed.

【0023】このようなアルゴリズムでは、ガベージ・
コレクションの実行中に、他の一般の処理が非常に複雑
になる。例えば、remote pointerを手放
すときには、そのremote pointerの指す
先にマーキング・メッセージを送る必要があるなど、ガ
ベージ・コレクションの実行手続きを強く意識してオブ
ジェクトのアクセスをしなければならない。
In such an algorithm, garbage
Other common operations become very complex while the collection is running. For example, when releasing a remote pointer, it is necessary to send a marking message to the destination pointed to by the remote pointer, and the object should be accessed with a strong awareness of the garbage collection execution procedure.

【0024】[0024]

【発明が解決しようとする課題】このように従来のオブ
ジェクト記憶管理方法にあっては、オブジェクトのイン
クリメンタルな分散ガベージ・コレクションを行うた
め、あらかじめ各プロセッサ・エレメントにremot
e pointerの領域を用意し、他のプロセッサ・
エレメントの参照はこのremote pointer
を介して行うことから、ガベージ・コレクションを意識
した処理を行わなければならず、Lispなどの特定の
言語しか使うことができなかった。
As described above, in the conventional object storage management method, in order to perform the incremental distributed garbage collection of the objects, the remote elements are preliminarily assigned to the respective processor elements.
Prepare an area for e pointer and
The element reference is this remote pointer
Since it is done via, it is necessary to perform processing that is aware of garbage collection, and only a specific language such as Lisp can be used.

【0025】また、全てのプロセッサ・エレメントの持
つオブジェクトを1つのポインタで表現する単一仮想記
憶を用いた分散記憶管理システムにおいては、プロセッ
サ・エレメントの違いを隠ぺいする機構を十分に生かす
ことができなかった。また、この場合、ガベージ・コレ
クション用の領域を用意することは、単に仮想領域を2
倍必要とするだけでなく、実際にパーシステント・オブ
ジェクトを格納できる量が半分になってしまうという重
大な問題点があった。
Further, in the distributed storage management system using the single virtual memory in which the objects of all the processor elements are represented by one pointer, the mechanism for hiding the difference between the processor elements can be fully utilized. There wasn't. Also, in this case, to prepare an area for garbage collection simply sets the virtual area to 2
There is a serious problem in that not only is it required twice, but the amount of persistent objects that can be actually stored is halved.

【0026】特に、広域ネットワークで結合された計算
機システムに於いては、全ての計算機がガベージ・コレ
クションに参加することを前提としたアルゴリズムは適
用できず、正常に処理が終了しないと重大なデータの損
失が起こる危険があった。
In particular, in a computer system connected by a wide area network, an algorithm based on the premise that all the computers participate in garbage collection cannot be applied, and if the processing is not normally completed, serious data will be lost. There was a risk of loss.

【0027】本発明は、上記事情に鑑みてなされたもの
で、アプリケーションの記述時にガベージ・コレクショ
ンの動作を意識することなく、効率良いオブジェクト参
照ができるオブジェクト記憶管理方法を提供することを
目的とする。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an object storage management method capable of efficiently referencing an object without paying attention to the operation of garbage collection when writing an application. .

【0028】[0028]

【課題を解決するための手段】本発明は、ネットワーク
上の複数のプロセッサ・エレメントの管理するオブジェ
クトを共有する記録装置において、一部の記憶領域のア
クセスを一時的に禁止する機構にネットワーク・ページ
ャを用い、該当記憶領域でのオブジェクトの再配置を可
能にするようにしている。
SUMMARY OF THE INVENTION The present invention provides a network pager as a mechanism for temporarily prohibiting access to a part of a storage area in a recording device sharing an object managed by a plurality of processor elements on a network. Is used to enable rearrangement of objects in the corresponding storage area.

【0029】また、本発明は、各記憶領域の一部または
全部で、オブジェクトの再配置を行った時刻と各領域の
オブジェクトを持つプロセッサの再配置に参加した時刻
を比較することで、再配置されたオブジェクトへのポイ
ンタの無効を検出するようにしている。また、本発明
は、オブジェクトの再配置を行う記憶領域の一部または
全部を一時的に他の記憶領域に移動してオブジェクトの
再配置を行うようにしている。
Further, according to the present invention, the rearrangement is performed by comparing the time when the object is rearranged and the time when the processor having the object in each region participates in the rearrangement in a part or all of each storage area. It detects the invalidity of the pointer to the created object. Further, according to the present invention, part or all of the storage area in which the object is rearranged is temporarily moved to another storage area to rearrange the object.

【0030】[0030]

【作用】この結果、本発明によれば、複数のプロセッサ
・エレメントのどこかに存在するオブジェクトを参照す
る手段として、ページャーにガベージ・コレクション実
行中の特殊動作を持たせることにより、LispやSm
alltalkのようなガベージ・コレクションをサポ
ートした特定言語を使わなくとも、アプリケーションの
記述時にガベージ・コレクションの動作を意識すること
なく、効率良いオブジェクトの参照ができる。つまり、
記憶領域のアクセスを一時的に禁止する機構をページャ
に持たせることにより、一般のアプリケーションはオブ
ジェクトの再配置を意識せずに分散オブジェクトを効率
良くアクセスすることができる。
As a result, according to the present invention, as a means for referencing an object existing somewhere in a plurality of processor elements, the pager has a special operation during garbage collection, so that Lisp or Sm can be obtained.
Even if you do not use a specific language that supports garbage collection, such as alltalk, you can refer to objects efficiently without paying attention to the behavior of garbage collection when writing an application. That is,
By giving the pager a mechanism for temporarily prohibiting access to the storage area, general applications can efficiently access distributed objects without being aware of object relocation.

【0031】この際、一部の記憶領域のオブジェクトの
アクセスだけを禁止するため、他のオブジェクトのアク
セスを停止する必要がなく、また、再配置する記憶領域
は、他の記憶領域に移動して処理することもできるの
で、ガベージ・コレクションのために用意しなければな
らない記憶領域は最小限にとどめることができる。
At this time, since access to only some objects in the storage area is prohibited, it is not necessary to stop access to other objects, and the storage area to be relocated is moved to another storage area. It can also be processed, minimizing the amount of storage that must be provided for garbage collection.

【0032】さらに、各記憶領域ごとに、オブジェクト
の再配置を行った時刻の履歴を持つことにより、オブジ
ェクトの再配置の失敗や不参加によって一部の情報が失
われても、重大なデータの損失が起こらずにデータの修
復を行うことができる。
Further, by having a history of the time when the objects are relocated for each storage area, even if some information is lost due to failure or non-participation of the object relocation, serious data loss will occur. The data can be repaired without causing the error.

【0033】これにより、従来事実上不可能であったネ
ットワークで共有されたオブジェクトの再配置が実現で
きるとともに、再配置されることを意識せずにアプリケ
ーションの開発ができるようになる。
As a result, relocation of objects shared in a network, which has been virtually impossible in the past, can be realized, and applications can be developed without being aware of relocation.

【0034】[0034]

【実施例】以下、本発明の一実施例を図面に従い説明す
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0035】図1は同実施例の概略構成を示している。
この場合、複数のプロセッサ・エレメント2とガベージ
・コレクション用のプロセッサ・エレメント4をネット
ワーク1を介して結合している。そして、それぞれのプ
ロセッサ・エレメント2には、ローカルな記憶装置3を
接続している。ここでのローカルとは、高速にアクセス
できる領域という意味であり、通常、プロセッサ・エレ
メント2に結合された実メモリ、ハードディスク、CD
ROMなどの記憶装置と考えて良く、他のプロセッサ・
エレメントからアクセスすることができても構わない。
また、ガベージ・コレクション用のプロセッサ・エレメ
ント4には、ガベージ・コレクション用の記憶装置5を
接続している。
FIG. 1 shows a schematic configuration of the same embodiment.
In this case, a plurality of processor elements 2 and a processor element 4 for garbage collection are connected via a network 1. A local storage device 3 is connected to each processor element 2. The term "local" here means an area that can be accessed at high speed, and is usually a real memory, a hard disk, a CD coupled to the processor element 2.
You can think of it as a storage device such as a ROM, and
It does not matter if it can be accessed from the element.
A storage device 5 for garbage collection is connected to the processor element 4 for garbage collection.

【0036】そして、ローカルな各記憶装置3は、図2
に示すように記憶領域201〜205を単一仮想記憶と
して配置している。これにより、同一のオブジェクト
は、どのプロセッサ・エレメントのどのスレッド(プロ
セス)からも同一の値のポインタで参照でき、一般プロ
グラマからは単なるメモリ参照命令で参照することがで
きる。一方、ガベージ・コレクション用の記憶装置5の
記憶領域207は、単一仮想記憶にはマッピングされて
いない。
Each local storage device 3 is shown in FIG.
As shown in, the storage areas 201 to 205 are arranged as a single virtual storage. As a result, the same object can be referenced by a pointer having the same value from any thread (process) of any processor element, and can be referenced from a general programmer by a simple memory reference instruction. On the other hand, the storage area 207 of the storage device 5 for garbage collection is not mapped to a single virtual storage.

【0037】ローカルな記憶装置3の記憶領域201〜
205には、ルート・ポインタのセルが含まれる。この
セルはガベージ・コレクションによって消去されること
のない領域であり、少なくとも1つ以上のローカルな記
憶領域の中に存在する。この場合、単一仮想記憶の一部
に、同一の値のポインタの指す記憶領域がスレッドによ
って異なるようなマルチ仮想記憶領域が含まれていても
よい。その場合はRudalicsのアルゴリズムと同
様にremote pointerを介してアクセスす
るようにすれば良い。本実施例においては、マルチ仮想
記憶領域が含まれていない場合を例として説明する。
Storage areas 201 to 1 of the local storage device 3
205 contains the cell of the root pointer. This cell is an area that is not erased by garbage collection and exists in at least one or more local storage areas. In this case, a part of the single virtual memory may include a multi virtual memory area in which the storage area pointed to by the pointer of the same value differs depending on the thread. In that case, the access may be performed via a remote pointer as in the Rudalics algorithm. In this embodiment, the case where the multi virtual storage area is not included will be described as an example.

【0038】一般に、ローカルな記憶装置3の領域をア
クセスするには、物理メモリなどのキャッシング領域を
利用して高速化するが、その部分のローカルな仮想記憶
手法は一般的なものを使うものとして、本実施例では説
明しない。
Generally, in order to access the local area of the storage device 3, the speed is increased by utilizing a caching area such as a physical memory. However, it is assumed that the local virtual memory method of that part uses a general method. No description will be given in this embodiment.

【0039】本実施例におけるガベージ・コレクション
は、1つまたは複数の記憶領域をガベージ・コレクショ
ン対象領域として指定し、ガベージ・コレクション実行
中はガベージ・コレクション対象領域へのアクセスを完
全に停止する。ガベージ・コレクション対象でない領域
へのアクセスは通常のオブジェクトのアクセスの方法と
同じである。
In the garbage collection in this embodiment, one or a plurality of storage areas are designated as the garbage collection target area, and the access to the garbage collection target area is completely stopped during the garbage collection. Accessing an area that is not subject to garbage collection is the same as a normal object access method.

【0040】この場合、ガベージ・コレクション対象領
域の全サイズを大きくするほど、ガベージ・コレクショ
ンの回数が減るので、分散システム全体でのパフォーマ
ンスは向上するが、ガベージ・コレクションにより一時
的にアクセスできなくなる領域とその時間が大きくな
る。また、ガベージ・コレクション対象領域の全サイズ
を小さくし過ぎると、ガベージ・コレクションの処理速
度がオブジェクト生成速度に追い付かず、結局ガベージ
・コレクションのための停止時間が長くなってしまうの
で、適当なサイズに決めるのが効率的である。
In this case, as the total size of the target area for garbage collection increases, the number of times of garbage collection decreases, so that the performance of the entire distributed system improves, but the area that is temporarily inaccessible due to garbage collection. And that time gets bigger. Also, if the total size of the target area for garbage collection is too small, the processing speed of garbage collection will not catch up with the object creation speed, and the stop time for garbage collection will end up taking a long time. It is efficient to decide.

【0041】分散オブジェクト記憶管理システムにおい
て、オブジェクトのアクセスは単一仮想記憶のアドレス
による。そして、アクセスしたアドレスのオブジェクト
がガベージ・コレクション対象領域に含まれているか否
かの判定は、単一仮想記憶を実現するページャの機能に
含ませるようにする。
In a distributed object storage management system, object access is by address of a single virtual storage. Then, the determination as to whether or not the object of the accessed address is included in the garbage collection target area is included in the function of the pager that realizes the single virtual memory.

【0042】通常、ページャはページ・フォルトを検出
するとページ・イン関数を呼び出し、適当な記憶領域か
らローカルなキャッシュ(実メモリなど)にコピーをし
て、利用可能とする。ガベージ・コレクション実行中に
は、ページ・テーブルのエントリに対し、ガベージ・コ
レクション実行中のフラグを設定することにより、ペー
ジ・イン操作を禁止し、アクセス・エラーまたはアクセ
ス待ちの状態を発生させる。
Normally, when a pager detects a page fault, it calls a page-in function, copies it from an appropriate storage area to a local cache (real memory, etc.), and makes it available. During execution of garbage collection, a page-in operation is prohibited by setting a flag indicating that garbage collection is being executed for an entry in the page table, and an access error or access wait state is generated.

【0043】ガベージ・コレクション対象領域のオブジ
ェクトは、この機構によりガベージ・コレクション実行
中にアクセスされることはなく、一括してローカルなガ
ベージ・コレクションを実行することができる。全くア
クセスされないのであるから、ガベージ・コレクション
用に用意した記憶領域(ローカルな記憶領域より高速か
またはサイズが大きい)を利用してローカルなガベージ
・コレクション処理を実行してもよい。以下、ガベージ
・コレクション実行の手順を詳述する。この場合、ネッ
トワークの状態を図3に示している。
Objects in the target area for garbage collection are not accessed during the garbage collection by this mechanism, and local garbage collection can be executed collectively. Since it is not accessed at all, the local garbage collection process may be executed by using the storage area prepared for garbage collection (faster or larger in size than the local storage area). The procedure for executing garbage collection will be described in detail below. In this case, the state of the network is shown in FIG.

【0044】この図では、ガベージ・コレクション対象
領域51および52がそれぞれプロセッサ・エレメント
41および42の持つ記憶領域全体であるという例を示
している。その他、ネットワーク1、プロセッサ・エレ
メント2、ローカルな記憶装置3の接続は、図1で述べ
のと同様である。
This figure shows an example in which the garbage collection target areas 51 and 52 are the entire storage areas of the processor elements 41 and 42, respectively. Other than that, the connection of the network 1, the processor element 2, and the local storage device 3 is the same as described in FIG.

【0045】まず、ガベージ・コレクション対象領域を
決定する。比較的ローカルなネットワークにおいてはガ
ベージ・コレクションのスケジューラが、ガベージ・コ
レクション対象領域を適切に決定することができるが、
比較的広域なネットワークに対しては、ガベージ・コレ
クション開始のリクエスト・メッセージに対して、記憶
領域を整理しようとするプロセッサ・エレメントが自分
の持つローカルな記憶領域の一部または全部をガベージ
・コレクション対象領域とする旨の返事をすることによ
り、ネットワーク上のガベージ・コレクション対象領域
(単一仮想記憶のアドレス)を知る。
First, the garbage collection target area is determined. In a relatively local network, the garbage collection scheduler can appropriately determine the target area for garbage collection.
For a relatively wide area network, in response to a garbage collection start request message, some or all of the local storage area owned by the processor element attempting to clean up the storage area is subject to garbage collection. By replying that it is an area, the garbage collection target area (address of a single virtual memory) on the network is known.

【0046】次に、ガベージ・コレクションのリクエス
トを出したプロセッサ・エレメントは、ガベージ・コレ
クション対象領域となったページ情報を基に、ページ・
テーブルの書き換え要求メッセージを出す。
Next, the processor element that has issued the garbage collection request executes page collection based on the page information that is the target area for garbage collection.
Send a table rewrite request message.

【0047】ページ・テーブルの書き換え要求メッセー
ジを受けたプロセッサ・エレメントは、ガベージ・コレ
クション対象領域へのアクセスが禁止されるように、ペ
ージ・テーブルを書き換え、以降のガベージ・コレクシ
ョンのためのページ・テーブルの書き換え要求を拒否
し、ページ・テーブル書き換え終了メッセージをリクエ
ストしたプロセッサ・エレメントに送る。
The processor element receiving the page table rewrite request message rewrites the page table so that access to the garbage collection target area is prohibited, and the page table for the subsequent garbage collection. , And sends a page table rewrite end message to the requesting processor element.

【0048】ページ・テーブルの書き換え要求メッセー
ジには、強いメッセージと弱いメッセージがある。ここ
で強いメッセージとは、メッセージを送る相手のプロセ
ッサ・エレメントが必ずガベージ・コレクションの動作
に参加してくれることを期待するものである。一般に強
いメッセージは特定のプロセッサ・エレメントを指定し
て送られるが、弱いメッセージはネットワークにブロー
ドキャストするのが普通である。
The page table rewrite request message includes a strong message and a weak message. A strong message here means that the processor element to which the message is sent always participates in the garbage collection operation. Generally, strong messages are sent by designating a specific processor element, but weak messages are usually broadcast to the network.

【0049】ページ・テーブルの書き換え要求メッセー
ジを受けたプロセッサ・エレメントは、そのメッセージ
を拒否することができる。メッセージの拒否は、ページ
・テーブル書き換え終了メッセージを送らないことによ
って弱い宣言をする。
Upon receiving the page table rewrite request message, the processor element can reject the message. Message rejection is weakly declared by not sending a page table rewrite complete message.

【0050】ページ・テーブル書き換え要求メッセージ
を出したプロセッサ・エレメントは、終了メッセージを
一定時間待つ。その際、弱いメッセージに応答のないプ
ロセッサ・エレメントは無視する。応答のあったプロセ
ッサ・エレメントを、ここではガベージ・コレクション
に参加したプロセッサ・エレメントと呼ぶことにする。
The processor element which has issued the page table rewrite request message waits for a fixed time for the end message. Ignore processor elements that do not respond to weak messages. The processor element that responds will be referred to herein as the processor element that participated in the garbage collection.

【0051】強いメッセージに応答のないプロセッサが
一つでもあれば、ガベージ・コレクションを実行するこ
とができず、ガベージ・コレクションの開始不許可のメ
ッセージを、ガベージ・コレクションに参加したプロセ
ッサ・エレメントに送る。そうでなければ、ガベージ・
コレクションの開始を認めるメッセージを、ガベージ・
コレクションに参加した全てのプロセッサ・エレメント
に送る。
If at least one processor does not respond to a strong message, garbage collection cannot be performed, and a message indicating that garbage collection cannot be started is sent to the processor elements that participated in garbage collection. . Otherwise, garbage
A message to acknowledge the start of the collection
Send to all processor elements that participated in the collection.

【0052】ページ・テーブルの強い書き換え要求メッ
セージを出すということは、一般に、そのメッセージを
出したプロセッサ・エレメントの持つ記憶領域を積極的
に利用していることを意味しており、メッセージを出し
たプロセッサ・エレメントのローカルなガベージ・コレ
クションによって、その記憶領域のオブジェクトをアク
セスできなくなることのないようにするものである。
Issuing a strong rewrite request message for the page table generally means that the storage area of the processor element that issued the message is being actively used, and the message is issued. It ensures that local garbage collection of processor elements does not make the objects in that storage inaccessible.

【0053】各プロセッサ・エレメントは、ガベージ・
コレクションの開始不許可のメッセージを受けたら、ガ
ベージ・コレクション対象領域のアクセス禁止を解除
し、以降のガベージ・コレクションのためのページ・テ
ーブルの書き換え要求の拒否も解除する。
Each processor element is
When the message of collection start disapproval is received, the access prohibition of the garbage collection target area is released, and the refusal of subsequent page table rewriting requests for garbage collection is also released.

【0054】ガベージ・コレクションの開始を認めるメ
ッセージを受けたら、ガベージ・コレクション対象領域
以外のローカル記憶装置3では、図4(a)に示すよう
にリモート・ポインタ・テーブルの領域19、20をガ
ベージ・コレクション対象領域を持つプロセッサ・エレ
メントの数だけ用意する。ここで、18はルート・ポイ
ンタの領域、21はオブジェクト格納領域、22は未使
用領域である。
Upon receipt of the message that acknowledges the start of garbage collection, the local storage device 3 other than the garbage collection target area is set to the garbage collection area 19 or 20 of the remote pointer table as shown in FIG. 4A. Prepare the number of processor elements that have the collection target area. Here, 18 is an area of the root pointer, 21 is an object storage area, and 22 is an unused area.

【0055】この場合、他のプロセッサ・エレメントへ
のポインタを持たず、書き込みの禁止されている記憶領
域については以下に述べるポインタの更新処理を行う必
要がない。例えば、書き込み不可能なCD−ROMなど
の記憶装置がこれに相当する。
In this case, it is not necessary to perform the pointer updating process described below for a storage area in which writing is prohibited without having a pointer to another processor element. For example, a storage device such as a non-writable CD-ROM corresponds to this.

【0056】また、ガベージ・コレクション対象領域5
1については、図4(b)のように、リモート・ポイン
タ・テーブルの領域は自分自身の分は不要である。ま
た、現在オブジェクトが格納されている領域(ルート・
ポインタの領域18を除く)と同じかまたはそれ以上の
未使用領域22を用意する。
Further, the garbage collection target area 5
For 1, the area of the remote pointer table is not required for itself, as shown in FIG. In addition, the area where the object is currently stored (root /
An unused area 22 equal to or more than the pointer area 18) is prepared.

【0057】この際、十分な記憶領域が確保されない場
合や、高速な記憶装置を用いてガベージ・コレクション
を早く終了させたい場合には、ガベージ・コレクション
のために用意された記憶領域にコピーしてから実行して
もよい。つまり、本発明においては、ネットワーク上に
1つ以上のガベージ・コレクション用の記憶装置5があ
れば、従来方式のように2倍程度の記憶領域を用意しな
くても、ガベージ・コレクションを実行することができ
ることを意味している。次に、他のプロセッサ・エレメ
ントからのマーキング要求メッセージを受信できる状態
にする。
At this time, if a sufficient storage area is not secured, or if it is desired to end the garbage collection quickly using a high-speed storage device, copy it to the storage area prepared for garbage collection. You can run from In other words, in the present invention, if there is one or more storage devices 5 for garbage collection on the network, garbage collection is executed without preparing about twice as many storage areas as in the conventional method. It means that you can. Next, it is ready to receive marking request messages from other processor elements.

【0058】もしローカルなルート・ポインタを持てば
そこからマーキングを開始する。マーキング中にガベー
ジ・コレクション対象領域へのポインタが出現したら、
そのポインタを該当するリモート・ポインタ・テーブル
に保存する。ただし、すでにリモート・ポインタ・テー
ブルに登録されているポインタの場合は新たに登録しな
い。この際、ガベージ・コレクタ以外の一般プログラム
も同時に実行されているのであるから、マーキングは、
一般プログラムの動作を阻害しない場所に行う。
If we have a local root pointer, we start marking from there. When a pointer to the garbage collection target area appears during marking,
Save the pointer in the appropriate remote pointer table. However, if the pointer is already registered in the remote pointer table, it is not newly registered. At this time, since general programs other than the garbage collector are also being executed at the same time, marking is
Place in a place that does not interfere with the operation of general programs.

【0059】また、図5(a)に示すようなガベージ・
コレクション対象領域のオブジェクトをマーキングする
際には、図5(b)に示すように新しい領域にコピーす
るとともに、新しい領域へのポインタ25と古い領域へ
のポインタ26をセットする。この際、新しい領域のア
ドレスは、ガベージ・コレクション終了後に移動するア
ドレスであるから、オブジェクト格納領域21の先頭の
アドレスと、未使用領域22の先頭のアドレスは一致す
ることに注意する。ここで言うアドレスとは、単一仮想
記憶上でのアドレスであり、ローカルなガベージ・コレ
クタの使う論理アドレスのことではない。ここで、23
はマーキングするオブジェクト、24はコピーしたオブ
ジェクトである。
Further, as shown in FIG.
When marking an object in the collection target area, it is copied to a new area as shown in FIG. 5B, and a pointer 25 to the new area and a pointer 26 to the old area are set. At this time, since the address of the new area is an address to be moved after the end of the garbage collection, note that the start address of the object storage area 21 and the start address of the unused area 22 match. The address mentioned here is an address on a single virtual memory, not a logical address used by a local garbage collector. Where 23
Is an object to be marked, and 24 is a copied object.

【0060】図6はリモート・ポインタ・テーブルの格
納方法を示す図であり、同図(a)にリモート・ポイン
タの格納状態を、同図(b)は、このリモート・ポイン
タについてリモート・ポインタ・テーブルに登録された
状態を示している。
FIG. 6 is a diagram showing a method of storing the remote pointer table. FIG. 6A shows the storage state of the remote pointer, and FIG. 6B shows the remote pointer table for this remote pointer. The state registered in the table is shown.

【0061】リモート・ポインタ・テーブルに登録され
たセル29には、同図(b)の如くリモート・ポインタ
を繋ぐ逆転ポインタ300が格納され、また、リモート
・ポインタの値(ガベージ・コレクションを実行する前
のポインタの値)も格納されている。ここで、27はリ
モート・ポインタ、28はリモート・ポインタが格納さ
れていたセルである。
The reverse pointer 300 connecting the remote pointers is stored in the cell 29 registered in the remote pointer table as shown in FIG. 9B, and the value of the remote pointer (to execute garbage collection). The previous pointer value) is also stored. Here, 27 is a remote pointer, and 28 is a cell in which the remote pointer was stored.

【0062】リモート・ポインタ・テーブルの領域が一
杯になるか、またはローカルにマーキングするオブジェ
クトがなくなったとき、他のプロセッサ・エレメントに
マーキング要求メッセージを送る。マーキング要求メッ
セージは、リモート・ポインタ・テーブルから、送る相
手のプロセッサ・エレメントへのリモート・ポインタの
リストを持つ。
When the remote pointer table is full or there are no more objects to mark locally, send a marking request message to the other processor elements. The marking request message has a list of remote pointers from the remote pointer table to the destination processor element to send.

【0063】マーキング要求メッセージを受けたプロセ
ッサ・エレメントは、自分へのリモート・ポインタの値
を使ってマーキングを続行する。そのマーキング要求メ
ッセージに関するマーキングが終了したら、ローカル・
マーキング終了メッセージを、マーキングを要求したプ
ロセッサ・エレメントに返す。
Upon receipt of the marking request message, the processor element continues marking with the value of the remote pointer to itself. When marking of the marking request message is complete, the local
A marking end message is returned to the processor element that requested marking.

【0064】各々のプロセッサ・エレメントは、他のプ
ロセッサ・エレメントにマーキング要求メッセージを記
憶していて、全てのマーキング要求メッセージに対して
終了メッセージの応答があったとき、ローカルなマーキ
ングを終了する。マーキングを行った全てのプロセッサ
・エレメントでローカルなマーキングが終了したら、ガ
ベージ・コレクションのリクエストを出したプロセッサ
・エレメントは全プロセッサ・エレメントにグローバル
・マーキング終了メッセージを出す。
Each processor element stores the marking request message in the other processor elements, and terminates the local marking when the end message is replied to all the marking request messages. When the local marking is completed in all the marked processor elements, the processor element that requests garbage collection issues a global marking end message to all the processor elements.

【0065】ガベージ・コレクション対象領域を持たな
いプロセッサ・エレメントは、グローバル・マーキング
終了メッセージを受けると、ローカルな全オブジェクト
からマーキングを消す。
When the processor element having no target area for garbage collection receives the global marking end message, it erases the marking from all local objects.

【0066】ガベージ・コレクション対象領域を持つプ
ロセッサ・エレメントは、図7に示すように、自分自身
の移動先リストを、ガベージ・コレクションに参加した
他の全てのプロセッサ・エレメントに送る。この場合、
移動先リストのヘッダ124には自分自身がどのプロセ
ッサ・エレメントのどの記憶領域であるかを宣言する。
各プロセッサ・エレメントは、他のプロセッサ・エレメ
ントの持つ記憶領域の単一仮想記憶上アドレスを知って
いるので、送るべき移動前アドレス125と移動後アド
レス126はそれぞれローカルな記憶領域内の相対アド
レスにすれば、移動先リストのデータ量を小さくするこ
とができる。ここで、127は通信される移動先リスト
である。移動先リストは2回以上に分けて送っても良
い。
As shown in FIG. 7, the processor element having the garbage collection target area sends its own destination list to all the other processor elements that participated in the garbage collection. in this case,
In the header 124 of the destination list, it is declared which storage area of which processor element it is.
Since each processor element knows the address on the single virtual memory of the storage area of the other processor element, the pre-movement address 125 and the post-movement address 126 to be sent are respectively relative addresses in the local storage area. By doing so, the amount of data in the destination list can be reduced. Here, 127 is a list of destinations to be communicated. The destination list may be sent twice or more.

【0067】通信量を減らすために、この通信には移動
しないポインタの情報は含めない。しかし、それでもな
お、粒度の細かいポインティングのされているシステム
では、この通信が非常に重くなる可能性もある。
In order to reduce the amount of communication, the information of the pointer that does not move is not included in this communication. However, this communication can nevertheless be very heavy on systems with fine-grained pointing.

【0068】この問題を解決するため、図8に示すよう
にオブジェクトのノードとなるような参照されやすいデ
ータを記憶領域のルート・セルや、それに続く先頭領域
30に置く。先頭領域30は、ルート・セルではない
が、ガベージ・コレクションによって移動しないことに
する。これによって、他のプロセッサ・エレメントから
先頭領域30へのポインタの更新のための通信を行う必
要がなくなる。
In order to solve this problem, as shown in FIG. 8, data that is to be referred to as an object node is placed in the root cell of the storage area or the head area 30 following it. The top area 30 is not the root cell, but is not moved by garbage collection. This eliminates the need for communication for updating the pointer from the other processor element to the head area 30.

【0069】ここで、115はローカルなオブジェクト
を指すポインタを含むセルで、ルート・セルの領域にあ
るもの、116はローカルなオブジェクトを指すポイン
タを含むセルで、先頭領域にあるもの、117はルート
・セル内からローカルなオブジェクトへのポインタ、1
18は先頭領域のセル内からローカルなオブジェクトへ
のポインタ、119はルート・セル内から指されたオブ
ジェクト、120は先頭領域のセル内から指されたオブ
ジェクトである。
Here, 115 is a cell containing a pointer pointing to a local object in the area of the root cell, 116 is a cell containing a pointer pointing to a local object in the beginning area, 117 is the root -Pointer to the local object from within the cell, 1
Reference numeral 18 is a pointer to a local object from within the cell of the head area, 119 is an object pointed from within the root cell, and 120 is an object pointed from within the cell of the head area.

【0070】一般に、リモート・プロセッサ・エレメン
トから参照されるオブジェクトの大部分はファイルなど
の大きなデータであるので、通信される移動先リストの
データ量は小さなものである。
Generally, most of the objects referred to by the remote processor element are large data such as files, and therefore the amount of data in the destination list to be communicated is small.

【0071】特に、この先頭領域30に割り付けるセル
の大きさを一定にしておけば、不要になった領域を図9
に示すように再利用することができる。この例では、不
要になった先頭領域をフリー・リストで繋ぐことによ
り、オブジェクト119へのポインタのセル116をオ
ブジェクト122へのポインタのセル121として再利
用している。
In particular, if the size of the cell to be allocated to this head area 30 is kept constant, the unnecessary area is shown in FIG.
It can be reused as shown in. In this example, the cell 116 of the pointer to the object 119 is reused as the cell 121 of the pointer to the object 122 by connecting the unnecessary head areas with the free list.

【0072】オブジェクト123が不要になったという
ことはガベージ・コレクションの際にマーキングされな
いことによって知ることができるので、実際には消去さ
れたオブジェクトの領域123には既に他のオブジェク
トが格納されている。この再利用の方法は、ルート・セ
ルにも全く同様に適用できる。
The fact that the object 123 is no longer needed can be known by not marking it at the time of garbage collection, so in reality, another object is already stored in the erased object area 123. . This reuse method can be applied to the root cell in exactly the same way.

【0073】移動先リストを受けたプロセッサ・エレメ
ントは、それをもとに、リモート・ポインタ・テーブル
に登録されているポインタの値を更新する。まず、移動
先リストに含まれているポインタについては、同じもの
をリモート・ポインタ・テーブルに登録されたセルの移
動前アドレスと一致するものを検索し、もしあれば新し
いアドレスを移動先リストから算出し、逆転ポインタ3
00をたどりながら更新する。移動先リストの受信が終
了した記憶領域に関するリモート・ポインタ領域につい
ては、元のアドレスに戻す。
The processor element that has received the destination list updates the value of the pointer registered in the remote pointer table based on it. First, for the pointers included in the destination list, search for the same pointer that matches the pre-movement address of the cell registered in the remote pointer table, and if there is, calculate a new address from the destination list. And reverse pointer 3
Update while tracing 00. The remote pointer area related to the storage area for which the reception of the destination list is completed is returned to the original address.

【0074】全ての記録領域について、移動先リストの
受信が終了したら、ローカルなガベージ・コレクション
の終了メッセージをガベージ・コレクションのリクエス
トを出したプロセッサに送る。ガベージ・コレクション
のリクエストを出したプロセッサは、全ての終了メッセ
ージを受けるのを待つ。最後に、ページ・テーブルを元
に戻すメッセージを全プロセッサ・エレメントに送るこ
とにより、ガベージ・コレクションは終了する。
When the reception of the destination list for all the recording areas is completed, a local garbage collection end message is sent to the processor that issued the garbage collection request. The processor that issued the garbage collection request waits for all termination messages. Finally, garbage collection is terminated by sending a page table undo message to all processor elements.

【0075】一般にはデータの異常やシステムのダウン
などにより、全てのプロセッサ・エレメントで正常終了
するとは限らない。そのような場合には、異常なデータ
を誤ってアクセスすることを防ぎ、エラーとして検出す
る。
Generally, not all processor elements normally end due to abnormal data or system down. In such a case, the abnormal data is prevented from being erroneously accessed and detected as an error.

【0076】各プロセッサ・エレメントは、前回ガベー
ジ・コレクションの実行が開始された時間、前回ガベー
ジ・コレクションの実行が完了した時間を記録してい
る。ガベージ・コレクションの開始時間は全プロセッサ
・エレメントに共通のものであり、ガベージ・コレクシ
ョン開始のリクエストを出すプロセッサが最初に発信す
る。これらのデータに矛盾が生じた場合、例えば参照し
ている他のプロセッサ・エレメントで実行された最新の
ガベージ・コレクションに自分自身が参加していない場
合には、そのポインタを無効(空)にする。ただし、当
該ポインタの指す領域が、ガベージ・コレクションより
も後に確保された領域である場合には、この処理を行わ
ない。
Each processor element records the time when the execution of the previous garbage collection was started and the time when the execution of the previous garbage collection was completed. The garbage collection start time is common to all processor elements, and is sent first by the processor that issues the request to start garbage collection. If these data are inconsistent, for example, if you are not participating in the most recent garbage collection performed by another processor element you are referencing, then invalidate (empty) the pointer. . However, if the area pointed to by the pointer is an area secured after the garbage collection, this processing is not performed.

【0077】この処理は特に非常に遠くのネットワーク
のデータを参照していて、そのガベージ・コレクション
に参加できなかったプロセッサ・エレメントに典型的な
ものである。
This process is typical of processor elements that are particularly referencing data on very distant networks and were unable to participate in their garbage collection.

【0078】この処理を怠ると、グローバルなガベージ
・コレクションの失敗によって、他のプロセッサ・エレ
メントへの参照オブジェクトが変化してしまうことにな
る。この処理を不用意に行って、ポインタを無効にして
しまわないために、前記の強いメッセージを利用する。
If this processing is neglected, the reference objects to other processor elements will change due to the failure of global garbage collection. This strong message is used in order not to invalidate the pointer by inadvertently performing this processing.

【0079】また、参照先のプロセッサ・エレメントの
最新のガベージ・コレクションに自分自身が参加してい
るが、その処理が完了していない場合には、やはり、そ
の参照ポインタを無効にする。この処理は特にガベージ
・コレクション中に自分自身のマシンがダウンした時に
典型的なものである。また、実際にそのメモリ・アクセ
スが起きた時にこの処理を行うだけでなく、無効なポイ
ンタとなったか否かだけを検出することもできる。
If the self-participation in the latest garbage collection of the referenced processor element is not completed yet, the reference pointer is invalidated. This process is typical, especially when your own machine goes down during garbage collection. Further, it is possible not only to perform this processing when the memory access actually occurs, but also to detect only whether or not the pointer becomes invalid.

【0080】本発明のオブジェクト記憶管理方式におい
ては、ページング・システムがページ管理と一緒にガベ
ージ・コレクション管理を行うことができるので、プロ
グラマはガベージ・コレクションの実行中であるか否か
を意識する必要がない。
In the object storage management method of the present invention, since the paging system can perform garbage collection management together with page management, the programmer needs to be aware of whether or not garbage collection is being executed. There is no.

【0081】ガベージ・コレクション管理を行うことが
できるページング方式を実現した構成を図10に示して
いる。図において、401はネットワーク、402はペ
ージテーブル・レジスタ、403はページテーブル・ア
ドレスレジスタ、404はCPU、405は仮想アドレ
ス記憶装置、406はページテーブル、407は物理メ
モリ、408は二次記憶装置、420はページ有効フラ
グ、421はアクセス権フラグ、422はガベージ・コ
レクション実行中フラグ、423はガベージ・コレクシ
ョン実行時刻記憶装置、424はページフレーム、42
5は二次記憶装置アドレス記憶装置である。
FIG. 10 shows a configuration that realizes a paging method capable of performing garbage collection management. In the figure, 401 is a network, 402 is a page table register, 403 is a page table address register, 404 is a CPU, 405 is a virtual address storage device, 406 is a page table, 407 is a physical memory, 408 is a secondary storage device, 420 is a page valid flag, 421 is an access right flag, 422 is a garbage collection executing flag, 423 is a garbage collection execution time storage device, 424 is a page frame, and 42 is a page frame.
Reference numeral 5 is a secondary storage device address storage device.

【0082】そして、このような構成について図11に
示す処理が実行される。この場合、プロセスが例外を起
こすと、この例外を起こした番地に対応する領域をロッ
クする(ステップ1101)。この場合、例外を起こし
た番地が仮想アドレス空間でなければ(ステップ110
2)、セグメンテーション違反として(ステップ110
3)エラー終了する。一方、仮想アドレス空間であれば
(ステップ1102)、対応する領域が現在ガベージコ
レクション実行中か判断する(ステップ1104)。こ
こでYESならば領域が最後にガベージコレクションさ
れた時刻は、実行中のマシンがその領域のマシンのガベ
ージコレクションに最後に参加した時刻よりも後かを判
断する(ステップ1105)。そして、ここでYESな
らば該当領域は失われているとして(ステップ110
6)、エラー終了する。NOならば、新しいページを領
域に割り当て(ステップ1107)、領域のロックを解
除して(ステップ1108)、ページングを終了する。
Then, the processing shown in FIG. 11 is executed for such a configuration. In this case, when the process causes an exception, the area corresponding to the address causing the exception is locked (step 1101). In this case, the address that caused the exception is not the virtual address space (step 110).
2), as a segmentation violation (step 110)
3) End with an error. On the other hand, if it is the virtual address space (step 1102), it is determined whether the corresponding area is currently undergoing garbage collection (step 1104). If YES here, it is determined whether the time when the area was last garbage collected is later than the time when the running machine last participated in the garbage collection of the machine in the area (step 1105). Then, if YES here, the corresponding area is lost (step 110).
6) The process ends in error. If NO, a new page is assigned to the area (step 1107), the area is unlocked (step 1108), and the paging is terminated.

【0083】一方、ステップ1104でNOならば、現
在のページングモードを判断し(ステップ1109)、
該当領域がガベージコレクション実行中のためアクセス
不可能(ステップ1110)またはガベージコレクショ
ン終了待ち(ステップ1111)になる。
On the other hand, if NO in step 1104, the current paging mode is judged (step 1109),
Since the relevant area is under garbage collection, it is inaccessible (step 1110) or waits for the end of garbage collection (step 1111).

【0084】従って、このようにすれば、コピー方式の
ガベージ・コレクションの特徴を生かし、万一データ異
常やシステム・トラブルが発生した場合にも、異常の起
きたデータを検出することができる。なお、本発明は上
記実施例にのみ限定されず、要旨を変更しない範囲で適
宜変形して実施できる。
Therefore, in this way, by utilizing the characteristics of the garbage collection of the copy method, even if a data abnormality or system trouble should occur, the abnormal data can be detected. The present invention is not limited to the above-mentioned embodiments, and can be implemented by appropriately modifying it without changing the gist.

【0085】[0085]

【発明の効果】以上説明したように本発明によれば、記
憶領域のアクセスを一時的に禁止する機構をページャに
持たせることにより、一般のアプリケーションはオブジ
ェクトの再配置を意識せずに分散オブジェクトを効率良
くアクセスすることができる。これにより、アプリケー
ションの実行を停止させることなく効率的なオブジェク
ト再配置を行うことができる。また、ネットワーク上の
一部の計算機に限って処理を行うこともでき、万一処理
中に異常が起きても異常なポインタの消去を行うので、
非常に信頼性の高いオブジェクト管理を行うことができ
る。さらに、無駄な記憶領域を使うこともなくなり、壊
れたポインタによるデータ・アクセスにより矛盾が生じ
ることを防ぐことができる。
As described above, according to the present invention, by providing the pager with a mechanism for temporarily prohibiting access to the storage area, a general application does not need to be aware of relocation of objects and the distributed objects can be distributed. Can be accessed efficiently. As a result, efficient object relocation can be performed without stopping the execution of the application. Also, it is possible to perform processing only on some computers on the network, and even if an abnormality occurs during processing, the abnormal pointer is deleted, so
You can do very reliable object management. Furthermore, useless storage area is not used, and it is possible to prevent inconsistency due to data access by a broken pointer.

【0086】また、一部の記憶領域のオブジェクトのア
クセスだけを禁止するため、他のオブジェクトのアクセ
スを停止する必要がなく、また、再配置する記憶領域
は、他の記憶領域に移動して処理することもできるの
で、ガベージ・コレクションのために用意しなければな
らない記憶領域は最小限にとどめることができる。
Since access to only some objects in the storage area is prohibited, it is not necessary to stop access to other objects, and the storage area to be relocated is moved to another storage area for processing. It also minimizes the amount of storage that must be provided for garbage collection.

【0087】さらに、各記憶領域ごとに、オブジェクト
の再配置を行った時刻の履歴を持つことにより、オブジ
ェクトの再配置の失敗や不参加によって一部の情報が失
われても、重大なデータの損失が起こらずにデータの修
復を行うことができる。
Further, by having a history of the time when the objects are relocated for each storage area, even if some information is lost due to failure or non-participation of the object relocation, serious data loss will occur. The data can be repaired without causing the error.

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

【図1】本発明の一実施例が適用されるシステム構成
図。
FIG. 1 is a system configuration diagram to which an embodiment of the present invention is applied.

【図2】一実施例の単一仮想記憶を説明するための図。FIG. 2 is a diagram for explaining a single virtual memory according to an embodiment.

【図3】ネットワーク状態を示す図。FIG. 3 is a diagram showing a network state.

【図4】ガベージ・コレクション対象領域のローカル記
憶装置の内部図。
FIG. 4 is an internal view of a local storage device in a garbage collection target area.

【図5】リモート・ポインタの格納状態およびリモート
・ポインタ・テーブルに登録された状態を示す図。
FIG. 5 is a diagram showing a storage state of a remote pointer and a state registered in a remote pointer table.

【図6】リモート・ポインタ・テーブルの格納方法を示
す図。
FIG. 6 is a diagram showing a method of storing a remote pointer table.

【図7】ガベージ・コレクション対象領域を持つプロセ
ッサ・エレメントの移動先リストを示す図。
FIG. 7 is a diagram showing a movement destination list of a processor element having a garbage collection target area.

【図8】移動先リストの通信を説明するための図。FIG. 8 is a diagram for explaining communication of a destination list.

【図9】移動先リストの通信を説明するための図。FIG. 9 is a diagram for explaining communication of a destination list.

【図10】ガベージ・コレクション管理を行うことがで
きるページング方式を実現した構成を示す図。
FIG. 10 is a diagram showing a configuration realizing a paging method capable of performing garbage collection management.

【図11】図10に示すページング方式を説明するため
の図。
11 is a diagram for explaining the paging method shown in FIG.

【図12】従来のBakerのアルゴリズムが適用され
る記憶領域の状態例を示す図。
FIG. 12 is a diagram showing a state example of a storage area to which a conventional Baker algorithm is applied.

【図13】Bakerのアルゴリズムによるガベージ・
コレクション実行例を示す図。
FIG. 13: Garbage based on Baker's algorithm
The figure which shows a collection execution example.

【図14】分散メモリの接続図。FIG. 14 is a connection diagram of a distributed memory.

【図15】プロセッサ・エレメントの記憶領域を示す
図。
FIG. 15 is a diagram showing a storage area of a processor element.

【図16】リモート・プロセッサ・エレメント内オブジ
ェクトの参照方法を示す図。
FIG. 16 is a diagram showing a method of referring to an object in a remote processor element.

【符号の説明】[Explanation of symbols]

1…ネットワーク、2…プロセッサ・エレメント、3…
ローカルな記憶装置、4…ガベージ・コレクション用の
プロセッサ・エレメント、5…ガベージ・コレクション
用のローカルな記憶装置、401…ネットワーク、40
2…ページテーブル・レジスタ、403…ページテーブ
ル・アドレスレジスタ、404…CPU、405…仮想
アドレス記憶装置、406…ページテーブル、407…
物理メモリ、408…二次記憶装置、420…ページ有
効フラグ、421…アクセス権フラグ、422…ガベー
ジ・コレクション実行中フラグ、423…ガベージ・コ
レクション実行時刻記憶装置、424…ページフレー
ム、425…二次記憶装置アドレス記憶装置。
1 ... Network, 2 ... Processor element, 3 ...
Local storage device, 4 ... Processor element for garbage collection, 5 ... Local storage device for garbage collection, 401 ... Network, 40
2 ... Page table register, 403 ... Page table address register, 404 ... CPU, 405 ... Virtual address storage device, 406 ... Page table, 407 ...
Physical memory, 408 ... Secondary storage device, 420 ... Page valid flag, 421 ... Access right flag, 422 ... Garbage collection execution flag, 423 ... Garbage collection execution time storage device, 424 ... Page frame, 425 ... Secondary Storage address storage device.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 ネットワーク上の複数のプロセッサ・エ
レメントが管理するオブジェクトを共有する記録装置に
おいて、一部の記憶領域のアクセスを一時的に禁止する
機構にネットワーク・ページャを用い、該当記憶領域で
のオブジェクトの再配置を可能にしたことを特徴とする
オブジェクト記憶管理方法。
1. In a recording device that shares an object managed by a plurality of processor elements on a network, a network pager is used as a mechanism for temporarily prohibiting access to a part of the storage area, and An object storage management method characterized by enabling relocation of objects.
【請求項2】 各記憶領域の一部または全部で、オブジ
ェクトの再配置を行った時刻と各領域のオブジェクトを
持つプロセッサの再配置に参加した時刻を比較すること
で、再配置されたオブジェクトへのポインタの無効を検
出することを特徴とする請求項1記載のオブジェクト記
憶管理方法。
2. A relocated object is obtained by comparing the time when an object is relocated in a part or all of each storage area and the time when a processor having an object in each area participates in the relocation. 2. The object storage management method according to claim 1, wherein the invalidity of the pointer is detected.
JP4310381A 1992-11-19 1992-11-19 Object storage managing method Pending JPH06161864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4310381A JPH06161864A (en) 1992-11-19 1992-11-19 Object storage managing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4310381A JPH06161864A (en) 1992-11-19 1992-11-19 Object storage managing method

Publications (1)

Publication Number Publication Date
JPH06161864A true JPH06161864A (en) 1994-06-10

Family

ID=18004570

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4310381A Pending JPH06161864A (en) 1992-11-19 1992-11-19 Object storage managing method

Country Status (1)

Country Link
JP (1) JPH06161864A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970022782A (en) * 1995-10-06 1997-05-30 리 패치 Systems and methods for managing distributed object resources
JP2016504665A (en) * 2012-11-22 2016-02-12 ゼットティーイー コーポレイション Buffer processing method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970022782A (en) * 1995-10-06 1997-05-30 리 패치 Systems and methods for managing distributed object resources
JP2016504665A (en) * 2012-11-22 2016-02-12 ゼットティーイー コーポレイション Buffer processing method and apparatus

Similar Documents

Publication Publication Date Title
US5226143A (en) Multiprocessor system includes operating system for notifying only those cache managers who are holders of shared locks on a designated page by global lock manager
US6629152B2 (en) Message passing using shared memory of a computer
US5414840A (en) Method and system for decreasing recovery time for failed atomic transactions by keeping copies of altered control structures in main memory
US6757787B2 (en) Adaptive cache coherence protocols
US6430580B1 (en) Method of replication-based garbage collection in a multiprocessor system
KR100233207B1 (en) Cache flush device and calculator system with the device
EP0389242B1 (en) Data base processing system using multiprocessor system
US5222217A (en) System and method for implementing operating system message queues with recoverable shared virtual storage
US5313647A (en) Digital data processor with improved checkpointing and forking
US5946711A (en) System for locking data in a shared cache
JP4176857B2 (en) Using tristate references to manage referenced objects
EP0450917A2 (en) Distributed computer systems
US20050120080A1 (en) Method and apparatus for virtual memory mapping and transaction management in an object-oriented database system
JPH1063561A (en) System and method for automatically changing database access method to insert database object processing instruction
JPH0799509B2 (en) How to control the entry of a block of data into memory
JPH08129457A (en) Method and apparatus for expansion,reduction and redistribution of external storage structure
US6119150A (en) Message passing distributed shared memory system that eliminates unnecessary software controlled cache flushes or purges
US5611070A (en) Methods and apparatus for performing a write/load cache protocol
EP0533447B1 (en) Digital data processor with improved paging
JP3295436B2 (en) Microprocessor cache consistency
EP0404560A2 (en) Improved multiprocessor system
US5619691A (en) File sharing method and system for multiprocessor system
JPH06161864A (en) Object storage managing method
JP3626609B2 (en) Multiprocessor system
JP3866448B2 (en) Internode shared file control method