JP2004192400A - Job scheduling method and system - Google Patents

Job scheduling method and system Download PDF

Info

Publication number
JP2004192400A
JP2004192400A JP2002360414A JP2002360414A JP2004192400A JP 2004192400 A JP2004192400 A JP 2004192400A JP 2002360414 A JP2002360414 A JP 2002360414A JP 2002360414 A JP2002360414 A JP 2002360414A JP 2004192400 A JP2004192400 A JP 2004192400A
Authority
JP
Japan
Prior art keywords
job
processor
processors
request
management process
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
JP2002360414A
Other languages
Japanese (ja)
Other versions
JP4063651B2 (en
Inventor
Haruyasu Ueda
晴康 上田
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 JP2002360414A priority Critical patent/JP4063651B2/en
Publication of JP2004192400A publication Critical patent/JP2004192400A/en
Application granted granted Critical
Publication of JP4063651B2 publication Critical patent/JP4063651B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To easily and efficiently operate a multiprocessor system by dynamically assigning processors again. <P>SOLUTION: A management process 2 issues a request for job cluster ID to a job cluster ID generator 11 and obtains a new job cluster ID. Next, the management process 2 informs a job scheduler 1 of the job cluster ID and requests the number of processors for use. The processor request may be permitted or not be permitted, and the management process 2 is informed of processors for assignment when it is permitted. The management process 2 receives a list of processors for assignment from the job scheduler 1, and an execution management device 6 assigns jobs to processors to make the processors execute jobs. As a means for execution management, the management process 2 may function as a parallel task execution program, or a program or hardware having a task distribution function may be provided. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、マルチプロセッサ装置において、ユーザが実行することを指示したジョブをスケージューリングする方法および装置に関し、特に、ユーザが指示した複数のジョブに強い関連性があり、それらをまとめてスケジューリングすることで、管理者がジョブの管理を容易に行えるようにしたジョブスケジューリング方法および装置に関するものである。
【0002】
【従来の技術】
従来から、例えば図6に示すようなジョブのスケジューリング方式が知られている(例えば非特許文献1,非特許文献2,非特許文献3参照)。
図6に記載のものは、ジョブとプロセッサの実行状況を管理するバッチジョブ管理システム101を設けてジョブスケジューリングを行うものであり、管理者102があらかじめ複数のキューを用意し、各キューが使用すべきプロセッサ数、一つのジョブに許可された実行時間等を設定し、バッチ処理システム101に指示を行う。
ユーザ103は、適当なキューを選んでジョブを投入する。
バッチ処理システム101は、キューに投入されたジョブと、マルチプロセッサ装置104のプロセッサの実行状況を管理している。すでに、プロセッサの割当が済んだ実行中のジョブに関しては、実行時間など管理者が設定した制限を監視しており、もしも制限を超過した場合は、ジョブの実行を強制終了する。
また、ジョブが制限以内に実行終了したかどうかを監視する。もしも、ジョブを実行していないプロセッサが見つかれば、それに未実行のジョブを割り当て、実行をさせる。もしも未実行のジョブが何も無ければ、次のジョブが来るまでプロセッサはアイドル状態とされる。
キューの設定が適切であれば、アイドル状態のプロセッサを少ないようにすることが出来る。
例えば、短時間で終るジョブのために数個のプロセスを割り当て、長時間かかるジョブのために残りの全てのプロセスを割り当てる等の設定を行うことが出来る。
非特許文献1には上記のようなジョブスケジューリング方式の機能の特徴が、非特許文献2にはその概要が、非特許文献3にはジョブスケジューラについて記載されている。
【0003】
また、キューの設定を自動的に設定する方法も提案されている。例えば特許文献1には、投入されたジョブの状況により、ジョブクラスとジョブ割り当て単位の対応を動的に設定し直すことを可能とし、システムの利用形態に則した適切なジョブスケジューリングによる資源の有効利用、システム性能に向上を図った「ジョブスケジューリング方式」が開示されている。
特許文献1に記載のものは、各キュー内のジョブ数や、累積ジョブ数等に応じてキューに割り当てるべきプロセッサを動的に変化させることが出来るようにしたものである。
【0004】
さらにキューでの設定だけでは不十分な場合として、ユーザ毎あるいは部署毎にジョブの優先度を決めて、優先度の等しいジョブはジョブ投入の順序にかかわらず、ジョブを実行したい場合がある。このような場合に設定を行うためのツールとして、スケジューラがある。
従来のスケジューラの例としては、非特許文献4,5に記載のもの(以下SunGrid/EEという)や、非特許文献6,7,8,9に記載のもの(以下mauiスケジューラという)がある。
【0005】
いずれのスケジューラでもさまざまな機能があるが、その中に、fair share(均等割り当て) 機能がある。この機能を用いることで、ユーザ毎、グループ毎などの基準で均等にジョブを選択し、実行させることが出来る。
上記SunGrid/EEについては、非特許文献4に概要が、非特許文献5にその詳細な説明がある。
これによると、SunGrid/EEは、ticketと呼ばれる仮想的な計算資源の使用権と管理者が設定したticketの分配方法を用いて、スケジューリングを行う。
ticketの分配方法は、部署毎、グループ毎、ユーザ毎等にticketを割り振る際に、どのような比率で割り振るかを決める。ticketは計算機の利用を希望する、すなわちジョブを投入している部署、グループ、ユーザのみに分配される。
例えば、部署Aと部署Bと部署Cが1: 3: 6の割合で割り振られ、各部署内では全てのユーザが均等に割り振られると設定されている場合に、部署AのユーザX、部署CのユーザY、ユーザZがジョブを投入すると、まずticket(総量はかりに700とする) がジョブを投入している部署Aと部署Cに割り振られる。この結果、部署Aは100、部署Bは600のticketを受け取る。ユーザXは部署Aのticketを全て割り振られ、ユーザY、Zは部署Bのticketを均等に割り振られるため、ユーザX,Y,Zはそれぞれ、100,300,300のticketを受け取る。ticketは更に各ユーザが投入したジョブに割り振られ、ジョブ当たりのticketの多いジョブから順に実行される。
このようにして、ユーザ毎、グループ毎等の基準で均等にジョブを選択し、実行することが出来る。
【0006】
また、前記Mauiスケジューラについては、非特許文献6に概要が、非特許文献7にユーザマニュアルが、非特許文献8,9には管理マニュアルがある(特に、非特許文献8の6.3章、FairShare(PP.67-73) 、非特許文献9の3.3章Scheduling Interation and Job Flow,PP.24-28 参照)。これによると、Mauiスケジューラは、過去の計算資源の利用量を計算し、その計算量がユーザ、グループ等に割り当てられるべき計算量よりも多ければ、キューに残っていてその後で実行すべきジョブ優先度を下げる。
SunGrid/EEがユーザ、グループ、部署等を階層的に構成してticketを分配するのと異なり、ユーザ、グループなどに関して、それぞれ独立に計算量を集計し、集計した計算量とユーザ、グループ等の使うべき計算量とを比較して優先度を決定する。
これにより、ユーザ単位、あるいはグループ単位などに関して単純に分配比率を決定できる場合に簡潔に管理を行うことが出来る。
【0007】
【特許文献1】
特開平9−101902号公報
【非特許文献1】
"Product Features", 〔2002/11/05検索〕、インターネット<URL: http://www.openpbs.com/features.html >
【非特許文献2】
"PBS Technical Overview"〔2002/11/05検索〕、インターネット<URL: http://www.openpbs.com/overview.html >
【非特許文献3】
"The Job Scheduler" 〔2002/11/05検索〕、インターネット<URL: http://www.openpbs.com/scheduler.html>
【非特許文献4】
"Sun[tm] ONE Grid Engine, Enterprise Edition",2002年,Sun Microsystems 社〔2002/9/30 検索] 、インターネット<URL: http://www.sun.com/software/gridware/sgeee53 >
【非特許文献5】
"Sun[tm] ONE Grid Engine, Enterprise Edition White Paper How Sun[tm]Grid Engine,Enterprise Edition 5.3 Works",2002年,Sun Microsystems 社〔2002/9/30 検索] 、インターネット<URL: http://www.sun.com/software/gridware/sgeee53/wp-sgeee/wp-sgeee.pdf >
【非特許文献6】
"Maui Overview",2002年,Supercluster Research and Development Group, 〔2002/11/05検索〕、インターネット<URL: http://www.supercluster.org/documentation/maui/mauioverview.html >
【非特許文献7】
"Maui Users Manual",2002年,Supercluster Research and Development Group, 〔2002/11/05検索〕、インターネット<URL: http://www.supercluster.org/documentation/maui/mauiusers.html>
【非特許文献8】
"6.3 FairShare(pp.67-73)"2002 年,Supercluster Research and DevelopmentGroup, 〔2002/11/05検索〕、インターネット<URL: http://www.supercluster.org/documentation/maui/mauiusers.html>
【非特許文献9】
"3.3 Scheduling Iterations and Job Flow(pp.24-28)"2002年,Supercluster Research and Development Group, 〔2002/11/05検索〕、インターネット<URL: http://www.supercluster.org/documentation/maui/mauiusers.html>
【0008】
【発明が解決しようとする課題】
しかしながら、従来のバッチジョブ管理システムでは、キューの設定は管理者の手作業で行うものであって、各キューに割り当てるべきプロセッサの数を、管理者があらかじめ予測するのは困難であった。また一度うまく設定できたとしても、ユーザのジョブ投入状況によって設定変更する必要がある。
キューに割り当てられるプロセッサの数が不適当であれば、他のキューにジョブがあるにもかかわらず、アイドル状態のプロセッサが生じ、非効率的な運用となる。
前記特許文献1に記載の「ジョブスケジューリング方式」では、各キュー内のジョブ数や、累積ジョブ数等に応じてキューに割り当てるべきプロセッサを動的に変化させることが出来るが、どのようなキューが必要か、またそこに課すべき実行時間などの制約はやはり管理者があらかじめ設定する必要がある。
【0009】
更に、従来のバッチジョブ管理システムでは、ジョブ投入時に必要となる計算量が判明していたため、必要となるプロセッサ数はバッチジョブ管理システムがあらかじめ計算して与えることが出来た。しかし、WWWサーバをこのようなマルチプロセッサシステム上で稼働させて運用する場合のように、外部からの要求により、必要な処理量が動的に変化する場合には、従来のバッチジョブ管理システムではこのような状況に対応することが出来ないという問題点もあった。
更に、単純なバッチジョブ管理システムでは、キュー内のジョブはどのユーザが投入したものであるか特に区別しなかったため、一人のユーザが極めて大量のジョブを投入することで、他のユーザのジョブがあるにもかかわらず、ほとんど全てのプロセッサを専有することが可能であった。
【0010】
スケジューラを設定することで、この問題には部分的に対処できる。前記Sun-Grid/EE では、ticketと呼ばれる計算資源の利用権をジョブ数で割ってジョブの優先度を決めるが、単純なバッチジョブ管理システムと逆に、ジョブ数が極端に多い場合には利用権が多いにもかかわらずジョブが処理されないと言う問題点があり、Mauiスケジューラと同様の過去の計算使用量に基づくticket割当を併用して、この問題を緩和するという複雑な運用を行う必要がある。
また、Mauiスケジューラでは、ユーザ毎、グループ毎の計算量を計算し、その他の優先度パラメータとともに重みつき総和を計算するため、非常に複雑な優先度管理が必要となり、管理が難しい。さらに、部署の内部でユーザに計算量を割り振るような優先度は記述できないと言う問題点を持っている。
【0011】
本発明は上記事情に鑑みなされたものであって、キューを用いず、動的にプロセッサを割当直すことにより、マルチプロセッサシステムを容易にかつ、効率的に運用できるようにすることを第1の目的とする。
また本発明はユーザが動的に利用したいプロセッサ数を変更したい場合に、管理者の設定した範囲内でプロセッサ数の割当を変更することを可能にすることを第2の目的とする。
また本発明はユーザがいかに多くのジョブを投入しても他のユーザのジョブの実行が阻害されず、かつ、管理者が容易にユーザ、グループ等の単位での利用率を設定できるようにすることを第3の目的とする。
【0012】
【課題を解決するための手段】
図1に本発明のシステムの基本構成を示す。同図に示すように、本発明においては、ジョブスケジューラ1の内部にジョブクラスタID生成器11とプロセッサ割当器12が設けられている。
ジョブクラスタID生成器11はID要求が来る度に新しいIDを生成し、返す。プロセッサ割当器12は、あらかじめ管理者3が決めた管理ポリシーと、あらかじめ指定された利用可能プロセッサに基づき、プロセッサ要求を出来るだけ満たすよう利用可能プロセッサを求める。なお、管理ポリシーや利用可能プロセッサは、状況に応じてジョブスケジューラ1を利用中も変更可能である。
図1において、ユーザ4は本発明のジョブスケジューリングを利用するにあたり、管理プロセス2を一つ作成する。
管理プロセス2は、まず、ジョブクラスタID生成器11にジョブクラスタID要求を出し、新しいジョブクラスタIDを得る。
ここで、ジョブクラスタIDとは、ユーザが指定したジョブ群またはサーバ群に対して生成されるIDであり、例えば、ユーザが強い関連性のあると考えるジョブ群についてIDをそれぞれ要求することにより、各ジョブ群にジョブクラスタIDが割り当てられる。なお、一人のユーザに対して複数のジョブクラスタIDを発行することもできるし、また、複数のユーザでジョブクラスタIDを共有することもできる。
【0013】
次に、管理プロセス2は、ジョブスケジューラ1に対して、ジョブクラスタIDを伝えて、利用したいプロセッサ数を要求する。可能な要求方法はプロセッサ割当器12が解決できる範囲でどのような形式でも良く、例えば、要求は具体的なプロセス数で行われる他、プロセッサを利用する際に支払っても良い金額とともに行ったり、単純に利用可能な範囲で出来るだけ多くとして行うことが出来る。
プロセッサ要求は、許可されるか、許可されないかであり、許可されれば何らかの時点で割り当てプロセッサが、管理プロセス2に通知される。割り当てプロセッサは状況に応じて何度も通知されることがある。割り当てプロセッサは状況によっては一つも無い場合があり得る。また、状況によっては、一度許可された要求が拒否されることがある。
管理プロセス2はジョブスケジューラ1から割り当てプロセッサのリストを受け取り、それを元にユーザがマルチプロセッサ装置5で実行したいプログラムの実行を行う。
【0014】
プログラムの実行を行わせる実行管理装置としては、以下のような様々な方式が考えられる。
(i) 図1に示すように、前記図6に示したバッチジョブ管理システムと同様の実行管理装置6を用いる。
実行管理装置として、前記図6に示したのと同様のバッチジョブ管理システムを用い、図1に示すように、利用可能ノード(プロセッサ)をジョブキュー61に割り当て、管理プロセス2はジョブをキューに投入するという方式が考えられる。
この場合、ジョブスケジューラ1のプロセッサ割り当て器12から随時送られて来るプロセッサ割り当て結果は、管理プロセス2が受け取ってから実行管理装置6に転送する他、直接実行管理装置が受け取るようにできる。
(ii)管理プロセスが並列タスク実行プログラムを兼ねる。
別の例としては、後述する図2に示すように、管理プロセス2が並列タスク実行プログラムを兼ねていて、割り当てられたプロセッサ上でタスク処理プログラムを起動し、タスクをそれらのタスク処理プログラムに振り分けて実行する事も考えられる。この場合、実行管理装置は仮想的な存在であり、管理プロセス2がその役割を兼ねていると考えられる。
(iii) タスクをそれらのタスク処理プログラムに振り分ける別のプログラムまたはハードウェアを設ける。
また、別の例としては、後述する図3に示すように、割り当てられたプロセッサ上でタスク処理プログラムを起動するが、タスクをそれらのタスク処理プログラムに振り分ける別のプログラムまたはハードウェア(以下タスク振り分け手段という)を設け、管理プロセス2は上記タスク振り分け手段に対して、振り分け先を通知するように実行することも考えられる。この場合、実行管理装置は仮想的な存在であり、管理プロセスがその役割を兼ねていると考えられる。
なお、この場合、上記タスク振り分け手段は、外からのタスク振り分け要求を受け付けることもできる。
【0015】
以上のように、本発明においては、管理プロセスからの要求に対して、ジョブクラスタIDを生成し、管理プロセスからジョブクラスタIDを指定して、利用したいプロセッサ数の要求があったとき、プロセッサ割当手段により、予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、上記ジョブクラスタIDを単位として利用可能プロセサ中からプロセッサを割り当てる。
また、上記プロセッサ割当手段は、ジョブクラスタID、プロセッサ数、割り当て希望時刻、専有時間数等を指定してプロセッサの要求があったとき、この要求に応じて、上記ジョブクラスタIDを単位として利用可能プロセサ中からプロセッサを割り当てることができる。また、複数回の割り当て要求に対して許可/不許可とすることもできる。
さらに、前記SUNGrid/EEのticket計算方式と同じ方法を用い、上記プロセッサ割当手段が、部署、グループ毎、ユーザ毎に均等にプロセッサを割り当てるように構成することもできる。
【0016】
この結果、管理者があらかじめキューを設定して各キューにプロセサを割り当てる必要が無くなる。また一切キューを用いないので、どのようなキューが必要かを管理者があらかじめ設定する必要もない。
従来キューの設定を行っていたのは、短時間のジョブと長時間のジョブが同じキューに並ぶと、平均待ち時間が長くなってしまう問題点を解決するためであった。本発明では、キューはそれぞれの管理プロセス(ジョブクラスタID) に対して存在するため、平均待ち時間が長くなってしまう問題点は元から存在しない。
そして、例えば、短時間ジョブ用のキューのためにプロセサを予約しておく必要が無いため、短時間のジョブが存在しないときには全てのプロセサを用いて容易にかつ効率良く運用することが出来る。
したがって、キューを用いず、動的にプロセッサを割当直すことにより、マルチプロセッサシステムを容易にかつ、効率的に運用することができ、前記第1の課題を達成することが出来る。
また、本発明では、複数回プロセサ要求を出すことが許可されうる。このため、WWWサーバのように外部からの要求により、必要な処理量が動的に増減するような場合においても、処理量が増えるにつれて、要求するプロセサ数を増やすことができる。プロセサ割当手段は、要求が来る度にプロセサの割当をし直し、より優先度の低い(あるいは、別の時刻に計算しても支障の無い) ジョブクラスタIDに割り当てられたプロセサを、処理量が増えたジョブクラスタIDに割り当て直すことができる。これにより、動的に処理量が変化する場合にも対処することが出来る
したがって、管理者の設定した範囲内でプロセッサ数の割当を変更することを可能にすることができ、前記第2の課題を達成することが出来る。
さらに、本発明では、管理者が管理ポリシーを記述することで、ユーザ毎あるいはグループ毎にまとめて、プロセサ数を均等に割り振るよう指示することが出来る。
また、前記SunGrid/EEのticketと同じ計算を行い、予め定められたticketの割り当てに応じて、部署、グループ、ユーザ、ジョブクラスタID等にプロセッサの割り当てを行うことで、グループからユーザへの再割り振り等、前記Mauiスケジューラで難しかった割り振り方法も容易に行える。
さらに、前記SunGrid/EEで問題となっていたジョブへのticketの割り振りの問題も無くなるため、ジョブ数が極端に多くても少なくても同じ数のプロセサを使うことが出来る。
このため大量のジョブの投入、あるいはジョブクラスタの作成を行っても、利用可能なプロセサ数は、他のユーザ/グループの利用可能なプロセサ数と均等あるいは管理者が指示した比率となるようにすることが出来る。
したがって、ユーザがいかに多くのジョブを投入しても他のユーザのジョブの実行が阻害されず、かつ、管理者が容易にユーザ、グループ等の単位での利用率を設定することができ、前記第3の課題を達成することが出来る。
【0017】
【発明の実施の形態】
図1は本発明の第1の実施例のシステムの構成を示す図であり、同図は前記図6に示したバッチジョブ管理システムと同様の実行管理装置6によりプログラムの実行を行う場合の構成を示している。
同図において、1はジョブスケジューラであり、管理プロセスからの要求に応じてジョブクラスタIDを生成するジョブクラスタID生成器11と、管理者3が設定する管理ポリシーに基づき、ジョブクラスタID単位でプロセッサを割り当てるプロセッサ割当器12が設けられている。また、ジョブスケジューラ1には、各ジョブクラスタIDに関しての情報を管理するプロセッサ割当DB13が設けられている。
2は管理プロセスであり、ジョブクラスタID生成器11に対してジョブクラスタID要求を行うとともに、ジョブスケジューラ1に対して、ジョブクラスタIDを伝えて、利用したいプロセッサ数を要求し、割り当てが許可されたとき、実行管理装置6に割り当て結果を転送する。また、管理プロセス2は、ジョブクラスタID等の環境変数JCIDを保存する領域を有する。
3は前記した管理ポリシーを定める管理者、4はユーザ、5は複数のプロセッサから構成されるマルチプロセッサ装置である。
6は従来のバッチジョブ管理システムと同様の実行管理装置であり、前記したように、ジョブキュー61に投入されたジョブと、マルチプロセッサ装置5のプロセッサの実行状況を管理しており、実行していないプロセッサに未実行のジョブを割り当て実行をさせる。
なお、前記ジョブスケジューラ1と上記実行管理装置6で本発明のジョブスケジューリング装置を構成する。
【0018】
図1に示したプロセッサ割当器12は以下のようにしてプロセッサの割り当てを行う。
プロセッサ割当器12は、プロセッサの割り当てが必要になる度に呼び出される。より具体的には、以下のような際に呼び出される。
・管理ポリシーが変更になった。
・利用可能プロセッサが増加/減少した。
・いずれかの管理プロセスからプロセッサ要求が起きた。あるいは要求内容が変更された。
・管理プロセスが無くなった。すなわち要求されるプロセッサが減少した。
割当を行う単位はジョブクラスタID単位とし、一つのジョブクラスタIDに一式のプロセッサを割り当てる。
割り当てが行われると、割り当て結果は各ジョブクラスタIDに通知する。通知の出力先は、ジョブクラスタIDを伝えて要求を行った管理プロセス2または、管理プロセス2が指定したプロセスやファイルである。
【0019】
プロセッサ割当器12は、管理者3が記述する管理ポリシーによって動作を変える。さまざまな管理ポリシーが考えられるが、具体的には例えば以下のようなポリシーが考えられる。
(i) あるジョブクラスタIDから、一定数のプロセッサを一定の時間専有する要求が来た場合それを許可するべきかどうか。
判断は例えば、ユーザ名、ユーザの属するグループ、ユーザの支払いアカウントなどに基づいて行われる。判断は、また、専有を希望するプロセッサ数や専有を希望する時間数にも基づいて行われる。
(ii)あるジョブクラスタIDから、一定数のプロセッサを一定の時刻から一定時間専有する要求が来た場合それを許可するべきかどうか。
判断は例えば、ユーザ名、ユーザの属するグループ、ユーザの支払いアカウントなどに基づいて行われる。判断は、また、専有を希望するプロセッサ数や専有を希望する時間数、専有を希望する時刻にも基づいて行われる。
(iii) あるジョブクラスタIDから、複数回プロセッサ要求を増減させて要求する場合、複数回のプロセッサ要求を許可すべきかどうか。
判断は例えば、ユーザ名、ユーザの属するグループ、ユーザの支払いアカウントなどに基づいて行われる。また、複数回の要求を行うことが許可されたとしても、それぞれの要求で判断は、また、各プロセッサ要求の際のプロセッサ数の上限や、変更頻度、要求回数にも基づいて行われる。
【0020】
(iv)あるジョブクラスタIDから、均等に出来るだけ多くのプロセッサを要求して来た場合、同じ要求を行うジョブクラスタIDにはそれぞれ同じ数のプロセッサを均等に割り当てるべきか、あるいは、より優先的に割り当てるべきか。
判断は例えば、ユーザ名、ユーザの属するグループ、ユーザの支払いアカウントなどに基づいて行われる。
また、均等に割り当てる際の単位をどうすべきか。例えば、全てのジョブクラスタを平等に扱うべきか、あるいは、一人のユーザが発行した複数のジョブクラスタ全体に割り当てられるプロセッサ数と他のユーザが発行した複数のジョブクラスタ全体に割り当てられるプロセッサ数が均等になるべきか、あるいは、各ユーザが属するグループ単位で均等になるべきかなど。
均等割り当ての場合、この割当単位と比率に基づいて前記SUNGrid/EEのticket計算方式と同じ方法でプロセッサの割当比率を計算し、残っているプロセッサ数を比例配分することができる。
例えば、部署、グループ、ユーザ、ジョブクラスタIDにticketを割り当て、均等割り当て要求があると、前記SUNGrid/EEと同様に、部署、グループ、ユーザ、ジョブクラスタIDに予め定められたticketの割り当てに応じてプロセッサを割り当てる。
(v) プロセッサ数が足りない場合どのジョブクラスタIDの要求を拒否すべきかどうか。
判断は例えば、ユーザ名、ユーザの属するグループ、ユーザの支払いアカウントなどに基づいて行われる。判断は、また、要求がどのように行われたか(プロセッサ数/時間指定の専有、プロセッサ数/時間/時刻指定の専有、複数回要求可能な要求、均等の要求) に基づいても行われる。
【0021】
これらの管理ポリシーが設定された状態で、プロセッサ割当器12は以下のようにプロセッサの割当を行う。
(i) 許可のない要求を除外する。もしもあるジョブクラスタIDをもつ管理プロセスから、複数回の要求が行われて、それが許可されなかった場合は、前回同じジョブクラスタIDで行われた要求内容を使う。
すなわち、複数回要求を認めていないジョブクラスタIDから要求があったときは、前回と同様に要求を認めない。
(ii)プロセッサ数/時間/時刻指定の要求を割り当てる。
(iii) プロセッサ数/時間指定の要求を割り当てる。
(iv)複数回の要求を行うことが出来るジョブクラスタIDの要求を割り当てる。
(v) 残ったプロセッサを均等に割り当てる。割当の単位は管理ポリシーの記述に従う。
(vi)もしもいずれかの時刻で、要求のあったプロセッサ数の合計が利用可能プロセッサ数よりも多い場合には、適当なジョブクラスタIDの許可を取り消す。いずれのジョブクラスタIDを取り消すべきかは管理ポリシーの記述に従う。
【0022】
図2は本発明の第2の実施例のシステムの構成を示す図であり、同図は前記した管理プロセス2が並列タスク実行プログラムを兼ねる場合を示しており、管理プロセス2に、並列タスク処理を行う並列タスク実行手段21が設けられている。この場合、前記したように実行管理装置は仮想的な存在である。
並列タスク実行手段21は、割り当てられたプロセッサ上でタスク処理プログラムを起動し、タスクをそれらのタスク処理プログラムに振り分けて実行させる。
その他の構成は、図1に示したものと同様であり、管理プロセス2は、ジョブクラスタID生成器11にジョブクラスタID要求を出し、新しいジョブクラスタIDを得る。次に、管理プロセス2は、ジョブスケジューラ1に対して、ジョブクラスタIDを伝えて、利用したいプロセッサ数を要求する。
プロセッサ要求が許可されると、管理プロセス2はジョブスケジューラ1から割り当てプロセッサのリストを受け取り、並列タスク実行手段21は、割り当てられたプロセッサ上でタスク処理プログラムを起動し、ユーザがマルチプロセッサ装置5で実行したいプログラムの実行を行う。
【0023】
図3は本発明の第3の実施例のシステムの構成を示す図であり、同図は、前記した、タスクを振り分ける別のプログラムまたはハードウェアを設ける場合を示しており、同図に示すようにタスク振り分け手段7が設けられている。この場合も、前記したように実行管理装置は仮想的な存在である。
タスク振り分け手段7は、管理プロセス2からタスク振り分け先が通知されると、割り当てられたプロセッサ上でタスク処理プログラムを起動する。また、タスク振り分け手段7は、外からの要求を受け付けることもできる。
その他の構成は、図1に示したものと同様であり、管理プロセス2は、ジョブクラスタID生成器11にジョブクラスタID要求を出し、新しいジョブクラスタIDを得る。次に、管理プロセス2は、ジョブスケジューラ1に対して、ジョブクラスタIDを伝えて、利用したいプロセッサ数を要求する。
プロセッサ要求が許可されると、管理プロセス2はジョブスケジューラ1から割り当てプロセッサのリストを受け取り、タスク振り分け手段7に通知する。タスク振り分け手段7は、割り当てられたプロセッサ上でタスク処理プログラムを起動する。
【0024】
以下、UNIX上で本実施例のジョブスケジューリングを行う場合について説明する。
(1)ジョブスケジューラ1と管理プロセス2との情報伝達手段
管理プロセス2からジョブスケジューラ1への情報伝達はジョブクラスタIDの獲得、プロセッサ要求およびジョブクラスタの終了である。また、ジョブスケジューラ1から管理プロセス2への情報伝達は、要求の拒否の通知、あるいは、プロセッサ割り当て結果である。後者は非同期的に通信が起きる。
そこで、以下のような3種のコマンドを用意する。
・jobclusterコマンド
% jobcluster 管理プロセスコマンド文字列
jobclusterコマンドはジョブクラスタIDをまず取得し、それを環境変数JCIDにいれた後、管理プロセスコマンド文字列に従って管理プロセスをexecシステムコールを用いて起動する。execシステムコールを用いるためjobclusterプロセスはそのまま管理プロセスになる。
【0025】
・ jcrequestコマンド
% jcrequest [-e通知コマンド| -f 通知ファイル| -s 通知プロセス]
リクエストファイル
jcrequest コマンドは環境変数JCIDを参照してジョブクラスタIDを入手する。そして、リクエストファイルにかかれたプロセッサ要求を解釈する。もしもプロセッサ要求が管理ポリシーに違反していて拒否された場合は、エラーメッセージを出力して、終了状態が0以外となる。
もしもポリシーに違反していなければ、オプションで指定された手段で結果が通知される。通知は割当プロセッサが変更される度に行われる。
もしも、-eオプションを指定していれば、その引数の通知コマンドの標準入力にプロセッサ名の一覧が入力される。
もしも、-fオプションを指定していれば、その引数の通知ファイルにプロセッサ名の一覧が書き出される。
もしも、-sオプションを指定していれば、標準出力にプロセッサ名の一覧と空行が書き出された後、引数の通知プロセスにSIGHUPシグナルが送られる。この場合、別のプロセスから後述のjcend コマンドを投入するまで、jcrequest コマンドは終了しない。
もしも何のオプションも指定していなければ、その要求に起因するプロセッサ割当の結果であるプロセッサ名の一覧のみを標準出力に書き出し、終了する。このコマンドでは以後の通知は行われない。
【0026】
・jcend コマンド
% jcend
jcend コマンドは環境変数JCIDを参照してジョブクラスタIDを入手する。そして、そのジョブクラスタIDへ割り当てられたプロセッサを全て開放し、他のジョブクラスタIDに割り当て直す。必要であれば、jcrequest コマンドを正常終了させる。
【0027】
(2)管理プロセスの起動
管理プロセス2は最初にジョブクラスタIDを取る必要がある。そこで、前述のjobclusterコマンドを用いてジョブクラスタIDを取ってから管理プロセス2を起動する。
管理プロセス2は、必要に応じてプロセッサ要求をjcrequest コマンドで要求する。そして、通知があるたびに割当プロセッサで適切な実行が行えるようにする。
もしも管理プロセスが正常終了する際にはjcend コマンドを実行する。管理プロセスは用途毎により詳細な作業内容が異なるので、それぞれ列挙する。
【0028】
(3)ジョブクラスタID生成
IDを作成するために排他制御を行う。IDはバッチキュー名として用いられるようにするため、アルファベット+数値のような形式を取る。IDは再利用せず、単調に数値を大きくしてIDを生成する。
【0029】
(3)プロセッサ割り当て
jcrequest コマンドは前記したように、管理ポリシーのチェックとプロセッサ割当を行う。
管理ポリシーのチェックでプロセッサ要求が拒否されなかった場合は、要求内容をプロセッサ割当DBに保存した後、以下に説明する、内部でプロセッサ割り当てを行うjcresched コマンドを呼び出す。保存を行う際に、DBを排他的に操作するためにロックを用いる。
jcresched コマンドは、プロセッサの割り当てが必要になる度に呼び出され、より具体的には、以下のような際に呼び出される。
(i) 管理ポリシーが変更になった。
(ii)利用可能プロセッサが増加/減少した。
(iii) いずれかの管理プロセスからプロセッサ要求が起きた。あるいは要求内容が変更された。
(iv)管理プロセスが無くなった。すなわち要求されるプロセッサが減少した。
【0030】
・jcresched コマンド
% jcresched
jcresched コマンドは前記プロセッサ割当DB13、管理ポリシー、利用可能プロセッサリスト(ファイル) を参照して、プロセッサ割当を行う。引数は無い。また、jcresched コマンドは、プロセッサ割当DB13を排他的に操作するためにロックを用いる。これにより同時に二つ以上のjcresched コマンドが実行されることを防ぐ。
プロセッサ割当DB13は、前記したようにジョブスケジューラ1に設けられ、少なくとも以下の4項目を含み、各ジョブクラスタIDに関しての情報を管理する。
・ジョブクラスタID
・プロセッサ要求
・以前の割当結果
・通知手段(複数あるかも知れない)
【0031】
そして、ジョブスケジューラ1のプロセッサプロセッサ割当器12は、前記したように、以下のようにプロセッサの割当を行う。
(i) プロセッサ数/時間/時刻指定の要求を割り当てる。
(ii)プロセッサ数/時間指定の要求を割り当てる。
(iii) 複数回の要求を行うことが出来るジョブクラスタIDの要求を割り当てる。
(iv)残ったプロセッサを均等に割り当てる。割当の単位はポリシーの記述に従う。
(v) もしもいずれかの時刻で、要求のあったプロセッサ数の合計が利用可能プロセッサ数よりも少ない場合には、適当なジョブクラスタIDの許可を取り消す。もしも、均等に割り当てるジョブクラスタIDの場合は、割り当てプロセッサにどのプロセッサも割り当てない。いずれのジョブクラスタIDを取り消すべきかは管理ポリシーの記述に従う。
そして、各ジョブクラスタIDに関する割り当て結果をそのジョブクラスタの通知手段に通知する。通知方法はjcrequest コマンドで説明した通りである。
【0032】
(4)ジョブを投入する管理プロセスの作業
従来のバッチジョブを投入する作業を本発明で利用する場合、この管理プロセスが必要となる。この管理プロセスは、図1に示した実行管理装置6と連係を行って作業をする。
図4に、ジョブを投入する際の処理の流れを示す。
まず、jobclusterコマンドによりジョブクラスタIDを取得し、それを環境変数JCIDにいれた後、管理プロセスコマンド文字列に従って管理プロセス2を起動し、ジョブクラスタIDと同名のキューを実行管理装置6上で作成する(図4の(1) )。ジョブクラスタIDは環境変数JCIDを用いる。
次に、jcrequest -eコマンドを用いて、キューに割り当てられたプロセッサを変更するコマンド“qresched $JCID”をジョブスケジューラ1に登録する。qreschedコマンドは引数のJCIDをキュー名として、標準入力を割り当てプロセッサとして解釈し、キューに割り当てるプロセッサを変更する。jcresched コマンドはプロセッサ割当DB、管理ポリシー、利用可能プロセッサリスト(ファイル) を参照して、プロセッサ割当を行う。(図4の(2) )。
その後で、通常のジョブの投入を行う(図4の(3) ) 。ジョブの投入に当たってキュー名としてジョブクラスタIDを用いる。これにより、実行管理装置6はキューを取り出して、実行ノード群にジョブを割り当て実行させる(図4の(4) )。
また、非同期にプロセッサ割り当てが変更される場合には、上記と同様に、jcrequest -eコマンドを用いて、キューに割り当てられたプロセッサを変更するコマンド“qresched $JCID”をジョブスケジューラ1に登録する。qreschedコマンドは引数のJCIDをキュー名として、標準入力を割り当てプロセッサとして解釈し、キューに割り当てるプロセッサを変更する。jcresched コマンドはプロセッサ割当を行う(図4の(5) )。その際、全てのJCIDにも割り当て結果が通知される。
そして、全ての投入したジョブが終了したかどうかを待ち合わせて、全て終了した後に、jcend コマンドを投入する(図4の(6))。また、キューを廃棄してユーザに終了を通知する。
キューの作成やキューに割り当てるプロセッサの変更は、図1の実行管理装置6と連係を行うことで実現でき、例えばPBS ではqmgrコマンドを呼び出すことで実現できる。また、ジョブの投入にはqsubコマンド、ジョブの監視にはqstat コマンドを用いて実現できる。
(5)動的にプロセッサ数を変更する管理プロセスの作業
WEBサーバや、検索サーバなど外部のクライアントからのタスクを処理するようなプログラムを実行する際には、以下のような管理プロセスが有用である。
図5に、動的にプロセッサ数を変更する場合の処理の流れを示す。
まず、サーバ管理者は、起動引数として管理コマンド名を通知して、jobclusterコマンドによりジョブクラスタIDを取得する(図5の(1) ) 。
次に、jcrequest -eコマンドを用いて、キューに割り当てられたプロセッサを変更するコマンド“resched $JCID ”をジョブスケジューラに登録する。resched コマンドは引数のJCIDをキュー名として、標準入力を割り当てプロセッサとして解釈し、サーバを起動するプロセッサを変更する。jcresched コマンドはプロセッサ割当を行う。(図5の(2) )。
そして、もしも既に動いているサーバのあるプロセッサがその割り当てプロセッサに含まれていなければ、そのサーバを終了させる。また、もしもまだサーバの動いていないプロセッサがその割り当てプロセッサに含まれていれば、そのプロセッサでサーバを起動させる(図5の(3) )。
その後で、タスクの振り分け(割り当て)を行う。タスクは、割り当てプロセッサのいずれかに割り振り、得られた結果はタスクを投入したクライアントに返すようにする(図5の(4) )。もしも別のタスク振り分け機構または振り分け装置を利用する場合は、resched コマンドは上記に述べたサーバの起動/終了の他に、振り分け先をその機構または装置に通知する作業を行う。
また、高負荷検出によるプロセッサ要求や、低負荷検出によるプロセッサの放棄がある場合には、前記したように、jcrequest -eコマンドを用いて、キューに割り当てられたプロセッサを変更するコマンド“resched $JCID ”をジョブスケジューラに登録し、サーバを起動するプロセッサを変更する(図5の(5) )。
そして、前記したようにサーバを起動させ、タスクの割り当てを行う(図5の(6) )。
また、このような管理プロセスは通常自分から終了することは無いので、ユーザが外部から管理プロセスの終了を指示した際のみ終了する。終了する際には、前記したように、jcend コマンドを実行する(図5の(7) )。
(6)実行日時を予約する管理プロセスの作業
前記図4に示したジョブを投入する管理プロセスと全く同じ管理プロセスで実施できる。
唯一の相違点は、jcrequest コマンドでの要求プロセッサの要求内容として時刻/専有時間/専有プロセッサ数を指定してプロセッサを要求する点だけである。
【0033】
(付記1) マルチプロセッサシステムにおけるジョブスケジューリング方法であって、
管理プロセスからの要求に対して、IDを生成し、
管理プロセスから上記IDを指定して利用したいプロセッサ数の要求があったとき、
予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、上記IDを単位としてプロセサを割り当てる
ことを特徴とするジョブスケジューリング方法。
(付記2) マルチプロセッサシステムにおけるジョブスケジューリング装置であって、
管理プロセスからの要求に対して、IDを生成するID生成手段と、
管理プロセスから上記IDを指定して利用したいプロセッサ数の要求があったとき、予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、上記IDを単位としてプロセサを割り当てるプロセッサ割当手段とを備えた
ことを特徴とするジョブスケジューリング装置。
(付記3) マルチプロセッサシステムにおけるジョブスケジューリング装置であって、
管理プロセスからの要求に対して、IDを生成するID生成手段と、
管理プロセスから上記IDを指定して利用したいプロセッサ数の要求があったとき、予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、上記IDを単位としてプロセサを割り当てるプロセッサ割当手段と、
管理プロセスから投入されたジョブの実行を管理する実行管理手段を備えた
ことを特徴するジョブスケジューリング装置。
(付記4) 上記実行管理手段は、管理プロセスからジョブが投入されたとき、マルチプロセッサシステムのプロセッサをジョブキューに割り当て、
管理プロセスは、上記キューにジョブを投入する
ことを特徴とする付記3のジョブスケジューリング装置。
(付記5) 上記実行管理手段は、管理プロセスからジョブが投入されたとき、割り当てられたプロセッサ上でタクス処理プログラムを起動し、タスクをそれらのタクス処理プログラムに振り分けて実行させる
ことを特徴とする付記3のジョブスケジューリング装置。
(付記6) タスクをタスク処理プログラムに振り分ける振り分け手段を備え、上記実行管理手段は、割り当てられたプロセッサ上でタクス処理プログラムを起動し、
上記管理プロセスは、上記振り分け手段に対して、振り分け先を通知する
ことを特徴とする付記3のジョブスケジューリング装置。
(付記7) 上記管理プロセスは、上記IDと、プロセッサ数と、割り当て希望時刻と、専有時間数を指定してプロセッサの割当手段に要求を出力し、
プロセッサ割当手段は、上記要求に応じて、予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、上記IDを単位としてプロセサを割り当てる
ことを特徴とする付記2,3,4,5または付記6のジョブスケジューリング装置。
(付記8) 上記管理プロセスは、ジョブクラスタIDと、プロセッサ数と、専有時間数を指定してプロセッサの割当手段に要求を出力し、
プロセッサ割当手段は、上記要求に応じて、予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、上記IDを単位としてプロセサを割り当てる
ことを特徴とする付記2,3,4,5または付記6のジョブスケジューリング装置。
(付記9) 上記プロセッサ割当手段は、複数回の割り当てを受け付けるかを許可または不許可とする手段を備えた
ことを特徴とする付記2,3,4,5,6,7または付記8のジョブスケジューリング装置。
(付記10) 上記プロセッサ割当手段は、部署毎、グループ毎、ユーザ毎に、均等にプロセッサを割当てる
ことを特徴とする付記2,3,4,5,6,7,8または付記9のジョブスケジューリング装置。
(付記11) マルチプロセッサシステムにおけるジョブスケジューリングプログラムであって、
上記プログラムは、管理プロセスからの要求に対して、ジョブクラスタIDを生成して、ジョブクラスタIDを割り当てる処理と、
管理プロセスからジョブクラスタIDを指定して利用したいプロセッサ数の要求があったとき、予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、ジョブクラスタを単位としてプロセサを割り当てる処理をコンピュータに実行させる
ことを特徴とするジョブスケジューリングプログラム。
【00034】
【発明の効果】
以上説明したように本発明によれば以下の効果を得ることができる。
(1)ジョブクラスタIDを単位として、プロセサ割当手段が利用可能プロセサ中からプロセサを割り当てるようにしているので、管理者があらかじめキューを設定して各キューにプロセサを割り当てる必要が無くなる。
そして、例えば、短時間ジョブ用のキューのためにプロセサを予約しておく必要が無いため、短時間のジョブが存在しないときには全てのプロセサを用いて効率良く運用することが出来る。
(2)複数回プロセサ要求を出すことが許可されうる。このため、WWWサーバのように外部からの要求により、必要な処理量が動的に増減するような場合においても、処理量が増えるにつれて、要求するプロセサ数を増やすことができる。プロセサ割り当て器は、要求が来る度にプロセサの割当をしなおし、より優先度の低い(あるいは、別の時刻に計算しても支障の無い) ジョブクラスタIDに割り当てられたプロセサを、処理量が増えたジョブクラスタIDに割り当て直すことができる。これにより、動的に処理量が変化する場合にも対処することが出来る。
(3)管理者が管理ポリシーを記述することで、ユーザ毎あるいはグループ毎にまとめて、プロセサ数を均等に割り振るよう指示することが出来る。
このため大量のジョブの投入、あるいはジョブクラスタの作成を行っても、利用可能なプロセサ数は、他のユーザの利用可能なプロセサ数と均等あるいは管理者が指示した比率となるようにすることが出来る。
【図面の簡単な説明】
【図1】本発明の第1の実施例のシステムの構成を示す図である。
【図2】本発明の第2の実施例のシステムの構成を示す図である。
【図3】本発明の第3の実施例のシステムの構成を示す図である。
【図4】本発明の実施例のジョブを投入する管理プロセスの動作を説明するシーケンス図である。
【図5】本発明の実施例の動的にプロセッサ数を変更する管理プロセスの動作を説明するシーケンス図である。
【図6】従来のバッチジョブ管理システムによるスケジューリングを説明する図である。
【符号の説明】
1 ジョブスケジューラ
11 ジョブクラスタID生成器
12 プロセッサ割当器
13 プロセッサ割当DB
2 管理プロセス
21 並列タスク実行手段
3 管理者
4 ユーザ
5 マルチプロセッサ装置
6 実行管理装置
7 タスク振り分け手段
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method and apparatus for scheduling a job instructed to be executed by a user in a multiprocessor device, and particularly relates to a plurality of jobs instructed by a user, and schedules them collectively. Thus, the present invention relates to a job scheduling method and apparatus that enable an administrator to easily manage jobs.
[0002]
[Prior art]
Conventionally, for example, a job scheduling method as shown in FIG. 6 is known (see, for example, Non-Patent Document 1, Non-Patent Document 2, and Non-Patent Document 3).
6 includes a batch job management system 101 that manages the execution status of jobs and processors, and performs job scheduling. An administrator 102 prepares a plurality of queues in advance and each queue uses them. The number of processors to be processed, the execution time allowed for one job, and the like are set, and an instruction is given to the batch processing system 101.
The user 103 selects an appropriate queue and submits a job.
The batch processing system 101 manages jobs submitted to the queue and the execution status of the processors of the multiprocessor device 104. For a running job that has already been assigned a processor, the limit set by the administrator, such as the execution time, is monitored. If the limit is exceeded, the execution of the job is forcibly terminated.
It also monitors whether the job has finished executing within the limit. If a processor that does not execute a job is found, an unexecuted job is assigned to it and executed. If there are no unexecuted jobs, the processor is idle until the next job comes.
If the queue settings are appropriate, the number of idle processors can be reduced.
For example, it is possible to perform settings such as assigning several processes for a job that ends in a short time and assigning all the remaining processes for a job that takes a long time.
Non-Patent Document 1 describes the features of the function of the job scheduling method as described above, Non-Patent Document 2 describes its outline, and Non-Patent Document 3 describes a job scheduler.
[0003]
A method for automatically setting the queue setting has also been proposed. For example, in Patent Document 1, it is possible to dynamically reset the correspondence between a job class and a job allocation unit according to the status of a job that has been submitted, and the resource can be effectively managed by appropriate job scheduling according to the system usage form. A “job scheduling method” that improves use and system performance is disclosed.
The device described in Japanese Patent Laid-Open No. 2004-228561 can dynamically change the processor to be assigned to the queue according to the number of jobs in each queue, the number of accumulated jobs, and the like.
[0004]
Furthermore, as a case where setting only in the queue is not sufficient, there is a case where the priority of a job is determined for each user or each department, and jobs with equal priority are desired to be executed regardless of the order of job submission. There is a scheduler as a tool for setting in such a case.
Examples of conventional schedulers include those described in Non-Patent Documents 4 and 5 (hereinafter referred to as SunGrid / EE) and those described in Non-Patent Documents 6, 7, 8, and 9 (hereinafter referred to as maui scheduler).
[0005]
Each scheduler has various functions, including a fair share function. By using this function, jobs can be selected and executed equally on the basis of each user, each group, or the like.
The SunGrid / EE is outlined in Non-Patent Document 4 and detailed in Non-Patent Document 5.
According to this, SunGrid / EE performs scheduling using a virtual computing resource usage right called ticket and a ticket distribution method set by an administrator.
The ticket distribution method determines the ratio of ticket allocation for each department, group, user, etc. The ticket is distributed only to the department, group, and user who wants to use the computer, that is, the job is submitted.
For example, if department A, department B, and department C are assigned at a ratio of 1: 3: 6, and all users are assigned equally within each department, then user X of department A, department C When user Y and user Z submit a job, a ticket (total amount is set to 700) is first allocated to department A and department C that submit the job. As a result, department A receives 100 tickets and department B receives 600 tickets. User X is assigned all tickets for department A, and users Y and Z are assigned tickets for department B evenly, so that users X, Y, and Z receive tickets for 100, 300, and 300, respectively. Tickets are further allocated to jobs submitted by each user, and are executed in order from jobs with more tickets per job.
In this way, jobs can be selected and executed equally on the basis of each user, each group, or the like.
[0006]
As for the Maui scheduler, there is a summary in Non-Patent Document 6, a user manual in Non-Patent Document 7, and a management manual in Non-Patent Documents 8 and 9 (particularly, Chapter 6.3 in Non-Patent Document 8). (See FairShare (PP.67-73), Non-Patent Document 9, Chapter 3.3 Scheduling Interation and Job Flow, PP.24-28). According to this, the Maui scheduler calculates the usage amount of the past calculation resources, and if the calculation amount is larger than the calculation amount that should be allocated to the user, group, etc., the job priority that remains in the queue and should be executed later Decrease the degree.
Unlike SunGrid / EE, which distributes tickets by hierarchically configuring users, groups, departments, etc., the calculation amount for each user, group, etc. is aggregated independently. The priority is determined by comparing the amount of calculation to be used.
Thereby, management can be performed succinctly when the distribution ratio can be simply determined in terms of user units or group units.
[0007]
[Patent Document 1]
JP-A-9-101902
[Non-Patent Document 1]
"Product Features", [Search 2002/11/05], Internet <URL: http://www.openpbs.com/features.html>
[Non-Patent Document 2]
"PBS Technical Overview" (searched 05/11/2002), Internet <URL: http://www.openpbs.com/overview.html>
[Non-Patent Document 3]
"The Job Scheduler" [searched 05/11/2002], Internet <URL: http://www.openpbs.com/scheduler.html>
[Non-Patent Document 4]
"Sun [tm] ONE Grid Engine, Enterprise Edition", 2002, Sun Microsystems [searched on September 30, 2002], Internet <URL: http://www.sun.com/software/gridware/sgeee53>
[Non-Patent Document 5]
"Sun [tm] ONE Grid Engine, Enterprise Edition White Paper How Sun [tm] Grid Engine, Enterprise Edition 5.3 Works", 2002, Sun Microsystems [Search 2002/9/30], Internet <URL: http: // www.sun.com/software/gridware/sgeee53/wp-sgeee/wp-sgeee.pdf>
[Non-Patent Document 6]
"Maui Overview", 2002, Supercluster Research and Development Group, [Search 11/05/2002], Internet <URL: http://www.supercluster.org/documentation/maui/mauioverview.html>
[Non-Patent Document 7]
"Maui Users Manual", 2002, Supercluster Research and Development Group, [Search 11/05/2002], Internet <URL: http://www.supercluster.org/documentation/maui/mauiusers.html>
[Non-Patent Document 8]
"6.3 FairShare (pp.67-73)" 2002, Supercluster Research and Development Group, [Search 2002/11/05], Internet <URL: http://www.supercluster.org/documentation/maui/mauiusers.html>
[Non-patent document 9]
"3.3 Scheduling Iterations and Job Flow (pp.24-28)" 2002, Supercluster Research and Development Group, [Search 2002/11/05], Internet <URL: http://www.supercluster.org/documentation/maui /mauiusers.html>
[0008]
[Problems to be solved by the invention]
However, in the conventional batch job management system, the queue is set manually by the administrator, and it is difficult for the administrator to predict in advance the number of processors to be assigned to each queue. Even if it can be set once, it is necessary to change the setting according to the job submission status of the user.
If the number of processors allocated to the queue is inappropriate, an idle processor is generated even though there are jobs in other queues, resulting in inefficient operation.
In the “job scheduling method” described in Patent Document 1, the processor to be assigned to a queue can be dynamically changed according to the number of jobs in each queue, the cumulative number of jobs, and the like. It is also necessary for the administrator to set in advance restrictions such as necessity and execution time to be imposed thereon.
[0009]
Further, in the conventional batch job management system, since the calculation amount required at the time of job submission has been found, the required number of processors can be calculated and given in advance by the batch job management system. However, when the required amount of processing changes dynamically due to an external request, such as when a WWW server is operated on such a multiprocessor system, the conventional batch job management system uses There was also a problem that it was impossible to cope with such a situation.
Furthermore, in a simple batch job management system, it was not particularly distinguished which user submitted the jobs in the queue, so if one user submitted a very large number of jobs, the jobs of other users could be Despite being, it was possible to occupy almost all processors.
[0010]
This problem can be partially addressed by setting a scheduler. In Sun-Grid / EE, the priority of a job is determined by dividing the right to use a computational resource called ticket by the number of jobs. In contrast to a simple batch job management system, it is used when the number of jobs is extremely large. There is a problem that jobs are not processed even though there are many rights, and it is necessary to perform complicated operation to alleviate this problem by using ticket allocation based on past calculation usage similar to Maui scheduler is there.
In addition, since the Maui scheduler calculates the calculation amount for each user and each group and calculates the weighted sum together with other priority parameters, very complicated priority management is required, and management is difficult. Furthermore, there is a problem that it is not possible to describe a priority that allocates a calculation amount to a user within a department.
[0011]
The present invention has been made in view of the above circumstances. The first object of the present invention is to enable easy and efficient operation of a multiprocessor system by dynamically reassigning processors without using a queue. Objective.
A second object of the present invention is to make it possible to change the allocation of the number of processors within a range set by an administrator when the user wants to dynamically change the number of processors to be used.
In addition, the present invention does not hinder the execution of other users' jobs regardless of how many jobs are submitted by the user, and allows the administrator to easily set the usage rate in units of users, groups, etc. This is the third purpose.
[0012]
[Means for Solving the Problems]
FIG. 1 shows the basic configuration of the system of the present invention. As shown in the figure, in the present invention, a job cluster ID generator 11 and a processor allocator 12 are provided in the job scheduler 1.
The job cluster ID generator 11 generates and returns a new ID every time an ID request is received. The processor allocator 12 obtains an available processor so as to satisfy the processor request as much as possible based on the management policy determined in advance by the administrator 3 and the available processor designated in advance. Note that the management policy and available processors can be changed according to the situation even while the job scheduler 1 is being used.
In FIG. 1, a user 4 creates one management process 2 when using the job scheduling of the present invention.
The management process 2 first issues a job cluster ID request to the job cluster ID generator 11 to obtain a new job cluster ID.
Here, the job cluster ID is an ID generated for a job group or server group designated by the user. For example, by requesting an ID for each job group that the user considers to be strongly related, A job cluster ID is assigned to each job group. A plurality of job cluster IDs can be issued to a single user, and a job cluster ID can be shared by a plurality of users.
[0013]
Next, the management process 2 transmits the job cluster ID to the job scheduler 1 and requests the number of processors to be used. The possible request method may be in any form as long as the processor allocator 12 can solve. For example, the request may be made with a specific number of processes, and may be performed with an amount that may be paid when using the processor. It can be done as much as possible, simply within the available range.
The processor request is permitted or not permitted. If permitted, the allocation processor is notified to the management process 2 at some point. The allocation processor may be notified several times depending on the situation. There may be no allocation processor in some situations. Also, depending on the situation, a request that has been granted once may be rejected.
The management process 2 receives a list of assigned processors from the job scheduler 1 and executes a program that the user wants to execute on the multiprocessor device 5 based on the list.
[0014]
The following various methods are conceivable as an execution management apparatus for executing a program.
(i) As shown in FIG. 1, an execution management device 6 similar to the batch job management system shown in FIG. 6 is used.
As the execution management apparatus, a batch job management system similar to that shown in FIG. 6 is used. As shown in FIG. 1, an available node (processor) is assigned to the job queue 61, and the management process 2 queues the job. The method of throwing in can be considered.
In this case, the processor allocation result sent from the processor allocator 12 of the job scheduler 1 at any time can be directly received by the execution management apparatus in addition to being transferred to the execution management apparatus 6 after being received by the management process 2.
(ii) The management process also serves as a parallel task execution program.
As another example, as shown in FIG. 2 to be described later, the management process 2 also serves as a parallel task execution program, starts a task processing program on an assigned processor, and distributes the tasks to those task processing programs. It is also possible to execute it. In this case, it is considered that the execution management apparatus is a virtual existence, and the management process 2 also serves as its role.
(iii) Provide another program or hardware that distributes tasks to those task processing programs.
As another example, as shown in FIG. 3 to be described later, a task processing program is started on an assigned processor, but another program or hardware (hereinafter referred to as task allocation) that allocates tasks to those task processing programs. It is also conceivable that the management process 2 is executed to notify the task distribution means of the distribution destination. In this case, it is considered that the execution management apparatus is a virtual existence, and the management process also serves as its role.
In this case, the task distribution means can also accept an external task distribution request.
[0015]
As described above, in the present invention, a job cluster ID is generated in response to a request from the management process, a job cluster ID is designated from the management process, and when there is a request for the number of processors to be used, processor allocation The means allocates a processor from the available processors in units of the job cluster ID based on a predetermined management policy and an available processor designated in advance.
In addition, the processor allocation means can use the job cluster ID as a unit in response to a request from a processor by specifying a job cluster ID, the number of processors, a desired allocation time, the number of exclusive hours, etc. Processors can be assigned from within the processor. It is also possible to permit / deny a plurality of allocation requests.
Further, the same method as the SUNGrid / EE ticket calculation method may be used, and the processor allocation unit may be configured to allocate processors equally for each department, group, and user.
[0016]
As a result, there is no need for the administrator to set queues in advance and assign processors to each queue. In addition, since no queue is used, the administrator does not need to set in advance what kind of queue is necessary.
Conventionally, the queue is set in order to solve the problem that the average waiting time becomes long when a short-time job and a long-time job are arranged in the same queue. In the present invention, since a queue exists for each management process (job cluster ID), there is no problem that the average waiting time becomes long.
For example, it is not necessary to reserve a processor for a queue for a short time job, so that when there is no short time job, it can be easily and efficiently operated using all the processors.
Therefore, by dynamically reallocating processors without using a queue, the multiprocessor system can be operated easily and efficiently, and the first problem can be achieved.
In the present invention, it may be permitted to issue a processor request a plurality of times. For this reason, even when the required processing amount is dynamically increased or decreased by a request from the outside like a WWW server, the number of processors to be requested can be increased as the processing amount increases. The processor allocation means reallocates the processor every time a request is received, and the processing amount of the processor allocated to the job cluster ID having a lower priority (or no problem even if calculated at another time) is processed. It can be reassigned to the increased job cluster ID. As a result, it is possible to cope with the case where the processing amount dynamically changes.
Therefore, the assignment of the number of processors can be changed within the range set by the administrator, and the second problem can be achieved.
Furthermore, in the present invention, the administrator can instruct to allocate the number of processors evenly for each user or group by describing the management policy.
In addition, the same calculation as that of the SunGrid / EE ticket is performed, and a processor is assigned to a department, a group, a user, a job cluster ID, etc. according to a predetermined ticket assignment. Allocation methods that were difficult with the Maui scheduler, such as allocation, can be easily performed.
Furthermore, the problem of ticket allocation to jobs that has been a problem in the SunGrid / EE is eliminated, so the same number of processors can be used regardless of whether the number of jobs is extremely large or small.
Therefore, even if a large number of jobs are input or a job cluster is created, the number of processors that can be used should be equal to the number of processors that can be used by other users / groups, or the ratio specified by the administrator. I can do it.
Therefore, no matter how many jobs a user submits, the execution of other users' jobs is not hindered, and the administrator can easily set the usage rate in units of users, groups, etc. The third problem can be achieved.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a diagram showing the configuration of a system according to a first embodiment of the present invention, and FIG. 1 shows a configuration when a program is executed by an execution management apparatus 6 similar to the batch job management system shown in FIG. Is shown.
In the figure, reference numeral 1 denotes a job scheduler, a job cluster ID generator 11 that generates a job cluster ID in response to a request from a management process, and a processor for each job cluster ID based on a management policy set by the administrator 3. Is provided. Further, the job scheduler 1 is provided with a processor allocation DB 13 that manages information regarding each job cluster ID.
Reference numeral 2 denotes a management process, which makes a job cluster ID request to the job cluster ID generator 11, transmits a job cluster ID to the job scheduler 1, requests the number of processors to be used, and is allowed to be assigned. The assignment result is transferred to the execution management device 6. The management process 2 has an area for storing an environment variable JCID such as a job cluster ID.
Reference numeral 3 denotes an administrator who determines the management policy described above, 4 denotes a user, and 5 denotes a multiprocessor device including a plurality of processors.
Reference numeral 6 denotes an execution management apparatus similar to the conventional batch job management system, and as described above, manages and executes the jobs input to the job queue 61 and the execution status of the processors of the multiprocessor apparatus 5. Assign an unexecuted job to a non-processor and execute it.
The job scheduler 1 and the execution management device 6 constitute a job scheduling device of the present invention.
[0018]
The processor allocator 12 shown in FIG. 1 performs processor allocation as follows.
The processor allocator 12 is called whenever processor allocation is required. More specifically, it is called when:
-The management policy has been changed.
・ Available processors increased / decreased.
-A processor request has occurred from one of the management processes. Or the request was changed.
-There is no management process. That is, the required processor has decreased.
The unit for assignment is a job cluster ID unit, and a set of processors is assigned to one job cluster ID.
When assignment is performed, the assignment result is notified to each job cluster ID. The output destination of the notification is the management process 2 that transmitted the job cluster ID and made the request, or the process or file designated by the management process 2.
[0019]
The processor allocator 12 changes the operation according to the management policy described by the administrator 3. Various management policies can be considered. Specifically, for example, the following policies can be considered.
(i) Whether a request that occupies a certain number of processors for a certain time from a certain job cluster ID should be permitted.
The determination is made based on, for example, the user name, the group to which the user belongs, the user's payment account, and the like. The determination is also made on the basis of the number of processors desiring exclusive use and the number of hours desiring exclusive use.
(ii) Whether a request to occupy a certain number of processors from a certain job cluster ID for a certain time from a certain time should be permitted.
The determination is made based on, for example, the user name, the group to which the user belongs, the user's payment account, and the like. The determination is also made based on the number of processors that are desired to be occupied, the number of hours that are desired to be owned, and the time that is desired.
(iii) Whether or not a plurality of processor requests should be permitted when a request is made by increasing / decreasing a plurality of processor requests from a certain job cluster ID.
The determination is made based on, for example, the user name, the group to which the user belongs, the user's payment account, and the like. Even if it is permitted to make a plurality of requests, the determination for each request is also made based on the upper limit of the number of processors at the time of each processor request, the change frequency, and the number of requests.
[0020]
(iv) When requesting as many processors as possible from a certain job cluster ID, the same number of processors should be allocated equally to the job cluster IDs that make the same request, or more preferentially Should be assigned to?
The determination is made based on, for example, the user name, the group to which the user belongs, the user's payment account, and the like.
Also, what should be done with the unit for even allocation? For example, all job clusters should be treated equally, or the number of processors assigned to all job clusters issued by one user and the number of processors assigned to all job clusters issued by other users are equal. Should it be equal, or should be equal for each group to which each user belongs?
In the case of equal allocation, the processor allocation ratio can be calculated based on the allocation unit and ratio in the same manner as the SUNGrid / EE ticket calculation method, and the remaining number of processors can be proportionally distributed.
For example, if tickets are assigned to departments, groups, users, and job cluster IDs, and there is an equal allocation request, according to ticket assignments predetermined for departments, groups, users, and job cluster IDs, as in SUNGrid / EE Assign processors.
(v) Which job cluster ID request should be rejected when the number of processors is insufficient.
The determination is made based on, for example, the user name, the group to which the user belongs, the user's payment account, and the like. The determination is also made based on how the request was made (dedicated processor number / time designation, exclusive number of processors / time / time designation, request that can be requested multiple times, equal request).
[0021]
With these management policies set, the processor assigner 12 assigns processors as follows.
(i) Exclude unauthorized requests. If a request is made a plurality of times from a management process having a certain job cluster ID and the request is not permitted, the request contents made last time with the same job cluster ID are used.
In other words, when there is a request from a job cluster ID that does not permit the request multiple times, the request is not permitted as in the previous case.
(ii) Allocate a request for specifying the number of processors / time / time.
(iii) Allocate requests for number of processors / time.
(iv) Allocate a job cluster ID request that can be requested multiple times.
(v) Allocate the remaining processors equally. The unit of allocation follows the description of the management policy.
(vi) If the total number of requested processors is greater than the number of available processors at any time, the permission of an appropriate job cluster ID is cancelled. Which job cluster ID should be canceled depends on the description of the management policy.
[0022]
FIG. 2 is a diagram showing the configuration of a system according to the second embodiment of the present invention. FIG. 2 shows a case where the management process 2 described above also serves as a parallel task execution program. Parallel task execution means 21 for performing the above is provided. In this case, as described above, the execution management apparatus is a virtual existence.
The parallel task execution means 21 starts a task processing program on the assigned processor, distributes the tasks to those task processing programs, and executes them.
Other configurations are the same as those shown in FIG. 1, and the management process 2 issues a job cluster ID request to the job cluster ID generator 11 to obtain a new job cluster ID. Next, the management process 2 transmits the job cluster ID to the job scheduler 1 and requests the number of processors to be used.
When the processor request is permitted, the management process 2 receives the list of assigned processors from the job scheduler 1, and the parallel task execution means 21 starts a task processing program on the assigned processor, and the user uses the multiprocessor device 5. Run the program you want to run.
[0023]
FIG. 3 is a diagram showing the configuration of a system according to the third embodiment of the present invention. FIG. 3 shows a case where another program or hardware for distributing tasks is provided, as shown in FIG. Are provided with task distribution means 7. Also in this case, as described above, the execution management apparatus is a virtual existence.
When the task distribution unit 7 is notified of the task distribution destination from the management process 2, the task distribution unit 7 starts a task processing program on the allocated processor. Further, the task distribution means 7 can also accept requests from outside.
Other configurations are the same as those shown in FIG. 1, and the management process 2 issues a job cluster ID request to the job cluster ID generator 11 to obtain a new job cluster ID. Next, the management process 2 transmits the job cluster ID to the job scheduler 1 and requests the number of processors to be used.
When the processor request is permitted, the management process 2 receives a list of assigned processors from the job scheduler 1 and notifies the task distribution means 7 of it. The task distribution means 7 starts a task processing program on the assigned processor.
[0024]
Hereinafter, a case where job scheduling of this embodiment is performed on UNIX will be described.
(1) Information transmission means between job scheduler 1 and management process 2
Information transmission from the management process 2 to the job scheduler 1 is acquisition of a job cluster ID, processor request, and end of the job cluster. Information transmission from the job scheduler 1 to the management process 2 is a request rejection notification or a processor allocation result. The latter communicates asynchronously.
Therefore, the following three types of commands are prepared.
-Jobcluster command
% jobcluster management process command string
The jobcluster command first acquires the job cluster ID, puts it in the environment variable JCID, and then starts the management process using the exec system call according to the management process command character string. Since the exec system call is used, the jobcluster process becomes a management process as it is.
[0025]
-Jcrequest command
% jcrequest [-e notification command | -f notification file | -s notification process]
Request file
The jcrequest command refers to the environment variable JCID to obtain the job cluster ID. Then, the processor request written in the request file is interpreted. If the processor request is rejected because it violates the management policy, an error message is output and the end status is other than zero.
If the policy is not violated, the result is notified by means of an option. Notification is made each time the allocation processor is changed.
If the -e option is specified, a list of processor names is input to the standard input of the notification command for that argument.
If the -f option is specified, a list of processor names is written to the argument notification file.
If the -s option is specified, a list of processor names and blank lines are written to the standard output, and then a SIGHUP signal is sent to the argument notification process. In this case, the jcrequest command does not end until a jcend command described later is input from another process.
If no option is specified, only a list of processor names as a result of processor allocation resulting from the request is written to the standard output, and the process is terminated. No further notification is performed with this command.
[0026]
Jcend command
% jcend
The jcend command refers to the environment variable JCID to obtain the job cluster ID. Then, all processors assigned to the job cluster ID are released and reassigned to other job cluster IDs. If necessary, terminate the jcrequest command normally.
[0027]
(2) Starting the management process
The management process 2 must first obtain a job cluster ID. Therefore, the management process 2 is started after obtaining the job cluster ID using the above-described jobcluster command.
The management process 2 requests a processor request with a jcrequest command as necessary. Then, every time there is a notification, the allocation processor can perform appropriate execution.
If the management process ends normally, execute the jcend command. Since the detailed work contents differ depending on the use, the management processes are listed.
[0028]
(3) Job cluster ID generation
Exclusive control is performed to create an ID. In order to be used as a batch queue name, the ID takes the form of alphabet + numerical value. The ID is not reused, and the ID is generated by monotonically increasing the numerical value.
[0029]
(3) Processor allocation
As described above, the jcrequest command performs management policy check and processor assignment.
If the processor request is not rejected by the management policy check, the request content is stored in the processor allocation DB, and then a jcresched command for performing processor allocation internally, which will be described below, is called. When saving, a lock is used to exclusively operate the DB.
The jcresched command is called every time processor allocation is required. More specifically, it is called at the following times.
(i) The management policy has been changed.
(ii) Available processors increased / decreased.
(iii) A processor request originated from one of the management processes. Or the request was changed.
(iv) There is no management process. That is, the required processor has decreased.
[0030]
Jcresched command
% jcresched
The jcresched command performs processor allocation with reference to the processor allocation DB 13, management policy, and available processor list (file). There are no arguments. The jcresched command uses a lock to exclusively operate the processor allocation DB 13. This prevents two or more jcresched commands from being executed at the same time.
As described above, the processor allocation DB 13 is provided in the job scheduler 1 and includes at least the following four items, and manages information regarding each job cluster ID.
-Job cluster ID
Processor request
-Previous assignment result
-Notification means (may be more than one)
[0031]
Then, as described above, the processor processor assigner 12 of the job scheduler 1 assigns processors as follows.
(i) Allocate a request for specifying the number of processors / time / time.
(ii) Allocate a request for specifying the number of processors / time.
(iii) Allocate a job cluster ID request that can be requested multiple times.
(iv) Allocate the remaining processors evenly. The allocation unit follows the policy description.
(v) If the total number of requested processors is smaller than the number of available processors at any time, the permission of an appropriate job cluster ID is cancelled. If the job cluster ID is assigned evenly, no processor is assigned to the assigned processor. Which job cluster ID should be canceled depends on the description of the management policy.
Then, the assignment result regarding each job cluster ID is notified to the notification means of the job cluster. The notification method is as described for the jcrequest command.
[0032]
(4) Work of the management process that submits jobs
This management process is required when the conventional batch job input operation is used in the present invention. This management process works in cooperation with the execution management apparatus 6 shown in FIG.
FIG. 4 shows the flow of processing when a job is submitted.
First, the job cluster ID is acquired by the jobcluster command, put in the environment variable JCID, then the management process 2 is started according to the management process command character string, and a queue having the same name as the job cluster ID is created on the execution management device 6 ((1) in FIG. 4). The environment variable JCID is used as the job cluster ID.
Next, a command “qresched $ JCID” for changing the processor assigned to the queue is registered in the job scheduler 1 using the jcrequest -e command. The qresched command interprets the standard input as an assigned processor using the argument JCID as the queue name, and changes the processor assigned to the queue. The jcresched command allocates processors by referring to the processor allocation DB, management policy, and available processor list (file). ((2) in FIG. 4).
Thereafter, a normal job is submitted ((3) in FIG. 4). A job cluster ID is used as a queue name when a job is submitted. As a result, the execution management apparatus 6 takes out the queue, assigns the job to the execution node group, and executes it ((4) in FIG. 4).
When the processor assignment is changed asynchronously, a command “qresched $ JCID” for changing the processor assigned to the queue is registered in the job scheduler 1 using the jcrequest -e command as described above. The qresched command changes the processor assigned to the queue by interpreting the standard input as the assigned processor, using the argument JCID as the queue name. The jcresched command assigns processors ((5) in Fig. 4). At that time, the allocation result is also notified to all the JCIDs.
Then, it waits whether all the input jobs have been completed, and after all the jobs are completed, the jcend command is input ((6) in FIG. 4). The queue is discarded and the user is notified of the end.
The creation of the queue and the change of the processor assigned to the queue can be realized by linking with the execution management apparatus 6 in FIG. 1, and for example, PBS can be realized by calling the qmgr command. The job can be submitted using the qsub command, and the job can be monitored using the qstat command.
(5) Work of the management process that dynamically changes the number of processors
When executing a program that processes a task from an external client such as a WEB server or a search server, the following management process is useful.
FIG. 5 shows the flow of processing when the number of processors is dynamically changed.
First, the server administrator notifies the management command name as an activation argument, and acquires the job cluster ID by the jobcluster command ((1) in FIG. 5).
Next, a command “resched $ JCID” for changing the processor assigned to the queue is registered in the job scheduler using the jcrequest -e command. The resched command changes the processor that starts the server by interpreting the standard input as an assigned processor, using the argument JCID as the queue name. The jcresched command performs processor allocation. ((2) in FIG. 5).
Then, if a processor of a server that is already running is not included in the assigned processor, the server is terminated. If a processor that does not yet run the server is included in the assigned processor, the server is started by the processor ((3) in FIG. 5).
After that, tasks are allocated (assigned). The task is allocated to one of the allocation processors, and the obtained result is returned to the client that has entered the task ((4) in FIG. 5). If another task distribution mechanism or distribution device is used, the resched command performs the task of notifying the mechanism or device of the distribution destination in addition to the server activation / termination described above.
When there is a processor request due to high load detection or abandonment of a processor due to low load detection, the command “resched $ JCID that changes the processor assigned to the queue using the jcrequest -e command as described above. "Is registered in the job scheduler, and the processor for starting the server is changed ((5) in FIG. 5).
Then, as described above, the server is started and tasks are assigned ((6) in FIG. 5).
In addition, such a management process is not normally terminated by itself, and therefore is terminated only when the user instructs the termination of the management process from the outside. When ending, the jcend command is executed as described above ((7) in FIG. 5).
(6) Work of management process to reserve execution date and time
The management process can be executed in exactly the same management process as that shown in FIG.
The only difference is that the processor is requested by specifying time / private time / number of dedicated processors as the request processor request contents in the jcrequest command.
[0033]
(Appendix 1) A job scheduling method in a multiprocessor system,
In response to a request from the management process, generate an ID
When there is a request for the number of processors to use by specifying the ID above from the management process,
Based on a predetermined management policy and a pre-designated available processor, a processor is assigned in units of the ID.
A job scheduling method.
(Appendix 2) A job scheduling apparatus in a multiprocessor system,
ID generation means for generating an ID in response to a request from the management process;
When there is a request for the number of processors to be used by specifying the ID from the management process, a processor management means for allocating a processor in units of the ID based on a predetermined management policy and an available processor specified in advance. Prepared
A job scheduling apparatus.
(Supplementary note 3) A job scheduling apparatus in a multiprocessor system,
ID generation means for generating an ID in response to a request from the management process;
A processor allocating means for allocating a processor in units of the ID based on a predetermined management policy and a pre-designated available processor when there is a request for the number of processors to be used by designating the ID from the management process;
Equipped with an execution management means to manage the execution of jobs submitted from the management process
A job scheduling apparatus characterized by that.
(Supplementary Note 4) When a job is submitted from the management process, the execution management means assigns a processor of the multiprocessor system to a job queue,
Management process submits job to the queue
The job scheduling apparatus according to supplementary note 3, wherein
(Supplementary Note 5) When a job is submitted from the management process, the execution management unit starts a tax processing program on the assigned processor, and distributes the task to the tax processing program for execution.
The job scheduling apparatus according to supplementary note 3, wherein
(Additional remark 6) It has the distribution means which distributes a task to a task processing program, The said execution management means starts a tax processing program on the allocated processor,
The management process notifies the distribution means of the distribution destination.
The job scheduling apparatus according to supplementary note 3, wherein
(Supplementary note 7) The management process outputs a request to the processor allocation means by specifying the ID, the number of processors, the desired allocation time, and the number of exclusive hours.
In response to the request, the processor assigning means assigns a processor in units of the ID based on a predetermined management policy and an available processor designated in advance.
The job scheduling apparatus according to appendix 2, 3, 4, 5, or appendix 6.
(Supplementary Note 8) The management process specifies a job cluster ID, the number of processors, and the number of exclusive hours, and outputs a request to the processor allocation means.
In response to the request, the processor assigning means assigns a processor in units of the ID based on a predetermined management policy and an available processor designated in advance.
The job scheduling apparatus according to appendix 2, 3, 4, 5, or appendix 6.
(Supplementary Note 9) The processor allocation means includes means for permitting or not permitting whether or not to accept a plurality of allocations.
The job scheduling apparatus according to Supplementary Note 2, 3, 4, 5, 6, 7 or Supplementary Note 8, wherein
(Supplementary Note 10) The processor assigning means assigns processors equally for each department, each group, and each user.
The job scheduling apparatus according to Supplementary Note 2, 3, 4, 5, 6, 7, 8 or Supplementary Note 9, wherein
(Supplementary Note 11) A job scheduling program in a multiprocessor system,
In response to a request from the management process, the program generates a job cluster ID and assigns a job cluster ID;
When there is a request for the number of processors to be used by specifying a job cluster ID from the management process, a process for assigning a processor in units of job clusters to the computer based on a predetermined management policy and a pre-specified available processor Execute
A job scheduling program.
[00034]
【The invention's effect】
As described above, according to the present invention, the following effects can be obtained.
(1) Since the processor assigning means assigns processors from the available processors in units of job cluster IDs, it is not necessary for the administrator to set queues in advance and assign processors to each queue.
For example, there is no need to reserve a processor for a queue for a short-time job, so that when there is no short-time job, all processors can be used efficiently.
(2) It may be permitted to issue a processor request multiple times. For this reason, even when the required processing amount is dynamically increased or decreased by a request from the outside like a WWW server, the number of processors to be requested can be increased as the processing amount increases. The processor allocator reassigns the processor each time a request is received, and the processor assigned to the job cluster ID with a lower priority (or no problem at another time) is processed. It can be reassigned to the increased job cluster ID. Thereby, it is possible to cope with a case where the processing amount dynamically changes.
(3) By describing the management policy, the administrator can give an instruction to allocate the number of processors equally for each user or group.
For this reason, even if a large number of jobs are input or a job cluster is created, the number of available processors may be equal to the number of available processors of other users or the ratio specified by the administrator. I can do it.
[Brief description of the drawings]
FIG. 1 is a diagram showing the configuration of a system according to a first embodiment of the present invention.
FIG. 2 is a diagram showing a system configuration of a second exemplary embodiment of the present invention.
FIG. 3 is a diagram showing a system configuration of a third exemplary embodiment of the present invention.
FIG. 4 is a sequence diagram illustrating an operation of a management process for submitting a job according to the embodiment of this invention.
FIG. 5 is a sequence diagram illustrating an operation of a management process for dynamically changing the number of processors according to the embodiment of this invention.
FIG. 6 is a diagram for explaining scheduling by a conventional batch job management system.
[Explanation of symbols]
1 Job scheduler
11 Job cluster ID generator
12 processor allocator
13 Processor allocation DB
2 Management process
21 Parallel task execution means
3 managers
4 users
5 Multiprocessor device
6 execution management device
7 Task distribution means

Claims (5)

マルチプロセッサシステムにおけるジョブスケジューリング方法であって、
管理プロセスからの要求に対して、IDを生成し、
管理プロセスから上記IDを指定して利用したいプロセッサ数の要求があったとき、
予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、上記IDを単位としてプロセサを割り当てる
ことを特徴とするジョブスケジューリング方法。
A job scheduling method in a multiprocessor system,
In response to a request from the management process, generate an ID
When there is a request for the number of processors to use by specifying the ID above from the management process,
A job scheduling method, wherein a processor is assigned in units of the ID based on a predetermined management policy and an available processor designated in advance.
マルチプロセッサシステムにおけるジョブスケジューリング装置であって、
管理プロセスからの要求に対して、IDを生成するID生成手段と、
管理プロセスから上記IDを指定して利用したいプロセッサ数の要求があったとき、予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、上記IDを単位としてプロセサを割り当てるプロセッサ割当手段とを備えた
ことを特徴とするジョブスケジューリング装置。
A job scheduling apparatus in a multiprocessor system,
ID generation means for generating an ID in response to a request from the management process;
When there is a request for the number of processors to be used by specifying the ID from the management process, a processor management means for allocating a processor in units of the ID based on a predetermined management policy and an available processor specified in advance. A job scheduling apparatus comprising:
マルチプロセッサシステムにおけるジョブスケジューリング装置であって、
管理プロセスからの要求に対して、IDを生成するID生成手段と、
管理プロセスから上記IDを指定して利用したいプロセッサ数の要求があったとき、予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、上記IDを単位としてプロセサを割り当てるプロセッサ割当手段と、
管理プロセスから投入されたジョブの実行を管理する実行管理手段を備えた
ことを特徴するジョブスケジューリング装置。
A job scheduling apparatus in a multiprocessor system,
ID generation means for generating an ID in response to a request from the management process;
A processor allocating means for allocating a processor in units of the ID based on a predetermined management policy and a pre-designated available processor when there is a request for the number of processors to be used by designating the ID from the management process;
A job scheduling apparatus comprising execution management means for managing execution of a job input from a management process.
上記プロセッサ割当手段は、複数回の割り当てを受け付けるかを許可または不許可とする手段を備えた
ことを特徴とする請求項2または請求項3のジョブスケジューリング装置。
4. The job scheduling apparatus according to claim 2, wherein said processor allocation means includes means for permitting or not permitting whether or not to accept a plurality of allocations.
マルチプロセッサシステムにおけるジョブスケジューリングプログラムであって、
上記プログラムは、管理プロセスからの要求に対して、ジョブクラスタIDを生成して、ジョブクラスタIDを割り当てる処理と、
管理プロセスからジョブクラスタIDを指定して利用したいプロセッサ数の要求があったとき、予め定めた管理ポリシーと、予め指定された利用可能プロセッサに基づき、ジョブクラスタを単位としてプロセサを割り当てる処理をコンピュータに実行させる
ことを特徴とするジョブスケジューリングプログラム。
A job scheduling program in a multiprocessor system,
In response to a request from the management process, the program generates a job cluster ID and assigns a job cluster ID;
When there is a request for the number of processors to be used by specifying a job cluster ID from the management process, a process for assigning a processor in units of job clusters to the computer based on a predetermined management policy and a pre-specified available processor A job scheduling program that is executed.
JP2002360414A 2002-12-12 2002-12-12 Job scheduling method and apparatus Expired - Fee Related JP4063651B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002360414A JP4063651B2 (en) 2002-12-12 2002-12-12 Job scheduling method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002360414A JP4063651B2 (en) 2002-12-12 2002-12-12 Job scheduling method and apparatus

Publications (2)

Publication Number Publication Date
JP2004192400A true JP2004192400A (en) 2004-07-08
JP4063651B2 JP4063651B2 (en) 2008-03-19

Family

ID=32759490

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002360414A Expired - Fee Related JP4063651B2 (en) 2002-12-12 2002-12-12 Job scheduling method and apparatus

Country Status (1)

Country Link
JP (1) JP4063651B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100748715B1 (en) 2005-12-27 2007-08-13 주식회사 텔레칩스 Hardware task management system
JP2007299401A (en) * 2006-04-27 2007-11-15 Internatl Business Mach Corp <Ibm> Method and system for executing fair share scheduling based on individual user's resource usage and tracking thereof
KR101085393B1 (en) 2008-12-24 2011-11-21 주식회사 코아로직 Method and apparatus for executing command to multitasking a plurality of process
JP2013506908A (en) * 2009-09-30 2013-02-28 アルカテル−ルーセント Dynamic load balancing and scaling of allocated cloud resources within the corporate network
US9703285B2 (en) 2006-04-27 2017-07-11 International Business Machines Corporation Fair share scheduling for mixed clusters with multiple resources
JP2021149232A (en) * 2020-03-17 2021-09-27 ヤフー株式会社 Video analysis system, video analysis apparatus, video analysis method, and program
EP3983893A4 (en) * 2019-06-12 2023-03-08 New York University In Abu Dhabi Corporation System, method and computer-accessible medium for a domain decomposition aware processor assignment in multicore processing system(s)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100748715B1 (en) 2005-12-27 2007-08-13 주식회사 텔레칩스 Hardware task management system
JP2007299401A (en) * 2006-04-27 2007-11-15 Internatl Business Mach Corp <Ibm> Method and system for executing fair share scheduling based on individual user's resource usage and tracking thereof
US8332863B2 (en) 2006-04-27 2012-12-11 International Business Machines Corporation Fair share scheduling based on an individual user's resource usage and the tracking of that usage
US9703285B2 (en) 2006-04-27 2017-07-11 International Business Machines Corporation Fair share scheduling for mixed clusters with multiple resources
KR101085393B1 (en) 2008-12-24 2011-11-21 주식회사 코아로직 Method and apparatus for executing command to multitasking a plurality of process
JP2013506908A (en) * 2009-09-30 2013-02-28 アルカテル−ルーセント Dynamic load balancing and scaling of allocated cloud resources within the corporate network
EP3983893A4 (en) * 2019-06-12 2023-03-08 New York University In Abu Dhabi Corporation System, method and computer-accessible medium for a domain decomposition aware processor assignment in multicore processing system(s)
JP2021149232A (en) * 2020-03-17 2021-09-27 ヤフー株式会社 Video analysis system, video analysis apparatus, video analysis method, and program
JP7428855B2 (en) 2020-03-17 2024-02-07 Lineヤフー株式会社 Video analysis system, video analysis device, video analysis method, and program

