JP3489157B2 - Distributed shared memory system and computer - Google Patents

Distributed shared memory system and computer

Info

Publication number
JP3489157B2
JP3489157B2 JP29630093A JP29630093A JP3489157B2 JP 3489157 B2 JP3489157 B2 JP 3489157B2 JP 29630093 A JP29630093 A JP 29630093A JP 29630093 A JP29630093 A JP 29630093A JP 3489157 B2 JP3489157 B2 JP 3489157B2
Authority
JP
Japan
Prior art keywords
shared data
data
shared
computer
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.)
Expired - Fee Related
Application number
JP29630093A
Other languages
Japanese (ja)
Other versions
JPH07152640A (en
Inventor
雅彦 山内
聡 吉沢
秀樹 村山
林  剛久
昭 鬼頭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP29630093A priority Critical patent/JP3489157B2/en
Priority to GB9423890A priority patent/GB2284494B/en
Priority to US08/348,099 priority patent/US5649102A/en
Publication of JPH07152640A publication Critical patent/JPH07152640A/en
Application granted granted Critical
Publication of JP3489157B2 publication Critical patent/JP3489157B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 【0001】 【産業上の利用分野】本発明は、ネットワークで接続さ
れた複数の計算機システムで構成されるネットワーク計
算機システムに於いて、物理的に分散配置されたメモリ
上のデータを、別計算機上で実行中の複数アプリケーシ
ョン間で共有するための分散共有メモリ技術に係わり、
特にネットワーク資源を有効利用し、その結果、分散共
有メモリへのアクセス性能を向上させる分散共有メモリ
方式に関する。 【0002】 【従来の技術】計算機に於いて、計算機内部でアプリケ
ーションを実行する仮想的な実体をプロセスと呼ぶ。プ
ロセスを複数生成し、単一CPUの演算資源を一定時間
毎に切り換えて各プロセスに割り当てることで、CPU
台数よりも多いプロセスを並行に動作させることができ
る。これを並行処理と呼ぶ。一方、複数のCPUを使用
して、複数のプロセスを同時に動作させる処理を並列処
理と呼ぶ。 【0003】従来、単一CPU構成の計算機に於いて並
行処理を行なう時には、プロセス間でのデータ交換の方
法として共有メモリを使用することができた。これには
例えば、「UNIXシステムコール・プログラミング、
Marc J.Rochkind著、福崎俊博訳、アス
キー出版、1987」の299−315頁に示されたシ
ステムVの共有メモリがある。 【0004】並行処理では物理的にプロセスが同時に実
行されないために、複数プロセスによって構成されるア
プリケーションの実行性能の向上は望めなかった。そこ
で、ネットワーク計算機システムでは、複数の計算機を
ネットワークで接続し、複数のCPUを同時に利用して
アプリケーションを並列処理することによって、アプリ
ケーション実行性能の向上を図る。 【0005】ネットワーク計算機システムに於ける共有
メモリでは、メモリが物理的に分散しているので、各計
算機のメモリ上に格納されたデータ間の一貫性を保証
し、あたかも一つのデータを共有しているかの様に、ア
プリケーションに見せる必要がある。この技術を分散共
有メモリと呼ぶ。 【0006】仮想記憶機構をページング機構で実現する
計算機では、そのページング機構を拡張して分散共有メ
モリを実現することができる。即ち、通常ではメモリア
クセスの際、アクセスしようとしたデータがメモリ上に
存在しないとページフォールトを発生し、補助記憶装置
からデータが存在するページをメモリ上にロードする。
分散共有メモリでは、ページフォールト発生の際、補助
記憶装置からページを取得する代わりに、他計算機から
ネットワークを介して自分の計算機のメモリ上にロード
することで実現される。 【0007】分散共有メモリの従来技術の例としては、
以下のIvyシステム(米・エール大学)、及びDAS
Hシステム(米・スタンフォード大学)を挙げることが
できる。 【0008】Ivyシステムでは、各ページに所有者
(オーナ)が存在し、所有者である計算機が、そのペー
ジの複製を保持する計算機の名称を管理する。また所有
者のみがそのページへ書き込みを行なうことを許されて
いる。ある計算機で読み出しフォールトが発生した時に
は、所有者からページの複製が送られる。また、書き込
みフォールトが発生した時には、書き込みフォールトを
発生した計算機が新しい所有者となり、他の計算機上に
存在するページの複製は無効化される。 【0009】DASHシステムでは、16バイトのデー
タを単位として、Ivyシステムと同様な制御を行なっ
ている。 【0010】これらの従来技術の詳細については、「分
散オペレーティングシステム UNIXの次にくるも
の、前川守・所真理雄・清水謙多郎編、共立出版、19
91」の124−141頁に示されている。 【0011】 【発明が解決しようとする課題】分散共有メモリではメ
モリ内容の一貫性を保つためにネットワークで接続され
た計算機間でメモリ内容の交換が行なわれる。この時、
従来の分散共有メモリ管理方式で課題となるのはデータ
転送サイズとデータ転送タイミングである。 【0012】Ivyシステムについては以下の様な課題
がある。第1にデータ転送サイズに関して、メモリ内容
交換のために計算機間を流れるデータ転送サイズがペー
ジであるため、ページサイズ(例えば、4キロバイト)
と比較して小さいデータ(例えば、8バイト)を計算機
間で共有している場合、計算機間を流れるデータ転送量
に無駄が発生する。このため、実質的なネットワーク資
源の利用率が下がるという課題がある。 【0013】また、計算機Aと計算機Bの各計算機でア
クセス頻度が高い2つの異なるデータが同一ページ上に
存在する場合に、計算機Aと計算機Bが交互に同じペー
ジに対するメモリ書き込みを行なうと、ページが計算機
Aと計算機Bの間を移動する。このため、各計算機がメ
モリアクセスを行なう度に、ネットワークを介した計算
機間でのページ転送が発生し、メモリアクセスの性能が
下がるという課題がある。 【0014】第2にデータ転送のタイミングに関して、
データ転送はメモリへの読み出しや書き込み時に自計算
機内に共有データの存在するページがない時にページフ
ォルトを発生して行なっていた。 【0015】そのため計算機Aと計算機Bが同じ共有デ
ータに連続して書き込みを行うと、最悪の場合、各計算
機がメモリ書き込みを行なう度にページが計算機間を移
動する。ネットワークを介して計算機間の転送を行なう
コストは、自分の計算機内のメモリアクセス速度と比較
して大きいため、共有データへのメモリアクセスの性能
が下がるという課題がある。 【0016】一方DASHシステムは、Ivyシステム
の第1の課題の解決を狙ったシステムである。即ち、ペ
ージ単位でメモリ内容を共有しているために発生する無
駄なデータ転送を無くすために共有の単位を小さくし
た。その結果、無駄なデータ転送はなくなったが、メモ
リの広範囲に対してアクセスを行なうとアクセスフォー
ルトが頻繁に発生することとなった。アクセスフォール
トが頻繁に発生すると、ネットワークを介して行なう計
算機間でのデータ転送時間が顕著になる。DASHシス
テムでは、これに対して小さいデータの転送時間を短く
することを目的として、特殊化した専用ネットワークを
提案している。しかし、この専用ネットワークは汎用ネ
ットワーク・アーキテクチャとは異なるためコストが高
いという問題がある。 【0017】更にIvyシステムの第2の課題である、
複数計算機が同じ共有データに対して連続してアクセス
した場合の性能低下については、DASHシステムに於
いても発生し解決されていない。 【0018】上記課題に起因して、従来の分散共有メモ
リ方式を、典型的な並列処理手法である領域分割型並列
処理に適用した場合、ネットワークを介した通信が頻繁
に発生し、並列化による処理の高速化率で良好な値を得
ることができない。更にポインタ変数を要素とするデー
タ構造体を複数計算機間で共有する場合等、共有の対象
となるデータがメモリ上で散在して格納されることがあ
り、この様な場合にもネットワークを介した通信が頻繁
に発生する。 【0019】本発明の目的は、上記課題を解決し、ネッ
トワーク資源の有効活用、及びアクセス性能の高い分散
共有メモリ方式を提供することにある。 【0020】 【課題を解決するための手段】先ず、第1の課題を解決
するために、アプリケーションで共有するデータとメモ
リへの写像を設定可能とし、設定した共有単位を記憶し
ておくための共有データ管理テーブルを有し、その共有
データ管理テーブルを管理するための共有データ管理手
段を設ける。 【0021】具体的には、アプリケーションが2次元配
列の様なデータを2分割し、分割した境界部分のデータ
を共有する場合には、アプリケーションからその境界部
分のデータを共有単位として設定する。共有単位は、メ
モリ連続領域、メモリ不連続領域(データサイズ一定、
データの間隔一定)、またはそれらの組合わせによって
指定する。 【0022】次に第2の課題を解決するために、複数の
計算機上の共有データの一貫性を保証するタイミングを
アプリケーションが仮想的な共有空間からの(1)最新
データの獲得指示、共有空間への(2)最新データの反
映指示という2つの情報に基づいて決定し、一貫性を保
証する単位として設定された共有単位を使用する。 【0023】具体的には、全ての計算機に共有データを
持たせ、共有データを変更する計算機に於ける(2)最
新データの反映指示のタイミングで全ての共有データの
更新を行なう方法、または一つの計算機に共有データを
持たせて、共有データを獲得しようとした計算機に於け
る(1)最新データ獲得指示のタイミングで共有データ
を保持している計算機から共有データをネットワークを
介して獲得する方法、更に、共有データの信頼性を高め
るために、これら2つの方法を組み合わせて一つ以上の
計算機で共有データを保持し、危険を分散してもよい。 【0024】 【作用】アプリケーション実行時に、予め共有単位を設
定することによって無駄なデータ転送を防ぎ、ネットワ
ーク資源を有効に活用することができる。また、物理的
に分散しているデータの一貫性をアプリケーションが必
要な時のみ保証することによって、ネットワークを介し
た計算機間の転送を最小現に抑さえてネットワーク資源
を有効活用できる。その結果、共有データへのアクセス
性能を向上できる。 【0025】 【実施例】図1は、本発明に於けるネットワーク計算機
システム100の一実施例を示すブロック図である。 【0026】本図に於いて、ネットワーク計算機システ
ム100は、複数の計算機101をネットワーク102
で接続して構成される。計算機101に於いて、103
は計算機を構成する各ブロック間のデータ伝送路である
システム・バス、104はプログラムを実行するプロセ
ッサ、105はプログラムやデータを格納する磁気ディ
スクなどの補助記憶装置、106はプログラム実行中に
該プログラムやデータを格納するためのメインメモリ、
107はネットワーク102との入出力を制御するため
のネットワーク・インタフェースである。本発明による
共有データ管理方式は、例えば計算機101(1)上の
アプリケーションと計算機101(2)上のアプリケー
ションが並列実行する時に、データを共有する際に適用
される。 【0027】図2は、領域分割型並列処理に対して、本
発明による分散共有メモリを適用する場合の一実施例を
示す図である。 【0028】ここで領域分割型並列処理とは、図2
(a)に示す様なデータ配列を、図2(c)、(d)に
示す様に分割して、それぞれを別々の計算機上で並列に
処理する形式の並列処理のことである。流体解析問題や
構造解析問題等、多くの科学技術計算には、領域分割型
並列処理を適用可能である。 【0029】領域分割型並列処理の一例として、二次元
熱拡散解析問題の一解法を図2を用いて説明する。本解
析手法では、解析対象となる領域を図2(a)に示す様
なn×n二次元メッシュ状に区切り、配列データ202
としてメインメモリ106上に格納して、プロセッサ1
04が演算処理を行なう。この際、配列データ202の
各要素には、各要素の温度値を格納する。演算処理は、
図2(a)の二次元配列の全要素に対して、各要素の近
傍要素を用いた計算を行ない、それを各要素の一定時間
後の値として設定する処理を、予め定められた終了条件
が満たされる迄、繰り返し行なう形態をとる。ここで各
要素の近傍要素を用いた計算とは、例えば図2に示した
様に、配列要素(m,m)の新たな値を計算する際に、
その4近傍点、即ち(m,m−1),(m+1,m),
(m,m+1),(m−1,m)と、(m,m)自体の
値を用いて計算することである。本計算の一例は、配列
要素(m,m)の値に対して、各近傍点の値と(m,
m)との値の差異を先ず求め、それに熱伝導率に該当す
る係数を乗じた上で、(m,m)の値に加算するもので
ある。 【0030】図2(c)、(d)に、本解析手法を二台
の計算機上で並列に処理する場合の領域分割を示す。上
記の様に本解析では各配列要素の演算のために近傍点の
みを用いるため、x=0からx=(n/2)−2迄の列
202(1)、及びx=(n/2)+1からx=(n−
1)迄の列202(2)に関しては、各領域の演算を担
当する計算機のみが読み書きできれば良く、各計算機の
ローカルメモリ106上に格納されていれば良い。それ
に対して、x=(n/2)−1からx=(n/2)まで
の列203(1)及び(2)は、両計算機から読み書き
できる必要があり、共有メモリ領域内に格納される必要
がある。 【0031】尚、上記の様な解析問題における典型的な
問題規模、即ち図2(a)の配列の要素数は、数百行×
数百列から数千行×数千列程度のオーダである。 【0032】以下に説明する様に、本発明の分散共有メ
モリ方式では、計算機間でのデータ交換を、上記の様な
領域分割型並列処理に対しても効率良く行なえる方式を
提供する。 【0033】図3は、同一のアプリケーションを実行す
る複数のプロセス間に於いてデータを共有する際の共有
データ管理方式の一実施例を示すブロック図である。 【0034】本図に於ては、計算機101(1)上のア
プリケーション201(1)と、計算機101(2)上
のアプリケーション201(2)とがデータを共有して
いる。ネットワーク計算機システム100を構成する各
計算機101は物理的に共有したメモリを持っていない
ために、物理的に分散した共有データ203(1)と2
03(2)との一貫性をハードウェア的、ソフトウェア
的、またはそれらの組み合わせによる手段で保つ必要が
ある。この一貫性制御によって、計算機101(1)上
のアプリケーション201(1)と、計算機101
(2)上のアプリケーション201(2)とが、あたか
も一つのデータを共有している様に見せることができ
る。 【0035】本実施例では、共有データの一貫性を保つ
仮想的な空間を各計算機上に存在する共有データ管理シ
ステム204によって提供する。アプリケーション20
1が共有データに対してRead/Writeを行う時
には、共有データ管理システム204によって一貫性が
保証された仮想的な空間との間で行なう。本実施例では
具体的には、共有データ複製領域205に格納されたデ
ータを読み書きして行なう。 【0036】本実施例に於ては、全ての計算機101の
共有データ管理システム204には、アプリケーション
201で使用する共有データ203の複製205が存在
する。この複製205は、アプリケーションが共有デー
タを使用することを宣言した時に生成される。これはア
プリケーション201から共有データ203を獲得する
要求がきた時の処理遅延を最小限にするためである。共
有データ管理システム204では、物理的に分散してい
る共有データの複製205に対して一貫性を保証する。
即ち、共有データ管理システムは、ある計算機で共有デ
ータの複製を変更した場合には、共有データの複製20
5を保持する全ての計算機101に対して変更を伝達す
る。 【0037】また、共有データ管理システム204の必
要とするメモリ量を節約するために、全ての計算機に共
有データの複製を持たずに、アプリケーション201が
最新の共有データ反映の指示を行った時に、その指示を
行った計算機上に複製を作成する方式をとっても良い。
同時に、共有データの複製205を保持する計算機の識
別子を他の計算機に通知する。共有データの複製は、ネ
ットワーク計算機システム内の一台、または一台以上の
計算機が保持していても良い。 【0038】図4は、本発明による共有データ管理方式
の一実施例を示すブロック図である。 【0039】共有データ管理システム204は、共有デ
ータ番号識別部401、共有データ番号付加部402、
パケット送受信部403、共有データ領域管理部404
から構成される。また、補助記憶装置105には、共有
データ管理テーブル405を持つ。共有データ管理テー
ブル405は、予めメインメモリ106に展開しておく
ことによって、その参照、更新処理を高速化することが
できる。共有データ管理テーブル405の詳細について
は後述する。 【0040】共有データ番号識別部401は、パケット
送受信部403から送られてくるパケットの共有データ
番号を識別する。共有データ番号に対応するメモリ領域
を共有データ領域管理部404を利用して調べ、対応す
るメモリ領域に対してデータを書き込む処理を行なう。 【0041】共有データ番号付加部402は、共有デー
タ領域管理部404から共有データ番号とそれに対応す
るメモリ領域を受け取り、メモリ領域を読み込んで他の
計算機に共有データの内容を伝達するパケットの生成を
行なう。 【0042】パケット送受信部403は、ネットワーク
・インタフェース107から送られてくるパケットのコ
マンドを解析し、そのパケットを処理するブロックに振
り分ける。また、共有データ番号付加部402で作成し
たパケットを他の計算機に伝達するためにネットワーク
・インタフェース107を起動する処理を行なう。 【0043】共有データ領域管理部404は、共有デー
タ管理テーブル405の管理と共有データ管理システム
204のブロックを制御する処理を行なう。また、アプ
リケーション201の共有データに対する処理依頼を受
け取り、共有データ管理テーブル405に新しいエント
リを追加したり、削除を行なう。更に、共有データの内
容を他の計算機に伝達する様に共有データ番号付加部4
02やパケット送受信部405を制御する。逆に共有デ
ータの内容を他の計算機から受け取れる様に共有データ
番号識別部401やパケット送受信部403を制御す
る。 【0044】図中401から404に於いて行なわれる
各処理は、ソフトウェア的、ハードウェア的、またはそ
の組み合わせによって行なわれるものである。ソフトウ
ェア的に行なわれる部分の処理に関しては、以下の様に
実行される。即ち、各ソフトウェア処理の内容を記述し
たプログラムは補助記憶装置105に格納されており、
システム・バス103に接続されたメインメモリ106
に展開した上で、プロセッサ104によって実行され
る。 【0045】図5は領域分割型並列処理を行う際に、配
列データを分割した時の共有データのメモリ配置を示す
一実施例である。 【0046】本図に於ては簡単化のために、6行×6列
の配列を列方向に2分割して、2台の計算機を利用して
並列処理することを例に採る。実際にはより要素数の多
い配列を、行方向、及び列方向に分割して、より多数の
計算機に割り当てて並列処理を行なうことが想定される
が、本図を用いて説明する内容を直接適用することが可
能である。 【0047】配列の各要素は8バイト長の倍精度実数と
する。分割した境界部分の1列を共有データ番号「0」
を持つ共有データ501、共有データ番号「1」を持つ
共有データ502として宣言する。511は、6行×3
列の部分配列のメインメモリ上の配置を示している。5
11が示す様に共有データ501はメインメモリ上では
不連続領域として配置されている。 【0048】一方、本発明に於て共有データを宣言した
時に作成される共有データ複製のメインメモリ上の配置
の一実施例は、512に示す様に連続領域になってい
る。511に於ける共有データの配置と512に於ける
共有データ複製との配置の対応を共有データ管理テーブ
ル405に於いて管理している。領域511と512に
格納されたデータの対応付けは、共有データ番号をキー
として行っている。この対応はアプリケーションが51
1に於ける共有データを使用すると宣言した時に共有デ
ータ管理テーブル405内に自動的に作成する。これに
よって、不連続な共有データを一つの識別子(共有デー
タ番号)で指定でき、かつ不連続なデータを一つにまと
めることによって無駄なメモリ領域を必要としない。 【0049】図6は、本発明に於ける共有データ管理テ
ーブル405の一実施例を示し、特に領域分割型並列処
理に適したテーブル構造を示す図である。 【0050】共有データ管理テーブル405は、共有デ
ータ番号エントリ601、共有データを管理している計
算機かどうかを示す管理ノードフラグ・エントリ60
2、共有データの開始アドレスを示す共有データアドレ
ス・エントリ603、共有データの複製の開始アドレス
を示す共有データ複製アドレス・エントリ604、共有
データの大きさを示す共有データサイズ・エントリ60
5、共有データを保持している計算機リスト・エントリ
609からなる。 【0051】また、アプリケーションが使用する共有デ
ータが連続領域か否かを示す分割フラグ・エントリ60
6、幾つの分割されたデータから共有データが構成され
ているかを示す共有データ要素数エントリ607、分割
されたデータがどのくらいの間隔で並んでいるかを示す
共有データオフセット・エントリ608を保持する。こ
れによって、アプリケーションは連続したメモリ領域の
共有データだけでなく、一定サイズのデータが一定間隔
で並んだメモリ領域を共有データとして宣言することが
可能である。 【0052】更に計算機リスト・エントリ609によっ
て、共有データ番号で示される共有データを保持する全
ての計算機を特定することができる。共有データ変更を
他の計算機に通知するために、計算機リスト・エントリ
609を利用してもよい。利用しない場合には、ネット
ワークに接続されている全ての計算機に通信を行なうブ
ロードキャスト機能を使えばよい。但し、ここで要求さ
れるブロードキャスト機能は、パケット消失が発生しな
い、各計算機で受信するパケットの順番が変わらないと
いう信頼性を持つ必要がある。 【0053】共有データの複製を全ての計算機が保持し
ない場合には、共有データの複製を保持している計算機
の識別子を格納する項目を必要とする。 【0054】図7は、複数計算期間で、ポインタ変数を
含むデータ構造体を共有する際の共有データのメモリ配
置を示す一実施例である。 【0055】図7(a)にC言語でのデータ構造体の宣
言の一例を示す。本例に於ては三番目の要素cが正数型
のポインタ変数となっている。以下、本構造体を共有す
る場合を例に、本発明による一実施例を示す。 【0056】図7(a)に示したデータ構造体を共有す
る場合、メモリ上では図7(b)の511に示す様に配
置される。本配置に於て、要素cの領域701に格納さ
れるのはメモリ上のアドレス値であり、これによりポイ
ンタを介してデータ領域702を指し示す。データ構造
体を複数計算機間で共有する場合、共有したいデータは
要素a,b,d、及び領域702に格納されたデータで
あり、要素cに格納されたアドレス値自体は共有する必
要がない。これは各計算機が独立したメインメモリ10
6を管理しており、各計算機上での領域511内の共有
データ格納アドレスは必ずしも一致しないためである。 【0057】一方、本発明に於て共有データを宣言した
時に作成される共有データ複製のメインメモリ上の配置
の一実施例を512に示す。512では、511で要素
cを格納していた領域701に該当する703の領域に
は、当該データ格納領域の開始位置迄のオフセット値7
04を格納する。またオフセット値704で指定される
データ格納領域の先頭705には、データ長706を格
納し、それに連続してデータ702を格納する。これに
より、ポインタ変数を要素とするデータ構造体を複数計
算機間で共有する場合にも、共有の対象となるデータは
メモリ上で連続した領域に格納することができる。 【0058】511に於ける共有データの配置と512
に於ける共有データ複製との配置の対応を共有データ管
理テーブル405に於いて管理している。領域511と
512に格納されたデータの対応付けは、対応付けは共
有データ番号をキーとして行っている。この対応は、左
記に図5で示したのと同様に、アプリケーションが51
1に於ける共有データを使用すると宣言した時に共有デ
ータ管理テーブル405内に自動的に作成する。これに
よって、不連続な共有データを一つの識別子(共有デー
タ番号)で指定でき、複数計算機間で共有する場合にネ
ットワークを介した通信の頻繁を減らすことができる。 【0059】図8は、本発明に於ける共有データ管理テ
ーブル405の他の実施例を示し、特にデータ構造体の
共有、及び階層関係を持つ共有データの管理について示
す図である。 【0060】本実施例に於ては、図6に示した共有デー
タ管理テーブル405に対して、610の構造体定義エ
ントリ、及び611の構造体サイズを示すエントリを設
けている。共有データ番号601に対応する共有データ
がデータ構造体の場合、構造体定義エントリ610には
データ構造体の定義を格納し、その共有データ複製領域
512上でのデータ長を611に格納する。本図に於て
は、共有データ番号「11」の共有データが、データ構
造体であることを示している。 【0061】共有データ管理テーブル405の構造体定
義エントリ610に格納する構造体定義テーブルの一実
施例を図9(a)に示す。構造体定義テーブル801
は、当該データ構造体の要素の型情報を格納するエント
リ802、当該要素のサイズを格納するエントリ80
3、当該要素の当該データ構造体内での開始位置を格納
するエントリ804、当該要素がポインタ型の場合に、
それが指し示すデータのサイズを格納するデータサイズ
・エントリ805により構成される。 【0062】更に図8に於て、階層要素フラグ・エント
リ612、及び階層要素共有データ番号エントリ613
を設けることにより、複数の共有データに対して階層関
係を定義しておき、共有データの一貫性保証処理のため
の獲得処理等を下位階層として定義されたデータを含め
て、一纏めで実行することが可能となる。例えば図8に
於ては、共有データ番号「5」の共有データの下位階層
データとして、共有データ番号「6」の共有データが定
義されており、更に共有データ番号「6」の下位階層に
は何も定義されていない。この場合、例えば共有データ
番号「5」の一貫性保証処理を指示すると、共有データ
番号「6」の共有データに関しても同様の処理を実行す
る。また共有データ番号「6」の一貫性保証処理を指示
した場合には、その共有データに対してのみ、同処理を
実行する。 【0063】尚、階層関係にある共有データは、共有デ
ータ複製領域512上で連続して配置しておくことによ
って、一貫性保証処理を実行する際に一括してネットワ
ークにデータを送出することが可能となり、ネットワー
クの利用効率を向上することができる。 【0064】また、図7のポインタ変数を含むデータ構
造体を階層構造として管理することもできる。即ち、デ
ータ構造体の要素aからdの本体部分を一つの共有単位
として扱い、その下位階層の共有単位として、要素cが
指し示すデータ部分702を定義すれば良い。また複数
のポインタ変数がデータ構造体内に定義されている場合
には、例えば構造体定義に表れる順番で、下位階層の共
有データ番号を階層要素共有データ番号エントリ613
に登録すれば良い。 【0065】ポインタ変数を含むデータ構造体を階層構
造として管理する別の実施例を、図9(b)に示す。構
造体定義テーブル802は、801と同等の803から
805のエントリと、当該要素がポインタ型の場合に、
それが指し示すデータの共有データ番号を格納するエン
トリ806により構成される。 【0066】図10は、本発明による共有データ管理シ
ステム204が使用するパケット構造の一実施例を示す
図である。 【0067】パケット901は、パケットヘッダ902
とデータ903より構成される。パケットヘッダ902
は、送信先計算機904、送信元計算機905、共有デ
ータ番号906、共有データ管理コマンド907より構
成される。例えば、共有データ番号12を持つ共有デー
タの変更を計算機1が計算機2に通知する場合には、送
信先計算機904に「2」、送信元計算機905に1、
共有データ番号906に12、共有データ管理コマンド
907に「共有データ変更通知」を示す識別子を、デー
タ903に変更された共有データの内容を格納して、共
有データを保持する計算機もしくは全ての計算機にパケ
ットを送信する。 【0068】図11は、本発明による共有データ管理方
式を適用するためにアプリケーション201に提供する
共有データへのアクセス関数の一実施例を示す表であ
る。 【0069】本実施例の「dsm_」で始まる文字列
は、共有データ管理システムを使用するためにアプリケ
ーションが呼び出すオペレーティング・システムの関数
の名称である。アプリケーションが共有データにアクセ
スするためには初期化処理、一貫性保証処理、終了処理
を行なう。 【0070】先ず、1001及び1002の初期化処理
dsm_open、dsm_open2に於いて、アプ
リケーションが使用する共有単位を共有データ管理シス
テムに宣言する。具体的にはあるメモリ領域に、共有デ
ータ番号を対応付ける。共有データ管理システムでは、
共有単位を管理するために必要な管理情報のエントリを
確保する。1001のdsm_openは、連続したメ
モリ領域を一つの共有単位として宣言する。1002の
dsm_open2は、一定のサイズを持つデータが一
定の間隔で並んでいるメモリ領域を一つの共有単位とし
て宣言する。 【0071】次に1003及び1004の一貫性保証処
理dsm_acquire、dsm_releaseに
於いて、アプリケーションが共有単位として宣言したメ
モリ領域に対してRead/Write操作を行なう時
は、一連のRead/Write操作を1003のds
m_acquireと1004のdsm_releas
eとで囲むことによって、共有データ管理システムは共
有単位の一貫性を保証する。 【0072】最後にアプリケーションが共有データ(共
有単位)を必要としなくなった場合には、1005の終
了処理dsm_closeを共有データ管理システムに
発行する。この発行によって、初期化処理で確保した共
有データ管理システム内の管理情報の領域を解放するこ
とができる。 【0073】尚、初期化処理、一貫性保証処理、終了処
理時に共有データ管理システム内で行なわれる処理内容
の詳細は後述する。 【0074】図12は、本発明による分散共有メモリを
利用した領域分割型並列処理を行う際のアプリケーショ
ンのメイン処理の一実施例を示すフローチャートであ
る。 【0075】ここで各計算機上のアプリケーションは、
図2及び図5に示した配列データの各要素に対して、先
に図2(b)を用いて説明した様な上下左右の隣接要素
と自要素の値を用いた演算処理を行う。 【0076】先ずステップ1101で、補助記憶装置な
どに格納された配列データからアプリケーション201
(1)に必要な配列データをメインメモリ106に読み
込む。ステップ1102では、アプリケーションで使用
する共有データの宣言を行う。具体的には、部分配列5
01のメモリ領域を共有データ番号「0」、部分配列5
02のメモリ領域を共有データ番号「1」として宣言す
る。図中では、それぞれの宣言を(open 0)、
(open 1)と略記したが、これはそれぞれ100
1のルーチンを用いて行う。ステップ1103では、ア
プリケーション201(1)が取り扱う部分配列の中
で、共有データ番号「0」を持つ共有データを仮想的な
共有空間に反映する操作をルーチン1004を用いて実
行する。図中では、(rel 0)と略記した。 【0077】次のステップ1104からステップ110
8までが、アプリケーションのメインループに対応す
る。ステップ1104で他のアプリケーションと同期を
取る。ステップ1105では、仮想的な共有空間から最
新データを獲得するための操作を実行する。ここでは、
移動元を共有データ「1」、移動先を同じ共有データ
「1」として1003のdsm_acquire処理を
実行する。図中では、この操作を(acq 1)と略記
した。ステップ1106では、部分配列の全ての要素に
ついて上下左右の隣接要素と自要素を用いた演算処理を
実行する。ステップ1107では、ステップ1106の
結果を仮想的な共有空間に反映する操作をステップ11
03と同様に実行する。ステップ1108では、計算が
終了したが否かを判定し、終了していない場合にはステ
ップ1104に戻り、ステップ1108迄の処理を繰り
返し行う。終了した場合にはステップ1109に進む。 【0078】ステップ1109では共有データの解放処
理を行う。ここでは、共有データ番号「0」を持つ共有
データ、共有データ番号「1」を持つ共有データの解放
処理を、ルーチン1005を用いて行う。図中では、そ
れぞれ(close 0)、(close 1)と略記
した。 【0079】アプリケーション201(2)について
も、ステップ1101からステップ1109と同様な処
理を実行する。但し、担当する部分配列が異なるため、
ステップ1112、ステップ1114、ステップ111
6では、それらに対応するアプリケーション201
(1)に於ける処理ステップとは異なる共有データに対
して操作を行う。 【0080】図13は、図11で示した共有データの初
期化処理を行なう際、共有データ管理システムが行なう
処理の一実施例を示すフローチャートである。 【0081】ブロック1201で囲まれた処理ステップ
は、共有データの使用を宣言したアプリケーションを実
行している計算機101で行なわれる処理内容を、ブロ
ック1202で囲まれた処理ステップは、共有データ番
号で決定される共有データを管理する計算機で行なわれ
る処理内容を示している。 【0082】先ずステップ1203で、アプリケーショ
ンが共有データ領域管理部404に共有データ番号と共
有データのメモリ領域を指定して共有データの使用を宣
言するために1001のdsm_openルーチンを起
動する。処理ステップ1204では、指定された共有デ
ータ番号に基づき、共有データを管理する計算機を決定
する。例えば、ネットワーク計算機システムを構成する
計算機に予め一意な番号を割り当てておき、共有データ
番号をネットワーク計算機システムを構成する計算機の
総数で割った余りが、ある予め決定された番号と一致し
た計算機を管理計算機として決定してもよい。ステップ
1205では、共有データ領域管理部が決定した共有デ
ータの管理計算機に対して共有データを使用することを
通知する。 共有データを管理する計算機では、ステッ
プ1206に於いて、宣言された共有データがすでに使
用されているか否かを確認する。使用されていない場合
には、ステップ1210で、管理計算機の共有データ管
理テーブル405に新しいエントリを作成する。また、
共有データ保持計算機リストの初期設定を行なう。使用
されている場合には、ステップ1207に於いて、共有
データを使用することを宣言した計算機を609の共有
データ保持計算機リストに追加し、ステップ1208で
共有データ保持計算機リストに登録されている計算機に
対して共有データ保持計算機リストが変更されたことを
通知する。 【0083】共有データの使用を宣言した計算機では、
共有データが宣言されていた場合には、ステップ120
9で共有データ保持計算機リストに基づき最新の共有デ
ータの内容を獲得して、それを共有データの複製とす
る。宣言されていなかった場合には、ステップ1211
で共有データの複製のメモリ領域を確保する。 【0084】ステップ1212では、共有データ管理テ
ーブル内に新しいエントリを作成し、共有データアドレ
スや共有データ複製アドレスなどの初期設定を行なう。 【0085】図14は、図11で示した共有データの一
貫性保証処理を行なう際、共有データ管理システムが行
なう処理の一実施例を示すフローチャートである。 【0086】ブロック1301で囲まれた処理ステップ
は、最新の共有データを獲得するために1003のds
m_acquireを発行した計算機で行なわれる処理
内容を示している。 【0087】先ずステップ1302ではアプリケーショ
ン内の共有データに最新の共有データを獲得するため
に、獲得する共有データ番号(移動元)と獲得した共有
データを置くメモリ領域を示す共有データ番号(移動
先)を指定して共有データ領域管理部404にdsm_
acquireを発行する。 【0088】ステップ1303で獲得したい共有データ
番号(移動元)に対応する共有データ複製アドレス、共
有データサイズなどを共有データ管理テーブル405か
ら共有データ番号をキーとして検索する。 【0089】次にステップ1303と同様にステップ1
304では、移動先を示す共有データ番号に基づいて、
共有データ番号に対応する共有データアドレス、及び共
有データサイズを調べる。 【0090】ステップ1305では、移動元である共有
データ複製205のメモリ領域512の内容を移動先の
共有データのメモリ領域511にコピーを行なう。 【0091】ステップ1305でコピーを行う際には、
共有データ管理テーブル405の分割フラグ606に
「1」が格納されている場合、図5に示した領域512
の格納形式から領域511の格納形式への変換を行う。
これは、データをコピーする際に、各要素毎に共有デー
タオフセット値608分のアドレス間隔でコピーを行う
ことによって実施する。また同様に、共有データ管理テ
ーブル405の構造体定義エントリ610に構造体定義
が、また階層要素フラグ612に「1」が格納されてい
る場合にも、格納形式の変換を行いながら、領域512
から511へのデータコピーを行う。 【0092】図15は、図11で示した共有データの一
貫性保証処理を行なう際、共有データ管理システムが行
なう処理の一実施例を示すフローチャートである。 【0093】ブロック1401で囲まれた処理ステップ
は、アプリケーションの共有データを共有データ管理シ
ステムに反映するために1004のdsm_relea
seを発行した計算機で行なわれる処理内容を、ブロッ
ク1402で囲まれた処理ステップは、共有データの反
映があった共有データを保持している全ての計算機で行
なわれる処理内容を示している。 【0094】先ずステップ1403ではアプリケーショ
ン内の共有データ内容を共有データ管理システムに反映
させるために、共有データ番号を指定して共有データ領
域管理部に1004のdsm_releaseを発行す
る。 【0095】ステップ1404では、指定された共有デ
ータ番号に対応するメモリ領域を共有データ管理テーブ
ルを共有データ番号をキーとして検索する。更に、共有
データ番号付加部が、対応するメモリ領域の内容を読み
だし、指定された共有データを保持する全ての計算機に
対して変更を伝達するためのパケットを作成する。 【0096】ステップ1404では、共有データのメモ
リ領域511の内容を共有データ複製205のメモリ領
域512にコピーする。この際、図14のステップ13
05で行ったコピー処理とは逆方向に処理を実施する。
即ち、図5及び図7に示した領域511の格納形式から
領域512の格納形式への変換を行いながら、データコ
ピーを行う。 【0097】ステップ1406では、パケット送受信部
が共有データ管理テーブル内の共有データ保持計算機リ
ストに基づいて、共有データ番号付加部が作成したパケ
ットを送信する。 【0098】共有データを保持している計算機では、ス
テップ1407に於いて、ネットワークによって伝達さ
れてきた共有データの変更を通知するパケットをパケッ
ト送受信部で受信する。更にパケット内容を調べて、共
有データの変更通知であることを知り、パケット番号識
別部にパケットを渡す。 【0099】ステップ1408では、パケット番号識別
部がパケット内の共有データ番号を識別する。更にその
共有データ番号に基づいて共有データ管理テーブルを検
索し、対応する共有メモリ複製アドレス、共有メモリサ
イズなどを調べる。 【0100】ステップ1409では、共有データ識別部
がネットワークから到着した共有データ変更通知に基づ
いて対応するメモリ領域に対して書き込みを行なう。 【0101】図16は、図11で示した共有データの終
了処理を行なう際、共有データ管理システムが行なう処
理の一実施例を示すフローチャートである。 【0102】ブロック1501で囲まれた処理ステップ
は、共有データの解放を要求した計算機で行なわれる処
理内容を、ブロック1502で囲まれた処理ステップ
は、共有データ番号で決定される共有データを管理する
計算機で行なわれる処理内容を示している。 【0103】先ず、ステップ1503で、アプリケーシ
ョンが共有データ領域管理部に対して共有データ番号を
指定して共有データを解放するために1004のdsm
_releaseを発行する。処理ステップ1504で
は、指定された共有データ番号に基づき、共有データを
管理する計算機を決定する。ステップ1505では、共
有データ領域管理部が決定した共有データの管理計算機
に対して共有データを解放することを通知する。 【0104】共有データを管理する計算機では、ステッ
プ1506に於いて、解放を宣言された共有データに対
して、その共有データ番号に基づいて共有データ管理テ
ーブルの共有データ保持計算機リストから、解放を要求
した計算機を削除する。 【0105】ステップ1507に於いて、共有データ管
理テーブルの共有データ保持計算機リストから解放要求
のあった計算機を削除した結果、共有データ保持計算機
リストが空になったか否かを確認する。計算機リストが
空の場合には、ステップ1508に於いて、共有データ
を管理している計算機内の共有データ管理テーブル40
5から共有データのエントリを削除する。計算機リスト
が空でない場合には、ステップ1509に於いて共有デ
ータ保持計算機リストに登録されている計算機に対して
共有データ保持計算機リストの変更を通知する。 【0106】共有データの解放を宣言した計算機では、
ステップ1510で共有データ管理テーブル内から共有
データのエントリを削除し、共有データ複製のために割
り当てられていたメモリ領域を解放する。 【0107】以上、本発明の実施例について説明してき
たが、最後に、再度図4を用いて、本発明の好適な実施
例における目的、構成、及び効果について簡単にまとめ
る。 【0108】ネットワークで接続した複数の計算機で構
成されるネットワーク計算機システムで、アプリケーシ
ョンに対してあたかも一つのデータを共有しているかの
様にみせる分散共有メモリを実現するために、アプリケ
ーションが使用する共有データに関して、共有するデー
タ領域や、共有するデータ一貫性保証のタイミング等の
共有データに関する情報を得て、ネットワーク間を流れ
るデータ転送量や転送回数を減らし、ネットワーク資源
を有効に活用し、共有データへのアクセス性能を向上さ
せる。 【0109】本発明の好適な実施例である図4において
は、共有データ管理システム204は、共有データ番号
識別部401、共有データ番号付加部402、パケット
送受信部403、共有データ領域管理部404から構成
され、共有データ管理テーブル405を保持する。 【0110】アプリケーション201が共有するデータ
(共有単位)とメモリへの写像を共有データ領域管理部
404に対して宣言すると、共有データとメモリとの対
応を共有データ管理テーブル405に格納する。共有デ
ータの一貫性を保証するために、共有データ変更を指示
した計算機と共有データ変更を受け取る計算機に於い
て、次の様な構成を取る。 【0111】共有データの変更を指示した計算機では、
変更した共有データを他の計算機に通知するために共有
データ番号に対応するメモリ領域を調べ、メモリ領域の
内容に共有データ番号を付加して、通知用パケットの作
成を行なう共有データ番号付加部402を設ける。 【0112】共有データ変更を受け取る計算機では、ネ
ットワークから伝達されてきたパケットの共有データ番
号を識別し、共有データ番号に対応するメモリ領域を共
有データ管理部を利用して調べ、対応するメモリ領域に
対してデータを書き込む処理を行なう共有データ番号識
別部401を設ける。 【0113】また両計算機に於いてパケットの送受信を
行ないネットワーク・インタフェースの制御を行なうパ
ケット送受信部403を設ける。 【0114】本発明の好適な実施例によれば、アプリケ
ーションが使用する共有データに関する情報を共有デー
タ管理システムに通知する手段を設けたことにより、ネ
ットワークを流れる無駄なデータ転送量や転送回数が減
り、ネットワーク資源を有効に利用することができると
共に、無駄なデータを転送しないのでネットワークの転
送時間も短くなり共有データへのアクセス性能が向上
し、例えば領域分割型の並列処理に於て、並列化による
高速化率を向上することができる。 【0115】 【発明の効果】本発明によれば、ネットワークで接続し
た複数の計算機システムで構成されるネットワーク計算
機システムに於いて、アプリケーションに対してあたか
も一つのデータを共有しているかの様にみせる分散共有
メモリを実現する際に、共有データの一貫性を保証する
ために必要なネットワークの転送量や転送回数が減少す
るので、ネットワーク資源を有効に活用することができ
る。更に、無駄なデータ転送をしないのでネットワーク
の転送時間が短くなり、その結果、共有データへのアク
セス性能を向上させることができる。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention
Network system composed of multiple computer systems
In a computer system, physically distributed memory
The above data can be used for multiple applications running on different computers.
Related to distributed shared memory technology for sharing between
In particular, network resources are effectively used, and as a result,
Distributed shared memory that improves access performance to resident memory
About the method. 2. Description of the Related Art In a computer, an application is executed inside the computer.
A virtual entity that executes an application is called a process. Step
Process for a single CPU for a certain period of time
By switching to each process and assigning to each process, CPU
More processes than the number can be run in parallel
You. This is called parallel processing. On the other hand, using multiple CPUs
Process to operate multiple processes simultaneously in parallel.
We call it logical. Conventionally, in a computer having a single CPU configuration, the average
When performing row processing, data exchange between processes
As a rule shared memory could be used. This includes
For example, "UNIX system call programming,
Marc J. By Rochkind, translated by Toshihiro Fukusaki, ass
Key Publishing, 1987, pp. 299-315.
There is a shared memory for stem V. In parallel processing, processes are physically executed simultaneously.
Account that consists of multiple processes
No improvement in application execution performance could be expected. There
In a network computer system, multiple computers
Connect over a network and use multiple CPUs simultaneously
By processing applications in parallel,
Application execution performance. [0005] Sharing in a network computer system
In memory, each memory is
Guarantee consistency between data stored in computer memory
And as if sharing a single piece of data,
Must be shown to the application. This technology is
It is referred to as having memory. A virtual storage mechanism is realized by a paging mechanism.
The computer expands its paging mechanism and distributes
Moly can be realized. That is, usually
At the time of access, the data
If it does not exist, a page fault occurs and the auxiliary storage device
Load the page on which data exists from the memory.
In the case of a page fault, auxiliary
Instead of retrieving the page from the storage device, from another computer
Load on your computer's memory via network
It is realized by doing. [0007] Examples of the prior art of the distributed shared memory include:
The following Ivy system (Yale University, USA) and DAS
H-System (Stanford University, USA)
it can. In the Ivy system, each page has an owner
(Owner) exists and the computer that is the owner
Manages the name of the computer that holds the copy of the page. Also own
Only those who are allowed to write to the page
I have. When a read fault occurs on a computer
Will send a copy of the page from the owner. Also write
When a read fault occurs, a write fault is
The new computer becomes the new owner and the new computer becomes
Duplication of existing pages is invalidated. In a DASH system, 16 bytes of data are
The same control as the Ivy system is performed in units of data.
ing. For details of these prior arts,
The operating system that comes after UNIX
No, Maekawa Mamoru, Mario Tokoro, Kentaro Shimizu, Kyoritsu Shuppan, 19
91 ", pp. 124-141. [0011] In a distributed shared memory, a
Networked for consistency of memory content
The memory contents are exchanged between the computers. At this time,
The problem with the conventional distributed shared memory management method is data
The transfer size and the data transfer timing. [0012] The following problems are related to the Ivy system.
There is. First, regarding the data transfer size, the memory contents
The size of the data transfer between computers for exchange is limited.
Page size (for example, 4 kilobytes)
A small data (for example, 8 bytes) compared to the computer
If shared between computers, the amount of data transferred between computers
Waste. Therefore, substantial network resources
There is a problem that the utilization rate of the source decreases. The computer A and the computer B use an
Two different frequently accessed data on the same page
If there is, computer A and computer B alternately
When memory is written to a page, the page is
Move between A and computer B. Therefore, each computer is
Every time memory access is performed, calculation via the network
Page transfer between machines occurs, and memory access performance decreases.
There is a problem of going down. Second, regarding the timing of data transfer,
Data transfer is self-calculated when reading or writing to memory
When there is no page with shared data on the plane,
Was running out of order. Therefore, computer A and computer B share the same shared data.
If data is written continuously to the data,
Each time the computer writes to memory, the page moves between computers.
Move. Transfer between computers via network
The cost is compared with the memory access speed in your computer
Memory access performance to shared data
There is a problem that is lowered. On the other hand, the DASH system is an Ivy system.
Is a system aiming at solving the first problem. That is,
Caused by sharing memory contents in
Reduce sharing units to eliminate useless data transfers
Was. As a result, unnecessary data transfer has been eliminated,
Access to a large area of the
Frequent failures. Access fall
If the traffic occurs frequently, the total
The data transfer time between the computers becomes remarkable. DASH cis
System, on the other hand, reduces the transfer time for small data.
Specialized network for the purpose of
is suggesting. However, this dedicated network is a general purpose network.
Higher cost due to different network architecture
Problem. Further, the second problem of the Ivy system is as follows.
Multiple computers continuously access the same shared data
Performance degradation in the case of DASH system
It has occurred and has not been resolved. [0018] Due to the above problems, the conventional distributed shared memo
Domain-based parallelism, a typical parallel processing technique.
When applied to processing, communication via the network is frequent
And good value is obtained at the processing speedup rate by parallelization.
I can't. In addition, data with pointer variables as elements
Target, such as when sharing data structures between multiple computers
Data may be scattered and stored on the memory.
In such cases, communication via the network is frequent.
Occurs. An object of the present invention is to solve the above-mentioned problems and to provide a network.
Effective utilization of network resources and distribution with high access performance
It is to provide a shared memory system. Means for Solving the Problems First, the first problem is solved.
Data and notes to share with the application
Can be set, and the set sharing unit is stored.
Has a shared data management table for storing
Shared data manager for managing data management tables
Steps are provided. Specifically, the application is a two-dimensional arrangement.
Data such as a column is divided into two parts, and the boundary part is divided
If you want to share
Set the minute data as a sharing unit. The sharing unit is
Memory continuous area, memory discontinuous area (constant data size,
Data intervals), or a combination of these
specify. Next, in order to solve the second problem, a plurality of
When to guarantee the consistency of shared data on computers
Application from virtual shared space (1) Latest
Data acquisition instruction, (2) Up-to-date data
Decisions are made based on two pieces of information:
Use the share unit set as the unit to be verified. More specifically, shared data is transmitted to all computers.
(2) In the computer that changes the shared data
All shared data will be
Update method or share data on one computer
In a computer that tries to acquire shared data
(1) Shared data at the timing of the latest data acquisition instruction
Network with shared data from computers that hold
How to get through and further increase the reliability of shared data
To combine these two methods, one or more
The danger may be distributed by holding shared data in a computer. When the application is executed, a sharing unit is set in advance.
Setting prevents unnecessary data transfer and
Work resources can be used effectively. Also physical
Applications need to ensure the consistency of the data
By guaranteeing only when necessary,
Network resources by minimizing the transfer between
Can be used effectively. As a result, access to shared data
Performance can be improved. FIG. 1 shows a network computer according to the present invention.
1 is a block diagram illustrating one embodiment of a system 100. In this figure, the network computer system
The system 100 connects a plurality of computers 101 to a network 102
It is configured by connecting with. In the computer 101, 103
Is the data transmission path between each block constituting the computer
The system bus 104 is a process for executing a program.
And 105 are magnetic disks for storing programs and data.
Auxiliary storage device such as disk
A main memory for storing the programs and data,
107 is for controlling input and output with the network 102
Network interface. According to the invention
The shared data management method is, for example, on the computer 101 (1).
Application and application on computer 101 (2)
Application when sharing data when applications execute in parallel
Is done. FIG. 2 shows an example of the present invention for the region division type parallel processing.
One embodiment in which the distributed shared memory according to the invention is applied
FIG. Here, the region division type parallel processing is shown in FIG.
The data array as shown in (a) is shown in FIGS. 2 (c) and (d).
Split as shown, and each one in parallel on a separate computer
This is a type of parallel processing. Fluid analysis problems
For many scientific and technical calculations, such as structural analysis problems, the domain division type
Parallel processing is applicable. As an example of the region division type parallel processing, a two-dimensional
One solution of the thermal diffusion analysis problem will be described with reference to FIG. Real solution
In the analysis method, the region to be analyzed is as shown in FIG.
Array data 202 divided into a two-dimensional mesh
And stored in the main memory 106 as processor 1
04 performs arithmetic processing. At this time, the array data 202
Each element stores the temperature value of each element. The arithmetic processing is
For all the elements of the two-dimensional array in FIG.
Perform calculations using neighboring elements, and calculate them for a certain period of time for each element.
The processing to be set as a later value is determined by a predetermined end condition.
Until the condition is satisfied. Where each
The calculation using neighboring elements of the element is, for example, as shown in FIG.
Thus, when calculating the new value of array element (m, m),
The four neighboring points, that is, (m, m-1), (m + 1, m),
(M, m + 1), (m-1, m) and (m, m) itself
It is to calculate using the value. An example of this calculation is an array
For the value of element (m, m), the value of each neighboring point and (m, m)
m) and the difference between the two values
After multiplying by the coefficient, the value is added to the value of (m, m).
is there. FIGS. 2C and 2D show two analysis methods.
2 shows a region division when processing is performed in parallel on a computer. Up
As described above, in this analysis, calculation of each array element
Column using x = 0 to x = (n / 2) -2
202 (1) and x = (n / 2) +1 to x = (n−
For the column 202 (2) up to 1), the calculation of each area is performed.
It is only necessary that only the appropriate computer can read and write.
What is necessary is just to store it on the local memory 106. It
From x = (n / 2) -1 to x = (n / 2)
Columns 203 (1) and (2) are read and written from both computers.
Must be able to be stored in the shared memory area
There is. It should be noted that a typical analysis problem as described above is
The scale of the problem, that is, the number of elements in the array in FIG.
The order is from several hundred columns to several thousand rows × thousands of columns. As described below, the distributed sharing method of the present invention
In the memory method, data exchange between computers is performed as described above.
A method that can be efficiently performed even for region division type parallel processing
provide. FIG. 3 shows the execution of the same application.
Sharing when sharing data between multiple processes
FIG. 2 is a block diagram illustrating an embodiment of a data management method. In the figure, the address on the computer 101 (1) is
Application 201 (1) and computer 101 (2)
Application 201 (2) shares data
I have. Each of the components constituting the network computer system 100
Computer 101 does not have physically shared memory
Therefore, physically distributed shared data 203 (1) and 2
Hardware consistency and software consistency with 03 (2)
Must be maintained by means of
is there. By this consistency control, on the computer 101 (1)
Application 201 (1) and the computer 101
(2) The application 201 (2) on the
Can share the same data
You. In this embodiment, the consistency of shared data is maintained
A virtual space is shared data management system that exists on each computer.
Provided by stem 204. Application 20
1 performs Read / Write for shared data
Is consistent with the shared data management system 204
Performs with guaranteed virtual space. In this embodiment,
Specifically, the data stored in the shared data replication area 205
Read and write data. In this embodiment, all the computers 101
The shared data management system 204 includes an application
There is a copy 205 of the shared data 203 used in 201
I do. This copy 205 is used when the application
Generated when you declare the use of This is a
Acquire shared data 203 from application 201
This is to minimize the processing delay when a request comes. Both
In the data management system 204, the
Consistency of the shared data copy 205 is guaranteed.
In other words, the shared data management system uses
If the data copy is changed, the shared data copy 20
5 is transmitted to all the computers 101 that hold 5
You. Further, the shared data management system 204
To save the required memory, all computers
Without having a copy of the data, application 201
When an instruction to reflect the latest shared data is issued, the instruction is
A method of creating a copy on the computer where the copying was performed may be adopted.
At the same time, the knowledge of the computer that holds the copy 205 of the shared data
Notify another computer of the bespoke child. Replication of shared data
Network computer system or one or more
It may be held by a computer. FIG. 4 shows a shared data management system according to the present invention.
FIG. 3 is a block diagram showing one embodiment of the present invention. The shared data management system 204 stores the shared data
Data number identification section 401, shared data number addition section 402,
Packet transmitting / receiving unit 403, shared data area management unit 404
Consists of In addition, the auxiliary storage device 105 has a shared
It has a data management table 405. Shared data management table
Bull 405 is pre-loaded in main memory 106
By doing so, the reference and update processing can be accelerated.
it can. About details of shared data management table 405
Will be described later. The shared data number identification unit 401 is
Shared data of the packet sent from the transmitting / receiving unit 403
Identify the number. Memory area corresponding to shared data number
Is checked using the shared data area management unit 404, and
A process of writing data to a memory area to be performed is performed. The shared data number adding section 402
The shared data number and the corresponding
Memory area, read the memory area, and
Generate packets that transmit the contents of shared data to computers
Do. The packet transmitting / receiving unit 403 is a network
-The packet of the packet sent from the interface 107
Parses the command and sends it to the block that processes the packet.
Divide. Also, the shared data number adding unit 402
Network to transmit the packets to other computers
Perform processing for activating the interface 107. The shared data area management unit 404 stores the shared data
Management of data management table 405 and shared data management system
Processing for controlling the block 204 is performed. Also,
Processing request for the shared data of application 201
New entry in the shared data management table 405
Add or delete entries. In addition, the shared data
Shared data number adding unit 4 so that contents are transmitted to other computers
02 and the packet transmitting / receiving unit 405 are controlled. Conversely,
Shared data so that data contents can be received from other computers
It controls the number identification unit 401 and the packet transmission / reception unit 403.
You. This is performed in steps 401 to 404 in the figure.
Each process is software, hardware, or
Is performed by a combination of Software
Regarding the processing of the part performed by the software,
Be executed. In other words, describe the contents of each software process
The stored program is stored in the auxiliary storage device 105,
Main memory 106 connected to system bus 103
And executed by the processor 104.
You. FIG. 5 shows the arrangement when performing the area division type parallel processing.
Indicates the memory location of shared data when column data is divided
This is one embodiment. In this figure, for simplicity, 6 rows × 6 columns
Is divided into two in the column direction and two computers are used
Take parallel processing as an example. In fact, there are more elements
Array is divided into rows and columns so that more
It is assumed that parallel processing is performed by assigning to computers
However, it is possible to directly apply the contents described using this diagram.
Noh. Each element of the array is an 8-byte double-precision real number.
I do. One column of the divided boundary is shared data number "0"
Shared data 501 having a shared data number "1"
Declared as shared data 502. 511 is 6 rows x 3
2 shows an arrangement of a partial array of columns on a main memory. 5
As shown in FIG. 11, the shared data 501 is stored in the main memory.
It is arranged as a discontinuous area. On the other hand, in the present invention, the shared data is declared.
Of shared data copy created in the main memory
One embodiment is a continuous area as shown at 512.
You. Location of shared data at 511 and at 512
Shared data management table for deployment with shared data replication
405. In areas 511 and 512
To map stored data, key the shared data number
Have gone. This is supported by the application 51
1 when it is declared to use shared data
Automatically created in the data management table 405. to this
Therefore, discontinuous shared data is assigned to one identifier (shared data).
Data number) and group discontinuous data
As a result, no useless memory area is required. FIG. 6 shows a shared data management table according to the present invention.
Table 405 shows an embodiment of the present invention.
FIG. 4 is a diagram showing a table structure suitable for management. The shared data management table 405 stores the shared data
Data number entry 601, the total
Management node flag entry 60 indicating whether it is a calculator
2. Shared data address indicating start address of shared data
Entry 603, start address of duplication of shared data
Data replication address entry 604 indicating
Shared data size entry 60 indicating the size of data
5. Computer list entry holding shared data
609. Also, the shared data used by the application
Flag entry 60 indicating whether the data is a continuous area
6. The shared data is composed of several divided data
Data element number entry 607 indicating whether the
Shows how spaced the data is arranged
Hold the shared data offset entry 608. This
This allows the application to
Not only shared data but also fixed size data at fixed intervals
Can be declared as shared data
It is possible. Further, by computer list entry 609,
The shared data indicated by the shared data number.
All computers can be specified. Change shared data
Calculator list entry to notify other calculators
609 may be used. If you do not use it,
A block that communicates with all computers connected to the work
You can use the road cast function. However, requested here
Broadcast function does not cause packet loss.
If the order of packets received by each computer does not change
It is necessary to have such reliability. A copy of the shared data is held by all computers.
If not, a computer that holds a copy of the shared data
Need an item to store the identifier of. FIG. 7 shows pointer variables in a plurality of calculation periods.
Memory allocation of shared data when sharing data structures including
FIG. FIG. 7A shows the declaration of a data structure in the C language.
Here is an example of the word. In this example, the third element c is a positive number type
Is a pointer variable. Below, this structure is shared
An example according to the present invention will be described with reference to the case where the present invention is applied. The data structure shown in FIG.
7B, the memory is arranged as shown at 511 in FIG.
Is placed. In this arrangement, the element c is stored in the area 701 of the element c.
It is the address value in memory that is
The data area 702 is pointed out via a counter. data structure
When sharing the body between multiple computers, the data you want to share is
With the data stored in the elements a, b, d and the area 702
The address value itself stored in element c must be shared.
No need. This is because each computer has independent main memory 10
6 and is shared within the area 511 on each computer.
This is because the data storage addresses do not always match. On the other hand, in the present invention, the shared data is declared.
Of shared data copy created in the main memory
Is shown at 512. In 512, element in 511
c in the area 703 corresponding to the area 701 where
Is the offset value 7 to the start position of the data storage area.
04 is stored. Also specified by the offset value 704
The data length 706 is stored at the head 705 of the data storage area.
And the data 702 is stored successively. to this
More data structures with pointer variables as elements
When sharing between computers, the data to be shared is
It can be stored in a continuous area on the memory. Arrangement of Shared Data in 511 and 512
Of the arrangement with the shared data replication in the shared data pipe
Management table 405. Region 511 and
The association of the data stored in 512 is
It is performed using the existing data number as a key. This response is left
In the same manner as shown in FIG.
1 when it is declared to use shared data
Automatically created in the data management table 405. to this
Therefore, discontinuous shared data is assigned to one identifier (shared data).
Network number), and can be used for sharing between multiple computers.
The frequency of communication via the network can be reduced. FIG. 8 shows a shared data management table according to the present invention.
Table 405 shows another embodiment of the data structure 405, in particular, of the data structure.
Introduces sharing and management of shared data with hierarchical relationships
FIG. In this embodiment, the shared data shown in FIG.
For the data management table 405, the structure definition
An entry indicating the structure size of the entry and 611 is set.
I am. Shared data corresponding to shared data number 601
Is a data structure, the structure definition entry 610 contains
Stores the definition of the data structure and its shared data replication area
The data length on 512 is stored in 611. In this figure
Indicates that the shared data with the shared data number “11” has the data structure
It indicates that it is a structure. Structure definition of shared data management table 405
Of the structure definition table stored in the definition entry 610
An example is shown in FIG. Structure definition table 801
Is an entry that stores the type information of the elements of the data structure.
802, entry 80 storing the size of the element
3. Store the starting position of the element in the data structure
Entry 804, if the element is a pointer type,
The data size that stores the size of the data that it points to
-Consists of an entry 805. Further, in FIG. 8, the hierarchical element flag entry
612 and hierarchical element shared data number entry 613
By establishing a hierarchy, hierarchical
Defined in order to ensure consistency of shared data
Acquisition processing etc., including data defined as lower layers
Thus, it can be executed collectively. For example, in FIG.
In the lower layer of the shared data with the shared data number "5"
As the data, the shared data with the shared data number “6” is set.
In the lower hierarchy of the shared data number “6”.
Is not defined. In this case, for example, shared data
When the consistency assurance process of number "5" is instructed, the shared data
A similar process is executed for the shared data of the number “6”.
You. Also, instruct consistency processing for shared data number "6"
The same process only for the shared data
Execute. It should be noted that shared data having a hierarchical relationship is shared data.
By placing them continuously on the data duplication area 512.
Therefore, when executing the consistency assurance process,
Network to send data to the network.
Can improve the use efficiency of the network. The data structure including the pointer variables shown in FIG.
Structures can also be managed as a hierarchical structure. That is,
Of the data structure elements a through d into one shared unit
And the element c is
What is necessary is just to define the data part 702 which points. Also multiple
Pointer variable is defined in the data structure
For example, in the order in which they appear in the structure definition,
The existing data number is assigned to the hierarchical element shared data number entry 613.
You can register to. A data structure including pointer variables is hierarchically structured.
FIG. 9B shows another embodiment in which the structure is managed. Structure
The structure definition table 802 starts from 803 equivalent to 801
805 entries and if the element is of pointer type,
An entry that stores the shared data number of the data it points to
A bird 806 is provided. FIG. 10 shows a shared data management system according to the present invention.
FIG. 6 shows an embodiment of a packet structure used by the stem 204. FIG.
FIG. The packet 901 has a packet header 902
And data 903. Packet header 902
Are the destination computer 904, the source computer 905, and the shared
Data number 906 and shared data management command 907
Is done. For example, the shared data having the shared data number 12
When Computer 1 notifies Computer 2 of a change in data,
"2" is assigned to the destination computer 904, and 1 is assigned to the source computer 905.
12 to the shared data number 906, a shared data management command
907, the identifier indicating “shared data change notification”
The contents of the changed shared data are stored in the
Packaged on the computer that holds the data or all computers
To send a credit. FIG. 11 shows a shared data management method according to the present invention.
Provide to application 201 to apply the formula
FIG. 6 is a table showing an embodiment of an access function to shared data;
You. Character string starting with “dsm_” in this embodiment
Is an application to use a shared data management system.
Operating system functions that the application calls
Is the name. Applications access shared data
Initialization, consistency assurance, and termination
Perform First, initialization processing of 1001 and 1002
In dsm_open and dsm_open2,
Sharing units used by the application
Declare to the system. Specifically, the shared data is stored in a certain memory area.
Data numbers. In a shared data management system,
Enter the management information entry required to manage the sharing unit.
Secure. The dsm_open of 1001 is a
Declare the memory area as one shared unit. 1002
dsm_open2 indicates that data having a certain size is one.
Memory areas arranged at regular intervals are considered as one shared unit.
Declare. Next, 1003 and 1004 consistency assurance processing
To dsm_acquire, dsm_release
The application has declared as a share unit.
When performing Read / Write operation on memory area
Performs a series of Read / Write operations in 1003 ds
m_acquire and dsm_release of 1004
e, the shared data management system
Ensuring unity consistency. Finally, when the application executes the shared data (shared)
If you no longer need credits, the end of 1005
End processing dsm_close to shared data management system
Issue. With this issuance, the shared
Release the management information area in the data management system
Can be. The initialization processing, the consistency assurance processing, and the termination processing
Processing performed in the shared data management system
Will be described later in detail. FIG. 12 shows a distributed shared memory according to the present invention.
Application for performing region division type parallel processing using
FIG. 4 is a flowchart illustrating an example of a main process of the application.
You. Here, the application on each computer is
For each element of the array data shown in FIGS.
, Top, bottom, left and right adjacent elements as described with reference to FIG.
And the arithmetic processing using the value of its own element. First, in step 1101, an auxiliary storage device
From the array data stored in the application 201
The sequence data necessary for (1) is read into the main memory 106.
Put in. In step 1102, use in application
Declares shared data to be used. Specifically, the partial sequence 5
01 is assigned to the shared data number “0” and the partial array 5
02 is declared as the shared data number “1”
You. In the figure, each declaration is (open 0),
(Open 1), each of which is 100
This is performed by using the first routine. In step 1103,
In the partial sequence handled by application 201 (1)
With the shared data having the shared data number “0”,
The operation to reflect on the shared space is executed using the routine 1004.
Run. In the figure, it is abbreviated as (rel 0). The next step 1104 to step 110
8 correspond to the main loop of the application
You. Synchronize with other applications in step 1104
take. In step 1105, the virtual shared space is
Perform operations to obtain new data. here,
Source is shared data "1", destination is same shared data
Dsm_acquire processing of 1003 as “1”
Execute. This operation is abbreviated as (acq 1) in the figure.
did. In step 1106, all the elements of the partial array
Calculation processing using neighboring elements and its own element
Execute. In step 1107, the
Step 11 to reflect the result in the virtual shared space
Execute in the same way as 03. In step 1108, the calculation
It is determined whether the process has been completed or not.
Returning to step 1104, the processing up to step 1108 is repeated.
Do it back. If the processing has been completed, the process proceeds to step 1109. At step 1109, the shared data is released.
Work. Here, the shared data having the shared data number “0”
Release of shared data having data and shared data number "1"
The processing is performed using the routine 1005. In the figure,
Abbreviated as (close 0) and (close 1), respectively.
did. About application 201 (2)
Are the same as steps 1101 to 1109.
Execute the process. However, since the partial sequence in charge is different,
Step 1112, Step 1114, Step 111
6, the corresponding application 201
For shared data different from the processing steps in (1)
And perform the operation. FIG. 13 shows the initial state of the shared data shown in FIG.
When performing initialization processing, the shared data management system performs
It is a flowchart which shows one Example of a process. Processing steps enclosed by block 1201
Implements applications that have declared use of shared data.
The processing performed by the executing computer 101 is
The processing steps surrounded by the lock 1202 are shared data numbers.
Is performed by a computer that manages shared data
4 shows the processing contents. First, in step 1203, the application
Is shared with the shared data number by the shared data area management unit 404.
Specify the memory area of the shared data and declare the use of shared data.
Call 1001 dsm_open routine to say
Move. In processing step 1204, the designated shared data
Determines computer to manage shared data based on data number
I do. For example, configuring a network computer system
Assign a unique number to the computer in advance, and
Number of the computer that constitutes the network computer system
The remainder divided by the total number matches a certain predetermined number.
May be determined as the management computer. Steps
In step 1205, the shared data determined by the shared data area management unit
Use of shared data for data management computers
Notice. Computers that manage shared data must
In step 1206, the shared data declared has already been used.
Check if it is used. If not used
In step 1210, the shared data management
A new entry is created in the management table 405. Also,
Initialize the shared data holding computer list. use
If so, in step 1207, the shared
609 sharing a computer that declared to use data
Add to the data holding computer list, and in step 1208
To computers registered in the shared data retention computer list
On the other hand, the list of computer
Notice. In a computer that has declared use of shared data,
If the shared data has been declared, step 120
In step 9, the latest shared data is
Data, and use it as a copy of the shared data.
You. If not, step 1211
Secures a memory area for duplication of shared data. At step 1212, the shared data management
Create a new entry in the shared data address
Initial settings such as the address and shared data copy address are performed. FIG. 14 shows one example of the shared data shown in FIG.
When performing persistence assurance processing, the shared data management system
It is a flowchart which shows one Example of a process. Processing steps enclosed by block 1301
Is 1003 ds to get the latest shared data
Processing performed by the computer that issued m_acquire
Indicates the content. First, in step 1302, the application
To get the latest shared data for shared data in the application
, The shared data number (source) and the acquired share
Shared data number indicating the memory area where data is to be stored (move
Destination), and the shared data area management unit 404 sends dsm_
Issue an acquire. Shared data to be obtained in step 1303
Address of the shared data corresponding to the
Whether the shared data size etc. is in the shared data management table 405
Search using the shared data number as a key. Next, as in step 1303, step 1
At 304, based on the shared data number indicating the destination,
A shared data address corresponding to the shared data number,
Check the data size. In step 1305, the shared
Copy the contents of the memory area 512 of the data copy 205 to the destination
The shared data is copied to the memory area 511. When copying in step 1305,
In the division flag 606 of the shared data management table 405
When "1" is stored, the area 512 shown in FIG.
From the storage format of the area 511 to the storage format of the area 511.
This means that when copying data, the shared data
Copy at address interval of 608 minutes offset value
It is implemented by doing. Similarly, shared data management
The structure definition entry 610 in the table 405
And “1” is stored in the hierarchy element flag 612.
Also, when converting the storage format,
To 511. FIG. 15 shows one example of the shared data shown in FIG.
When performing persistence assurance processing, the shared data management system
It is a flowchart which shows one Example of a process. Processing steps enclosed by block 1401
Manages shared data for applications
1004 dsm_relea to reflect on stem
The contents of the processing performed by the computer that issued the
The processing steps surrounded by the block 1402 are the counterparts of the shared data.
Run on all computers that have shared data
This shows the processing to be performed. First, in step 1403, the application
Reflect shared data contents in shared data management system
The shared data number to specify
Issues 1004 dsm_release to the area manager
You. At step 1404, the designated shared data
Data area corresponding to data number is shared data management table
Search for the file using the shared data number as a key. Furthermore, sharing
The data number addition section reads the contents of the corresponding memory area.
However, all computers that hold the specified shared data
Create a packet to propagate changes to it. In step 1404, a memo of shared data
The contents of the storage area 511 are stored in the memory area of the shared data copy 205.
Copy to area 512. At this time, step 13 in FIG.
Processing is performed in a direction opposite to the copy processing performed in step 05.
That is, from the storage format of the area 511 shown in FIG. 5 and FIG.
While converting the storage format of the area 512,
Do pea. At step 1406, the packet transmitting / receiving unit
Is the shared data holding computer in the shared data management table.
The packet created by the shared data number addition unit based on the
To send a credit. In a computer that holds shared data,
At step 1407, the communication
Packet that notifies the change of shared data
Received by the transmitting and receiving unit. Further examine the packet contents and
Knows that it is a change notification of the existing data and recognizes the packet number.
Pass the packet to another part. At step 1408, packet number identification
The unit identifies a shared data number in the packet. Furthermore
Search the shared data management table based on the shared data number
Search for the corresponding shared memory replication address,
Check the ises and more. In step 1409, the shared data identification unit
Based on the shared data change notification arriving from the network
Write to the corresponding memory area. FIG. 16 shows the end of the shared data shown in FIG.
When the shared data management system performs
It is a flowchart which shows one Example of a process. Processing steps enclosed by block 1501
Is a process performed by the computer that requested the release of the shared data.
Processing steps enclosed in block 1502
Manages shared data determined by the shared data number
It shows the contents of processing performed by the computer. First, in step 1503, the application
The shared data number to the shared data area management unit.
1004 dsm to specify and release shared data
_Release is issued. In processing step 1504
Will share data based on the specified shared data number.
Decide which computer to manage. In step 1505,
Shared data management computer determined by the data area management unit
To release the shared data. In the computer that manages shared data, step
In step 1506, the shared data declared to be released
The shared data management data based on the shared data number.
Request release from the shared data holding computer list of the cable
Deleted calculator. In step 1507, the shared data management
Request from the shared data holding computer list of the logical table
As a result of deleting a computer with
Check if the list is empty. Computer list
If it is empty, in step 1508, the shared data
Data management table 40 in the computer managing the
5 is deleted from the entry of the shared data. Computer list
If is not empty, in step 1509 the shared data
For computers registered in the data holding computer list
Notifies the change of the shared data holding computer list. In a computer that has declared release of shared data,
In step 1510, sharing from within the shared data management table
Delete data entries and assign for shared data replication
Release the allocated memory area. The embodiments of the present invention have been described above.
However, finally, referring again to FIG.
A brief summary of the purpose, organization, and effects of the examples
You. [0108] It is composed of a plurality of computers connected via a network.
The network computer system that is created
Whether a single piece of data is shared
Application to realize distributed shared memory
About the shared data used by the
Data area, the timing of shared data consistency assurance, etc.
Get information about shared data and flow between networks
Network resources by reducing the amount of data transfer and the number of transfers
To improve the performance of accessing shared data.
Let In FIG. 4, which is a preferred embodiment of the present invention,
Is the shared data management system 204 is the shared data number
Identification unit 401, shared data number addition unit 402, packet
Consisting of a transmitting / receiving unit 403 and a shared data area management unit 404
Then, the shared data management table 405 is held. Data shared by application 201
(Shared unit) and mapping to memory, shared data area management unit
When declared for 404, the pair of shared data and memory
The response is stored in the shared data management table 405. Shared data
Order shared data changes to ensure data consistency
Computer and the computer that receives the shared data change
And take the following configuration. In the computer instructing the change of the shared data,
Shared to notify other computers of changed shared data
Check the memory area corresponding to the data number, and
Add a shared data number to the contents to create a notification packet.
And a shared data number adding unit 402 for performing the generation. The computer that receives the change of the shared data
The shared data number of the packet transmitted from the network
And identify the memory area corresponding to the shared data number.
Investigate using the data management section and store it in the corresponding memory area.
Shared data number for writing data to
A separate part 401 is provided. Packet transmission and reception between both computers
To control the network interface
A packet transmitting / receiving unit 403 is provided. According to a preferred embodiment of the present invention, application
Information about the shared data used by the
By providing a means to notify the data management system,
The amount of unnecessary data transfer and the number of transfers flowing through the
And that network resources can be used effectively
Both do not transfer useless data, so network
The transmission time is shortened and the access performance to shared data is improved.
For example, in parallel processing of the area division type,
The speed-up rate can be improved. According to the present invention, according to the present invention, network connection
Network computing composed of multiple computer systems
In the machine system
Sharing that makes it appear as if they share one piece of data
Ensure consistency of shared data when implementing memory
Network transfer volume and number of transfers required for
Therefore, network resources can be used effectively
You. In addition, since there is no needless data transfer,
Transfer time is shortened, resulting in access to shared data.
Process performance can be improved.

【図面の簡単な説明】 【図1】本発明の一実施例のネットワーク計算機システ
ムのブロック図である。 【図2】本発明の適用対象の一例である領域分割型並列
処理の一実施例を示す図である。 【図3】本発明による共有データ保持の一実施例を示す
図である。 【図4】本発明に於ける共有データ管理システムの一実
施例を示すブロック図である。 【図5】本発明による共有データの領域分割型並列処理
への応用を示す一実施例である。 【図6】本発明に於ける共有データ管理テーブルの一実
施例を示す図である。 【図7】本発明による共有データのデータ構造体への応
用を示す一実施例である。 【図8】本発明に於ける共有データ管理テーブルの一実
施例を示す図である。 【図9】本発明に於ける構造体定義テーブルの一実施例
を示す図である。 【図10】本発明に於ける通信パケット構造の一実施例
を示す図である。 【図11】本発明による共有データアクセス関数の一実
施例を示す図である。 【図12】本発明による共有データを利用したアプリケ
ーションのメイン処理の一実施例を示すフローチャート
である。 【図13】本発明による共有データ使用開始処理の一実
施例を示すフローチャートである。 【図14】本発明による共有データ獲得処理の一実施例
を示すフローチャートである。 【図15】本発明による共有データ反映処理の一実施例
を示すフローチャートである。 【図16】本発明による共有データ解放処理の一実施例
を示すフローチャートである。 【符号の説明】 100:ネットワーク計算機システム、101:計算
機、102:ネットワーク、103:システム・バス、
104:プロセッサ、105:補助記憶装置、106:
メインメモリ、107:ネットワーク・インタフェー
ス、201:アプリケーション、202:アプリケーシ
ョン内のローカルデータ、203:アプリケーション内
の共有データ、204:共有データ管理システム、20
5:共有データ管理システム内の共有データ複製、40
1:共有データ番号識別部、402:共有データ番号付
加部、403:パケット送受信部、404:共有データ
領域管理部、405:共有データ管理テーブル、50
1:共有データ番号「0」を持つ共有データ、502:
共有データ番号「1」を持つ共有データ、511:共有
データのメインメモリ上での配置、512:共有データ
複製のメインメモリ上での配置、601:共有データ番
号、602−613:共有データ管理テーブルの管理項
目、701−706:データ構造体の共有データ複製領
域上での配置要素、801、802:構造体定義テーブ
ル、803−807:構造体定義テーブルの管理項目、
901:通信パケット、902−907:通信パケット
構成要素、1001−1006:共有データのアクセス
関数、1301−1318:共有データを利用した領域
分割型アプリケーションのメイン処理ステップ、120
1:共有データの使用を要求した計算機内での処理ステ
ップ、1202:共有データ管理計算機内での処理ステ
ップ、1203−1212:共有データ使用を要求した
時の処理ステップ、1301:共有データの獲得処理を
発行した計算機内での処理ステップ、1302−130
5:共有データを獲得する時の処理ステップ、140
1:共有データ反映処理を発行した計算機内での処理ス
テップ、1402:データを共有する他の計算機内での
処理ステップ、1403−1410:共有データを反映
する時の処理ステップ、1501:共有データ解放を要
求した計算機内での処理ステップ、1502:共有デー
タ管理計算機内での処理ステップ、1503−151
0:共有データ解放を要求した時の処理ステップ。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of a network computer system according to an embodiment of the present invention. FIG. 2 is a diagram showing an embodiment of a region division type parallel processing which is an example of an application target of the present invention. FIG. 3 is a diagram showing one embodiment of holding shared data according to the present invention. FIG. 4 is a block diagram showing one embodiment of a shared data management system according to the present invention. FIG. 5 is an embodiment showing an application of the shared data to a region division type parallel processing according to the present invention. FIG. 6 is a diagram showing one embodiment of a shared data management table according to the present invention. FIG. 7 is an embodiment showing application of shared data to a data structure according to the present invention. FIG. 8 is a diagram showing one embodiment of a shared data management table according to the present invention. FIG. 9 is a diagram showing one embodiment of a structure definition table according to the present invention. FIG. 10 is a diagram showing one embodiment of a communication packet structure in the present invention. FIG. 11 is a diagram showing one embodiment of a shared data access function according to the present invention. FIG. 12 is a flowchart illustrating an embodiment of an application main process using shared data according to the present invention. FIG. 13 is a flowchart showing an embodiment of a shared data use start process according to the present invention. FIG. 14 is a flowchart showing an embodiment of a shared data acquisition process according to the present invention. FIG. 15 is a flowchart showing an embodiment of a shared data reflection process according to the present invention. FIG. 16 is a flowchart showing an embodiment of shared data release processing according to the present invention. [Description of Signs] 100: Network computer system, 101: Computer, 102: Network, 103: System bus,
104: processor, 105: auxiliary storage device, 106:
Main memory, 107: network interface, 201: application, 202: local data in application, 203: shared data in application, 204: shared data management system, 20
5: Shared data replication in shared data management system, 40
1: shared data number identification unit, 402: shared data number addition unit, 403: packet transmission / reception unit, 404: shared data area management unit, 405: shared data management table, 50
1: Shared data having a shared data number “0” 502:
Shared data having a shared data number "1", 511: Placement of shared data on the main memory, 512: Placement of shared data copy on the main memory, 601: Shared data number, 602-613: Shared data management table 701-706: Arrangement elements of the data structure on the shared data replication area, 801 and 802: Structure definition table, 803-807: Management items of the structure definition table,
901: communication packet, 902-907: communication packet component, 1001-1006: access function of shared data, 1301-1318: main processing step of area division type application using shared data, 120
1: a processing step in the computer requesting use of shared data; 1202: a processing step in the shared data management computer; 1203-1212: a processing step when requesting use of shared data; 1301: a process of acquiring shared data Processing steps in the computer that issued the
5: processing steps for acquiring shared data, 140
1: processing steps in the computer that issued the shared data reflection processing; 1402: processing steps in another computer sharing data; 1403-1410: processing steps when reflecting shared data; 1501: release of shared data In the computer that requested the request, 1502: processing step in the shared data management computer, 1503-151
0: Processing step when requesting release of shared data.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 林 剛久 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所中央研究所内 (72)発明者 鬼頭 昭 神奈川県横浜市戸塚区戸塚町5030番地 株式会社日立製作所ソフトウェア開発本 部内 (56)参考文献 特開 平5−282165(JP,A) A.S.Tanenbaum,Par allel Programming Using Shared Objec ts and Broadcastin g,IEEE COMPUTER,米 国,IEEE,1992年 8月,10−19 Marc.J.Rochkind,U NIXシステムコールプログラミング, 日本,ASCII,1987年11月 1日, p299−p315 前川守,分散オペレーティングシステ ム UNIXの次にくるもの,日本,共 立出版,1991年12月25日,p124−p141 (58)調査した分野(Int.Cl.7,DB名) G06F 12/06 G06F 15/167 G06F 15/177 G06F 9/46 G06F 12/00 ──────────────────────────────────────────────────続 き Continuing from the front page (72) Inventor Takehisa Hayashi 1-280 Higashi Koikebo, Kokubunji-shi, Tokyo Inside the Central Research Laboratory, Hitachi, Ltd. (72) Inventor Akira Kito 5030 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Hitachi (56) References JP-A-5-282165 (JP, A) S. See Tanenbaum, Parall Programming Using Shared Objects and Broadcasting, IEEE COMPUTER, USA, IEEE, August 1992, 10-19 Marc. J. Rochkind, UNIX System Call Programming, Japan, ASCII, November 1, 1987, p299-p315 Maekawa Mamoru, Distributed Operating System Next to UNIX, Japan, Kyoritsu Shuppan, December 25, 1991, p124 −p141 (58) Field surveyed (Int.Cl. 7 , DB name) G06F 12/06 G06F 15/167 G06F 15/177 G06F 9/46 G06F 12/00

Claims (1)

(57)【特許請求の範囲】【請求項1】 複数の計算機がネットワークで接続され、
各計算機のメモリ上に分散したデータを各計算機にて共
有する分散共有メモリシステムにおいて、 計算機のアプリケーションから、前記各計算機で共有す
る領域の任意の部位を一次元配列への写像として指定
し、各計算機のメモリ上に分散したデータを前記一次元
配列を共有単位として指定し、前記指定された共有単位
にて共有データを対応付けて管理する共有データ管理手
段を上記複数の計算機の少なくともいずれか一つに設け
たことを特徴とする分散共有メモリシステム。
(57) [Claims] [Claim 1] A plurality of computers are connected by a network,
In a distributed shared memory system in which data distributed on the memory of each computer is shared by each computer, an arbitrary part of an area shared by each computer is specified as a mapping to a one-dimensional array from a computer application, The shared data management means for designating the data distributed on the memory of the computer as the one-dimensional array as a shared unit and managing the shared data in association with the specified shared unit by at least one of the plurality of computers. A distributed shared memory system, comprising:
JP29630093A 1993-11-26 1993-11-26 Distributed shared memory system and computer Expired - Fee Related JP3489157B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP29630093A JP3489157B2 (en) 1993-11-26 1993-11-26 Distributed shared memory system and computer
GB9423890A GB2284494B (en) 1993-11-26 1994-11-25 Distributed shared memory management system
US08/348,099 US5649102A (en) 1993-11-26 1994-11-25 Distributed shared data management system for controlling structured shared data and for serializing access to shared data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29630093A JP3489157B2 (en) 1993-11-26 1993-11-26 Distributed shared memory system and computer

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2003206387A Division JP2004164586A (en) 2003-08-07 2003-08-07 Loosely coupled computer system

Publications (2)

Publication Number Publication Date
JPH07152640A JPH07152640A (en) 1995-06-16
JP3489157B2 true JP3489157B2 (en) 2004-01-19

Family

ID=17831771

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29630093A Expired - Fee Related JP3489157B2 (en) 1993-11-26 1993-11-26 Distributed shared memory system and computer

Country Status (1)

Country Link
JP (1) JP3489157B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4317296B2 (en) * 1999-09-17 2009-08-19 株式会社ターボデータラボラトリー Parallel computer architecture and information processing unit using this architecture
JP2009512029A (en) * 2005-10-10 2009-03-19 ワラテック プロプライエタリー リミテッド Multi-computer system with extended memory cleanup
CN101283343B (en) * 2005-10-10 2010-05-19 瓦拉泰克有限公司 Modified machine architecture with partial memory updating
EP1943596A4 (en) * 2005-10-17 2009-01-07 Waratek Pty Ltd Multiple machine architecture with overhead reduction
JP4696025B2 (en) 2006-05-25 2011-06-08 富士通株式会社 Computing system and data update method
JP4546943B2 (en) * 2006-09-01 2010-09-22 株式会社日立製作所 Node and memory area management method used in transfer memory system
US9372752B2 (en) * 2013-12-27 2016-06-21 Intel Corporation Assisted coherent shared memory
US10560542B2 (en) 2014-09-15 2020-02-11 Ge Aviation Systems Llc Mechanism and method for communicating between a client and a server by accessing message data in a shared memory

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A.S.Tanenbaum,Parallel Programming Using Shared Objects and Broadcasting,IEEE COMPUTER,米国,IEEE,1992年 8月,10−19
Marc.J.Rochkind,UNIXシステムコールプログラミング,日本,ASCII,1987年11月 1日,p299−p315
前川守,分散オペレーティングシステム UNIXの次にくるもの,日本,共立出版,1991年12月25日,p124−p141

Also Published As

Publication number Publication date
JPH07152640A (en) 1995-06-16

Similar Documents

Publication Publication Date Title
US4912629A (en) Real-time garbage collection for list processing using restructured cells for increased reference counter size
US4707781A (en) Shared memory computer method and apparatus
US11562091B2 (en) Low latency access to physical storage locations by implementing multiple levels of metadata
US4484262A (en) Shared memory computer method and apparatus
Wulf et al. C. mmp: A multi-mini-processor
Delp et al. An analysis of memnet—an experiment in high-speed shared-memory local networking
Lahjomri et al. Koan: a shared virtual memory for the ipsc/2 hypercube
EP3688598B1 (en) Method for reading data stored in a non-volatile cache using rdma
US6711559B1 (en) Distributed processing system, apparatus for operating shared file system and computer readable medium
US6112281A (en) I/O forwarding in a cache coherent shared disk computer system
CN112000287B (en) IO request processing device, method, equipment and readable storage medium
JPH10222407A (en) Method for processing multiple data base transactions in same process for reducing process overhead and redundant retrieval from data base server
JP3489157B2 (en) Distributed shared memory system and computer
CN113138859A (en) General data storage method based on shared memory pool
US6834281B1 (en) Method and apparatus to support multi-node direct access to file system data
CN113448897B (en) Optimization method suitable for pure user mode far-end direct memory access
WO2024082702A1 (en) Data processing method and apparatus, and chip and computer-readable storage medium
JPH07319839A (en) Distributed shared memory managing method and network computer system
JPH011049A (en) parallel computer
JPH086838A (en) Distribusion system
KR0170197B1 (en) Virtual system for parallel processing of desk in high speed parallel computer
JPH11238047A (en) Distributed common memory system and recording medium which records program and which machine can read
Ranade et al. Distributed memory management on a multi-transputer system
CN116263746A (en) Memory partitioning of processing entities
CN111831397A (en) Method, device, equipment and storage medium for processing IO (input/output) request

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees