JP2004280293A - Gang scheduling system at gang group unit - Google Patents

Gang scheduling system at gang group unit Download PDF

Info

Publication number
JP2004280293A
JP2004280293A JP2003068757A JP2003068757A JP2004280293A JP 2004280293 A JP2004280293 A JP 2004280293A JP 2003068757 A JP2003068757 A JP 2003068757A JP 2003068757 A JP2003068757 A JP 2003068757A JP 2004280293 A JP2004280293 A JP 2004280293A
Authority
JP
Japan
Prior art keywords
gang
scheduling
group
gang group
scheduling information
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.)
Granted
Application number
JP2003068757A
Other languages
Japanese (ja)
Other versions
JP3885748B2 (en
Inventor
Emiko Miyazaki
恵美子 宮崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2003068757A priority Critical patent/JP3885748B2/en
Publication of JP2004280293A publication Critical patent/JP2004280293A/en
Application granted granted Critical
Publication of JP3885748B2 publication Critical patent/JP3885748B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To realize gang scheduling at a gang group unit and achieve flexible and efficient gang scheduling. <P>SOLUTION: An achieving part 10 of a gang group managing function (a gang group creating means 11 and the number-of-execution-CPUs setting means 12) creates at least one gang group in one parallel-program and manages (such as, setting the number of simultaneous execution CPUs to each gang group) gang groups to perform the gang scheduling not at parallel-program unit but at gang group unit. A scheduling function achieving part 20 (a scheduling information acquiring means 21, a scheduling executing means 22 and a dispatching means 23) performs the gang scheduling at gang group unit created by the achieving part 10. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、分散並列プログラム(以下、並列プログラムと称す)に関するギャングスケジューリング機能を有するコンピュータシステムにおいて、ギャングスケジューリングを並列プログラム全体を単位とするのではなくグループ(後述のようなギャンググループ)を単位として行うことを特徴とするグループ単位ギャングスケジューリング方式に関する。
【0002】
【従来の技術】
ギャングスケジューリング機能は、並列プログラムのスケジューリングを行う際に、必要とする数のCPU(Central Processing Unit)を同時に割り当てる機能である。
【0003】
従来、この種のギャングスケジューリング機能を実現するためのギャングスケジューリング方式では、1つの並列プログラム全体をスケジューリングの単位として、スケジューリングが行われていた(例えば、特許文献1参照)。
【0004】
そのため、例えば、気象に関する演算を行う並列プログラムにおいては、1つの並列プログラムが南半球に関する演算カテゴリと北半球に関する演算カテゴリとに別れているような場合でも、各演算カテゴリ毎に分けてギャングスケジューリング対象にするということはできなかった。
【0005】
なお、ギャングスケジューリング機能に関するものに限らず、プログラムを構成する各プロセス(並列的な動作を行うプロセス)にプロセッサ(CPU)を割り付ける技術は、従来から、周知の技術として存在している(例えば、特許文献2参照)。本発明は、このような「プロセスにプロセッサを割り付ける(割り当てる)技術」が存在することを前提としている。
【0006】
【特許文献1】
特開2000−250876号公報(第2頁、図1)
【特許文献2】
特開平10−143380号公報(第2−3頁、図1、図8)
【0007】
【発明が解決しようとする課題】
上述した従来のギャングスケジューリング方式では、上記のように、1つの並列プログラム全体をスケジューリングの単位としてギャングスケジューリングが行われているので、1つの並列プログラム中に異なるカテゴリの複数の演算(例えば、先述の気象に関する演算を行う並列プログラムにおける南半球に関する演算カテゴリおよび北半球に関する演算カテゴリ)が存在する場合でも、並列プログラム全体を単位としてスケジューリングを行うしかなく、より柔軟かつ効率的なギャングスケジューリングを実現することができないという問題点があった。
【0008】
本発明の目的は、上述の点に鑑み、これらの問題を解決し、並列プログラム単位ではなく並列プログラム中のギャンググループ単位にスケジューリングを行うことを可能にするギャングスケジューリング方式(グループ単位ギャングスケジューリング方式)を提供することにある。
【0009】
【課題を解決するための手段】
本発明のグループ単位ギャングスケジューリング方式は、ギャングスケジューリング機能を有するコンピュータシステムにおいて、並列プログラム中のプロセスの生成時に当該プロセスに対して設定されたギャンググループ番号(通常、0,1,…という数字による番号の形式が考えられるが、より一般的には、ギャンググループを識別するための情報であればどのような形式の識別情報であってもよい)を持つギャンググループが当該並列プログラムにすでに存在するか否かを判定し、存在しない場合には当該ギャンググループ番号の新たなギャンググループを当該並列プログラム中に作成するギャンググループ作成手段と、前記ギャンググループ作成手段によるギャンググループの作成時に、当該コンピュータシステムにおける使用可能CPU数以下の範囲で、当該ギャンググループに対する同時実行CPU数を設定する実行CPU数設定手段と、スケジュールインターバル毎に動き、ギャンググループ単位にギャングスケジューリングに必要な情報を採取し、その採取に基づいて各ギャンググループに対するスケジューリング情報をスケジューリング情報テーブルに書き出すスケジューリング情報採取手段と、当該コンピュータシステムにおける使用可能CPU数および前記スケジューリング情報採取手段により前記スケジューリング情報テーブルに書き出されたスケジューリング情報を考慮して、ギャンググループ単位でのギャングスケジューリングを行い、スケジューリング対象のギャンググループを選択するスケジューリング実行手段と、前記スケジューリング実行手段によるギャングスケジューリングによって選択されたギャンググループに属するプロセス群にCPUを割り当てるディスパッチング手段とを有する。
【0010】
ここで、上記のグループ単位ギャングスケジューリング方式は、下記のaまたはbに示すような具体化が可能である。
【0011】
a.スケジューリング情報テーブル内の各ギャンググループに対するスケジューリング情報に同時実行CPU数が含まれるようにし、各プロセスに設定されるグループ単位ギャングスケジューリング関連プロセス設定情報にギャングスケジューリング対象識別フラグ,実行フラグ,およびギャンググループ番号が含まれるようにする。
【0012】
b.スケジューリング情報テーブル内の各ギャンググループに対するスケジューリング情報に同時実行CPU数およびプライオリティ(ギャングスケジューリングにおけるCPU割り当ての優先度を示す情報)が含まれるようにし、各プロセスに設定されるグループ単位ギャングスケジューリング関連プロセス設定情報にギャングスケジューリング対象識別フラグ,実行フラグ,ギャンググループ番号,およびプライオリティが含まれるようにする。その上で、スケジューリング情報採取手段が、ギャングスケジューリングに必要な情報の1つとして各プロセスに対して設定されているプライオリティを採取し、その採取に基づき前記スケジューリング情報テーブルに各ギャンググループに対するプライオリティ(例えば、当該各ギャンググループに属する全プロセスの各々に対して設定されているプライオリティの平均を示す情報)を設定する。また、スケジューリング実行手段が、前記スケジューリング情報テーブル中の各ギャンググループに対するプライオリティをも考慮してギャングスケジューリングを行う。
【0013】
なお、本発明のグループ単位ギャングスケジューリング方式は、より一般的には、ギャングスケジューリング機能を有するコンピュータシステムにおいて、1つの並列プログラムの中に1以上のギャンググループを作成し、並列プログラム単位ではなくギャンググループ単位にギャングスケジューリングを行うためのギャンググループに関する管理(各ギャンググループへの同時実行CPU数の設定等)を行うギャンググループ管理機能実現部と、前記ギャンググループ管理機能実現部により作成されたギャンググループを単位としてギャングスケジューリングを行うスケジューリング機能実現部とを有すると表現することができる。
【0014】
また、本発明は、ギャングスケジューリング機能を有するコンピュータシステムを、1つの並列プログラムの中に1以上のギャンググループを作成し、並列プログラム単位ではなくギャンググループ単位にギャングスケジューリングを行うためのギャンググループに関する管理を行うギャンググループ管理機能実現部,および前記ギャンググループ管理機能実現部により作成されたギャンググループを単位としてギャングスケジューリングを行うスケジューリング機能実現部として機能させるためのプログラムの態様で実現することも可能である。
【0015】
さらに、本発明は、ギャングスケジューリング機能を有するコンピュータシステムを、並列プログラム中のプロセスの生成時に当該プロセスに対して設定されたギャンググループ番号を持つギャンググループが当該並列プログラムにすでに存在するか否かを判定し、存在しない場合には当該ギャンググループ番号の新たなギャンググループを当該並列プログラム中に作成するギャンググループ作成手段,前記ギャンググループ作成手段によるギャンググループの作成時に、当該コンピュータシステムにおける使用可能CPU数以下の範囲で、当該ギャンググループに対する同時実行CPU数を設定する実行CPU数設定手段,スケジュールインターバル毎に動き、ギャンググループ単位にギャングスケジューリングに必要な情報を採取し、その採取に基づいて各ギャンググループに対するスケジューリング情報をスケジューリング情報テーブルに書き出すスケジューリング情報採取手段,当該コンピュータシステムにおける使用可能CPU数および前記スケジューリング情報採取手段により前記スケジューリング情報テーブルに書き出されたスケジューリング情報を考慮して、ギャンググループ単位でのギャングスケジューリングを行い、スケジューリング対象のギャンググループを選択するスケジューリング実行手段,ならびに前記スケジューリング実行手段によるギャングスケジューリングによって選択されたギャンググループに属するプロセス群にCPUを割り当てるディスパッチング手段として機能させるためのプログラムの態様で実現することも可能である。
【0016】
加えて、本発明は、ギャングスケジューリング機能を有するコンピュータシステムを、並列プログラム中のプロセスの生成時に当該プロセスに対して設定されたギャンググループ番号を持つギャンググループが当該並列プログラムにすでに存在するか否かを判定し、存在しない場合には当該ギャンググループ番号の新たなギャンググループを当該並列プログラム中に作成するギャンググループ作成手段,前記ギャンググループ作成手段によるギャンググループの作成時に、当該コンピュータシステムにおける使用可能CPU数以下の範囲で、当該ギャンググループに対する同時実行CPU数を設定する実行CPU数設定手段,スケジュールインターバル毎に動き、ギャンググループ単位にギャングスケジューリングに必要な情報を採取し、その採取に基づいて各ギャンググループに対するスケジューリング情報をスケジューリング情報テーブルに書き出し、その際に、ギャングスケジューリングに必要な情報の1つとして各プロセスに対して設定されているプライオリティを採取し、その採取に基づき前記スケジューリング情報テーブルに各ギャンググループに対するプライオリティを設定するスケジューリング情報採取手段,当該コンピュータシステムにおける使用可能CPU数および前記スケジューリング情報採取手段により前記スケジューリング情報テーブルに書き出されたスケジューリング情報を考慮して、ギャンググループ単位でのギャングスケジューリングを行い、スケジューリング対象のギャンググループを選択し、その際に、前記スケジューリング情報テーブル中の各ギャンググループに対するプライオリティをも考慮してギャングスケジューリングを行うスケジューリング実行手段,ならびに前記スケジューリング実行手段によるギャングスケジューリングによって選択されたギャンググループに属するプロセス群にCPUを割り当てるディスパッチング手段として機能させるためのプログラムの態様で実現することも可能である。
【0017】
【発明の実施の形態】
次に、本発明について図面を参照して詳細に説明する。
【0018】
(1) 第1の実施の形態
【0019】
図1は、本発明の第1の実施の形態に係るグループ単位ギャングスケジューリング方式の構成を示すブロック図である。
【0020】
図1を参照すると、本実施の形態に係るグループ単位ギャングスケジューリング方式は、ギャンググループ管理機能実現部10と、スケジューリング機能実現部20と、使用可能CPU数格納部30と、スケジューリング情報テーブル40と、並列プログラム群100とを含んで構成されている。
【0021】
ギャンググループ管理機能実現部10は、ギャンググループ作成手段11と、実行CPU数設定手段12とを含んで構成されている。
【0022】
スケジューリング機能実現部20は、スケジューリング情報採取手段21と、スケジューリング実行手段22と、ディスパッチング手段23とを含んで構成されている。なお、このスケジューリング機能実現部20によって実現されるスケジューリング機能は、ギャンググループ単位でギャングスケジューリングを行うこと以外は、従来技術のギャングスケジューリング方式におけるスケジューリング機能と同様のものである。
【0023】
上記の各手段は、概略、次のような動作を行う。
【0024】
ギャンググループ作成手段11は、並列プログラム群100に属する並列プログラム中のプロセスの生成時に当該プロセスに対して設定されたギャンググループ番号(ここでは、0,1,…という数字による番号の形式で与えられるが、より一般的には、ギャンググループを識別するための情報であればどのような形式の識別情報であってもよい)を受け取り、当該ギャンググループ番号を持つギャンググループが当該並列プログラムにすでに存在するか否かを判定し、存在しない場合には当該ギャンググループ番号の新たなギャンググループを当該並列プログラム中に作成する。
【0025】
実行CPU数設定手段12は、ギャンググループ作成手段11によるギャンググループの作成時に、当該ギャンググループに対する同時実行CPU数を設定する。この設定処理は、使用可能CPU数格納部30内の使用可能CPU数以下の範囲で、当該コンピュータシステム(本実施の形態に係るグループ単位ギャングスケジューリング方式が適用されるコンピュータシステム)で保持されている既定値(同時実行CPU数の既定値)や、ジョブ実行時にジョブスケジューラによって設定された値(同時実行CPU数のジョブスケジューラ設定値)を、当該ギャンググループの同時実行CPU数として設定することによって実現される。
【0026】
スケジューリング情報採取手段21は、スケジュールインターバル毎に動き、ギャンググループ単位にギャングスケジューリングに必要な情報を採取し、その採取内容(各ギャンググループに対するスケジューリング情報)をスケジューリング情報テーブル40に書き出す。
【0027】
スケジューリング実行手段22は、上記のスケジューリング情報採取手段21によるスケジューリング情報テーブル40への情報設定の後に、使用可能CPU数格納部30内の使用可能CPU数およびスケジューリング情報テーブル40内のスケジューリング情報等に基づき、ギャンググループ単位でのギャングスケジューリングを行う(今回のスケジューリングタイミングにおけるギャングスケジューリング対象のギャンググループを選択する)。
【0028】
ディスパッチング手段23は、スケジューリング実行手段22によるギャングスケジューリングによって選択されたギャンググループに属するプロセス群にCPUを割り当てる。
【0029】
使用可能CPU数格納部30は、当該コンピュータシステムにおいて使用可能なCPUの数を示す情報(使用可能CPU数)を保持している。
【0030】
スケジューリング情報テーブル40は、各並列プログラムの各ギャンググループに対応するスケジューリング情報(本実施の形態では、図4に示すように、同時実行CPU数およびプライオリティ)を保持している。
【0031】
並列プログラム群100には、当該コンピュータシステム上で実行状態にある各並列プログラム(ロードモジュールの態様の各並列プログラムが当該コンピュータシステム上で起動され実行状態とされた各並列プログラム)が存在する。
【0032】
なお、ロードモジュールの態様の並列プログラムには、ギャンググループによるグループ化が考慮されて複数のプロセスに対応する処理内容が記述されている。これらの処理内容を実現する複数のプロセスは、当該並列プログラムの当該コンピュータシステム上での起動後に、順次、そのプロセスに対応する記述内容(ロードモジュールの態様の並列プログラム中の記述内容)に基づいて生成され実行される。
【0033】
各プロセスの生成時には、当該プロセスに対応する記述内容中に含まれているグループ単位ギャングスケジューリングに関する情報(本実施の形態では、当該プロセスに対するギャンググループ番号およびプライオリティ)が、ギャンググループ管理機能実現部10内のギャンググループ作成手段11に与えられる(後述の図2中のステップA2参照)。
【0034】
図2は、本実施の形態に係るグループ単位ギャングスケジューリング方式におけるギャンググループ管理機能実現部10の処理を示す流れ図である。この処理は、プロセス生成有無判定ステップA1と、グループ単位ギャングスケジューリング関連情報取得ステップA2と、ギャンググループ存在判定ステップA3と、新ギャンググループ作成ステップA4と、新ギャンググループプロセス配属ステップA5と、同時実行CPU数設定ステップA6と、既存ギャンググループプロセス配属ステップA7とからなる。
【0035】
図3は、本実施の形態に係るグループ単位ギャングスケジューリング方式におけるスケジューリング機能実現部20の処理を示す流れ図である。この処理は、スケジューリング情報書き出しステップB1と、CPU割り当て対象ギャンググループ決定ステップB2と、実行フラグRUN削除ステップB3と、実行フラグRUN設定ステップB4と、CPU割り当てステップB5とからなる。
【0036】
図4は、本実施の形態に係るグループ単位ギャングスケジューリング方式の具体的な動作を説明するためのブロック図である。
【0037】
図4に示す並列プログラム群100には、ギャンググループ0(ギャンググループ番号が0のギャンググループ)を有する並列プログラムAと、ギャンググループ0およびギャンググループ1を有する並列プログラムBと、ギャンググループ0を有する並列プログラムCとが存在する(グループ化の数の上限が図4に示すような2に限定されないことはいうまでもない)。各並列プログラムの各ギャンググループ上には、並列化の対象となる複数のプロセスA−01〜A−04,プロセスB−01〜B−04,プロセスB−11〜B−12,およびプロセスC−01〜C−02が生成されている。本実施の形態、ひいては本発明では、これらの複数のプロセスに対してギャンググループ単位で同時に複数のCPU(同時実行CPU数で示される数のCPU)を割り当てるギャングスケジューリングが行われる。
【0038】
図5は、本実施の形態に係るグループ単位ギャングスケジューリング方式の具体的な動作および効果を説明するための図である。
【0039】
次に、図1〜図5を参照して、上記のように構成された本実施の形態に係るグループ単位ギャングスケジューリング方式の全体の動作について詳細に説明する。
【0040】
第1に、ギャンググループ管理機能実現部10によるギャンググループの作成および管理に関する動作について説明する(図2参照)。
【0041】
ギャンググループ管理機能実現部10内のギャンググループ作成手段11は、「並列プログラム中のプロセスの生成」という事象が生じたか否かを常に監視している。すなわち、一定の短い時間間隔毎に、プロセスの生成の有無を判定する(ステップA1)。
【0042】
ギャンググループ作成手段11は、ステップA1で「ある並列プログラムにおけるあるプロセスの生成が生じた」と判定した場合に、生成されたプロセスに対するグループ単位ギャングスケジューリングに関する情報(本実施の形態では、ギャンググループ番号およびプライオリティ)を取得する(ステップA2)。
【0043】
その上で、ギャンググループ作成手段11は、当該取得情報中のギャンググループ番号のギャンググループが当該並列プログラムにすでに存在するか否かを判定する(ステップA3)。
【0044】
ギャンググループ作成手段11は、ステップA3で「当該ギャンググループ番号のギャンググループが当該並列プログラムに存在しない」と判定した場合には、当該プロセスが新たなギャンググループの作成を要求するプロセスであると判断(認識)し、当該並列プログラム内に当該ギャンググループ番号を持つ新たなギャンググループ(当該プロセスが属することとなるギャンググループ)を作成する(ステップA4)。
【0045】
なお、ある並列プログラムの起動時において最初のプロセスが生成される場合には、当然に、ステップA3で「当該ギャンググループ番号のギャンググループが当該並列プログラムに存在しない」と判定されることとなる。この場合に、各並列プログラムの最初のプロセスに対しては、ギャンググループ番号0(第1のギャンググループを示す情報)が与えられている。すなわち、最初に生成されるプロセスが属するギャンググループがギャンググループ番号0のギャンググループとなるように設定されている。
【0046】
さらに、ギャンググループ作成手段11は、ステップA4で作成したギャンググループに当該プロセスを属させるように設定する(ステップA5)。ここで、当該ギャンググループに属することとなった当該プロセスには、ギャングスケジューリング対象であることを意味するGANGという情報が設定されたフラグ(ギャングスケジューリング対象識別フラグ)と、当該プロセスの実行時にRUNという情報(CPU割り当て中を示す情報)が設定されるフラグ(実行フラグ)と、ギャンググループ番号と、ギャングスケジューリングにおけるCPU割り当ての優先度(例えば、100を最大値とした数値で示される優先度)を示すプライオリティとが、設定されることとなる(図4中のプロセスB−01およびプロセスB−11参照)。なお、このようなプロセスへの設定情報をグループ単位ギャングスケジューリング関連プロセス設定情報と呼ぶこととする。
【0047】
ギャンググループ管理機能実現部10内の実行CPU数設定手段12は、ギャンググループ作成手段11によるステップA4およびステップA5における処理の後に、ステップA4で作成されたギャンググループに対する同時実行CPU数として、使用可能CPU数格納部30内の使用可能CPU数以下の範囲で、当該コンピュータシステムで保持されている既定値(同時実行CPU数の既定値)や、ジョブ実行時にジョブスケジューラによって設定された値(同時実行CPU数のジョブスケジューラ設定値)を設定する(ステップA6)。
【0048】
一方、ギャンググループ作成手段11は、ステップA3で「当該ギャンググループ番号のギャンググループが当該並列プログラムにすでに存在する」と判定した場合には、当該プロセスがすでに作成されたギャンググループへの加入を要求するプロセスであると判断(認識)し、当該ギャンググループ番号のギャンググループ(既存のギャンググループ)に当該プロセスを属させるように設定する(ステップA7)。ここで、当該ギャンググループに属することとなった当該プロセスには、ギャングスケジューリング対象であることを意味するGANGという情報が設定されたギャングスケジューリング対象識別フラグと、当該プロセスの実行時にRUNという情報が設定される実行フラグと、ギャンググループ番号と、ギャングスケジューリングにおけるCPU割り当ての優先度を示すプライオリティとが、グループ単位ギャングスケジューリング関連プロセス設定情報として設定されることとなる。
【0049】
なお、ステップA6またはステップA7の処理が終了すると、ステップA1の判定に制御が戻る。
【0050】
以上のような動作が繰り返されることによって、例えば、図4に示すような並列プログラムA〜C中の各プロセスがギャンググループに属する態様で生成されることとなる。図4における各ギャンググループには、使用可能CPU数格納部30内の使用可能CPU数である4以下となる範囲で、同時実行CPU数が設定されている。ここで、例えば、並列プログラムBには、ギャンググループ0の他に、ギャンググループ1が作成されており、両方のギャンググループを別個に(例えば、演算カテゴリ毎に)ギャングスケジューリングの対象とすることが可能になる。
【0051】
第2に、スケジューリング機能実現部20によるギャングスケジューリングに関する動作について説明する(図3参照)。
【0052】
スケジューリング機能実現部20内のスケジューリング情報採取手段21は、一定時間(スケジュールインターバル)毎に動き、当該コンピュータシステム内の各ギャンググループとギャングスケジューリング対象である各プロセス(ギャングスケジューリング対象であることを示すGANGという情報がギャングスケジューリング対象識別フラグに設定されたプロセス)とをサーチし、ギャンググループ毎にギャングスケジューリングに必要な情報(本実施の形態では、各ギャンググループの同時実行CPU数および各プロセスのプライオリティ)を調べ、それらの情報に基づいて、各ギャンググループに対応するスケジューリング情報をスケジューリング情報テーブル40に書き出す(ステップB1)。
【0053】
図4に示す並列プログラム群100を有するコンピュータシステムにおいては、並列プログラム群100内の各ギャンググループおよび各プロセスのサーチに基づき、図4中のスケジューリング情報テーブル40に示すような情報が書き出される。ここで、例えば、並列プログラムBのギャンググループ0に対するスケジューリング情報としては、同時実行CPU数の4とプライオリティの80とが書き出される。なお、スケジューリング情報テーブル40中の各ギャンググループに対するプライオリティとは、当該ギャンググループに属する全てのプロセスのプライオリティの平均値を意味する。
【0054】
スケジューリング機能実現部20内のスケジューリング実行手段22は、スケジューリング情報採取手段21によるスケジューリング情報テーブル40への情報設定の後に動き、使用可能CPU数格納部30内の使用可能CPU数とステップB1で書き出されたスケジューリング情報テーブル40内のスケジューリング情報とを基に、過去のスケジューリング結果等をも考慮して、ギャングスケジューリングによるCPU割り当て時に割り当て対象とすべきギャンググループ(当該ギャンググループに属するプロセス群)を決定(選択)する(ステップB2)。ここで、複数あるギャンググループからCPUを割り当てる対象のギャンググループを決定する方法としては、当該コンピュータシステムであらかじめ決められた方法(従来技術においてCPUを割り当てる対象の並列プログラムを決定する方法と同様の方法)が採用される。また、2つ以上のギャンググループの同時実行CPU数の合計が使用可能CPU数の範囲内であれば、当該2つ以上のギャンググループに対して同時にCPUを割り当てることも可能である(図5中のプロセスB−11〜B−12およびプロセスC−01〜C−02へのCPU割り当てタイミングを参照のこと)。
【0055】
スケジューリング機能実現部20内のディスパッチング手段23は、今回のスケジューリングにおけるCPU割り当てタイミングで、今までCPUを割り当てていたギャンググループに属するプロセス群の実行フラグからRUN(CPU割り当て中を示す情報)を削除する(ステップB3)。そして、上記のステップB2でスケジューリング実行手段22により新たに選択されたギャンググループに属するプロセス群の実行フラグにRUNを設定し(ステップB4)、ステップB4で実行フラグにRUNを設定したプロセス群にCPUを割り当てる(ステップB5)。
【0056】
図5は、CPU(ここでは、CPU#0〜CPU#3)から見た場合における、図4中の並列プログラム群100内の各ギャンググループに属するプロセス群へのCPUの割り当て状況の具体例を示した図である。
【0057】
図5を参照すると、図4中のプロセスB−01〜B−04を有するギャンググループ0とプロセスB−11〜B−12を有するギャンググループ1とは、同じ並列プログラムBに属するギャンググループであるが、別々のタイミングでCPUが割り当てられていることが分かる(このような柔軟かつ効率的なスケジューリングが可能になるということが、本実施の形態、ひいては本発明のグループ単位ギャングスケジューリング方式による効果に該当する)。
【0058】
(2) 第1の実施の形態の変形形態
【0059】
次に、上述の第1の実施の形態に係るグループ単位ギャングスケジューリング方式に対する変形形態について説明する。
【0060】
上述の第1の実施の形態においては、スケジューリング情報テーブル40に書き出されるスケジューリング情報や、各プロセスに設定されるグループ単位ギャングスケジューリング関連プロセス設定情報の中に、プライオリティという情報が含まれていた。
【0061】
しかしながら、本発明が適用されるコンピュータシステムにおいて、ギャングスケジューリングの対象となる各プロセスの間でCPUの割り当てに関する優先度に差がない場合等において、そのような優先度を考慮する必要がないときには、上記のスケジューリング情報やグループ単位ギャングスケジューリング関連プロセス設定情報にプライオリティという情報が含まれていなくても、本発明のグループ単位ギャングスケジューリング方式を実現することが可能となる。
【0062】
このような「プライオリティという情報を取り扱わない実施の形態」を、第1の実施の形態に対する変形形態として考えることができる。
【0063】
ここで、このような変形形態においては、図1中のギャンググループ管理機能実現部10やスケジューリング機能実現部20におけるプライオリティの取り扱いに関連する処理(プライオリティという情報の設定・参照やCPU割り当て時のプライオリティの考慮等)は不要となる。
【0064】
なお、スケジューリング情報テーブル40に書き出される各ギャンググループに対するスケジューリング情報(ギャングスケジューリングを実行する際に参照・考慮される情報)の内容として、上述の第1の実施の形態で示した同時実行CPU数およびプライオリティ(上記のように、プライオリティがない場合も考えられる)以外の情報を加えて、そのような付加情報をも考慮してギャングスケジューリングを実行することも可能である。
【0065】
(3) 第2の実施の形態
【0066】
図6は、本発明の第2の実施の形態の構成を示すブロック図である。
【0067】
図6を参照すると、本発明の第2の実施の形態は、図1に示した第1の実施の形態に対して、グループ単位ギャングスケジューリング制御プログラム600を備える点が異なっている。
【0068】
グループ単位ギャングスケジューリング制御プログラム600は、ギャンググループ管理機能実現部10,スケジューリング機能実現部20,使用可能CPU数格納部30,スケジューリング情報テーブル40,および並列プログラム群100を含むコンピュータシステムに読み込まれ、当該コンピュータシステムの動作を、使用可能CPU数格納部30,スケジューリング情報テーブル40,および並列プログラム群100が存在することを前提とした上で、ギャンググループ管理機能実現部10(ギャンググループ作成手段11および実行CPU数設定手段12)およびスケジューリング機能実現部20(スケジューリング情報採取手段21,スケジューリング実行手段22,およびディスパッチング手段23)として制御する。グループ単位ギャングスケジューリング制御プログラム600の制御によるギャンググループ作成手段11,実行CPU数設定手段12,スケジューリング情報採取手段21,スケジューリング実行手段22,およびディスパッチング手段23の動作は、第1の実施の形態におけるギャンググループ作成手段11,実行CPU数設定手段12,スケジューリング情報採取手段21,スケジューリング実行手段22,およびディスパッチング手段23の動作と全く同様になるので、その詳しい説明を割愛する。
【0069】
【発明の効果】
以上説明したように、本発明によると、以下に示すような効果が生じる。
【0070】
第1に、並列プログラム中にギャンググループを作成すること(並列プログラムをギャンググループにグループ分けすること)により、並列プログラム単位ではなく、ギャンググループ単位でのギャングスケジューリングが可能となり、柔軟かつ効率的なギャングスケジューリングを実現することができるという効果が生じる。
【0071】
すなわち、このようなギャンググループの作成により、並列プログラムの並列数(並列化されたプロセスの数)がギャングスケジューリングの適用対象のコンピュータシステムにおける使用可能CPU数を超えた場合でも、複数のギャンググループ(例えば、演算カテゴリ毎に分けられたギャンググループ)に並列プログラムを分けることによって、各ギャンググループにおいては並列数を当該使用可能CPU数以下に抑えることが可能になり、効率よくギャングスケジューリングを実行することができるようになる。また、同一並列プログラム内の演算に関して、演算カテゴリ毎に別個にスケジューリングを行うことができ、柔軟なギャングスケジューリングを実現することが可能になる。
【0072】
第2に、同一並列プログラム内の各ギャンググループに異なる同時実行CPU数を割り当てる(設定する)ことが可能になるので(例えば、図4中の並列プログラムBにおける2つのギャンググループを参照のこと)、使用可能なCPUを無駄にしない効率的なギャングスケジューリングが可能になるという効果が生じる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態に係るグループ単位ギャングスケジューリング方式の構成を示すブロック図である。
【図2】図1に示すグループ単位ギャングスケジューリング方式におけるギャンググループ管理機能実現部の処理を示す流れ図である。
【図3】図1に示すグループ単位ギャングスケジューリング方式におけるスケジューリング機能実現部の処理を示す流れ図である。
【図4】図1に示すグループ単位ギャングスケジューリング方式の具体的な動作を説明するためのブロック図である。
【図5】図1に示すグループ単位ギャングスケジューリング方式の具体的な動作および効果を説明するための図である。
【図6】本発明の第2の実施の形態の構成を示すブロック図である。
【符号の説明】
10 ギャンググループ管理機能実現部
11 ギャンググループ作成手段
12 実行CPU数設定手段
20 スケジューリング機能実現部
21 スケジューリング情報採取手段
22 スケジューリング実行手段
23 ディスパッチング手段
30 使用可能CPU数格納部
40 スケジューリング情報テーブル
100 並列プログラム群
600 グループ単位ギャングスケジューリング制御プログラム
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a computer system having a gang scheduling function for a distributed parallel program (hereinafter, referred to as a parallel program). In a computer system, the gang scheduling is performed not by the whole parallel program but by a group (a gang group as described later). The present invention relates to a group-based gang scheduling scheme characterized by performing.
[0002]
[Prior art]
The gang scheduling function is a function of simultaneously allocating a required number of CPUs (Central Processing Units) when scheduling a parallel program.
[0003]
Conventionally, in a gang scheduling method for realizing this type of gang scheduling function, scheduling has been performed using one parallel program as a whole as a scheduling unit (for example, see Patent Document 1).
[0004]
Therefore, for example, in a parallel program that performs an operation related to weather, even when one parallel program is divided into an operation category related to the southern hemisphere and an operation category related to the northern hemisphere, it is set as a gang scheduling target for each operation category. I could not say that.
[0005]
A technique for allocating a processor (CPU) to each process (process performing a parallel operation) constituting a program, not limited to the gang scheduling function, has conventionally been known as a known technique (for example, Patent Document 2). The present invention is based on the premise that such a "technology for allocating (allocating) a processor to a process" exists.
[0006]
[Patent Document 1]
JP-A-2000-250876 (page 2, FIG. 1)
[Patent Document 2]
JP-A-10-143380 (pages 2-3, FIGS. 1 and 8)
[0007]
[Problems to be solved by the invention]
In the above-described conventional gang scheduling method, as described above, gang scheduling is performed using one entire parallel program as a unit of scheduling. Therefore, a plurality of operations of different categories in one parallel program (for example, Even if there is an arithmetic category for the southern hemisphere and an arithmetic category for the northern hemisphere in a parallel program that performs an arithmetic operation for weather), scheduling must be performed for the entire parallel program as a unit, and more flexible and efficient gang scheduling cannot be realized. There was a problem.
[0008]
In view of the above points, an object of the present invention is to solve these problems and to make it possible to perform scheduling not in parallel program units but in gang group units in a parallel program (group-based gang scheduling system). Is to provide.
[0009]
[Means for Solving the Problems]
The group-based gang scheduling method according to the present invention provides a computer system having a gang scheduling function. In a computer system having a gang scheduling function, a gang group number (usually 0, 1,...) Set for a process in a parallel program when the process is generated. The format can be considered, but more generally, any type of identification information may be used as long as it is information for identifying a gang group.) Gang group creation means for creating a new gang group of the gang group number in the parallel program when there is no gang group number, and when the gang group is created by the gang group creation means, Available Means for setting the number of concurrently executing CPUs for the gang group within a range equal to or less than the number of PUs; and means for setting the number of concurrently executing CPUs for each gang group, and collecting information necessary for gang scheduling for each gang group, based on the collection. Scheduling information collecting means for writing scheduling information for each gang group in a scheduling information table; gangs in consideration of the number of available CPUs in the computer system and the scheduling information written in the scheduling information table by the scheduling information collecting means; Scheduling execution means for performing gang scheduling on a group basis and selecting a gang group to be scheduled; And a dispatching unit for allocating a CPU to the process group belonging to gang group selected by the gang scheduling by.
[0010]
Here, the above-described group-based gang scheduling scheme can be embodied as shown in a or b below.
[0011]
a. The number of concurrently executing CPUs is included in the scheduling information for each gang group in the scheduling information table, and the gang scheduling object identification flag, the execution flag, and the gang group number are included in the group unit gang scheduling related process setting information set for each process. To be included.
[0012]
b. The scheduling information for each gang group in the scheduling information table includes the number of concurrently executing CPUs and the priority (information indicating the priority of CPU allocation in gang scheduling), and group-based gang scheduling-related process settings set for each process The information includes a gang scheduling target identification flag, an execution flag, a gang group number, and a priority. Then, the scheduling information collecting means collects the priority set for each process as one of the information necessary for the gang scheduling, and based on the collected, the priority for each gang group (for example, And information indicating the average of the priorities set for all the processes belonging to each gang group. Further, the scheduling execution means performs gang scheduling in consideration of the priority for each gang group in the scheduling information table.
[0013]
Note that the group-based gang scheduling method of the present invention is more generally used in a computer system having a gang scheduling function in which one or more gang groups are created in one parallel program. A gang group management function realizing unit that manages gang groups for performing gang scheduling in units (setting of the number of concurrently executing CPUs for each gang group, etc.), and a gang group created by the gang group management function realizing unit And a scheduling function realizing unit that performs gang scheduling as a unit.
[0014]
In addition, the present invention provides a computer system having a gang scheduling function that manages a gang group for creating one or more gang groups in one parallel program and performing gang scheduling not in parallel program units but in gang group units. And a gang group management function realizing unit that performs the gang scheduling by using the gang group created by the gang group management function realizing unit as a unit. .
[0015]
Further, the present invention provides a computer system having a gang scheduling function by determining whether a gang group having a gang group number set for a process in a parallel program already exists in the parallel program. The gang group creating means for creating a new gang group of the gang group number in the parallel program if it does not exist, and the number of CPUs available in the computer system when the gang group is created by the gang group creating means. Within the following range, the number-of-executing-CPUs setting means for setting the number of concurrently executing CPUs for the gang group moves at each schedule interval, and collects information necessary for gang scheduling for each gang group. A scheduling information collection unit that writes scheduling information for each gang group to a scheduling information table based on the collection, a number of available CPUs in the computer system, and scheduling information written to the scheduling information table by the scheduling information collection unit. Means for performing gang scheduling on a gang group basis and selecting a gang group to be scheduled; and dispatching means for allocating a CPU to a process group belonging to the gang group selected by the gang scheduling by the scheduling execution means. It is also possible to realize in the form of a program for making it function.
[0016]
In addition, the present invention relates to a computer system having a gang scheduling function that determines whether a gang group having a gang group number set for a process in a parallel program already exists in the parallel program. Gang group creating means for creating a new gang group of the gang group number in the parallel program if the gang group number does not exist. When a gang group is created by the gang group creating means, an available CPU in the computer system is used. The number-of-executing-CPUs setting means for setting the number of concurrently executing CPUs for the gang group within a range of not more than the number of the gang groups. The scheduling information for each gang group is written to the scheduling information table based on the collection, and at this time, the priority set for each process as one of information necessary for gang scheduling is collected, and based on the collection, the priority is set. A gang group taking into account the scheduling information collecting means for setting the priority for each gang group in the scheduling information table, the number of available CPUs in the computer system, and the scheduling information written in the scheduling information table by the scheduling information collecting means. Perform gang scheduling on a unit basis and select a gang group to be scheduled. Scheduling execution means for performing gang scheduling in consideration of the priority for each gang group; and a program for functioning as dispatching means for allocating a CPU to a group of processes belonging to the gang group selected by the gang scheduling by the scheduling execution means. It is also possible to realize in an embodiment.
[0017]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, the present invention will be described in detail with reference to the drawings.
[0018]
(1) First embodiment
[0019]
FIG. 1 is a block diagram showing a configuration of a group-based gang scheduling scheme according to the first embodiment of the present invention.
[0020]
Referring to FIG. 1, the group-based gang scheduling scheme according to the present embodiment includes a gang group management function realizing unit 10, a scheduling function realizing unit 20, an available CPU number storage unit 30, a scheduling information table 40, And a parallel program group 100.
[0021]
The gang group management function implementing unit 10 includes a gang group creation unit 11 and an execution CPU number setting unit 12.
[0022]
The scheduling function implementing unit 20 includes a scheduling information collecting unit 21, a scheduling executing unit 22, and a dispatching unit 23. The scheduling function realized by the scheduling function realizing unit 20 is the same as the scheduling function in the gang scheduling method of the related art, except that gang scheduling is performed in gang groups.
[0023]
Each of the above-described units roughly performs the following operation.
[0024]
The gang group creation means 11 is given in the form of a gang group number (here, numbers of 0, 1,...) Set for a process in a parallel program belonging to the parallel program group 100 when the process is generated. However, more generally, any type of identification information may be used as long as it is information for identifying a gang group), and a gang group having the gang group number already exists in the parallel program. It is determined whether or not the gang group is to be executed. If the gang group does not exist, a new gang group having the gang group number is created in the parallel program.
[0025]
The number-of-executed-CPUs setting unit 12 sets the number of concurrently executed CPUs for the gang group when the gang group creating unit 11 creates the gang group. This setting process is held in the computer system (computer system to which the group-based gang scheduling scheme according to the present embodiment is applied) in a range equal to or less than the number of available CPUs in the available CPU number storage unit 30. Implemented by setting a default value (the default value of the number of concurrently executing CPUs) or a value set by the job scheduler when executing a job (the job scheduler setting value of the number of concurrently executing CPUs) as the number of concurrently executing CPUs of the gang group. Is done.
[0026]
The scheduling information collecting means 21 moves at every schedule interval, collects information necessary for gang scheduling for each gang group, and writes the collected contents (scheduling information for each gang group) to the scheduling information table 40.
[0027]
After the scheduling information collection unit 21 sets the information in the scheduling information table 40 by the scheduling information collection unit 21, the scheduling execution unit 22 determines the number of available CPUs in the available CPU number storage unit 30 and the scheduling information in the scheduling information table 40. Then, gang scheduling is performed for each gang group (a gang group to be gang scheduled at the current scheduling timing is selected).
[0028]
The dispatching unit 23 allocates a CPU to a process group belonging to the gang group selected by the gang scheduling by the scheduling execution unit 22.
[0029]
The available CPU number storage unit 30 holds information indicating the number of available CPUs in the computer system (the number of available CPUs).
[0030]
The scheduling information table 40 holds scheduling information corresponding to each gang group of each parallel program (in the present embodiment, as shown in FIG. 4, the number of concurrently executing CPUs and the priority).
[0031]
In the parallel program group 100, there are respective parallel programs that are in an execution state on the computer system (each of the parallel programs in the form of a load module are activated and executed on the computer system).
[0032]
In the parallel program in the form of a load module, processing contents corresponding to a plurality of processes are described in consideration of grouping by gang groups. The plurality of processes that realize these processing contents are sequentially based on the description contents (description contents in the parallel program in the form of the load module) corresponding to the processes after the parallel program is activated on the computer system. Generated and executed.
[0033]
At the time of generation of each process, information on the group-based gang scheduling (in this embodiment, the gang group number and priority for the process) included in the description corresponding to the process is transmitted to the gang group management function implementing unit 10. (See step A2 in FIG. 2 described later).
[0034]
FIG. 2 is a flowchart showing the processing of the gang group management function implementing unit 10 in the group gang scheduling scheme according to the present embodiment. This processing is performed simultaneously with a process generation presence / absence determination step A1, a group-based gang scheduling related information acquisition step A2, a gang group existence determination step A3, a new gang group creation step A4, and a new gang group process assignment step A5. It comprises a CPU number setting step A6 and an existing gang group process assignment step A7.
[0035]
FIG. 3 is a flowchart showing a process of the scheduling function implementing unit 20 in the group-based gang scheduling scheme according to the present embodiment. This processing includes a scheduling information writing step B1, a CPU allocation target gang group determination step B2, an execution flag RUN deletion step B3, an execution flag RUN setting step B4, and a CPU allocation step B5.
[0036]
FIG. 4 is a block diagram for explaining a specific operation of the group-based gang scheduling scheme according to the present embodiment.
[0037]
The parallel program group 100 shown in FIG. 4 includes a parallel program A having a gang group 0 (a gang group having a gang group number of 0), a parallel program B having a gang group 0 and a gang group 1, and a gang group 0. There is a parallel program C (it goes without saying that the upper limit of the number of groupings is not limited to 2 as shown in FIG. 4). On each gang group of each parallel program, a plurality of processes A-01 to A-04, processes B-01 to B-04, processes B-11 to B-12, and a process C- 01 to C-02 are generated. In the present embodiment and the present invention, gang scheduling for allocating a plurality of CPUs (the number of CPUs indicated by the number of concurrently executing CPUs) to the plurality of processes at the same time in a gang group is performed.
[0038]
FIG. 5 is a diagram for describing specific operations and effects of the group-based gang scheduling scheme according to the present embodiment.
[0039]
Next, the overall operation of the group-based gang scheduling scheme according to the present embodiment configured as described above will be described in detail with reference to FIGS.
[0040]
First, an operation related to the creation and management of a gang group by the gang group management function implementing unit 10 will be described (see FIG. 2).
[0041]
The gang group creation means 11 in the gang group management function implementing unit 10 constantly monitors whether or not an event of “generation of a process in a parallel program” has occurred. That is, the presence or absence of the generation of a process is determined for each fixed short time interval (step A1).
[0042]
When it is determined in step A1 that “a certain process has been generated in a certain parallel program”, the gang group creating unit 11 outputs information on group-based gang scheduling for the created process (in this embodiment, the gang group number And priority) (step A2).
[0043]
Then, the gang group creating means 11 determines whether or not the gang group of the gang group number in the obtained information already exists in the parallel program (step A3).
[0044]
If the gang group creating means 11 determines in step A3 that "the gang group of the gang group number does not exist in the parallel program", it determines that the process is a process for requesting creation of a new gang group. (Recognition), and a new gang group (a gang group to which the process belongs) having the gang group number is created in the parallel program (step A4).
[0045]
When the first process is generated at the time of starting a certain parallel program, naturally, it is determined in step A3 that "the gang group of the gang group number does not exist in the parallel program". In this case, the gang group number 0 (information indicating the first gang group) is given to the first process of each parallel program. That is, the gang group to which the process generated first belongs is set to be the gang group of gang group number 0.
[0046]
Further, the gang group creating means 11 sets the process to belong to the gang group created in step A4 (step A5). Here, the process belonging to the gang group has a flag (gang scheduling target identification flag) in which information of GANG indicating that the process is a gang scheduling target is set, and a RUN is set when the process is executed. A flag (execution flag) in which information (information indicating that CPU is being allocated) is set, a gang group number, and a priority of CPU allocation in gang scheduling (for example, a priority indicated by a numerical value with 100 being the maximum value) The indicated priority is set (see process B-01 and process B-11 in FIG. 4). The setting information for such a process is referred to as group-based gang scheduling-related process setting information.
[0047]
The number-of-executed-CPUs setting means 12 in the gang group management function implementing unit 10 can be used as the number of concurrently executed CPUs for the gang group created in step A4 after the processing in steps A4 and A5 by the gang group creating means 11. Within the range of the number of available CPUs in the number-of-CPUs storage unit 30 or less, a default value (default value of the number of concurrently executed CPUs) held in the computer system or a value set by the job scheduler at the time of job execution (simultaneously executed A job scheduler setting value for the number of CPUs is set (step A6).
[0048]
On the other hand, when it is determined in step A3 that the gang group of the gang group number already exists in the parallel program, the gang group creating unit 11 requests the process to join the gang group that has already been created. The process is determined (recognized) as a process to be performed, and the process is set to belong to the gang group (existing gang group) of the gang group number (step A7). Here, the process belonging to the gang group has a gang scheduling target identification flag in which information GANG indicating that the process is a gang scheduling target is set, and information RUN is set when the process is executed. The execution flag, the gang group number, and the priority indicating the priority of CPU allocation in the gang scheduling are set as group-based gang scheduling related process setting information.
[0049]
When the processing in step A6 or step A7 ends, the control returns to the determination in step A1.
[0050]
By repeating the above operation, for example, each process in the parallel programs A to C as shown in FIG. 4 is generated in a mode belonging to a gang group. In each gang group in FIG. 4, the number of concurrently executing CPUs is set within a range of 4 or less, which is the number of available CPUs in the available CPU number storage unit 30. Here, for example, in the parallel program B, a gang group 1 is created in addition to the gang group 0, and both gang groups may be separately subjected to gang scheduling (for example, for each operation category). Will be possible.
[0051]
Second, an operation related to gang scheduling by the scheduling function implementing unit 20 will be described (see FIG. 3).
[0052]
The scheduling information collecting means 21 in the scheduling function realizing section 20 moves at regular time intervals (schedule intervals), and each gang group in the computer system and each process to be gang scheduled (GANG indicating that it is a gang scheduled object). Is searched for the information set in the gang scheduling target identification flag), and information necessary for gang scheduling for each gang group (in the present embodiment, the number of concurrently executing CPUs of each gang group and the priority of each process) And writes the scheduling information corresponding to each gang group into the scheduling information table 40 based on the information (step B1).
[0053]
In the computer system having the parallel program group 100 shown in FIG. 4, based on a search for each gang group and each process in the parallel program group 100, information as shown in the scheduling information table 40 in FIG. Here, for example, 4 as the number of concurrently executing CPUs and 80 as the priority are written out as the scheduling information for the gang group 0 of the parallel program B. The priority for each gang group in the scheduling information table 40 means an average value of the priorities of all processes belonging to the gang group.
[0054]
The scheduling execution unit 22 in the scheduling function realizing unit 20 moves after setting the information in the scheduling information table 40 by the scheduling information collecting unit 21 and writes out the number of available CPUs in the available CPU number storage unit 30 and step B1. Based on the scheduling information in the scheduling information table 40, a gang group to be assigned (a process group belonging to the gang group) to be assigned at the time of CPU assignment by gang scheduling is determined in consideration of past scheduling results and the like. (Selection) (step B2). Here, as a method of determining a gang group to which a CPU is to be allocated from a plurality of gang groups, a method determined in advance by the computer system (a method similar to the method of determining a parallel program to which a CPU is allocated in the related art) is used. ) Is adopted. Also, if the total number of concurrently executing CPUs of two or more gang groups is within the range of the number of usable CPUs, CPUs can be simultaneously allocated to the two or more gang groups (FIG. 5). CPU allocation timing to processes B-11 to B-12 and processes C-01 to C-02).
[0055]
The dispatching means 23 in the scheduling function realizing unit 20 deletes RUN (information indicating that CPU is being allocated) from the execution flags of the processes belonging to the gang group to which the CPU has been allocated at the CPU allocation timing in the current scheduling. (Step B3). Then, at step B2, RUN is set to the execution flag of the process group belonging to the gang group newly selected by the scheduling execution means 22 (step B4). At step B4, CPU is assigned to the process group whose execution flag is set to RUN. Is assigned (step B5).
[0056]
FIG. 5 shows a specific example of the state of allocation of CPUs to processes belonging to each gang group in the parallel program group 100 in FIG. 4 when viewed from the CPU (here, CPU # 0 to CPU # 3). FIG.
[0057]
Referring to FIG. 5, gang group 0 having processes B-01 to B-04 and gang group 1 having processes B-11 to B-12 in FIG. 4 are gang groups belonging to the same parallel program B. However, it can be seen that CPUs are allocated at different timings. (The fact that such flexible and efficient scheduling becomes possible is an effect of the present embodiment and the effect of the group-based gang scheduling method of the present invention. Applicable).
[0058]
(2) Modification of the first embodiment
[0059]
Next, a modification of the group-based gang scheduling scheme according to the first embodiment will be described.
[0060]
In the above-described first embodiment, the priority information is included in the scheduling information written in the scheduling information table 40 and the process setting information related to the gang scheduling in units of groups set in each process.
[0061]
However, in the computer system to which the present invention is applied, when there is no difference in the priority regarding the CPU allocation among the respective processes to be subjected to gang scheduling, when there is no need to consider such a priority, Even if the above-mentioned scheduling information and the process setting information related to the group-based gang scheduling do not include the information of the priority, the group-based gang scheduling method of the present invention can be realized.
[0062]
Such an “embodiment that does not handle the information of priority” can be considered as a modification to the first embodiment.
[0063]
Here, in such a modified embodiment, the processing related to the handling of the priority in the gang group management function realizing unit 10 and the scheduling function realizing unit 20 in FIG. 1 (setting / referencing of information called priority and priority in CPU allocation) Is not necessary.
[0064]
The contents of the scheduling information (information referred and considered when executing gang scheduling) for each gang group written in the scheduling information table 40 include the number of concurrently executed CPUs and the number of CPUs described in the first embodiment. It is also possible to perform gang scheduling by adding information other than the priority (it is considered that there is no priority as described above) and taking such additional information into consideration.
[0065]
(3) Second embodiment
[0066]
FIG. 6 is a block diagram showing a configuration of the second exemplary embodiment of the present invention.
[0067]
Referring to FIG. 6, the second embodiment of the present invention is different from the first embodiment shown in FIG. 1 in that a group-based gang scheduling control program 600 is provided.
[0068]
The group unit gang scheduling control program 600 is read into a computer system including a gang group management function realizing unit 10, a scheduling function realizing unit 20, an available CPU number storing unit 30, a scheduling information table 40, and a parallel program group 100, and The operation of the computer system is based on the assumption that the number of available CPUs storage unit 30, the scheduling information table 40, and the parallel program group 100 are present, and the gang group management function realizing unit 10 (gang group creation unit 11 and execution The control is performed as a CPU number setting unit 12) and a scheduling function realizing unit 20 (scheduling information collecting unit 21, scheduling executing unit 22, and dispatching unit 23). The operations of the gang group creation means 11, the number of CPUs to be executed setting means 12, the scheduling information collecting means 21, the scheduling execution means 22, and the dispatching means 23 under the control of the group unit gang scheduling control program 600 are the same as those in the first embodiment. The operations are exactly the same as those of the gang group creating means 11, the number-of-executing-CPUs setting means 12, the scheduling information collecting means 21, the scheduling executing means 22, and the dispatching means 23.
[0069]
【The invention's effect】
As described above, according to the present invention, the following effects are produced.
[0070]
First, by creating a gang group in a parallel program (grouping a parallel program into a gang group), gang scheduling can be performed in a gang group unit instead of in a parallel program unit, which is flexible and efficient. There is an effect that gang scheduling can be realized.
[0071]
In other words, even when the number of parallel programs (the number of parallelized processes) exceeds the number of available CPUs in the computer system to which gang scheduling is applied, by creating such a gang group, a plurality of gang groups ( For example, by dividing a parallel program into gang groups divided for each operation category), the number of parallel programs in each gang group can be suppressed to the number of available CPUs or less, and gang scheduling can be performed efficiently. Will be able to In addition, for operations in the same parallel program, scheduling can be separately performed for each operation category, and flexible gang scheduling can be realized.
[0072]
Second, since it becomes possible to assign (set) a different number of concurrently executing CPUs to each gang group in the same parallel program (for example, see two gang groups in parallel program B in FIG. 4). This has the effect of enabling efficient gang scheduling without wasting available CPUs.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a group-based gang scheduling scheme according to a first embodiment of the present invention.
FIG. 2 is a flowchart showing a process of a gang group management function implementing unit in the group-based gang scheduling scheme shown in FIG.
FIG. 3 is a flowchart showing a process of a scheduling function implementing unit in the group-based gang scheduling scheme shown in FIG. 1;
FIG. 4 is a block diagram for explaining a specific operation of the group-based gang scheduling scheme shown in FIG.
FIG. 5 is a diagram for explaining specific operations and effects of the group-based gang scheduling scheme shown in FIG. 1;
FIG. 6 is a block diagram showing a configuration of a second exemplary embodiment of the present invention.
[Explanation of symbols]
10 Gang Group Management Function Realization Unit
11 Gang group creation means
12. Execution CPU number setting means
20 Scheduling Function Realization Unit
21 Scheduling information collection means
22 Scheduling execution means
23 Dispatching means
30 Available CPU number storage
40 Scheduling information table
100 parallel programs
600 Group-based gang scheduling control program

Claims (7)

ギャングスケジューリング機能を有するコンピュータシステムにおいて、
1つの並列プログラムの中に1以上のギャンググループを作成し、並列プログラム単位ではなくギャンググループ単位にギャングスケジューリングを行うためのギャンググループに関する管理を行うギャンググループ管理機能実現部と、
前記ギャンググループ管理機能実現部により作成されたギャンググループを単位としてギャングスケジューリングを行うスケジューリング機能実現部と
を有することを特徴とするグループ単位ギャングスケジューリング方式。
In a computer system having a gang scheduling function,
A gang group management function realizing unit that creates one or more gang groups in one parallel program, and manages gang groups for performing gang scheduling not in parallel program units but in gang group units;
A group-based gang scheduling system, comprising: a scheduling function implementing unit that performs gang scheduling in units of a gang group created by the gang group managing function implementing unit.
ギャングスケジューリング機能を有するコンピュータシステムにおいて、
並列プログラム中のプロセスの生成時に当該プロセスに対して設定されたギャンググループ番号を持つギャンググループが当該並列プログラムにすでに存在するか否かを判定し、存在しない場合には当該ギャンググループ番号の新たなギャンググループを当該並列プログラム中に作成するギャンググループ作成手段と、
前記ギャンググループ作成手段によるギャンググループの作成時に、当該コンピュータシステムにおける使用可能CPU数以下の範囲で、当該ギャンググループに対する同時実行CPU数を設定する実行CPU数設定手段と、
スケジュールインターバル毎に動き、ギャンググループ単位にギャングスケジューリングに必要な情報を採取し、その採取に基づいて各ギャンググループに対するスケジューリング情報をスケジューリング情報テーブルに書き出すスケジューリング情報採取手段と、
当該コンピュータシステムにおける使用可能CPU数および前記スケジューリング情報採取手段により前記スケジューリング情報テーブルに書き出されたスケジューリング情報を考慮して、ギャンググループ単位でのギャングスケジューリングを行い、スケジューリング対象のギャンググループを選択するスケジューリング実行手段と、
前記スケジューリング実行手段によるギャングスケジューリングによって選択されたギャンググループに属するプロセス群にCPUを割り当てるディスパッチング手段と
を有することを特徴とするグループ単位ギャングスケジューリング方式。
In a computer system having a gang scheduling function,
It is determined whether a gang group having the gang group number set for the process at the time of generation of the process in the parallel program already exists in the parallel program, and if not, a new gang group number of the gang group number is determined. Gang group creation means for creating a gang group in the parallel program;
Executing CPU number setting means for setting the number of concurrently executing CPUs for the gang group within a range equal to or less than the number of available CPUs in the computer system when the gang group is created by the gang group creating means;
A scheduling information collection unit that moves at every schedule interval, collects information necessary for gang scheduling in gang group units, and writes scheduling information for each gang group to a scheduling information table based on the collection;
In consideration of the number of available CPUs in the computer system and the scheduling information written to the scheduling information table by the scheduling information collecting means, gang scheduling is performed in gang group units, and scheduling for selecting a gang group to be scheduled is performed. Means of execution;
Dispatching means for allocating a CPU to a process group belonging to a gang group selected by the gang scheduling by the scheduling execution means.
スケジューリング情報テーブル内の各ギャンググループに対するスケジューリング情報に同時実行CPU数が含まれ、各プロセスに設定されるグループ単位ギャングスケジューリング関連プロセス設定情報にギャングスケジューリング対象識別フラグ,実行フラグ,およびギャンググループ番号が含まれることを特徴とする請求項2記載のグループ単位ギャングスケジューリング方式。The scheduling information for each gang group in the scheduling information table includes the number of concurrently executing CPUs, and the gang scheduling target identification flag, the execution flag, and the gang group number are included in the group-based gang scheduling related process setting information set for each process. 3. The group-based gang scheduling method according to claim 2, wherein: スケジューリング情報テーブル内の各ギャンググループに対するスケジューリング情報に同時実行CPU数およびプライオリティが含まれ、各プロセスに設定されるグループ単位ギャングスケジューリング関連プロセス設定情報にギャングスケジューリング対象識別フラグ,実行フラグ,ギャンググループ番号,およびプライオリティが含まれ、
スケジューリング情報採取手段が、ギャングスケジューリングに必要な情報の1つとして各プロセスに対して設定されているプライオリティを採取し、その採取に基づき前記スケジューリング情報テーブルに各ギャンググループに対するプライオリティを設定し、
スケジューリング実行手段が、前記スケジューリング情報テーブル中の各ギャンググループに対するプライオリティをも考慮してギャングスケジューリングを行う
ことを特徴とする請求項2記載のグループ単位ギャングスケジューリング方式。
The scheduling information for each gang group in the scheduling information table includes the number of concurrently executing CPUs and the priority, and the group-based gang scheduling-related process setting information set for each process includes a gang scheduling target identification flag, an execution flag, a gang group number, And priority,
Scheduling information collecting means collects a priority set for each process as one of information necessary for gang scheduling, sets a priority for each gang group in the scheduling information table based on the collected,
3. The group-based gang scheduling method according to claim 2, wherein the scheduling execution means performs gang scheduling in consideration of a priority for each gang group in the scheduling information table.
ギャングスケジューリング機能を有するコンピュータシステムを、1つの並列プログラムの中に1以上のギャンググループを作成し、並列プログラム単位ではなくギャンググループ単位にギャングスケジューリングを行うためのギャンググループに関する管理を行うギャンググループ管理機能実現部,および前記ギャンググループ管理機能実現部により作成されたギャンググループを単位としてギャングスケジューリングを行うスケジューリング機能実現部として機能させるためのプログラム。A gang group management function for managing a computer system having a gang scheduling function by creating one or more gang groups in one parallel program and performing gang group management for performing gang scheduling not in parallel program units but in gang group units A program for functioning as a realizing unit and a scheduling function realizing unit that performs gang scheduling in units of gang groups created by the gang group managing function realizing unit. ギャングスケジューリング機能を有するコンピュータシステムを、並列プログラム中のプロセスの生成時に当該プロセスに対して設定されたギャンググループ番号を持つギャンググループが当該並列プログラムにすでに存在するか否かを判定し、存在しない場合には当該ギャンググループ番号の新たなギャンググループを当該並列プログラム中に作成するギャンググループ作成手段,前記ギャンググループ作成手段によるギャンググループの作成時に、当該コンピュータシステムにおける使用可能CPU数以下の範囲で、当該ギャンググループに対する同時実行CPU数を設定する実行CPU数設定手段,スケジュールインターバル毎に動き、ギャンググループ単位にギャングスケジューリングに必要な情報を採取し、その採取に基づいて各ギャンググループに対するスケジューリング情報をスケジューリング情報テーブルに書き出すスケジューリング情報採取手段,当該コンピュータシステムにおける使用可能CPU数および前記スケジューリング情報採取手段により前記スケジューリング情報テーブルに書き出されたスケジューリング情報を考慮して、ギャンググループ単位でのギャングスケジューリングを行い、スケジューリング対象のギャンググループを選択するスケジューリング実行手段,ならびに前記スケジューリング実行手段によるギャングスケジューリングによって選択されたギャンググループに属するプロセス群にCPUを割り当てるディスパッチング手段として機能させるためのプログラム。A computer system having a gang scheduling function is used to determine whether or not a gang group having a gang group number set for a process in a parallel program already exists in the parallel program when the process is generated. A gang group creating means for creating a new gang group of the gang group number in the parallel program, and when the gang group is created by the gang group creating means, the gang group is created within a range of not more than the number of available CPUs in the computer system. The number-of-executing-CPUs setting means for setting the number of concurrently-executing CPUs for the gang group, which moves at each schedule interval, collects information necessary for gang scheduling for each gang group, and sets each information based on the collected information. Scheduling information collecting means for writing scheduling information for a gang group in a scheduling information table, the number of available CPUs in the computer system, and scheduling information written in the scheduling information table by the scheduling information collecting means, in gang group units. And a program for functioning as scheduling execution means for performing gang scheduling and selecting a gang group to be scheduled, and dispatching means for allocating a CPU to a process group belonging to the gang group selected by the gang scheduling by the scheduling execution means. ギャングスケジューリング機能を有するコンピュータシステムを、並列プログラム中のプロセスの生成時に当該プロセスに対して設定されたギャンググループ番号を持つギャンググループが当該並列プログラムにすでに存在するか否かを判定し、存在しない場合には当該ギャンググループ番号の新たなギャンググループを当該並列プログラム中に作成するギャンググループ作成手段,前記ギャンググループ作成手段によるギャンググループの作成時に、当該コンピュータシステムにおける使用可能CPU数以下の範囲で、当該ギャンググループに対する同時実行CPU数を設定する実行CPU数設定手段,スケジュールインターバル毎に動き、ギャンググループ単位にギャングスケジューリングに必要な情報を採取し、その採取に基づいて各ギャンググループに対するスケジューリング情報をスケジューリング情報テーブルに書き出し、その際に、ギャングスケジューリングに必要な情報の1つとして各プロセスに対して設定されているプライオリティを採取し、その採取に基づき前記スケジューリング情報テーブルに各ギャンググループに対するプライオリティを設定するスケジューリング情報採取手段,当該コンピュータシステムにおける使用可能CPU数および前記スケジューリング情報採取手段により前記スケジューリング情報テーブルに書き出されたスケジューリング情報を考慮して、ギャンググループ単位でのギャングスケジューリングを行い、スケジューリング対象のギャンググループを選択し、その際に、前記スケジューリング情報テーブル中の各ギャンググループに対するプライオリティをも考慮してギャングスケジューリングを行うスケジューリング実行手段,ならびに前記スケジューリング実行手段によるギャングスケジューリングによって選択されたギャンググループに属するプロセス群にCPUを割り当てるディスパッチング手段として機能させるためのプログラム。A computer system having a gang scheduling function is used to determine whether or not a gang group having a gang group number set for a process in a parallel program already exists in the parallel program when the process is generated. A gang group creating means for creating a new gang group of the gang group number in the parallel program, and when the gang group is created by the gang group creating means, the gang group is created within a range of not more than the number of available CPUs in the computer system. The number-of-executing-CPUs setting means for setting the number of concurrently-executing CPUs for the gang group, which moves at each schedule interval, collects information necessary for gang scheduling for each gang group, and sets each information based on the collected information. The scheduling information for the gang group is written to the scheduling information table. At this time, the priority set for each process as one piece of information necessary for the gang scheduling is collected, and each gang is stored in the scheduling information table based on the collection. In consideration of scheduling information collecting means for setting a priority for a group, the number of available CPUs in the computer system, and scheduling information written to the scheduling information table by the scheduling information collecting means, gang scheduling in gang group units is performed. And selecting a gang group to be scheduled. At this time, each gang group in the scheduling information table is selected. Program for functioning as a dispatching means for assigning a CPU in consideration of the priority scheduling execution means performs gang scheduling, as well as to a process belonging to the gang group selected by the gang scheduling by said scheduling execution means for.
JP2003068757A 2003-03-13 2003-03-13 Group unit gang scheduling method Expired - Fee Related JP3885748B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003068757A JP3885748B2 (en) 2003-03-13 2003-03-13 Group unit gang scheduling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003068757A JP3885748B2 (en) 2003-03-13 2003-03-13 Group unit gang scheduling method

Publications (2)

Publication Number Publication Date
JP2004280293A true JP2004280293A (en) 2004-10-07
JP3885748B2 JP3885748B2 (en) 2007-02-28

Family

ID=33286000

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003068757A Expired - Fee Related JP3885748B2 (en) 2003-03-13 2003-03-13 Group unit gang scheduling method

Country Status (1)

Country Link
JP (1) JP3885748B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009075956A (en) * 2007-09-21 2009-04-09 Fujitsu Ltd Job management method, job management device and job management program
US7565011B2 (en) 2004-11-10 2009-07-21 Canon Kabushiki Kaisha Image processing apparatus including an image processing unit having a plurality of image processing sub-units each adapted to be capable of being changed in circuit configuration and method of controlling the image processing apparatus
US7657890B2 (en) 2003-06-27 2010-02-02 Kabushiki Kaisha Toshiba Scheduling system and method in which threads for performing a real-time operation are assigned to a plurality of processors

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6020731B2 (en) 2013-08-29 2016-11-02 三菱電機株式会社 Semiconductor module, semiconductor device, and automobile

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0277870A (en) * 1988-06-30 1990-03-16 Mitsubishi Electric Corp Parallel computer system
JP2000250876A (en) * 1999-02-26 2000-09-14 Nec Corp Method and device for gang scheduling
WO2002069174A1 (en) * 2001-02-28 2002-09-06 Fujitsu Limited Method for executing parallel process, and multi-processor computer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0277870A (en) * 1988-06-30 1990-03-16 Mitsubishi Electric Corp Parallel computer system
JP2000250876A (en) * 1999-02-26 2000-09-14 Nec Corp Method and device for gang scheduling
WO2002069174A1 (en) * 2001-02-28 2002-09-06 Fujitsu Limited Method for executing parallel process, and multi-processor computer

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7657890B2 (en) 2003-06-27 2010-02-02 Kabushiki Kaisha Toshiba Scheduling system and method in which threads for performing a real-time operation are assigned to a plurality of processors
US7565011B2 (en) 2004-11-10 2009-07-21 Canon Kabushiki Kaisha Image processing apparatus including an image processing unit having a plurality of image processing sub-units each adapted to be capable of being changed in circuit configuration and method of controlling the image processing apparatus
JP2009075956A (en) * 2007-09-21 2009-04-09 Fujitsu Ltd Job management method, job management device and job management program

Also Published As

Publication number Publication date
JP3885748B2 (en) 2007-02-28

Similar Documents

Publication Publication Date Title
JP4185103B2 (en) System and method for scheduling executable programs
CN107038069B (en) Dynamic label matching DLMS scheduling method under Hadoop platform
JP5438100B2 (en) Mass data processing method and system
US8185908B2 (en) Dynamic scheduling in a distributed environment
JP3890045B2 (en) Improved EDF scheduling method
US20160132355A1 (en) Process grouping for improved cache and memory affinity
EP2728473B1 (en) Systems and methods for instruction entity allocation and scheduling on multi-processors
US20190319895A1 (en) Resource Scheduling Method And Apparatus
US20140201753A1 (en) Scheduling mapreduce jobs in a cluster of dynamically available servers
US20030056091A1 (en) Method of scheduling in a reconfigurable hardware architecture with multiple hardware configurations
US20110119674A1 (en) Scheduling method, scheduling apparatus and multiprocessor system
WO2008019195B1 (en) Optimized multi-component co-allocation scheduling with advanced reservations for data transfers and distributed jobs
KR101356033B1 (en) Hybrid Main Memory System and Task Scheduling Method therefor
KR20110075297A (en) Apparatus and method for parallel processing in consideration of degree of parallelism
CN107515781B (en) Deterministic task scheduling and load balancing system based on multiple processors
Singh An algorithm to reduce the time complexity of earliest deadline first scheduling algorithm in real-time system
CN109857535B (en) Spark JDBC-oriented task priority control implementation method and device
CN108427602B (en) Distributed computing task cooperative scheduling method and device
JP2014191594A (en) Decentralized processing system
CN110084507B (en) Scientific workflow scheduling optimization method based on hierarchical perception in cloud computing environment
Goh et al. Design and performance evaluation of combined first-fit task allocation and migration strategies in mesh multiprocessor systems
JP2004280293A (en) Gang scheduling system at gang group unit
CN110175078B (en) Service processing method and device
CN109189581B (en) Job scheduling method and device
CN108574719B (en) Cloud host creation method and device

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050124

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050310

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060619

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060627

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060823

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: 20061031

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061113

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: 20091201

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101201

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111201

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121201

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121201

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131201

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees