JP2001331457A - Distributed shared memory system - Google Patents

Distributed shared memory system

Info

Publication number
JP2001331457A
JP2001331457A JP2000148848A JP2000148848A JP2001331457A JP 2001331457 A JP2001331457 A JP 2001331457A JP 2000148848 A JP2000148848 A JP 2000148848A JP 2000148848 A JP2000148848 A JP 2000148848A JP 2001331457 A JP2001331457 A JP 2001331457A
Authority
JP
Japan
Prior art keywords
remote
memory
class
remote memory
shared memory
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
JP2000148848A
Other languages
Japanese (ja)
Inventor
Mitsuo Ando
光男 安藤
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2000148848A priority Critical patent/JP2001331457A/en
Publication of JP2001331457A publication Critical patent/JP2001331457A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Computer And Data Communications (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve flexibility in the case of operating a remote memory. SOLUTION: In order for a remote machine 100 to share a shared memory 114 inside a host machine 110 as the remote memory, the remote machine 100 is provided with a remote memory control application 101 for operating the shared memory 114 as the remote memory and an object-oriented communication framework 103 and also the host machine 110 is provided with a host memory control application 111 for operating the scared memory 114 as a host memory and an object-oriented communication framework 113. Then, a function group 102 for the remote memory control application 101 to access the object-oriented communication framework 103 is realized by a remote type definition.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、各計算機が独立し
たアドレス空間を持つ複数の計算機がネットワークを介
して結合され、各計算機内メモリ上に分散したデータを
共有する疎結合計算機システムにおける分散共有メモリ
方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a distributed sharing in a loosely-coupled computer system in which a plurality of computers each having an independent address space are connected via a network to share data distributed on a memory in each computer. It relates to a memory system.

【0002】[0002]

【従来の技術】この種の従来例として、例えば特開平1
0−91445号公報、特開平7−152708号公報
に示すように、疎結合計算機システムにおける共有メモ
リは物理的に分散しているので、各計算機がリモートメ
モリ上に格納されたデータにアクセスするには、特別な
関数を作成してリモートメモリを操作することが一般的
である。
2. Description of the Related Art A conventional example of this kind is disclosed in, for example,
As described in Japanese Patent Application Laid-Open No. 0-91445 and Japanese Patent Application Laid-Open No. 7-152708, the shared memory in the loosely-coupled computer system is physically distributed, so that each computer accesses data stored in the remote memory. It is common to create special functions to manipulate remote memory.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記従
来例では、特別な関数を作成してリモートメモリを操作
することによりアクセスするので、プログラム言語が有
するデータ型及び構造体などのデータ型をリモートメモ
リに対して宣言してアクセスすることができず、柔軟性
が低いという問題点がある。
However, in the above conventional example, since a special function is created and accessed by manipulating the remote memory, the data types such as data types and structures of the programming language are stored in the remote memory. Cannot be declared and accessed, and there is a problem that flexibility is low.

【0004】本発明は上記の問題点に鑑み、リモートメ
モリを操作する場合に柔軟性を高めることができる分散
共有メモリ方式を提供することを目的とする。
[0004] In view of the above problems, an object of the present invention is to provide a distributed shared memory system which can increase flexibility when operating a remote memory.

【0005】[0005]

【課題を解決するための手段】第1の手段は上記目的を
達成するために、独立したアドレス空間を持つ複数の計
算機がネットワークを介して結合されて各計算機内のメ
モリ上に分散したデータを共有する疎結合計算機システ
ムにおける分散共有メモリ方式であって、前記計算機
は、他の計算機内のリモートメモリに対してオブジェク
ト指向プログラム言語のリモートメモリ記述クラスによ
りアクセスするインタフェース手段を備えたことを特徴
とする。
According to a first aspect of the present invention, in order to achieve the above object, a plurality of computers having independent address spaces are connected via a network to distribute data distributed on a memory in each computer. A distributed shared memory system in a shared loosely-coupled computer system, wherein the computer includes interface means for accessing a remote memory in another computer by a remote memory description class of an object-oriented programming language. I do.

【0006】第2の手段は、第1の手段において前記イ
ンタフェース手段が、リモートメモリに対してデータ型
指定でアクセスする手段を有することを特徴とする。
The second means is characterized in that in the first means, the interface means has means for accessing a remote memory by data type designation.

【0007】第3の手段は、第1、第2の手段において
前記インタフェース手段が、リモートメモリに対して構
造体の型指定でアクセスする手段を有することを特徴と
する。
The third means is characterized in that in the first and second means, the interface means has means for accessing a remote memory by designating a structure type.

【0008】第4の手段は、第1ないし第3の手段にお
いて前記オブジェクト指向プログラム言語が、C++言
語であることを特徴とする。
The fourth means is characterized in that in the first to third means, the object-oriented programming language is a C ++ language.

【0009】[0009]

【発明の実施の形態】以下、図面を参照して本発明の実
施の形態について説明する。図1は本発明に係る分散共
有メモリ方式の一実施形態を示すブロック図、図2は図
1のリモートマシンのオブジェクト指向通信フレームワ
ークが有するリモートメモリクラスと、ホストマシンの
オブジェクト指向通信フレームワークが有する共有メモ
リクラスを示す説明図、図3はリモート型定義クラスの
関連を示す説明図、図4はリモートメモリを操作するサ
ンプルプログラムを示す説明図、図5は図4のサンプル
プログラムによる動作シーケンスを示す説明図、図6は
構造体の関連を示す説明図、図7は構造体のコントラク
タによる動作シーケンスを示す説明図である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a distributed shared memory system according to the present invention. FIG. 2 is a diagram showing a remote memory class of the object-oriented communication framework of the remote machine of FIG. 1 and an object-oriented communication framework of the host machine. FIG. 3 is an explanatory diagram showing the relationship between remote type definition classes, FIG. 4 is an explanatory diagram showing a sample program for operating a remote memory, and FIG. 5 is an operation sequence based on the sample program in FIG. FIG. 6 is an explanatory diagram showing the relationship between structures, and FIG. 7 is an explanatory diagram showing an operation sequence of the structure by a contractor.

【0010】図1は独立したアドレス空間を持つ複数の
計算機としてリモートマシン100とホストマシン11
0がネットワーク120を介して結合されて各計算機内
のメモリ(図1ではホストマシン110内の共有メモリ
114のみを示す)上に分散したデータを共有する疎結
合計算機システムを示している。
FIG. 1 shows a remote machine 100 and a host machine 11 as a plurality of computers having independent address spaces.
0 shows a loosely-coupled computer system which is connected via a network 120 and shares data distributed on a memory in each computer (only the shared memory 114 in the host machine 110 is shown in FIG. 1).

【0011】このような構成において、リモートマシン
100がホストマシン110内の共有メモリ114をリ
モートメモリとして共有するために、リモートマシン1
00は共有メモリ114をリモートメモリとして操作す
るリモートメモリ制御アプリケーション101とオブジ
ェクト指向通信フレームワーク103を有し、また、ホ
ストマシン110は共有メモリ114をホストメモリと
して操作するホストメモリ制御アプリケーション111
とオブジェクト指向通信フレームワーク113を有す
る。そして、リモートメモリ制御アプリケーション10
1がオブジェクト指向通信フレームワーク103にアク
セスする為の関数群102をリモート型定義で実現す
る。
In such a configuration, the remote machine 100 shares the shared memory 114 in the host machine 110 as a remote memory.
00 has a remote memory control application 101 operating the shared memory 114 as a remote memory and an object-oriented communication framework 103, and the host machine 110 has a host memory control application 111 operating the shared memory 114 as a host memory.
And an object-oriented communication framework 113. Then, the remote memory control application 10
1 realizes a function group 102 for accessing the object-oriented communication framework 103 by remote type definition.

【0012】ここで、プログラム言語におけるデータ型
指定には、プログラム言語が提供する予約語のデータ型
と、プログラム開発者が新たに作成するデータ型が一般
的に存在する。データ型の生成、削除、演算、代入処理
は、同一のアドレス空間にデータが存在することを前提
として設計されている。そのため、独立したアドレス空
間に対してデータ型を指定するには、特別な関数を使用
してデータの生成、削除、演算、代入処理を実現しなけ
ればならない。本発明では、独立したアドレス空間に対
してオブジェクト指向通信フレームワーク103、11
3を使用して共有メモリ114を実現する。また、共有
メモリ114にアクセスするリモートメモリのデータ型
指定及び、データ型の生成方法(ポインタ及び配列)を
プログラム言語が備える機能と同等のものを実現する。
Here, the data type designation in the programming language generally includes a data type of a reserved word provided by the programming language and a data type newly created by a program developer. The data type generation, deletion, operation, and assignment processing are designed on the assumption that data exists in the same address space. Therefore, in order to specify a data type for an independent address space, data generation, deletion, operation, and assignment processing must be realized using a special function. In the present invention, the object-oriented communication frameworks 103, 11
3 is used to implement the shared memory 114. In addition, the data type designation of the remote memory accessing the shared memory 114 and the method of generating the data type (pointer and array) are realized as those equivalent to the functions provided in the programming language.

【0013】オブジェクト指向通信フレームワーク10
3は図2に示すようなリモートメモリクラス(rmemor
y)200を有し、このリモートメモリクラス200は
リモートメモリに対して生成、削除、演算、代入処理を
実現する。このとき、リモートメモリを生成するため
に、固有のハンドル番号を使用してメモリ確保のサイズ
を要求する。リモートメモリクラス200は、ホストマ
シン110のオブジェクト指向通信フレームワーク11
3が有する共有メモリクラス(hmemory)250と通信を
行い、ホストマシン110上の共有メモリ114に対す
るメモリ確保要求を行う。
Object-oriented communication framework 10
3 is a remote memory class (rmemor
y) 200, and this remote memory class 200 implements creation, deletion, calculation, and assignment processing for the remote memory. At this time, in order to generate a remote memory, a request for the size of memory reservation is made using a unique handle number. The remote memory class 200 corresponds to the object-oriented communication framework 11 of the host machine 110.
It communicates with the shared memory class (hmemory) 250 of 3 and issues a memory reservation request to the shared memory 114 on the host machine 110.

【0014】ホストマシン110のホストメモリオブジ
ェクトは、メモリ確保の要求に対して共有メモリ114
のエリアから要求されたメモリサイズを確保し、確保し
たメモリエリアの先頭アドレスをリモートメモリクラス
200に返信メッセージを送る。リモートメモリクラス
200は、返信メッセージを受け付けて共有メモリ11
4の先頭アドレスを取得し、ハンドル番号と取得した先
頭アドレスをペアで辞書クラスに登録する。
The host memory object of the host machine 110 receives a request for memory allocation from the shared memory 114.
, The requested memory size is secured from the area, and the start address of the secured memory area is sent to the remote memory class 200 as a reply message. The remote memory class 200 receives the reply message and
4 is obtained, and the handle number and the obtained start address are registered as a pair in the dictionary class.

【0015】また、リモートメモリクラス200の機能
を使用してリモート型定義を実現する。リモートメモリ
型指定には、C++言語がサポートするテンプレート機
能を使用して実現する。テンプレート機能とは、不特定
な集合に対して配置と演算子を定義する機能である。リ
モート型定義クラスのクラス関連図を図3に示す。図3
に示すクラス関連図は、UML(Unified Modeling Lang
uage)記法で表記している。リモート型定義クラス(3
20、330、340、350)は、リモートメモリク
ラス200を操作する為のクラスであり、リモートメモ
リクラスに対して操作手順を隠蔽する為のカプセル化ク
ラスとして動作する。以下、リモート型定義クラスにつ
いて詳しく説明する。
Further, the remote type definition is realized by using the function of the remote memory class 200. The remote memory type is specified by using a template function supported by the C ++ language. The template function is a function for defining an arrangement and an operator for an unspecified set. FIG. 3 shows a class relation diagram of the remote type definition class. FIG.
The class association diagram shown in UML (Unified Modeling Lang)
uage) notation. Remote type definition class (3
20, 330, 340, and 350) are classes for operating the remote memory class 200, and operate as encapsulation classes for hiding the operation procedure from the remote memory class. Hereinafter, the remote type definition class will be described in detail.

【0016】(1)rtype_base310:リモート型定義
クラス(320、330、340、350)の基底クラ
スであり、リモートメモリ114の生成、削除、入力、
出力を管理する。基底クラス(rtype_base)310のオ
ブジェクト生成時(コンストラクタ実行時)には、オブ
ジェクトに対して固有のハンドル番号311が割り付け
られる。リモートメモリ114に対してハンドル番号3
11を使用してリモートメモリ114のメモリエリアを
要求する。ハンドル番号311は、リモートメモリ11
4を操作するための番号として使用する。
(1) rtype_base 310: a base class of remote type definition classes (320, 330, 340, 350).
Manage output. When an object of the base class (rtype_base) 310 is generated (when a constructor is executed), a unique handle number 311 is assigned to the object. Handle number 3 for remote memory 114
11 to request the memory area of the remote memory 114. The handle number 311 is stored in the remote memory 11
4 is used as a number to operate.

【0017】(2)rtype<T>320:予約語データ型(d
ouble,int,char..)をリモート型定義するためのリモー
ト型定義テンプレートクラスを実現する。演算子のオー
バーロード機能を使用してリモートアクセスを実現す
る。
(2) rtype <T> 320: reserved word data type (d
ouble, int, char ..) is realized. Realize remote access by using operator overload function.

【0018】(3)rstruct<T>330:構造体のリモー
ト型定義テンプレートクラスを実現する。rstruct<T>3
30は、rtype_baseクラス310とテンプレート型<T>
331の多重継承クラスとして実現する。リモート構造
体型定義テンプレートクラス(rstruct<T>)330は、
テンプレート引数型にリモート型定義クラスを使用して
作成した構造体を管理するクラスである。管理機能とし
ては、 リモート構造体クラスで定義したクラスは、構造体の
全要素が連続した空間にリモートメモリを確保する機能
を有する。
(3) rstruct <T> 330: implements a remote type definition template class for a structure. rstruct <T> 3
30 is an rtype_base class 310 and a template type <T>
331 are implemented as multiple inheritance classes. The remote structure type definition template class (rstruct <T>) 330
This class manages the structure created using the remote type definition class for the template argument type. As a management function, the class defined by the remote structure class has a function to secure a remote memory in a space where all elements of the structure are continuous.

【0019】構造体のインスタンスは、リモート型定
義クラ スと同等の機能を有する。
An instance of a structure has the same function as a remote type definition class.

【0020】同一構造体同士のインスタンスをコピー
する機能を有する。
It has a function of copying instances of the same structure.

【0021】入れ子の構造体(階層化された構造体)
に関しても前記、、の機能を実現する。
Nested structure (hierarchical structure)
Also, the functions described above are realized.

【0022】図4は、本発明におけるリモート型定義の
サンプルプログラムを示す。このサンプルプログラムは
リモートマシン100のオブジェクト指向通信フレーム
ワーク103上からリモートメモリを生成して演算を行
うサンプルプログラム例であり、int型のリモート変数n
1,n2にそれぞれ10及び20を代入し、リモート変数su
mに加算した結果=n1+n2を代入することにより、10
+20=30を求めるプログラムである。
FIG. 4 shows a sample program of the remote type definition in the present invention. This sample program is an example of a sample program that generates a remote memory from the object-oriented communication framework 103 of the remote machine 100 and performs an operation.
Substitute 10 and 20 for 1, n2 respectively, and set the remote variable su
By substituting the result of addition to m = n1 + n2, 10
+ 20 = 30.

【0023】図5を参照して図4に示すサンプルプログ
ラムの動作シーケンスを説明する。
The operation sequence of the sample program shown in FIG. 4 will be described with reference to FIG.

【0024】動作501:リモート型定義クラスのイン
スタンス(n1:rint)を生成する際に固有のハンドル番
号を割り当てる。このハンドル番号を使用してリモート
メモリクラス(rmemory)200と通信を行う。
Operation 501: A unique handle number is assigned when an instance (n1: rint) of the remote type definition class is generated. Communication with the remote memory class (rmemory) 200 is performed using this handle number.

【0025】動作502:n1:rint は、コンストラクタ
実行時にリモートメモリクラス(rmemory)200に対
してメモリ確保サイズ=4バイト(int型サイズ)を要求
するメッセージを出力する。リモートメモリクラス(rm
emory)200は、メモリ確保の要求メッセージをホス
トマシン110の共有メモリクラス(hmemory)250に
送信できるようにメッセージフォーマットを変換して送
信する。リモートメモリクラス(rmemory)200と共
有メモリクラス(hmemory)250の間は、ネットワーク
120を介して通信するため遅延が発生する。リモート
メモリクラス(rmemory)200に対しての通信は、イ
ンスタンス(n1:rint)のハンドル番号を使用して通信
を行う。
Operation 502: n1: rint outputs a message requesting the memory allocation size = 4 bytes (int type size) to the remote memory class (rmemory) 200 when the constructor is executed. Remote memory class (rm
emory) 200 converts the message format so that the request message for memory reservation can be transmitted to the shared memory class (hmemory) 250 of the host machine 110 and transmits the message. There is a delay between the remote memory class (rmemory) 200 and the shared memory class (hmemory) 250 due to communication via the network 120. Communication with the remote memory class (rmemory) 200 is performed using the handle number of the instance (n1: rint).

【0026】動作503:共有メモリクラス(hmemory)
250では、リモートメモリクラス(rmemory)200
からのメモリ確保要求メッセージを受信し、共有メモリ
クラス(hmemory)250が管理する共有メモリエリアに
4バイトのメモリを確保し、確保した先頭アドレスをリ
モートメモリクラス(rmemory)200にメッセージで
返信する。
Operation 503: Shared memory class (hmemory)
In 250, the remote memory class (rmemory) 200
, A 4-byte memory is secured in the shared memory area managed by the shared memory class (hmemory) 250, and the secured start address is returned as a message to the remote memory class (rmemory) 200.

【0027】動作504:リモートメモリクラス(rmem
ory)200がメモリ確保成功のメッセージを受信した
場合は、インスタンス(n1:rint)のハンドル番号と共
有メモリクラス(hmemory)250からの返信メッセージ
に添付していたメモリ確保の先頭アドレスをペアで辞書
クラス(z11)に格納する。今後、このリモートメモリ確
保空間にアクセスする場合は、ハンドル番号で指示を与
え、リモートメモリクラス(rmemory)200がハンド
ル番号からアドレスに変換し、共有メモリクラス(hmemo
ry)250に指示を与える。また、リモートメモリクラ
ス(rmemory)200では、インスタンス(n1:rint)か
らのメモリ操作メッセージに対して同期/非同期処理を
サポートしている。そのため、インスタンス(n1:rin
t)にアクセスするスレッドに対してシグナルを発行す
ることによってスレッド停止/再開により同期/非同期
を実現する。
Operation 504: Remote memory class (rmem
ory) 200 receives a message indicating that the memory allocation succeeded, and handles the instance (n1: rint) handle number and the start address of the memory allocation attached to the reply message from the shared memory class (hmemory) 250 as a dictionary. Store in class (z11). In the future, when accessing this remote memory reservation space, an instruction is given by the handle number, the remote memory class (rmemory) 200 converts the handle number into an address, and the shared memory class (hmemo).
ry) Give instructions to 250. The remote memory class (rmemory) 200 supports synchronous / asynchronous processing for a memory operation message from the instance (n1: rint). Therefore, the instance (n1: rin
By issuing a signal to the thread accessing t), synchronous / asynchronous is realized by stopping / restarting the thread.

【0028】動作505:インスタンス(n1:rint)に
対して即値10(ローカル変数でも同様)の代入動作を
行った場合は、オーバーロードされた代入演算子により
write(handle,value)のメッセージ変換され、リモート
メモリクラス(rmemory)200にメッセージ送信す
る。handleには、n1:rintのハンドル番号(ここでは"
1"とする)、robject_baseには、代入値"10"のオブ
ジェクトがセットされる。robject_baseは、代入値と代
入するオブジェクトのサイズ(ここでは4バイト)を格
納するコンテナオブジェクトである。
Operation 505: When an assignment operation of an immediate value 10 (similarly for a local variable) is performed on the instance (n1: rint), an overloaded assignment operator is used.
The message of write (handle, value) is converted and transmitted to the remote memory class (rmemory) 200. handle is the handle number of n1: rint (here ""
1), an object having an assignment value of "10" is set in robject_base, which is a container object storing the assignment value and the size of the object to be assigned (4 bytes in this case).

【0029】動作506:リモートメモリクラス(rmem
ory)200は、write(handle,value) を受信し、第1
引数のハンドル番号に対応するメモリアドレス値を辞書
クラスから検索する。ここでは、インスタンス(n1:rin
t)のハンドル番号"1"に対応するアドレス(n1_addr)
を得ることができ、共有メモリクラス(hmemory)250
に write(n1_adr,10)メッセージを送信を行う。
Operation 506: Remote memory class (rmem
ory) 200 receives write (handle, value) and
Search the dictionary class for the memory address value corresponding to the handle number of the argument. Here, the instance (n1: rin
Address (n1_addr) corresponding to handle number "1" in t)
And a shared memory class (hmemory) 250
Sends a write (n1_adr, 10) message to

【0030】動作507:共有メモリクラス(hmemory)
250は、write(n1_adr,10)のメッセージを受信後、n1
_adrのアドレス空間からの4バイトに10の値を書き込
む。書き込み完了後、リモートメモリクラス(rmemor
y)200に書き込み完了の返信メッセージを送信す
る。
Operation 507: Shared memory class (hmemory)
250 receives the write (n1_adr, 10) message and returns to n1
Write a value of 10 to 4 bytes from the address space of _adr. After writing is completed, the remote memory class (rmemor
y) Send a write completion reply message to 200.

【0031】動作508:リモートメモリクラス(rmem
ory)200では、書き込み完了メッセージを受信後、
同期処理中であれば、シグナルを発行する。
Operation 508: Remote memory class (rmem
ory) 200, after receiving the write completion message,
If synchronous processing is in progress, a signal is issued.

【0032】動作509:加算(+)演算子のオーバーロ
ード関数によりn1:rintの値とn2:rintの値を加算処理を
行い、sum:rintに加算結果を代入する処理を行う。
Operation 509: The value of n1: rint and the value of n2: rint are added by the overload function of the addition (+) operator, and the result of addition is assigned to sum: rint.

【0033】動作510:sum:rintオブジェクトは、リ
モートメモリの値同士を加算処理を行うが、n1:rint及
びn2:rintのリモートメモリの実体はリモートマシン1
00上に存在しないため、ハンドル番号を使用してリモ
ートメモリクラス(rmemory)200に対してリモート
メモリ取得のメッセージを送信する。
Operation 510: The sum: rint object adds the values of the remote memories to each other, but the entities of the remote memories n1: rint and n2: rint are the remote machine 1
Since it does not exist on the remote memory class 00, a remote memory acquisition message is transmitted to the remote memory class (rmemory) 200 using the handle number.

【0034】動作511:共有メモリクラス(hmemory)
250は、リモートメモリ値要求メッセージを受信する
と、該当する共有メモリエリアの値を取得し、返信メッ
セージをリモートメモリクラス(rmemory)200に送
信する。
Operation 511: Shared memory class (hmemory)
Upon receiving the remote memory value request message, the 250 acquires the value of the corresponding shared memory area, and transmits a reply message to the remote memory class (rmemory) 200.

【0035】動作512:リモートメモリクラス(rmem
ory)200は、リモート変数値要求メッセージの返信
メッセージを受信するとリモート変数の値を取得した
後、sum:rintに対してシグナルを発行し、待機状態から
復帰する。
Operation 512: remote memory class (rmem
ory) 200 receives the reply message of the remote variable value request message, acquires the value of the remote variable, issues a signal to sum: rint, and returns from the standby state.

【0036】動作513:sum:rintオブジェクトが、n
1:rint及びn2:rintのリモート変数値を取得後、リモー
ト変数同士の加算処理を行い、sum:rintのハンドル番号
が示すリモートメモリエリアに加算結果を書き込むメッ
セージを送信する。
Operation 513: If the sum: rint object is n
After obtaining the remote variable values of 1: rint and n2: rint, the process of adding the remote variables is performed, and a message for writing the addition result to the remote memory area indicated by the handle number of sum: rint is transmitted.

【0037】動作514:destructor n1;と示している
が、実際はスコープ外に移る場合のことを意味する。ス
コープ外に移動するとn1:rintのデストラクタが起動
し、rmemoryに対してn1:rintが要求していたメモリエリ
アを開放するように n1:rintのハンドル番号を添えてリ
モートメモリクラス(rmemory)200にメッセージを
送信する。
Operation 514: Destructor n1; is shown, but it actually means a case where it goes out of the scope. When moving out of the scope, the n1: rint destructor starts, and attaches the handle of n1: rint to the remote memory class (rmemory) 200 so that the memory area requested by n1: rint is released to rmemory. Send a message.

【0038】動作515:リモートメモリクラス(rmem
ory)200では、メモリ開放要求メッセージを受信す
るとn1.handleに対応するメモリポインタを検索し、共
有メモリクラス(hmemory)250に対してメモリ開放要
求メッセージを送信する。
Operation 515: Remote memory class (rmem
(ory) 200, upon receiving the memory release request message, searches the memory pointer corresponding to n1.handle, and transmits the memory release request message to the shared memory class (hmemory) 250.

【0039】動作516:hallocでは、メモリ開放要求
メッセージを受信すると該当するメモリエリアを開放す
る。開放処理完了後には、リモートメモリクラス(rmem
ory)200に対して完了メッセージを返信する。
Operation 516: In the halloc, when the memory release request message is received, the corresponding memory area is released. After the release processing is completed, the remote memory class (rmem
ory) Returns a completion message to 200.

【0040】次に図6を参照して構造体について説明す
る。rstruct<T>は、下記のサンプルコードのように構造
体の各メンバー変数にrtype<T>を使用したリモート変数
定義を行い、次に定義した構造体をrstuct<T>で定義す
ることによりリモート構造体として定義することが可能
である。
Next, the structure will be described with reference to FIG. rstruct <T> defines remote variables using rtype <T> for each member variable of the structure as shown in the sample code below, and then defines the defined structure with rstuct <T> to define the remote variable. It can be defined as a structure.

【0041】 struct Man{ rtype<int> id; rtype<int> age; }; rstruct<Man> rMan; 構造体(Man)には、リモート型定義rtype<int>で定義
したメンバーのハンドル番号は、全て rhs:hobject62
1のコンテナクラスに登録される。rhs:hobject621
への登録は、C++言語の多重継承におけるオブジェク
ト生成順番を利用し、オブジェクトのコンストラクタの
生成過程時にrhs:hobjectに格納される仕組みになって
いる。この手法によるハンドル番号管理の長所は、構造
体が入れ子になるような多重の構造体の場合でも対応で
きる点にある。rhs:hobject621は、ハンドル番号を
登録する辞書クラスhobjectのインスタンスrhsを意味す
る。
Struct Man {rtype <int>id; rtype <int>age;}; rstruct <Man>rMan; In the structure (Man), the handle number of the member defined by the remote type definition rtype <int> is All rhs: hobject62
Registered in one container class. rhs: hobject621
The registration to the URL uses the object generation order in the multiple inheritance of the C ++ language, and is stored in rhs: hobject during the generation process of the object constructor. An advantage of handle number management by this method is that it can cope with a case of a multiple structure in which structures are nested. rhs: hobject 621 means an instance rhs of the dictionary class hobject for registering a handle number.

【0042】次に、C++言語のコンストラクタの特徴
について説明する。派生クラスが基本クラスのコンスト
ラクタを呼び出すことはできるが継承することはできな
い。コンストラクタは、ほとんどのC++関数と同様
に、デフォルトの引数を持つことができ、またメンバー
初期化リストを使うことができる。コンストラクタは通
常の関数と同じ方法で呼び出すことはできない。複数の
基本クラスを持つクラスのコンストラクタの呼び出し順
序については、基本クラスコンストラクタが派生クラス
のコンストラクタより前に呼び出される。基本クラスの
コンストラクタは宣言された順に呼び出される。rstruc
t<T>のクラス宣言は、次のように記述する。
Next, features of the C ++ language constructor will be described. Derived classes can call base class constructors but cannot inherit them. Constructors, like most C ++ functions, can have default arguments and can use a member initialization list. Constructors cannot be called in the same way as regular functions. Regarding the calling order of the constructor of a class having multiple base classes, the base class constructor is called before the constructor of the derived class. Base class constructors are called in the order they are declared. rstruc
The class declaration of t <T> is described as follows.

【0043】 template<class T> class rstruct : public rtype_base , public T { public: rstruct(); : }; この場合のコンストラクタの呼び出し順序は、 rtype_base 基本クラスのコンストラクタ 、 T型の基本 クラスのコンストラクタ、 rstruct<T> 基本クラスのコンストラクタの順番で呼
び出される。
Template <class T> class rstruct: public rtype_base, public T {public: rstruct ();:}; In this case, the calling sequence of the constructor is rtype_base base class constructor, T type base class constructor, rstruct <T> Called in the order of the base class constructor.

【0044】図7は、rstruct<Man>のオブジェクトを生
成する場合のコンストラクタ実行順番を示す。図7を参
照して、rstruct<T>内の全要素が、rhs:hobjectに格納
する手順を説明する。一例として、Manのリモートメン
バー変数がテストサーバー上に連続したメモリ空間に割
り当てられ、リモートメンバー変数のハンドル番号をrs
turct<T>::rhsが管理する手順を説明する。
FIG. 7 shows the order of execution of constructors when an object of rstruct <Man> is generated. With reference to FIG. 7, a procedure for storing all elements in rstruct <T> in rhs: hobject will be described. As an example, the remote member variable of Man is allocated in a continuous memory space on the test server, and the handle number of the remote member variable is rs
The procedure managed by turct <T> :: rhs will be described.

【0045】動作701: "rMan man;"のインスタンス
生成時にコンストラクタ実行順番については、rManの基
本クラスrtype_baseのコンストラクタが始めに起動す
る。コンストラクタのオーバーロード機能を使用し、rs
truct<T>用のコンストラクタ rtype_base(eGroup)を実
行する。eGroupは、groupsの列挙型であり、これから実
行されるrtype_base(size)のコンストラクタのハンドル
番号をgroupsに登録することを指示する。rallocに対し
ては、連続したリモートメモリ空間を要求するように指
示する。
Operation 701: The constructor of the base class rType_base of rMan is activated first with respect to the execution order of constructors when an instance of "rMan man;" is generated. Use the overload function of the constructor and rs
Execute the constructor rtype_base (eGroup) for truct <T>. eGroup is an enumeration type of groups, and indicates that the handle number of the constructor of rtype_base (size) to be executed is registered in groups. Instructs ralloc to request contiguous remote memory space.

【0046】動作702:これから実行されるコンスト
ラクタrtype_base(size)からのリモートメモリ確保要求
メッセージalloc(handle,size)は、連続したメモリ空間
になるように指示するメッセージserial(handle,mode)
を送信する。serial()の第1引数は、rstruct<T>自身の
ハンドル番号であり、第2引数modeは連続開始モードを
指定する "start"を設定する。srial()にハンドル番号
を記述するのは、構造体の入れ子や配列の入れ子に対応
するためである。メモリ連続の解除は、第2引数に"en
d"を記述して実行(710)する。
Operation 702: The remote memory allocation request message alloc (handle, size) from the constructor rtype_base (size) to be executed is a message serial (handle, mode) instructing a continuous memory space.
Send The first argument of serial () is the handle number of rstruct <T> itself, and the second argument mode sets "start" which specifies the continuous start mode. The handle number is described in srial () in order to support nesting of structures and nesting of arrays. To cancel memory continuation, use "en" as the second argument.
d "is described and executed (710).

【0047】動作703:groupsに対して、これから実
行されるコンストラクタrtype_base(size)のハンドル番
号を保持するように指示するメッセージpush_goup(hand
le)を送信する。引数にrstruct<T>のハンドル番号を使
用しているのは、上記動作702と同様に構造体及び配
列の入れ子に対応するためである。入れ子された構造体
に対応するため、groupsは、スタック形式で実現してい
る。
Operation 703: Message push_goup (hand) for instructing groups to retain the handle number of the constructor rtype_base (size) to be executed.
le). The reason why the handle number of rstruct <T> is used as an argument is to cope with the nesting of structures and arrays as in the above-described operation 702. To accommodate nested structures, groups are implemented in a stack format.

【0048】動作704:rtype_base(eGroup)のコンス
トラクタ処理が完了したら、次の基本クラスのコンスト
ラクタを実行する。rstruct<T>は、型Tを基本クラスと
して定義しているため、型TすなわちManのコンストラク
タが実行される。但し、Manは、コンストラクタを明示
していないため、コンパイラの生成するデフォルトコン
ストラクタが実行される。
Operation 704: When the constructor processing of rtype_base (eGroup) is completed, the constructor of the next base class is executed. Since rstruct <T> defines the type T as a base class, the constructor of the type T, that is, Man, is executed. However, since Man does not specify a constructor, a default constructor generated by the compiler is executed.

【0049】動作705:Manのリモートメンバー変数
であるid:rintのコンストラクタが起動し、rallocに対
してリモートメモリ確保要求メッセージを出力する。
Operation 705: The constructor of the remote member variable id: rint of Man is activated, and outputs a remote memory reservation request message to ralloc.

【0050】動作706:groupのコンテナが空でない
場合は、id:rintのハンドル番号を格納する。
Operation 706: If the container of group is not empty, store the handle number of id: rint.

【0051】動作707:Manのリモートメンバー変数
であるage:rint のコンストラクタが起動し、rallocに
対してリモートメモリ確保要求メッセージを出力する。
Operation 707: The constructor of age: rint, which is a remote member variable of Man, is activated, and outputs a remote memory reservation request message to ralloc.

【0052】動作708:groupのコンテナが空でない
場合は、age:rintのハンドル番号を格納する。
Operation 708: If the container of group is not empty, store the handle number of age: rint.

【0053】動作709:最後にman:rMan自身のコンス
トラクタを実行する。このコンストラクタでは基本クラ
スで実行されたリモート型宣言クラスのハンドル番号を
取得するために、groupsから基本クラスのコンストラク
タで実行したハンドル番号のコンテナクラスを取得す
る。
Operation 709: Finally, the constructor of man: rMan itself is executed. In this constructor, to obtain the handle number of the remote type declaration class executed by the base class, obtain the container class of the handle number executed by the base class constructor from groups.

【0054】動作710:リモートメモリ確保要求メッ
セージの連続空間指示を解除することをrallocに通知す
る。
Operation 710: The ralloc is notified that the continuous space indication of the remote memory reservation request message is released.

【0055】動作711:連続メモリ確保解除メッセー
ジを受信し、且つメモリ確保解除命令の入れ子がなくな
る場合にhallocに対してリモートメモリ確保要求メッセ
ージを送信する。この場合、メッセージは、serial(1,s
tart)からserial(1,end)までのメモリ確保要求メッセー
ジをグループにまとめて送信する。
Operation 711: A remote memory reservation request message is sent to halloc when a continuous memory reservation release message is received and the nesting of the memory reservation release command is eliminated. In this case, the message is serial (1, s
The memory allocation request messages from (tart) to serial (1, end) are grouped and transmitted.

【0056】[0056]

【発明の効果】以上説明したように請求項1記載の発明
によれば、リモートメモリに対してオブジェクト指向プ
ログラム言語のリモートメモリ記述クラスによりアクセ
スするインタフェース手段を備えたので、リモートメモ
リを操作する場合に柔軟性を高めることができる。
As described above, according to the first aspect of the present invention, the remote memory is provided with the interface means for accessing the remote memory using the remote memory description class of the object-oriented programming language. Flexibility can be increased.

【0057】請求項2記載の発明によれば、リモートメ
モリに対してデータ型指定でアクセスするので、リモー
ト型定義の実現により、ローカルのメモリ型指定と同様
な型指定が可能となる。例えばC/C++言語のデータ
型指定には、予約されたデータ型(int,long,char,floa
t,double...)の型指定があるので、リモートメモリ型指
定でもC/C++言語のデータ型指定と同様の機能をク
ラスライブラリとして実現することができる。
According to the second aspect of the present invention, since the remote memory is accessed by specifying the data type, realization of the remote type definition makes it possible to specify the same type as the local memory type. For example, to specify the data type of the C / C ++ language, a reserved data type (int, long, char, floa
t, double ...), so that the same function as the data type specification of the C / C ++ language can be realized as a class library even in the remote memory type specification.

【0058】請求項3記載の発明によれば、リモートメ
モリに対して構造体の型指定でアクセスするので、構造
体のリモート型定義の実現により、ローカルの構造体型
指定と同様な型指定が可能となる。
According to the third aspect of the present invention, since the remote memory is accessed by specifying the structure type, the same type specification as the local structure type specification is possible by realizing the remote type definition of the structure. Becomes

【0059】請求項4記載の発明によれば、オブジェク
ト指向プログラム言語がC++言語であるので、リモー
トメモリを操作する場合に柔軟性を高めることができ
る。
According to the fourth aspect of the present invention, since the object-oriented programming language is the C ++ language, flexibility can be enhanced when operating a remote memory.

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

【図1】本発明に係る分散共有メモリ方式の一実施形態
を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a distributed shared memory system according to the present invention.

【図2】図1のリモートマシンのオブジェクト指向通信
フレームワークが有するリモートメモリクラスと、ホス
トマシンのオブジェクト指向通信フレームワークが有す
る共有メモリクラスを示す説明図である。
FIG. 2 is an explanatory diagram showing a remote memory class of an object-oriented communication framework of the remote machine of FIG. 1 and a shared memory class of an object-oriented communication framework of a host machine.

【図3】リモート型定義クラスの関連を示す説明図であ
る。
FIG. 3 is an explanatory diagram showing the relationship between remote type definition classes.

【図4】リモートメモリを操作するサンプルプログラム
を示す説明図である。
FIG. 4 is an explanatory diagram showing a sample program for operating a remote memory.

【図5】図4のサンプルプログラムによる動作シーケン
スを示す説明図である。
FIG. 5 is an explanatory diagram showing an operation sequence according to the sample program of FIG. 4;

【図6】構造体の関連を示す説明図である。FIG. 6 is an explanatory diagram showing the relationship between structures.

【図7】構造体のコントラクタによる動作シーケンスを
示す説明図である。
FIG. 7 is an explanatory diagram showing an operation sequence by a contractor of the structure.

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

100 リモートマシン 110 ホストマシン 101 リモートメモリ制御アプリケーション 103,113 オブジェクト指向通信フレームワーク 111 ホストメモリ制御アプリケーション 114 共有メモリ 120 ネットワーク 200 リモートメモリクラス 250 共有メモリクラス REFERENCE SIGNS LIST 100 remote machine 110 host machine 101 remote memory control application 103, 113 object-oriented communication framework 111 host memory control application 114 shared memory 120 network 200 remote memory class 250 shared memory class

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) G06F 15/167 G06F 15/167 B ──────────────────────────────────────────────────続 き Continued on the front page (51) Int.Cl. 7 Identification symbol FI Theme coat ゛ (Reference) G06F 15/167 G06F 15/167 B

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 独立したアドレス空間を持つ複数の計算
機がネットワークを介して結合されて各計算機内のメモ
リ上に分散したデータを共有する疎結合計算機システム
における分散共有メモリ方式であって、 前記計算機は、他の計算機内のリモートメモリに対して
オブジェクト指向プログラム言語のリモートメモリ記述
クラスによりアクセスするインタフェース手段を備えた
ことを特徴とする分散共有メモリ方式。
1. A distributed shared memory system in a loosely-coupled computer system in which a plurality of computers having independent address spaces are connected via a network to share data distributed on a memory in each computer, The present invention provides a distributed shared memory system comprising interface means for accessing a remote memory in another computer using a remote memory description class of an object-oriented programming language.
【請求項2】 前記インタフェース手段は、リモートメ
モリに対してデータ型指定でアクセスする手段を有する
ことを特徴とする請求項1記載の分散共有メモリ方式。
2. The distributed shared memory system according to claim 1, wherein said interface means has means for accessing a remote memory by specifying a data type.
【請求項3】 前記インタフェース手段は、リモートメ
モリに対して構造体の型指定でアクセスする手段を有す
ることを特徴とする請求項1または2記載の分散共有メ
モリ方式。
3. The distributed shared memory system according to claim 1, wherein said interface means includes means for accessing a remote memory by designating a structure type.
【請求項4】 前記オブジェクト指向プログラム言語
は、C++言語であることを特徴とする請求項1ないし
3のいずれか1項に記載の分散共有メモリ方式。
4. The distributed shared memory system according to claim 1, wherein the object-oriented programming language is a C ++ language.
JP2000148848A 2000-05-19 2000-05-19 Distributed shared memory system Pending JP2001331457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000148848A JP2001331457A (en) 2000-05-19 2000-05-19 Distributed shared memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000148848A JP2001331457A (en) 2000-05-19 2000-05-19 Distributed shared memory system

Publications (1)

Publication Number Publication Date
JP2001331457A true JP2001331457A (en) 2001-11-30

Family

ID=18654805

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000148848A Pending JP2001331457A (en) 2000-05-19 2000-05-19 Distributed shared memory system

Country Status (1)

Country Link
JP (1) JP2001331457A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7979645B2 (en) 2007-09-14 2011-07-12 Ricoh Company, Limited Multiprocessor system for memory mapping of processing nodes
WO2014183531A1 (en) * 2013-05-17 2014-11-20 华为技术有限公司 Method and device for allocating remote memory

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7979645B2 (en) 2007-09-14 2011-07-12 Ricoh Company, Limited Multiprocessor system for memory mapping of processing nodes
WO2014183531A1 (en) * 2013-05-17 2014-11-20 华为技术有限公司 Method and device for allocating remote memory

Similar Documents

Publication Publication Date Title
US6549955B2 (en) System and method for dynamic generation of remote proxies
US6772206B1 (en) XML-based integrated services bridging
US6049853A (en) Data replication across nodes of a multiprocessor computer system
JP3687990B2 (en) Memory access mechanism
US5884075A (en) Conflict resolution using self-contained virtual devices
US6505286B1 (en) User specifiable allocation of memory for processes in a multiprocessor computer having a non-uniform memory architecture
US6883172B1 (en) System and method for bridging managed and unmanaged object systems by utilizing an interface wrapper to facilitate transparent communications
JPH08263292A (en) Object-oriented programming interface and mapping method
JP2000020490A (en) Computer having remote procedure calling mechanism or object request broker mechanism, data transfer method and transfer method storage medium
JP2013546106A (en) Distributed computing architecture
Kafura et al. ACT++ 2.0: A class library for concurrent programming in C++ using Actors
US7383551B2 (en) Method and system for integrating non-compliant providers of dynamic services into a resource management infrastructure
Andert Object frameworks in the Taligent OS
Dincer A ubiquitous message passing interface implementation in Java: jmpi
US20110238702A1 (en) Creating multiple mbeans from a factory mbean
JP2001331457A (en) Distributed shared memory system
US9361266B2 (en) System and method for distributed computing
JP2005182419A (en) Component processing system and component processing method
Andersson et al. Kaffemik-A distributed JVM on a single address space architecture
US8082553B2 (en) Client management of java management extensions (JMX) Mbean state
JP3241214B2 (en) Distributed processing apparatus and process execution method
EP1122644A1 (en) A method and system for dynamically dispatching function calls from a first execution environment to a second execution environment
JPH1040108A (en) Method and device for mixing objective-c and c++ object
Fröhlich et al. Epos: An object-oriented operating system
JP2005032171A (en) Communication control system between functional modules for data sharing, communication control method between functional modules, communication control program between functional modules, and its recording medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050404

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050426

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050627

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060117