Also Published As

Publication number Publication date
JP4063651B2 (en) 2008-03-19

Similar Documents

Publication Publication Date Title
US11681562B2 (en) Resource manager for managing the sharing of resources among multiple workloads in a distributed computing environment
US11243805B2 (en) Job distribution within a grid environment using clusters of execution hosts
US8418186B2 (en) System and method of co-allocating a reservation spanning different compute resources types
US9298514B2 (en) System and method for enforcing future policies in a compute environment
US9465663B2 (en) Allocating resources in a compute farm to increase resource utilization by using a priority-based allocation layer to allocate job slots to projects
US20130346994A1 (en) Job distribution within a grid environment
US8468530B2 (en) Determining and describing available resources and capabilities to match jobs to endpoints
US8082547B1 (en) Reallocating hardware resources among workloads in accordance with license rights
JPH0659906A (en) Method for controlling execution of parallel
JP4912927B2 (en) Task allocation apparatus and task allocation method
CN108123980A (en) A kind of resource regulating method and system
Tan et al. Resource stealing: a resource multiplexing method for mix workloads in cloud system
JP4063651B2 (en) Job scheduling method and apparatus
GB2417580A (en) Method for executing a bag of tasks application on a cluster by loading a slave process onto an idle node in the cluster
KR20150089665A (en) Appratus for workflow job scheduling
JP4211645B2 (en) A computer system with a dedicated processor
John et al. Novel backfilling technique with deadlock avoidance and migration for grid workflow scheduling
JPH09167096A (en) Scheduling method for virtual computer system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050915

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070510

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070515

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070712

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071225

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4063651

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140111

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees