JP3628782B2 - Parallel distributed processing system - Google Patents

Parallel distributed processing system Download PDF

Info

Publication number
JP3628782B2
JP3628782B2 JP31017395A JP31017395A JP3628782B2 JP 3628782 B2 JP3628782 B2 JP 3628782B2 JP 31017395 A JP31017395 A JP 31017395A JP 31017395 A JP31017395 A JP 31017395A JP 3628782 B2 JP3628782 B2 JP 3628782B2
Authority
JP
Japan
Prior art keywords
library
processor
code
virtual code
native
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
JP31017395A
Other languages
Japanese (ja)
Other versions
JPH09146900A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP31017395A priority Critical patent/JP3628782B2/en
Publication of JPH09146900A publication Critical patent/JPH09146900A/en
Application granted granted Critical
Publication of JP3628782B2 publication Critical patent/JP3628782B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は,複数のプロセッサが協調して処理を進める並列分散処理システムに関する。
【0002】
現在の並列分散処理の環境は,それ自身の複雑さおよび並列処理のためのプログラミングの困難さから一部の専門家の独占物となってしまっているが,単一のCPUによる処理のボトルネックが顕在化している現在,一般の計算機ユーザにも容易で高性能な並列処理を可能とする環境の提供が急務となっている。
【0003】
【発明が解決しようとする課題】
複数のプロセッサが協調して処理を進める並列処理分散システム,特に,LAN,WAN環境でヘテロジーニァスな複数のプロセッサを1クラスタとして協調させながら一つのタスクを並列分散処理させるようなシステム環境が考えられている。このような並列処理環境を一般ユーザに提供する際に問題となるのは,簡易性と習得のし易さとであるが,これは性能との間にトレードオフの関係を生ずる。
【0004】
従来の技術水準では,性能のために簡易性をかなりの程度犠牲にするか,または簡易性のために大幅な性能の低下を甘受せざるを得ない。
性能に関し,プロセッサ間のデータ転送の遅延とスループットが問題になるが,これは,本質的にはデータ転送の遅延の問題に還元できる。並列度の高い計算では,転送するデータの単位が小さく,転送量に関係のない転送回数だけに依存する遅延が主だからである。転送回数に依存する遅延を全体として減らすためには,転送するデータをある程度バッファに蓄積しておいて,まとめて一度に転送する必要があるが,このバッファの大きさをどの程度にすると最適であるのかは,因子が複雑に絡み合っているため,事実上実験してみないことには分からない。
【0005】
また,プログラムを並列実行するためには,それを並列実行の単位に分割しなければならない。しかし,より小さな単位に分割すればそれだけ多くのCPUが利用可能になる代わりに,実行の単位が小さくなることによる同期のオーバヘッド,コンテキスト・スイッチの増加によるオーバヘッド,データの遅延,データ転送量の増加,メモリのフラグメンテーションによるページングの増加等を招くことになり,ここでもまた,トレードオフを生じる。
【0006】
エンドユーザに対しても並列処理によるプログラムの高速化,大規模化のメリットを享受できるようにすることが望まれているが,現状では,ある程度の性能を得るためには,エンドユーザでもエキスパート・ユーザの持つ並列処理の煩雑なノウハウを獲得してプログラムのチューニングをしなければならないという矛盾に直面する。
【0007】
これらの解決の手段として,従来,並列処理のための高級言語,例えば,手続き型として,Occam(A.Burns, PROGRAMMING IN occam 2, Addison−Wesley,1988), HPF(High Performance Fortran Forum, High Performance Fortran Language Specification, 1994),関数型として,CLEAN(R.Plasmeijer and M.van Eekelen, Functional Programming and Parallel Graph Rewriting, Addison−Wesley,1993),論理型として,PARLOG(T.Conlon, Programming in PARLOG, Addison−Wesley,1989)のような高級言語が開発されている。
【0008】
また,高レベルのライブラリ・インタフェースとして,例えばPVM(A.Geist,A.Beguelin,J.Dongarra,W.Jiang,R.Manchek and V.Sunderam, PVM:Parallel Virtual Machine − A Users’ Guide and Tutorial for Networked Parallel Computing −, MIT press,1994 ),MPI(Message Passing Interface Forum, MPI: A Message−Passing Interface Standard, May 5,1994)が開発されている。
【0009】
しかし,高級言語では十分な性能がでないか,性能を出すためにはエキスパート並みのノウハウが必要であり,また,高レベルのライブラリは,未だにエンドユーザが使えるようなレベルに達していない。
【0010】
他の中間的な解決手段として,比較的低レベルの手続き型の逐次言語と並列処理のための命令言語を組み合わせる方法(I.Foster, R.Olson and S.Tuecke, Productive Parallel Programming, Scientific Programming, Vol.1,pp.51−66, 1992; L.A.Crowl and T.J.LeBlanc, Parallel Programming with Control Abstraction, ACM Transactions on Programming Languages and Systems, Vol.16,No.3,pp.524−576, 1994)が提案されている。
【0011】
これらの方法は,全ての面にわたってエンドユーザであるのではなく,逐次処理のエキスパートであるが並列処理に関しては比較的エンドユーザに近い人を対象として,低レベルの逐次言語のチューニングと並列処理のチューニングとを分離し,並列処理のインタフェース部分だけに簡易で画一化されたチューニング・スタイルを導入するものである。
【0012】
本発明が対象とするシステムは,後者の考え方にもとづくものであるが,並列処理インタフェース部分のさらなる画一化とエキスパート・ユーザのための汎用性とを推進し,逐次処理部分とのインタフェースに柔軟性を持たせるために,全体を手続き型言語の意味論で統一することを図っている。
【0013】
例えば,ネットワーク上のワークステーション群あるいは専用のマルチCPUの並列計算機上で並列処理プログラムを開発する場合,通常,ワークステーションを1台だけ使って,あるいは1台のワークステーション上に構築された並列計算機のシミュレータを使って,プログラムを開発するところから始める。また,多くの場合,過去に開発されたプログラムのためのルーティンがライブラリ化されているので,利用可能なライブラリが既に存在すれば,それを再利用するところからプログラムの開発を始める。
【0014】
このようにしてプログラムの開発が進み,実際にプログラムを実行して全体のデバッグをする段階において,従来は,新たに開発したルーティンの部分に既存のライブラリをリンクしてできるバイナリのコードを,実行時に全てのワークステーション,あるいは全てのCPUに毎回転送することを繰り返していた。この方法では,デバッグを必要としないライブラリの部分までデバッグの度に毎回転送することになり,プログラム開発の効率を下げてしまうという問題があった。また,実際にプログラムを実行して運用する段階においても,同様にライブラリの部分を毎回転送するので,プログラムの起動に掛かる時間が長くなってしまう要因となっていた。
【0015】
特に,ネットワーク上のワークステーション群を使って処理を行う場合,異なったタイプのワークステーションを使用したいという要求もある。この場合,一つのアプローチとしては,例えば前述したPVM,MPI等の並列処理のメッセージ・パッシング・インタフェースを使って機能単位で逐次処理の部分プログラムを作り,その間を通信によって結び付けて並列処理させる方法がある。この方法では,各プログラムのネィテイブ・コードはワークステーションのタイプごとに違っていても構わない。しかし,ワークステーションのタイプごとに,プログラムをコンパイルしてネイティブ・コードを作成しなければならず,作業が煩雑になるという欠点がある。
【0016】
他のアプローチとしては,仮想コードを設定して,そのインタプリタを各々のワークステーションに配して並列処理させる方法がある。この方法は1種類のコードしか使用しないので,コンパイルその他の作業が単純であるという利点があるが,仮想コードの実行時におけるインタプリートにかかるオーバヘッドが大きいという欠点がある。
【0017】
この欠点を克服する方法として,仮想コードからネィティブ・コードを呼び出すインタフェースを設けて,ネイティブ・コードの部分の実行によってインタプリートのオーバヘッドを低減させる方法がある。しかし,この方法はインタプリタに予め標準的なネイティブ・コード・ライブラリをリンクさせておくものであり,ユーザの作成した一般のネイティブ・コードをリンクして使用できるわけではない。
【0018】
本発明は上記問題点の解決を図り,エンドユーザが容易に並列分散計算を記述できる環境を提供するとともに,仮想コードからの柔軟なネイティブ・コードの利用を可能にすることにより高性能なプログラム実行環境を実現することを目的としている。
【0019】
【課題を解決するための手段】
図1は,本発明の並列分散処理システムの原理説明図である。
図1において,プロセッサ10,10’は,それぞれ仮想コード実行手段11,11’,ライブラリ・テーブル13,13’,動的リンク手段14,14’,ネイティブ・コード・ライブラリ15,15’,スケジューラ16,16’を備える。プロセッサ10,10’上で動作するプログラム12,12’は,各プロセッサ10,10’に共通の書式(構文)で記述された仮想コードと,各プロセッサ10,10’に特有の命令コード群で記述されたネイティブ・コードとからなる。
【0020】
本発明では,ネットワーク20上で複数のプロセッサ10,10’が協調して一つの計算を進めるようなユーザのプログラムを,各プロセッサ10,10’に共通の書式で記述された仮想コードと,各プロセッサ10,10’に特有の命令コード群で記述されたネイティブ・コードからなるネイティブ・コード・ライブラリ15,15’とに分離し,仮想コードの実行に必要なネイティブ・コード・ライブラリ15,15’は,各プロセッサ10,10’において動的リンク手段14,14’により仮想コードに動的にリンクする。ネイティブ・コード・ライブラリ15,15’は,それぞれローカルなファイルシステムに保存される。
【0021】
仮想コード実行手段11,11’は,それぞれプログラム12,12’の仮想コードを解釈し実行する手段である。仮想コードの実行中に,まだプログラム12,12’中にマッピングされていないネイティブ・コードの呼び出しを検出すると,そのネイティブ・コード・ライブラリ15,15’を動的リンク手段14,14’によってマッピングし,仮想コード実行手段11,11’中のネイティブ・コード・インタフェースによってネイティブ・コードを実行する。
【0022】
ライブラリ・テーブル13,13’は,動的リンク手段14,14’がネイティブ・コード・ライブラリ15,15’のマッピングを行って動的にリンクする場合に,対象とするネイティブ・コード・ライブラリ15,15’の格納場所情報を得るためのテーブルである。
【0023】
スケジューラ16,16’は,プログラム12,12’を実行する単位であるプロセス(またはスレッド)に対してCPU実行権を与える制御を行う手段であり,他のプロセッサと通信を行いながら仮想コード実行手段11,11’を制御する。また,負荷分散等のために,プロセス(またはスレッド)を他のプロセッサとの間で送受するマイグレート(移動)の機能を持つ。
【0024】
例えば,プロセッサ10のスケジューラ16がプロセス(またはスレッド)を他のプロセッサ10’にマイグレートする場合には,スケジューラ16は,仮想コードの部分と動的リンクに必要な情報,例えばライブラリ・テーブル13を送り,ネイティブ・コードの部分は送らない。マイグレート先のプロセッサ10’では,受け取った仮想コードを仮想コード実行手段11’により先頭の実行開始点または実行中断点から実行し,仮想コードの実行においてネイティブ・コードの呼び出しを検出すると,動的リンク手段14’によりプログラム12’にネイティブ・コード・ライブラリ15’をマッピングして実行を進める。
【0025】
仮想コード実行手段11,11’による仮想コードの実行においてネイティブ・コードの呼び出しを検出したときに,ネイティブ・コード・ライブラリ15,15’を動的にリンクする代わりに,スケジューラ16,16’間でプロセス(またはスレッド)のマイグレートを行い,スケジューラ16,16’が他のプロセッサから仮想コードと動的リンクに必要な情報を受け取ったときに,最初にまとめて一度にネイティブ・コード・ライブラリ15,15’を動的にリンクするようにしてもよい。
【0026】
【発明の実施の形態】
本発明に係る並列分散処理システムでは,並列化が容易で高性能な実行環境を提供するために,例えばネットワーク化されたヘテロジーニァスなクラスタ上で,実行中の任意のプロセスを適度にマイグレート(移動)させながら全体の処理を進めることを可能にすることと,ネットワーク上のプロセス間を高速なストリーム通信で結び付けることを実現する。
【0027】
すなわち,あるプロセスが通信の応答を待っている時間にCPUを他のプロセスの処理に割り当てることで,CPUの利用効率を上げると共に,他のプロセスの実行による通信をも時間的にオーバラップさせて全体として平均した場合の通信のレイテンシを低下させることを可能とするシステムの提供を実現する。
【0028】
本発明の実施の一形態として,ネットワーク上のタイプの違う複数のワークステーションで並列計算用のインタプリタを起動し,その間に仮想コードと動的(ダイナミック)リンクに必要な情報を送り,ネイティブ・コードのライブラリを使って並列計算させる場合を説明する。
【0029】
マスタプロセッサ,スレーブプロセッサに対応するものを,特定のシステムでのプロセスとして実現し,その内部で複数の仮想コード・インタプリタをスケジューリングしながら実行するようにし,このプロセスにより,ワークステーション間で入出力データ,仮想コード,ライブラリ・テーブル,インタプリタの制御情報,その他を通信する。
【0030】
(1)要求駆動方式
図2は,本発明の実施の一形態である要求駆動方式による実現例を示す図である。図2において,プロセッサ30は,ダイナミック・リンカ32およびネイティブ・コード・インタフェース33を持つインタプリタ31,仮想コードで記述されたプログラム34,動的リンクの情報を格納し,ルックアップするためのライブラリ・テーブル35,ローカル・ファイルシステムに格納されたネイティブ・コード・ライブラリ36,他のプロセッサと通信を行いながらインタプリタ31を制御するスケジューラ37を備える。インタプリタ31は,図1に示す仮想コード実行手段11および動的リンク手段14に対応する。プロセッサ30’の構成も同様である。
【0031】
ここで,プロセッサ30からプロセッサ30’へプロセスを移動させる事象が発生したとする。この事象は,ユーザの明示的な移動指示によるものでも,負荷分散制御によりスケジューラ37が自律的に生じさせるものでもよい。プロセッサ30のスケジューラ37は,プログラム34中の仮想コードとライブラリ・テーブル35をプロセッサ30’へ転送する。プロセッサ30’のスケジューラ37’は,プロセッサ30から上記の情報を受け取り,プログラム34’,ライブラリ・テーブル35’としてメモリ上に設定する。
【0032】
ここで,ネイティブ・コードの呼出命令は,呼び出す関数名を「func」とすると,「lib_call ”func”」である。関数名funcの関数を含むライブラリを格納するファイル名を,ここでは「/opt/X11/lib/libX11.so」とする。
【0033】
インタプリタ31’は,プログラム34’の仮想コードを実行し,ネイティブ・コードの呼出命令「lib_call ”func”」を検出し,呼び出す関数名funcを取り出す。これが,後で説明するハッシュ・テーブルに登録されていれば,それを使って直接ネイティブ・コード・インタフェース33’で関数名funcの関数を実行する。ハッシュ・テーブルに登録されていない場合には,ダイナミック・リンカ32’を起動し,ライブラリ・テーブル35’に登録してあるライブラリ名から,「/opt/X11/lib/libX11.so」のローカル・ファイル中の対応するネイティブ・コード・ライブラリ36’の中身をアクセスし,関数名のハッシュ・テーブルを構築し,これをライブラリ・テーブル35’のライブラリ名と結合する。
【0034】
関数名funcの関数が見つかるまでライブラリのハッシュ・テーブルの構築を続け,funcが見つかったときには,funcを含むライブラリをプログラム34’中のネイティブ・コードの記憶領域にマッピングし,そのライブラリが利用しているその他の標準ライブラリとリンク・エディットし,ハッシュ・テーブルに各関数のエントリ・ポイントを登録し,そのライブラリの各関数を実行可能な状態にする。
【0035】
最後にネイティブ・コード・インタフェース33’を使って,funcに対応するライブラリ関数のエントリ・ポイントを検索し,その関数を実行する。
図3は,図2の構成例による要求駆動方式の処理フローチャートである。
【0036】
図2に示すプロセッサ30がマスタCPU,プロセッサ30’がスレーブCPUであったとする。プロセッサ30’が,最初何も処理するプロセス(スレッド)がない状況であったところに,図3のステップS11において,マスタのプロセッサ30からプロセス(スレッド)のマイグレートがあると,処理を開始する。
【0037】
まず,ステップS12では,仮想コードとライブラリ・テーブルをマスタのプロセッサ30から受信する。ステップS13では,インタプリタ31’により,受け取った仮想コードを実行する。実行の結果,ステップS14によりネイティブ・コード・ライブラリ呼び出し命令を検出した場合には,ステップS15の処理へ進み,実行終了を指示するexit命令を検出した場合には処理を中止する。その他の命令である場合には,ネイティブ・コード・ライブラリ呼び出し命令またはexit命令のいずれかを検出するまで,ステップS13〜S14を繰り返す。
【0038】
ステップS15では,インタプリタ31’は,該当するネイティブ・コード・ライブラリ36’がマッピングされているかどうかを,関数名のハッシュ・テーブルをもとに判定する。ネイティブ・コード・ライブラリ36’がマッピングされていなければ,ステップS16の処理を行い,ネイティブ・コード・ライブラリ36’がマッピングされていれば,ステップS17の処理へ進む。
【0039】
ステップS16では,ライブラリ・テーブル35’からマッピングするネイティブ・コード・ライブラリ36’のファイル名を得て,ダイナミック・リンカ32’により,そのネイティブ・コード・ライブラリ36’をマッピングし,リンク・エディットを行う。
【0040】
その後,ステップS17では,インタプリタ31’のネイティブ・コード・インタフェース33’に制御を渡してネイティブ・コードを実行する。ネイティブ・コードの実行が終了したならば,ステップS13へ戻り,同様に仮想コードの実行を続ける。
【0041】
(2)前処理方式
図4は,本発明の実施の一形態である前処理方式による実現例を示す図である。図4に示す実現例は,図2に示す実現例とほぼ同じ構成であるが,ダイナミック・リンカ54,54’がインタプリタ51,51’内ではなく,スケジューラ53,53’の内部にある点が相違する。
【0042】
マスタのプロセッサ50から仮想コードとライブラリ・テーブルを転送し,スレーブのプロセッサ50’が受信するところまでは前述の要求駆動方式と同様である。しかし,この方式では,スレーブのプロセッサ50’がマスタのプロセッサ50から仮想コードとライブラリ・テーブルとを受信した後,インタプリタ51’を起動する前に,受信したライブラリ・テーブル56’の全てのライブラリについて関数名のハッシュ・テーブルをあらかじめ作り,ライブラリをプログラム55’のネイティブ・コードの記憶領域にマッピングし,標準ライブラリなどとともにリンク・エディットし,ハッシュ・テーブルにライブラリ関数のエントリ・ポイントを登録する処理を最初にまとめて行う。
【0043】
インタプリタ51’は,プログラム55’の仮想コードを実行し,ネイティブ・コードの呼び出し命令「lib_call ”func”」を検出すると,直接ネイティブ・コード・インタフェース52’を起動して,ネイティブ・コードで作成された関数funcを実行する。
【0044】
図5は,図4に示す構成例による前処理方式の処理フローチャートである。
図4に示すスレーブのプロセッサ50’が,最初何も処理するプロセス(スレッド)がない状況であったところに,図5のステップS21において,マスタのプロセッサ50からプロセス(スレッド)のマイグレートがあると,処理を開始する。ステップS22では,プロセッサ50’は,仮想コードとライブラリ・テーブルをマスタのプロセッサ50から受信する。
【0045】
次に,ステップS23では,スケジューラ53’内のダイナミック・リンカ54’により,受信したライブラリ・テーブル56’に登録された全てのネイティブ・コード・ライブラリ57’をマッピングし,リンク・エディットを行う。
【0046】
ステップS24では,インタプリタ51’により仮想コードを実行する。実行の結果,ステップS25により,ネイティブ・コード・ライブラリ呼び出し命令を検出した場合には,ステップS26の処理へ進み,実行終了を指示するexit命令を検出した場合には処理を中止する。その他の命令である場合には,ネイティブ・コード・ライブラリ呼び出し命令またはexit命令のいずれかを検出するまで,ステップS24〜S25を繰り返す。
【0047】
ステップS26では,インタプリタ51’のネイティブ・コード・インタフェース52’に処理を渡してネイティブ・コードを実行する。ネイティブ・コードの実行が終了したならば,ステップS24へ戻り,同様に仮想コードの実行を続ける。
【0048】
入力データなどに依存して実行時に様々なライブラリが使用され,ライブラリの登録数が多い割には実行時に使用されるライブラリの数が少ない場合には,図2に示す要求駆動方式のほうが有利である。
【0049】
一方,実行時に登録されたほとんどのライブラリがプロセッサに使用される場合には,図4に示す前処理方式のほうが,個々のネイティブ・コード呼び出し命令でライブラリが既にマッピングされているかどうかをチェックする必要がないので有利である。
【0050】
【発明の効果】
本発明によれば,中間コードとしての仮想コードと,各プロセッサに特有のネイティブ・コードとを分離し,仮想コードの実行時または仮想コードの受信時に,ネイティブ・コードを動的にリンクする仕組みを設けることにより,ヘテロジーニァスな複数のプロセッサ間においても,並列処理の処理速度の高速性を保持し,かつ,エンドユーザの使用にも適した平易な並列分散処理システムの提供が可能となる。
【0051】
例えば,ネットワーク上のワークステーション群あるいは専用のマルチCPUの並列計算機上で並列処理プログラムを開発する場合,システムの標準ライブラリ,他で既に開発を終えたユーザ作成のライブラリ,デバッグが終了したユーザ作成のライブラリ等を更新する必要がない。
【0052】
また,各プロセッサに特有のネイティブ・コードをマスタのプロセッサから毎回実行の度に,あるいは実行に先立って転送する必要がないので,デバッグその他の開発作業が軽減され,開発が迅速になる。また,開発が終了し,実際にプログラムを起動して使用するときにも,プログラムの起動時間が短縮されるという効果を奏する。
【0053】
さらに,プログラムを変更する場合,仮想コードの部分のみの変更によりプログラム全体としての変更を柔軟に吸収し,ネイティブ・コード・ライブラリを利用することで性能を引き出すことが可能となるため,チューニングや保守が容易になるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の原理説明図である。
【図2】本発明の実施の一形態である要求駆動方式による実現例を示す図である。
【図3】要求駆動方式による処理フローチャートである。
【図4】本発明の実施の一形態である前処理方式による実現例を示す図である。
【図5】前処理方式による処理フローチャートである。
【符号の説明】
10,10’ プロセッサ
11,11’ 仮想コード実行手段
12,12’ プログラム
13,13’ ライブラリ・テーブル
14,14’ 動的リンク手段
15,15’ ネイティブ・コード・ライブラリ
16,16’ スケジューラ
20 ネットワーク
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a parallel and distributed processing system in which a plurality of processors advance processing in cooperation.
[0002]
The current parallel and distributed processing environment has become the monopoly of some experts due to its own complexity and programming difficulties for parallel processing, but a single CPU processing bottleneck. At present, there is an urgent need to provide an environment that enables easy and high-performance parallel processing for general computer users.
[0003]
[Problems to be solved by the invention]
A parallel processing distributed system in which a plurality of processors cooperate in processing, particularly a system environment in which one task is processed in parallel and distributed while coordinating multiple heterogeneous processors as one cluster in a LAN or WAN environment. Yes. The problem in providing such a parallel processing environment to general users is simplicity and ease of learning, but this creates a trade-off relationship with performance.
[0004]
In the state of the art, it is necessary to sacrifice a considerable degree of simplicity for performance, or to accept a significant decrease in performance for simplicity.
In terms of performance, the delay and throughput of data transfer between processors becomes a problem, but this can essentially be reduced to the problem of delay in data transfer. This is because in a calculation with a high degree of parallelism, the unit of data to be transferred is small, and the delay depends only on the number of transfers that is not related to the transfer amount. In order to reduce the delay that depends on the number of transfers as a whole, it is necessary to accumulate some data to be transferred in a buffer and transfer it all at once. The fact is that the factors are intricately intertwined, so it's hard to see that they don't actually experiment.
[0005]
In order to execute a program in parallel, it must be divided into units for parallel execution. However, if you divide into smaller units, more CPUs can be used, but instead the overhead of synchronization due to smaller execution units, overhead due to increased context switches, data delays, and increased data transfer volume , Resulting in increased paging due to memory fragmentation, and again, there is a trade-off.
[0006]
It is desirable for end users to enjoy the benefits of faster and larger programs through parallel processing. At present, however, end users are also required to be able to obtain a certain level of performance. We face the contradiction that the user has to acquire the complicated know-how of parallel processing and tune the program.
[0007]
Conventionally, high-level languages for parallel processing, for example, Occam (A. Burns, PROGRAMMING IN occam 2, Addison-Wesley, 1988), HPF (High Performance Fortran Forum, High Performance), are used as means for solving these problems. FORTRAN LANGUAGE SPECIFICATION, 1994), as a function type, CLEAN (R.Plasmeijer and M.van Ekelen, Functional Programming and Parallel Graph Rewriting, LO type, PA). High-level languages such as ARLOG, Addison-Wesley, 1989) have been developed.
[0008]
Further, as a high-level library interface, for example, PVM (A. Geist, A. Beguelin, J. Dongarra, W. Jiang, R. Manchek and V. Sunderam, PVM: Parallel Virtual Machine-A User's User's User's Guide. Networked Parallel Computing-, MIT press, 1994), MPI (Message Passing Interface Forum, MPI: A Message-Passing Interface Standard, May 5, 1994) has been developed.
[0009]
However, high-level languages do not have sufficient performance, or expert-level know-how is necessary to achieve performance, and high-level libraries have not yet reached a level that can be used by end users.
[0010]
As another intermediate solution, a method of combining a relatively low-level procedural sequential language and an instruction language for parallel processing (I. Foster, R. Olson and S. Tuecke, Productive Parallel Programming, Scientific Programming, Vol. 1, pp. 51-66, 1992; LA Crown and TJ LeBlanc, Parallel Programming with Control Abstraction, ACM Transactions on Programming Language 3, p. 576, 1994).
[0011]
These methods are not end users in all aspects, but are experts in sequential processing, but with respect to parallel processing, those who are relatively close to end users are interested in low-level sequential language tuning and parallel processing. Tuning is separated and a simple and uniform tuning style is introduced only to the parallel processing interface.
[0012]
The system targeted by the present invention is based on the latter concept, but promotes further uniformization of the parallel processing interface part and versatility for expert users, and is flexible in the interface with the sequential processing part. In order to have the nature, we try to unify the whole with the semantics of procedural languages.
[0013]
For example, when developing a parallel processing program on a workstation group on a network or a dedicated multi-CPU parallel computer, the parallel computer is usually constructed using only one workstation or on one workstation. Start by developing a program using the simulator. In many cases, routines for programs that have been developed in the past are made into a library. If an available library already exists, program development is started from the point where it is reused.
[0014]
In this way, program development progresses, and at the stage of actually executing the program and debugging the entire program, conventionally, binary code that can be created by linking an existing library to the newly developed routine is executed. Sometimes it was repeated every time to all workstations or all CPUs. This method has a problem of reducing the efficiency of program development because the library portion that does not require debugging is transferred every time it is debugged. Further, even in the stage where the program is actually executed and operated, the library portion is similarly transferred each time, which causes a long time for starting the program.
[0015]
In particular, when processing is performed using a group of workstations on the network, there is a demand for using different types of workstations. In this case, one approach is to create a partial program for sequential processing in units of functions using, for example, the above-described parallel processing message passing interfaces such as PVM and MPI, and connect them in parallel to perform parallel processing. is there. In this way, the native code of each program can be different for each type of workstation. However, for each type of workstation, there is a disadvantage that the program must be compiled to create native code, which makes the work complicated.
[0016]
Another approach is to set up virtual code and place the interpreter on each workstation for parallel processing. Since this method uses only one type of code, there is an advantage that compilation and other operations are simple, but there is a drawback that overhead for interpreting at the time of execution of virtual code is large.
[0017]
As a method for overcoming this drawback, there is a method in which an interface for calling native code from virtual code is provided, and the overhead of the interpretation is reduced by executing a portion of the native code. However, in this method, a standard native code library is linked in advance to the interpreter, and general native code created by the user cannot be linked and used.
[0018]
The present invention solves the above-described problems, provides an environment in which end users can easily describe parallel and distributed computations, and enables flexible native code usage from virtual code, thereby enabling high-performance program execution. The purpose is to realize the environment.
[0019]
[Means for Solving the Problems]
FIG. 1 is an explanatory diagram of the principle of the parallel distributed processing system of the present invention.
In FIG. 1, processors 10 and 10 ′ are virtual code execution means 11 and 11 ′, library tables 13 and 13 ′, dynamic link means 14 and 14 ′, native code libraries 15 and 15 ′, and a scheduler 16, respectively. , 16 ′. The programs 12 and 12 ′ operating on the processors 10 and 10 ′ are virtual codes described in a format (syntax) common to the processors 10 and 10 ′ and instruction code groups specific to the processors 10 and 10 ′. It consists of written native code.
[0020]
In the present invention, a user program in which a plurality of processors 10 and 10 ′ advance one calculation in cooperation with each other on the network 20, virtual codes described in a format common to the processors 10 and 10 ′, It is separated into native code libraries 15 and 15 'composed of native codes described in instruction codes specific to the processors 10 and 10', and the native code libraries 15 and 15 'required for executing virtual code Are dynamically linked to the virtual code by the dynamic link means 14, 14 'in each processor 10, 10'. The native code libraries 15 and 15 'are stored in local file systems, respectively.
[0021]
The virtual code execution means 11 and 11 ′ are means for interpreting and executing the virtual codes of the programs 12 and 12 ′, respectively. When a call to native code that is not yet mapped in the program 12, 12 'is detected during execution of the virtual code, the native code library 15, 15' is mapped by the dynamic link means 14, 14 '. , The native code is executed by the native code interface in the virtual code execution means 11, 11 ′.
[0022]
The library tables 13 and 13 ′ include the target native code library 15 and the dynamic code when the dynamic link means 14 and 14 ′ dynamically link the native code libraries 15 and 15 ′. 15 is a table for obtaining storage location information of 15 ′.
[0023]
The schedulers 16 and 16 'are means for performing control to give a CPU execution right to a process (or thread) that is a unit for executing the programs 12 and 12', and perform virtual code execution means while communicating with other processors. 11, 11 'is controlled. In addition, it has a function of migration (movement) for sending and receiving processes (or threads) to and from other processors for load balancing and the like.
[0024]
For example, when the scheduler 16 of the processor 10 migrates a process (or thread) to another processor 10 ′, the scheduler 16 stores information necessary for dynamic linking with the virtual code portion, for example, the library table 13. Send, do not send the native code part. In the migration destination processor 10 ′, the received virtual code is executed from the top execution start point or execution stop point by the virtual code execution means 11 ′, and when the native code call is detected in the execution of the virtual code, The native code library 15 ′ is mapped to the program 12 ′ by the link means 14 ′ and the execution proceeds.
[0025]
Instead of dynamically linking the native code libraries 15 and 15 'when the native code call is detected in the virtual code execution by the virtual code execution means 11 and 11', the scheduler 16 and 16 ' When the process (or thread) is migrated and the scheduler 16, 16 'receives information necessary for dynamic linking with the virtual code from other processors, the native code library 15, You may make it link 15 'dynamically.
[0026]
DETAILED DESCRIPTION OF THE INVENTION
In the parallel distributed processing system according to the present invention, in order to provide a high-performance execution environment that is easy to parallelize, for example, on a networked heterogeneous cluster, any process being executed is appropriately migrated (moved). ), And it is possible to link the processes on the network with high-speed stream communication.
[0027]
In other words, by assigning the CPU to the processing of another process while a certain process is waiting for a communication response, the CPU utilization efficiency is improved, and communication by execution of other processes is also overlapped in time. It is possible to provide a system that can reduce communication latency when averaged as a whole.
[0028]
As an embodiment of the present invention, an interpreter for parallel computation is started on a plurality of workstations of different types on the network, and information necessary for a virtual code and a dynamic link is sent between them. The case of parallel calculation using the library of will be described.
[0029]
A process corresponding to a master processor and a slave processor is realized as a process in a specific system, and a plurality of virtual code interpreters are executed while being scheduled in this process. This process allows input / output data between workstations. , Virtual code, library table, interpreter control information, etc.
[0030]
(1) Request Drive Method FIG. 2 is a diagram illustrating an implementation example using a request drive method according to an embodiment of the present invention. In FIG. 2, a processor 30 includes an interpreter 31 having a dynamic linker 32 and a native code interface 33, a program 34 written in virtual code, and a library table for storing and looking up dynamic link information. 35, a native code library 36 stored in the local file system, and a scheduler 37 for controlling the interpreter 31 while communicating with other processors. The interpreter 31 corresponds to the virtual code execution means 11 and the dynamic link means 14 shown in FIG. The configuration of the processor 30 ′ is the same.
[0031]
Here, it is assumed that an event for moving the process from the processor 30 to the processor 30 ′ occurs. This event may be caused by an explicit movement instruction from the user, or may be autonomously generated by the scheduler 37 by load balancing control. The scheduler 37 of the processor 30 transfers the virtual code and the library table 35 in the program 34 to the processor 30 ′. The scheduler 37 ′ of the processor 30 ′ receives the above information from the processor 30 and sets it as a program 34 ′ and a library table 35 ′ on the memory.
[0032]
Here, the call instruction of the native code is “lib_call“ func ”” when the function name to be called is “func”. The file name for storing the library including the function with the function name func is assumed to be “/opt/X11/lib/libX11.so” here.
[0033]
The interpreter 31 ′ executes the virtual code of the program 34 ′, detects the call instruction “lib_call“ func ”” of the native code, and extracts the function name func to be called. If this is registered in a hash table described later, the function having the function name func is directly executed by using the native code interface 33 ′. If it is not registered in the hash table, the dynamic linker 32 ′ is started, and the local name “/opt/X11/lib/libX11.so” is determined from the library name registered in the library table 35 ′. The contents of the corresponding native code library 36 'in the file are accessed, a function name hash table is constructed, and this is combined with the library name of the library table 35'.
[0034]
The construction of the hash table of the library is continued until the function with the function name func is found. When the func is found, the library including the func is mapped to the storage area of the native code in the program 34 'and used by the library. Link-edit with other standard libraries, register the entry points of each function in the hash table, and make each function in the library executable.
[0035]
Finally, using the native code interface 33 ', the entry point of the library function corresponding to func is searched and the function is executed.
FIG. 3 is a process flowchart of the request driving method according to the configuration example of FIG.
[0036]
Assume that the processor 30 shown in FIG. 2 is a master CPU and the processor 30 ′ is a slave CPU. The processor 30 'starts processing when there is no process (thread) to process anything at the beginning, and there is a process (thread) migration from the master processor 30 in step S11 of FIG. .
[0037]
First, in step S12, the virtual code and the library table are received from the master processor 30. In step S13, the received virtual code is executed by the interpreter 31 ′. As a result of execution, if a native code library call instruction is detected in step S14, the process proceeds to step S15, and if an exit instruction instructing the end of execution is detected, the process is stopped. If it is another instruction, steps S13 to S14 are repeated until either the native code library call instruction or the exit instruction is detected.
[0038]
In step S15, the interpreter 31 ′ determines whether or not the corresponding native code library 36 ′ is mapped based on the hash table of function names. If the native code library 36 'is not mapped, the process of step S16 is performed. If the native code library 36' is mapped, the process proceeds to step S17.
[0039]
In step S16, the file name of the native code library 36 'to be mapped is obtained from the library table 35', the native code library 36 'is mapped by the dynamic linker 32', and link editing is performed. .
[0040]
Thereafter, in step S17, control is passed to the native code interface 33 ′ of the interpreter 31 ′ to execute the native code. When the execution of the native code is completed, the process returns to step S13, and the execution of the virtual code is continued in the same manner.
[0041]
(2) Pre-processing method FIG. 4 is a diagram showing an implementation example of the pre-processing method according to an embodiment of the present invention. The implementation example shown in FIG. 4 has substantially the same configuration as the implementation example shown in FIG. 2, except that the dynamic linkers 54 and 54 ′ are not in the interpreters 51 and 51 ′ but in the schedulers 53 and 53 ′. Is different.
[0042]
The procedure up to the point where the virtual code and the library table are transferred from the master processor 50 and received by the slave processor 50 ′ is the same as the above-described request driving method. However, in this system, after the slave processor 50 ′ receives the virtual code and the library table from the master processor 50, before starting the interpreter 51 ′, all the libraries in the received library table 56 ′ are processed. A function name hash table is created in advance, the library is mapped to the native code storage area of program 55 ', link-edited with the standard library, etc., and the library function entry point is registered in the hash table. Do it all together first.
[0043]
When the interpreter 51 ′ executes the virtual code of the program 55 ′ and detects the call instruction “lib_call“ func ”” of the native code, the interpreter 51 ′ starts the native code interface 52 ′ directly and is generated in the native code. The function func is executed.
[0044]
FIG. 5 is a process flowchart of the preprocessing method according to the configuration example shown in FIG.
In the situation where the slave processor 50 'shown in FIG. 4 does not have any process (thread) to process anything at first, there is a process (thread) migration from the master processor 50 in step S21 of FIG. And start processing. In step S22, the processor 50 ′ receives the virtual code and the library table from the master processor 50.
[0045]
Next, in step S23, all the native code libraries 57 'registered in the received library table 56' are mapped by the dynamic linker 54 'in the scheduler 53', and link editing is performed.
[0046]
In step S24, the virtual code is executed by the interpreter 51 '. As a result of execution, if a native code library call instruction is detected in step S25, the process proceeds to step S26, and if an exit instruction instructing the end of execution is detected, the process is stopped. If it is another instruction, steps S24 to S25 are repeated until either the native code library call instruction or the exit instruction is detected.
[0047]
In step S26, the native code is executed by passing processing to the native code interface 52 'of the interpreter 51'. When the execution of the native code is completed, the process returns to step S24 and the execution of the virtual code is continued in the same manner.
[0048]
Depending on the input data, etc., various libraries are used during execution. If the number of libraries used during execution is small for a large number of registered libraries, the request drive method shown in FIG. 2 is more advantageous. is there.
[0049]
On the other hand, if most libraries registered at runtime are used for the processor, the preprocessing method shown in Fig. 4 should check whether the library is already mapped by each native code call instruction. There is no advantage.
[0050]
【The invention's effect】
According to the present invention, there is provided a mechanism for separating virtual code as intermediate code and native code specific to each processor and dynamically linking native code when executing virtual code or receiving virtual code. As a result, it is possible to provide a simple parallel distributed processing system that maintains the high processing speed of parallel processing among a plurality of heterogeneous processors and that is also suitable for use by end users.
[0051]
For example, when developing a parallel processing program on a workstation group on a network or a dedicated multi-CPU parallel computer, a system standard library, a user-created library that has already been developed elsewhere, a user-created library that has been debugged, etc. There is no need to update the library.
[0052]
In addition, since native code specific to each processor does not need to be transferred from the master processor every time or prior to execution, debugging and other development work are reduced, and development is accelerated. Also, when the development is finished and the program is actually activated and used, the program activation time is shortened.
[0053]
Furthermore, when changing a program, it is possible to flexibly absorb the changes of the entire program by changing only the virtual code part, and to draw out performance by using the native code library. The effect is that it becomes easy.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating the principle of the present invention.
FIG. 2 is a diagram illustrating an implementation example using a request driving method according to an embodiment of the present invention.
FIG. 3 is a process flowchart according to a request driving method;
FIG. 4 is a diagram illustrating an implementation example using a preprocessing method according to an embodiment of the present invention.
FIG. 5 is a process flowchart according to a pre-processing method.
[Explanation of symbols]
10, 10 'processor 11, 11' virtual code executing means 12, 12 'program 13, 13' library table 14, 14 'dynamic linking means 15, 15' native code library 16, 16 'scheduler 20 network

Claims (2)

複数のプロセッサが協調して処理を進める並列分散処理システムにおいて,
前記プロセッサは,
各プロセッサに特有の命令コード群で記述されたネイティブ・コードのライブラリを格納するライブラリ格納手段と,
各プロセッサに共通の書式で記述されたプログラムである仮想コードを解釈し実行する仮想コード実行手段と,
仮想コードの実行においてネイティブ・コードの呼び出しを検出したときに,前記ライブラリ格納手段に格納されたネイティブ・コードのライブラリを動的にリンクする動的リンク手段と,
他のプロセッサに仮想コードを実行させる場合に,実行させる仮想コードおよびその仮想コードと動的リンクに必要な対象とするネイティブ・コード・ライブラリの格納場所情報とを他のプロセッサに送信する手段とを備える
ことを特徴とする並列分散処理システム。
In a parallel and distributed processing system in which multiple processors work together,
The processor is
Library storage means for storing a library of native codes described in instruction codes specific to each processor;
Virtual code execution means for interpreting and executing virtual code that is a program described in a format common to each processor;
A dynamic linking means for dynamically linking a library of native codes stored in the library storage means when a call to native code is detected in the execution of virtual code;
Means for transmitting virtual code to be executed to another processor and information about the storage location of the virtual code to be executed and the target native code library required for dynamic linking to the other processor; A parallel distributed processing system characterized by comprising:
複数のプロセッサが協調して処理を進める並列分散処理システムにおいて,
前記プロセッサは,
各プロセッサに特有の命令コード群で記述されたネイティブ・コードのライブラリを格納するライブラリ格納手段と,
各プロセッサに共通の書式で記述されたプログラムである仮想コードを解釈し実行する仮想コード実行手段と,
他のプロセッサに仮想コードを実行させる場合に,実行させる仮想コードおよびその仮想コードと動的リンクに必要な対象とするネイティブ・コード・ライブラリの格納場所情報とを他のプロセッサに送信する手段と,
他のプロセッサから仮想コードを受信し,その仮想コードを実行する場合に,前記ライブラリ格納手段に格納されたネイティブ・コードのライブラリを一括して動的にリンクする動的リンク手段とを備えた
ことを特徴とする並列分散処理システム。
In a parallel and distributed processing system in which multiple processors work together,
The processor is
Library storage means for storing a library of native codes described in instruction codes specific to each processor;
Virtual code execution means for interpreting and executing virtual code that is a program described in a format common to each processor;
Means for transmitting virtual code to be executed to another processor and the storage location information of the virtual code to be executed and the native code library to be necessary for dynamic linking to the other processor;
Dynamic link means for dynamically linking libraries of native codes stored in the library storage means when receiving virtual code from another processor and executing the virtual code Parallel distributed processing system characterized by
JP31017395A 1995-11-29 1995-11-29 Parallel distributed processing system Expired - Fee Related JP3628782B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31017395A JP3628782B2 (en) 1995-11-29 1995-11-29 Parallel distributed processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31017395A JP3628782B2 (en) 1995-11-29 1995-11-29 Parallel distributed processing system

Publications (2)

Publication Number Publication Date
JPH09146900A JPH09146900A (en) 1997-06-06
JP3628782B2 true JP3628782B2 (en) 2005-03-16

Family

ID=18002058

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31017395A Expired - Fee Related JP3628782B2 (en) 1995-11-29 1995-11-29 Parallel distributed processing system

Country Status (1)

Country Link
JP (1) JP3628782B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3250729B2 (en) 1999-01-22 2002-01-28 日本電気株式会社 Program execution device, process movement method thereof, and storage medium storing process movement control program
US8627291B2 (en) * 2012-04-02 2014-01-07 International Business Machines Corporation Identification of localizable function calls

Also Published As

Publication number Publication date
JPH09146900A (en) 1997-06-06

Similar Documents

Publication Publication Date Title
CA2061117C (en) Apparatus and method for distributed program stack
JP2893071B2 (en) Thread private memory for multi-threaded digital data processor
US5303357A (en) Loop optimization system
JPH06266683A (en) Parallel processor
WO2007083613A1 (en) Program processing device, parallel processing program, program processing method, parallel processing compiler, recording medium containing the parallel processing compiler, and multi-processor system
JPH02188833A (en) Interface for computer system
US20120036514A1 (en) Method and apparatus for a compiler and related components for stream-based computations for a general-purpose, multiple-core system
WO2023124543A1 (en) Data processing method and data processing apparatus for big data
Nikhil A multithreaded implementation of Id using P-RISC graphs
Baalbergen Design and implementation of parallel make
US20040143825A1 (en) Dynamic compiler apparatus and method that stores and uses persistent execution statistics
JP2582992B2 (en) Data processing system including general-purpose control interface
US6684395B2 (en) Multiple image dynamic bind and load procedure for a multi-processor
JP3628782B2 (en) Parallel distributed processing system
US6134708A (en) Program compilation execution system
JP3639366B2 (en) Address space sharing system
CN110119275A (en) A kind of distributed memory columnar database Complied executing device framework
Nair An Analytical study of Performance towards Task-level Parallelism on Many-core systems using Java API
Lopes On the Design and Implementation of a Virtual Machine for Process Calculi
KR100294876B1 (en) Operation system capable of dynamic reconfiguration and method for the same
Naishlos et al. Evaluating the XMT parallel programming model
EP0509946A2 (en) Apparatus and method for implementing a distributed program stack
Guzev et al. Asynchronous parallel programming language based on the Microsoft. NET platform
WO2022166480A1 (en) Task scheduling method, apparatus and system
Armstrong et al. Dynamic task migration from SPMD to SIMD virtual machines

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040330

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040531

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20041207

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041209

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071217

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091217

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees