JP3559581B2 - Job execution control method - Google Patents

Job execution control method Download PDF

Info

Publication number
JP3559581B2
JP3559581B2 JP33975793A JP33975793A JP3559581B2 JP 3559581 B2 JP3559581 B2 JP 3559581B2 JP 33975793 A JP33975793 A JP 33975793A JP 33975793 A JP33975793 A JP 33975793A JP 3559581 B2 JP3559581 B2 JP 3559581B2
Authority
JP
Japan
Prior art keywords
job
execution
jcs
input
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP33975793A
Other languages
Japanese (ja)
Other versions
JPH07160517A (en
Inventor
弘文 長須賀
利明 新井
壮一 尾山
雅広 清井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP33975793A priority Critical patent/JP3559581B2/en
Publication of JPH07160517A publication Critical patent/JPH07160517A/en
Application granted granted Critical
Publication of JP3559581B2 publication Critical patent/JP3559581B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Multi Processors (AREA)

Description

【0001】
【産業上の利用分野】
計算機システムのジョブスケジュール方法に係り、特にジョブの実行制御方法に関する。
【0002】
【従来の技術】
計算機の利用形態の一つに、収集した売上げ情報や在庫情報などのデータを1日単位や、1週間単位、1か月単位などにまとめておいて、一括して集計するバッチ処理がある。バッチ集計処理は、いくつかの処理プログラムを実行させることにより、最終的な実行結果を得る体系となっている。
こうした実行結果を得るための論理的な仕事の単位をジョブと呼ぶ。1つのジョブの中では、複数の処理プログラムを実行させ、実行結果を得る。一つのプログラムの実行単位をジョブステップと呼ぶ。
また、こうしたバッチ処理で、実行させるプログラムや、そのプログラムでアクセスするファイルは、ジョブ制御言語(JCL)で記述されるジョブ制御文(JCS)で定義する。
一般的には、上段のジョブステップの実行結果を下段のジョブステップが参照し、下段のジョブステップの実行結果をさらに下段のジョブステップが参照して処理するプロセスを繰り返すことにより、最終的な実行結果を得る。
このように、複数のジョブステップから構成されているジョブの実行方法は、ANDREW S. TANENBAUM著「MODERN OPERATING SYSTEMS」(Prentice−Hall International Editions、P6〜7)に記載されているように、一般的には、上段のジョブステップから1つずつ順次実行させる方法が一般的である。この場合、各ジョブの実行用に一つのアドレス空間を割当て、その空間上でジョブステップを1段ずつ実行させていた。これにより、多重のアドレス空間を生成し、管理するオペレーティングシステムでは、複数のジョブを並列に実行させることが可能であり、バッチ処理全体の処理時間短縮を臨むことができる。
【0003】
【発明が解決しようとする課題】
近年、半導体技術等の進歩により、データ演算等をする中央処理装置(CPU)や入出力装置の処理能力の進展が目覚ましい。また、CPUにおいては、多数のCPUを配置し、各CPUにプログラムの実行を分散させ、処理の並列度を向上させることで、プログラムのスループット向上を図る分散環境の構築が図られている。
しかし、上記従来技術では、ジョブステップの実行スケジュールにおいて、ジョブステップの並列処理ができないことに問題がある。
ここで、ジョブステップ1、ジョブステップ2、およびジョブステップ3という3つのジョブステップから構成されるジョブを例に説明する。ジョブの処理構成は、ジョブステップ1とジョブステップ2の実行結果をジョブステップ3が参照するものとする。従来技術では、ジョブステップ1、ジョブステップ2、ジョブステップ3の順で、順次1段ずつジョブステップを実行させることになる。しかし、ジョブステップ1とジョブステップ2は、データの受け渡し関係が存在しないため、並列に実行することが可能である。
本発明の目的は、1つのジョブの中で、並列に実行させることができるジョブステップを並列実行させることにより、バッチ処理時間の短縮を図ることにある。
【0004】
【課題を解決するための手段】
上記目的を達成するため、本発明では、
ジョブ制御文(JCS)を用いて実行するプログラムと、当該プログラムが使用する資源を指定し、ファイルにアクセスし、複数のジョブステップから構成される複数のジョブが並列あるいは逐次的に実行する計算機システムにおいて、
各ジョブステップについて、実行を開始できる条件である実行開始条件を指定するパラメタをJCSに設け、ジョブが投入されると、当該ジョブを定義したJCSを入力し、前記ジョブの全ての各ジョブステップから、前記パラメタの指定内容が等しいジョブステップと前記指定のないジョブステップの数の合計の最大値を求めることで、並列に実行できるジョブステップの最大値(最大並列度)を求めるステップと、
前記最大並列度の数のプログラムが平行して実行できるための資源を確保するステップと、
前記ジョブの中で、実行開始条件を満たしたジョブステップの実行を許可するステップと、
前記全てのジョブステップの実行状況を監視し、全ての前記ジョブステップが実行を完了した時点で、確保した前記資源を解放するステップを有するようにしている。
また、上記の各ジョブステップの実行を開始できる条件である実行開始条件を指定するパラメタをJCSから求めるために、
ジョブが投入されると、当該ジョブを定義したJCSを入力し、前記JCSに定義されている各ジョブステップがアクセスするファイル識別子を参照して同一のファイルへアクセスするジョブステップのペアを求めるステップと、
前記ペアとなったジョブステップにおいて、前記JCSで定義されたジョブステップの実行順序が後となっているジョブステップの実行開始条件として、前記ペアとなったもう一方のジョブステップの実行完了後と定める実行開始条件を決定するステップと、
前記決定した実行開始条件をパラメタとして入力したJCSに書き込むステップを有するようにしている。
また、上記の各ジョブステップの実行を開始できる条件である実行開始条件を指定するパラメタをジョブの実行履歴から求めるために、
ジョブの実行時に該ジョブについて、ジョブの識別子と、ジョブステップの識別子と、ジョブステップの開始時刻と、アクセスした全てのファイル識別子と、アクセスした前記全てのファイルへのアクセスが出力であったか、入力であったかを示すアクセス種別を含む履歴情報を収集するステップと、
同一ジョブ内で、前記ファイル識別子が等しく、かつ、前記アクセス種別が出力と入力であり、かつ、前記アクセス種別が出力であるジョブステップの開始時刻が、前記アクセス種別が入力であるジョブステップの開始時刻より先行しているジョブステップのペアを求めるステップと、
前記アクセス種別が入力であるジョブステップの実行開始条件を、前記アクセス種別が出力であるジョブステップが完了した直後と定める実行開始条件を決定し、保存するステップと、
前記ジョブと同一のジョブが再び投入された時に、前記保存された実行開始条件をパラメタとして入力したJCSに書き込むステップを有するようにしている。
【0005】
【作用】
JCS解析部では、JCSに指定されたジョブステップの並列実行指定部を抽出し、あるいはJCSに定義されている各ジョブステップでアクセスするファイル情報に基づき並列実行可能部を抽出し、あるいはジョブの実行履歴に基づく並列実行解析の結果と投入されたJCSとをマッチングすることでジョブステップの並列実行可能部を抽出する。
ジョブ実行管理部では、JCS解析部から通知された並列度をもとに、並列実行するために必要となるアドレス空間等の資源を確保し、ジョブステップをジョブとして各アドレス空間に割当てて実行させる。各ジョブステップの実行は、ジョブ実行管理部が管理し、実行完了後、ジョブ受付部を経由して、ユーザに実行完了が通知される。
履歴情報収集部では、ジョブの実行履歴情報をファイルのアクセス履歴情報を時系列に収集する。履歴情報解析部では、ファイルへのアクセス履歴情報をもとに、並列実行が可能なジョブステップを求める。
これにより、ジョブにおける並列実行が可能なジョブステップが抽出され、これらのジョブステップを並列実行することができる。
【0006】
【実施例】
実施例を用いて、本発明を説明する。
第1の実施例は、複数のジョブステップから構成されるジョブにおいて、ジョブで実行させるプログラムやアクセスするファイルを定義するジョブ制御文において、各ジョブステップの開始を宣言するレコードに、ジョブステップが実行を開始できる条件を記述して、1つのジョブ内のジョブステップを並列実行させるものであり、この場合、上記レコードに事前に上記条件を記述しておくか、投入されたジョブ制御文を解析し、ファイルのアクセス順序関係に制約のないジョブステップを抽出して、各ジョブステップの開始を宣言するレコードに、ジョブステップが開始できる条件を付加する。
第2の実施例は、投入されたジョブのジョブ制御文と、以前に実行されたジョブの実行履歴とファイルへのアクセス履歴を照合して、ジョブステップが実行を開始できる条件を、ジョブ制御文に付加することで、ジョブステップを並列実行させる方法である。
【0007】
図1は本発明の機能ブロック図である。まず、図1を用いて本発明の構成を説明する。
100は、計算機システムを示す。100は、演算操作を行なう中央処理装置(CPU)(200)とメモリ(300)により構成される。400は外部記憶装置を示す。400の中には、ジョブで実行させるプログラムやアクセスするファイルを定義したジョブ制御文が格納されている。500も外部記憶装置である。500には、履歴情報収集部6000によって、ジョブの実行履歴情報やファイルへのアクセス履歴情報が出力される。
1000は、JCS解析部である。JCS解析部では、投入されたジョブのジョブ制御文(JCS)を400より入力し、JCSよりファイルへのアクセス順序関係や、各ジョブステップについて実行を開始するための制約条件を求める実行履歴解析部(7000)の解析結果と照合して、入力したJCSの各ジョブステップについて実行を開始するための制約条件を付加して、ジョブ受付部(2000)に渡す。
ジョブ受付部では、JCS解析部から渡されたJCSについて、ジョブステップを並列実行できる最大の多重度をもとめ、ジョブステップ実行処理部(3000)にJCSと最大の多重度を渡す。
ジョブステップ実行処理部(3000)では、並列実行させるために必要な資源(アドレス空間)を確保し、実行開始の制約が解除されたジョブステップから次々と実行させていく。
4000では、ジョブステップの実行が終了するたびに通知をうけ、通知されたジョブステップが属するジョブが終了したか否かを確認する。終了した場合は、ジョブ完了部5000に通知し、まだ他のジョブステップに実行を開始していないジョブステップがある場合には、ジョブステップ実行処理部を呼び出す。
6000は、履歴情報収集部である。6000では、ジョブが開始された時点で、ジョブ受付部(2000)からジョブ開始情報を受け取り、ジョブステップが終了した時点で、ジョブステップ終了情報とそのジョブステップでのファイルアクセス履歴情報をステップ終了受付部(4000)から受け取る。さらに、ジョブが終了した時点で、ジョブ完了部(5000)からジョブ終了情報を受け取る。こうしたジョブの実行履歴情報や、ファイルへのアクセス履歴情報を、収集した順に外部記憶装置(500)に格納するのが、履歴情報収集部(6000)である。
実行履歴解析部(7000)は、6000により収集された実行履歴(500)を入力として、ファイルへのアクセス順序関係や、ファイルへの入出力の識別により、ジョブステップの実行開始をするための制約条件を求める。ジョブステップを実行するための制約は、参照するファイルが完成されていれば、直ちに実行することが可能であるため、ファイルへのアクセス順序関係のみを守れば、他には制約を受けずに実行することができる。8000はジョブステップを実行するプログラム実行部である。
【0008】
図2は、本発明で説明するJCSの記述例である。図2を用いて、本実施例でのJCSの記述規則を説明する。
まず。JOBは、一つの処理単位であるジョブを宣言する制御文である。本例で、JOB1がジョブ名である。
このジョブでは、PGM1というプログラムを実行した後、PGM2を実行させ、その後にPGM3を実行する。このように、ジョブの中で実行すべきプログラムの指定と、プログラムの実行順序を宣言しているのがSTEP文である。STEP文で宣言したプログラムの実行単位がジョブステップである。すなわち、ジョブステップとは、ジョブを構成する実行の単位で、一つのプログラムの実行を意味する。
410では、ジョブステップ名がSTEP1というジョブステップでPGM1というプログラムを実行する。そのジョブステップが完了した後に、ジョブステップ名がSTEP2というジョブステップでPGM2というプログラムを実行する。さらに、STEP2の実行が完了した後で、ジョブステップ名がSTEP3というジョブステップでPGM3というプログラムを実行する。
各プログラムの実行中にファイルをアクセスする場合がある。このようにプログラムの実行中にアクセスするファイルを指定するのが、FD文である。FD文ではFILEオペランドでアクセスするファイル名称を指定する。
このようにJCS中で定義したアクセスするファイルを、プログラムと対応づける必要がある。それがFD名である。410の例では、IN1、OUT1、IN2、OUT2、IN3、OUT3がFD名である。また、ここで定義したファイルへのアクセスが入力なのか、出力なのかはプログラムの中で指定する。
【0009】
次に、410の処理の流れを説明する。
まず、STEP1ではPGM1というプログラムを実行する。ここでは、A.DATAというファイルからデータを入力し、B.DATAというファイルへ実行結果を出力する。次に、STEP2で、PGM2というプログラムを実行する。ここでは、PGM1の実行結果であるB.DATAというファイルのデータを入力し、実行結果をC.DATAというファイルへ出力する。STEP2の実行終了後、STEP3でPGM3というプログラムを実行する。ここでは、PGM1の実行結果であるB.DATAというファイルのデータを入力し、実行結果をD.DATAというファイルへ出力する。
ここで、STEP2とSTEP3は、互いにB.DATAというファイルを参照するが、STEP2でのB.DATAへのアクセスが入力と分かっている場合には、STEP2とSTEP3の間でデータの受け渡し関係がないため、並列に実行することが可能である。しかし、STEP2でのB.DATAへのアクセスが入力と分かっていない場合には並列に実行することはできない。そこで、こうしたジョブステップの構成の場合に、STEP1の実行が完了した後、STEP2とSTEP3の間にデータの受け渡し関係がない場合に、これらを並列に実行させることにより、処理時間の短縮を図ることが本発明の目的である。
【0010】
図3を用いて、410のSTEP2とSTEP3を並列に実行させるための指定方法を説明する。これが、本実施例での記述規則とする。
420では、STEP2とSTEP3のSTEP文にEXEC=STEP1という指定が付加されている。これは、STEP1というジョブステップが実行完了した時点で、実行開始可能であることを示す実行開始条件を宣言している。この宣言は事前にJCSで行なえばよい。
本実施例では、上記の実行開始条件の宣言がJCSで行なわれていない場合には、入力したJCSに基づきJCS解析部1000によりSTEP文のオペランドに実行を開始できる条件である実行開始条件を付加することができるようにしている。
以上が、本実施例での構成およびジョブ制御文の記述規則である。
【0011】
次に、第1の実施例について説明する。
図4は、JCS解析部のフローチャートである。
まず、投入されたジョブのJCSを全て読み込む(1005)。
次に、JCSについて、EXECオペランドが指定されているSTEP文があるかを調べる(1010)。
もしあれば、1060に分岐し、ジョブ受付部にJCSを渡す。ない場合には、入力したJCSを1行ずつ解析する。まず、解析の対象をJCSの第1行目とする(1015)。
解析対象がJOB文であれば、1055に進み、解析対象を次の1行にする。JOB文でなければ、1025に進み、STEP文であるかを調べる。もし、STEP文であれば1030に進み、STEP文のアドレス(STEP文の格納されているアドレス)を記憶し、1055へ進む。STEP文でなければ、残った指定は、アクセスするファイルを指定したFD文となる。
そこで、1035では、このFD文と等しいファイル名を指定したFD文を、前段ジョブステップから上段のジョブステップ向かってサーチする。最初に見つかった時点で、1045に進み、見つからなかったら1055に分岐して解析対象を次の1行目にする(1040)。
1045では、1030で記憶しているSTEP文に対して、EXECオペランドを付加し、1035で検索した、同一のファイル名を示すFD文を指定したジョブステップ名を指定する。
次に、1050では入力した全てのJCSについて上記解析を行ったかをチェックし、解析した場合には、1060に進み、ジョブ受付部にJCSを渡す。検索していない場合には、1055に進み、解析の対象を次の1行として、上記解析を繰り返す。
【0012】
次に、ジョブ受付部(2000)の処理について、図5を用いて説明する。図5はジョブ実行受付部のフローチャートである。
まず、2005でJCS解析部からJCSを受け取る。
次に2010でジョブステップの並列度を求める。これは、入力したJCSのEXECオペランドの実行開始条件の指定が等しいか、EXECオペランドに実行開始条件の指定がないSTEP文数の最大値である(EXECオペランドの指定がないSTEPは並列処理可能である)。
次に、実行履歴情報であるジョブ開始レコードを作成し、履歴情報収集部に渡す(2015)。最後に、ジョブ実行状況を監視するためのJCSテーブルを作成し、実行管理マスタテーブルからポイントされる実行待ちJCSテーブルキューの最終エントリに繋げる。ここで、ジョブ開始レコードや、JCSテーブル、実行管理マスタテーブルの詳細は、後で説明することにする。
【0013】
図6は、ジョブ受付部(2000)や、ジョブステップ実行処理部(3000)、ステップ終了受付部(4000)およびジョブ完了部(5000)で使用するテーブルの構造である。
実行管理マスタテーブル(3100)はジョブ実行状況の監視や、ジョブを実行させることができる空間を管理するマスタテーブルである。
実行空間管理テーブル(3200)は、現在、実行しているジョブを記すテーブルであり、実行中の場合は、対応するジョブのJCSテーブル(3300)からポイントされるキューに繋がり、実行待ちの場合は、実行管理マスタテーブル(3100)の3110と3120によってポイントされる空き実行空間管理テーブルキューにつながる。
JCSテーブルは、各ジョブのJCSの内容や、使用している空間に対応する実行空間管理テーブル(3200)を管理するためのテーブルである。
ジョブの実行中は、3130と3140によりポイントされる実行中のJCSテーブルキューに繋がり、実行待ちの場合は、31503160によりポイントされる実行待ちのJCSキューにつながる。このJCSテーブル(3300)と実行空間管理テーブル(3200)をプログラム実行部に渡すことにより、一つのジョブステップが実行空間管理テーブル(3200)に対応する空間上で実行されることとなる。
【0014】
図7は、実行空間管理テーブルの詳細である。
3210と3220は、実行管理マスタテーブル(3100)やJCSテーブル(3200)によって管理されるキューを生成するためのポインタである。3230は実行させるジョブ名を格納する領域であり、3240はジョブステップ名を格納する領域である。3250は実行状態を示すフラグで、実行中はONとなり、実行していないときはOFFとなる。3260は対応するアドレス空間の番号である。
図8はJCSテーブル(3300)の構造である。JCSテーブルはジョブ対応に作成されるテーブルである。
3310と3320は実行管理マスタテーブルによって管理されるJCSテーブルキューを生成するためのポインタである。
3330と3340は、ジョブステップを実行させるために確保した実行空間管理テーブルのキューを管理するためのポインタである。
3350はジョブステップの完了マスクである。上段のジョブステップから、左詰めに2ビットずつ割当てる。この2ビットが、’00’の時は未実行を意味し、’10’は実行中を意味する。さらに、実行が完了すると’11’となる。
3360は、ジョブステップ数の格納領域である。3370はジョブ受付部の2010で求めた並列度を格納する領域である。3380はJCSの内容を格納する領域である。
【0015】
図9を用いて、ジョブステップ実行処理部のフローを説明する。まず、空き実行空間管理テーブルキューのエントリ数を3010で求める。
次に、3020で実行待ちJCSキューの先頭から、3010で求めたエントリ数よりも並列度(3370)が小さいJCSテーブルを検索する。もしなかったら、3030で3010にもどる。この場合、一定時間間隔待って3010に戻ってもよい。
3030で有ると分かった場合には、3040でJCSテーブル内の並列度分の実行空間管理テーブルを空きキューから切離し、3110と3120を更新する。3020で求めたJCSテーブルで管理する実行空間管理テーブルキューに接続する。このキューの管理に3330と3340を使用する。3040は、ステップ終了受付部よりコールされた時の入口点でもある。
つぎに、3050でJCSの内容(3380)から、上段のSTEP文から解析を進め、実行できるジョブステップを検索する。この検索条件は、
(1)STEP文にEXECオペランドの指定がないジョブステップで、まだ未実行であるジョブステップであること
もしくは、
(2)STEP文のEXECオペランドで指定されたジョブステップがすでに実行を完了しているジョブステップであること
である。ここで、ジョブステップの実行状況は、ジョブステップマスク(3350)の各ジョブステップに対応するフィールドを参照することで確認できる。
3060では、実行可能なジョブ名とジョブステップ名を各々3230と3240に格納し、実行フラグ(3250)をONにする。
3070では、登録したジョブステップ名の対応するジョブステップ完了マスク(3350)の対応するフィールドを’10’として実行中にし、更新した実行空間管理テーブル(3200)とJCSテーブル(3300)とをプログラム実行部(8000)に渡す。
プログラム実行部では、実行空間管理テーブルに記された空間番号(3260)上でジョブステップを実行させる。
【0016】
次に図10を用いて、ステップ終了受付部を説明する。
ジョブステップが終了すると、プログラム実行部(8000)から通知をうける。
まず、4010で実行完了の通知をうけたジョブステップに対応するジョブステップ完了マスク(3350)のフィールドを’11’とする。
4020では、実行を完了した実行空間管理テーブル(3200)のジョブ名(3230)、ジョブステップ名(3240)をクリアし、実行フラグ(3250)をOFFにする。
次に、4030では、実行履歴として、ジョブステップ終了レコードを作成し、履歴情報収集部(6000)に渡す。
次に、4040ではジョブステップ完了マスク(3350)を左から2ビットずつジョブステップ数(3360)回見て、’00’となっているフィールドがあるかをチェックする。ある場合には、まだ実行を開始していないジョブステップが存在することを意味するので、4070に進み、ジョブステップ実行処理部をコールする(図9のステップ3040に進む)。
もし、存在しない場合は、4050でジョブステップ完了マスク(3350)を左から2ビットずつジョブステップ数(3360)回見て、’10’となっているフィールドがあるかをチェックする。もし、存在すれば、まだ実行中のジョブステップが存在することを意味する。そこで、’10’というフィールドがなくなるまで、4050の実行を繰り返す。4050で’10’となっているフィールドがなくなると、すべてのジョブステップの実行を終了したことを意味するので、4060でジョブ完了部に制御を渡す。
【0017】
最後に、図11を用いて、ジョブ完了部(5000)のフローを示す。
まず、5010で実行履歴として、ジョブ終了レコードを作成し、履歴情報収集部(6000)に渡す。
次に、5020で、JCSテーブル(3300)に管理されている実行空間管理テーブル(3200)を実行管理マスタテーブル(3100)の3110と3120によって管理される空きキューにつなぐ。
最後にJCSテーブルを解放する。
【0018】
次に、第2の実施例を説明する。
第2の実施例は、過去のジョブの実行履歴情報とファイルへのアクセス履歴情報をもとにジョブステップの並列実行を解析し、その結果を使って、ジョブステップを並列実行させるものである。
バッチ処理には、データを1日単位や、1週間単位、1ヵ月単位などにまとめておいて、一括して処理するバッチ処理があり、このような処理では、1日、1週間などの間をおいて同一ジョブを実行することになり、このような場合に第2の実施例は有効である。
第1の実施例では、JCS解析部で実行開始条件を求める場合には、ファイルアクセスが入力か出力かはプログラムの中で指定しているため、ファイルアクセスが入力か出力かを識別できない。したがって、図2に示すJCSを投入すると、STEP2のEXECオペランドは、EXEC=STEP1となり、STEP3のEXECオペランドは、EXEC=STEP2となり、結局逐次的にジョブステップを実行させることとなってしまう。
ここに示す第2の実施例を用いると、STEP3のEXECオペランドはEXEC=STEP1となり、STEP1の実行完了後に、STEP2とSTEP3をパラレルに実行させることができる。
第2の実施例が第1の実施例と異なる点は、実行履歴解析部(7000)が加わる点と、JCS解析部(1000)のフローが異なる点である。
【0019】
本実施例の説明は、まずジョブの実行履歴レコードとファイルアクセス履歴レコードの詳細を説明し、次に、その履歴情報を用いる実行履歴解析部のフローを説明する。最後に、JCS解析部のフローを説明する。
図12、図13、図14および図15を用いて履歴情報について説明する。
ジョブの実行が開始されると、ジョブ受付部(2000)がジョブ開始情報(510)を出力し、ジョブの実行が終了すると、ジョブ完了部(5000)がジョブ終了情報(520)を出力する。
さらに、ジョブ実行中に、ジョブステップが終了すると、ステップ終了受付部(4000)がジョブステップ終了情報(530)を出力する。
各ジョブステップで実行しているプログラムが、アクセス終了を宣言する命令(CLOSE命令)を発行すると、CLOSEしたファイルに関して、ファイルアクセス履歴情報(540)を出力する。
上記各レコードを、情報の種類を区別するために、レコードの中に識別子を持っている。ジョブ開始情報(510)はX’01’(511)であり、ジョブ終了情報(520)はX’02’(521)、さらにジョブステップ情報(530)は、X’03’である。ファイルアクセス履歴情報(540)に関しては、プログラムがファイルのデータを入力したのか、出力したのかによって異なる。識別子(541)は、入力の場合がX’04’で、出力の場合がX’05’である。
上記各情報は、イベントが発生する度に時系列に履歴情報収集部(6000)に渡され、履歴情報収集部(6000)は外部記憶装置(500)に出力する。
【0020】
以下に、上記各情報の出力レコード形式を説明する。
図12は、ジョブ開始情報のレコード形式である。
当該レコードは、ジョブの実行が開始された時点で、ジョブ受付部(2000)によって出力される。511は識別子で、当該レコードはX’01’である。512はジョブ名である。513はジョブ開始時刻である。
図13は、ジョブ終了情報のレコード形式である。
521は識別子で、当該レコードはX’02’である。522はジョブ名である。523はジョブ実行の開始時刻を示し、524はジョブ実行の終了時刻を示す。
図14は、ジョブステップ終了情報のレコード形式である。
531は識別子で、当該レコードではX’03’である。532は終了したジョブステップが属しているジョブの名称である。533は終了したジョブステップが属しているジョブの開始時刻である。534はジョブステップ名である。535はジョブステップの開始時刻であり、536はジョブステップの終了時刻である。
図15は、ファイルアクセル履歴情報のレコード形式である。
当該レコードは、プログラムがCLOSE命令を発行した時に出力される。541は識別子である。ただし、プログラムがファイルからデータを入力した場合と出力した場合とで、識別子(541)の内容が異なる。入力の場合はX’04’であり、出力の場合はX’05’である。
542は、ファイルアクセスをしたプログラムが属するジョブのジョブ名である。543は、ジョブの開始時刻である。544はファイルアクセスをしたプログラムが実行したジョブステップのジョブステップ名である。545はジョブステップの開始時刻である。546はFD名である。547はファイルの識別子であるファイル名である。
【0021】
実行解析部(7000)では、上記履歴情報を用いて、各ジョブステップの実行開始条件を求める。
図16に、実行履歴解析部(7000)の構成を示す。
実行履歴解析部(7000)は、履歴情報入力(7100)と実行条件解析(7200)に分かれる。履歴情報入力(7100)では、上記履歴情報を入力し、ジョブとジョブステップ、およびジョブステップとアクセスしたファイルを関連づける。実行条件解析(7200)では、履歴情報入力(7100)によって関連づけられた結果から、各ジョブステップに関して、実行開始条件を求める。
【0022】
図17から図22に、実行履歴解析部で使用するテーブルの関連および、各テーブルの詳細を示す。
図17は、実行条件解析(7200)が、入力した履歴情報を格納し、解析するために用意するテーブル群のテーブル関連図である。各テーブルの詳細は、図18から図22に示す。
履歴マスタテーブル(MSTH)(7500)は、実行履歴解析部(7000)のマスタテーブルであり、ジョブの実行履歴を格納するJOBH(7600)キューの管理と、各ジョブステップの実行開始条件を格納する実行条件テーブル(7900)を管理する。
ジョブ実行履歴テーブル(JOBH)(7600)は、ジョブ単位に作成され、ジョブ開始情報(510)やジョブ終了情報(520)を格納する。また、JOBH(7600)キューは、ジョブの実行順序にしたがっている。さらに、ジョブ内で実行されたジョブステップ情報を格納するジョブステップ実行履歴テーブル(STPH)(7700)キューの管理をする。
STPH(7700)は、ジョブステップ単位に作成され、同一ジョブ内で実行された順にキューになってならんでいる。STPH(7700)は、ジョブステップの開始情報や終了情報を格納している。さらにSTPH(7700)は、ジョブステップ内でアクセスしたファイル情報を格納するファイルアクセス履歴テーブルFDH(7800)キューの管理をする。
FDH(7800)は、プログラムがアクセスしたファイル単位に作成され、アクセス先のファイル情報を格納する。また、FDH(7800)は、プログラムが実行したジョブステップごとに、キューを作成する。
実行条件テーブル(EXCN)(7900)は、履歴情報に格納されている全てのジョブステップについて、実行開始が可能な条件を格納している。
【0023】
図18から図22に、上記で説明したテーブルの詳細を記す。
図18は、履歴マスタテーブル(MSTH)(7600)のテーブル構造である。
MSTHは、JOBHキューとEXCNキューの管理をするマスタテーブルである。MSTH(7500)は、先頭JOBHアドレス(7510)、最終JOBHアドレス(7520)、EXCNアドレス格納域(7530)を格納する。
図19は、JOBH(7600)のテーブル構造である。
JOBHは、ジョブ開始情報(510)を入力した時に作成される。7610は次JOBHアドレス格納域であり、7620は前JOBHアドレス格納域である。7610と7620を使用して、キューを形成する。7630は先頭STPHアドレス格納域であり、7640は最終STPHアドレス格納域である。7630と7640は、JOBHに対応するジョブの中で実行されたジョブステップ情報を格納するSTPHのキューを管理するものである。
7650はジョブ開始時刻の格納域であり、7660はジョブの終了時刻の格納域である。また、7670はジョブ名の格納域である。7650と7670は、ジョブ開始情報レコード(510)よりコピーされる。7660はジョブ終了情報レコード(520)からコピーされる。
【0024】
図20は、STPH(7700)のテーブル構造である。
STPH(7800)は、ファイルアクセス履歴情報(540)を入力した時に、当該ファイルに対してアクセスしたプログラムが属しているSTPH(7700)が用意されていない場合に作成する。
7710は次STPHテーブルアドレス格納域であり、7720は前STPHテーブルアドレスの格納域である。7710と7720により、ジョブ単位に実行されたジョブステップを管理するSTPHキューが形成される。7730は先頭FDHアドレス格納域であり、7740は最終FDHアドレス格納域である。7730と7740は、ジョブステップ内でアクセスしたファイル情報を格納するFDHキューを管理する。7750はジョブステップ名の格納域である。7760はジョブステップの開始時刻格納域で、7770はジョブステップ終了時刻格納粋である。
図21は、FDH(7800)のテーブル構造である。
FDH(7800)は、ファイルアクセス履歴情報(540)を入力した時に作成する。FDH(7800)は、ファイルへアクセスしたプログラムが実行されたジョブステップ単位で管理される。7810は次FDHアドレス格納域であり、7820は前FDHアドレス格納域である。7810と7820を用いて、FDHキューを作成する。7830は、JCSで記述したFD名の格納域である。同様に、7840はファイル名の格納域である。また、7850は入出力識別子の格納域である。
図22は、実行条件テーブル(EXCN)(7900)のテーブル構造である。
7910にはジョブ名が記され、7920にはそのジョブの中で実行されるジョブステップ名が記される。さらに、7930には、実行を開始するための条件、すなわち、当該ジョブステップを開始するために終了しなければならないジョブステップ名が格納される。
【0025】
図23は、履歴情報入力(7100)のフローである。
まず、履歴情報レコードを1レコード入力する(7105)。7110では、入力したレコードがジョブ開始情報レコード(510)であるか否かをチェックする。すなわち、識別子(511)がX’01’であるか否かをチェックする。識別子(511)がX’01’である場合には、7115へ進み、JOBH(7600)を作成する。ここで、JOBH(7600)に対し、ジョブ開始時刻(7650)と、ジョブ名(7670)を登録する。作成したJOBHは、7510と7520によって管理されるJOBキューに登録する。
7110で識別子がX’01’でない場合、7120に進む。7120では、入力したレコードがファイルアクセス履歴情報レコード(540)であるか否かをチェックする。すなわち、入力したレコードの識別子(541)が、X’04’もしくはX’05’であるか否かをチェックする。入力したレコードが、上記条件を満たす場合は7125へ進み、上記条件を満たさない場合は7135へ進む。
7125では、まず、7510および7520に管理されるJOBH(7600)キューをたどって、下記の条件を満たすJOBH(7600)を検索する。
(1)入力レコードのジョブ名(542)とJOBH(7600)のジョブ名 (7670)が等しい。
(2)入力レコードのジョブ開始時刻(543)と、JOBH(7600)
ジョブ開始時刻(7650)が等しい。
(3)ジョブ終了時刻(536)が未登録である。
当該JOBH検索処理において、入力レコードに記したファイルへアクセスしたプログラムが属するジョブの開始情報レコード(510)は、すでにシステムに出力されており、当該JOBH検索処理では、必ずJOBHキューに上記3条件を満たすJOBH(7600)が存在する。
次に、上記JOBH検索処理により求められたJOBH(7600)が管理するSTPH(7700)キューから、下記の3条件を満たすSTPH(7700)を検索する。
(1)入力レコードのジョブステップ名(544)とSTPH(7700)の ジョブステップ名(7750)が等しい。
(2)入力レコードのジョブステップ開始時刻(545)と、STPH(77 00)のジョブステップ開始時刻(7760)が等しい。
(3)ジョブステップ終了日付と終了時刻(7700)が未登録である。
当該STPHの検索処理で、当該3条件を満足するSTPHを検索できなかった場合、新たにSTPH領域を確保し、入力レコードの中から、ジョブステップ名(542)とジョブステップ開始時刻(544)をコピーする。以後、本ステップでの操作対象とするSTPHを当該STPHとし、7130に進む。
上記STPHの検索処理で、上記3条件を満足するSTPH(7770)を検索できた場合は、検索したSTPH(7700)を操作対象として、7130に進む。
7130では、まず、FDH領域を確保する。確保したFDH(7800)に対して、入力レコード情報から、FD名(546)、ファイル名(547)、入出力識別子(548)を登録する。ここで、入出力識別子(7860)には、ファイルアクセス履歴情報レコード(540)の識別子(548)をコピーする。登録処理をしたFDHは、上記STPH検索処理で操作対象となったSTPH(7700)が管理するFDHキューの最後尾に接続する。
【0026】
7135では、入力レコードがジョブステップ終了情報レコードか否かをチェックする。すなわち、入力レコードの識別子がX’03’か否かをチェックする。
入力レコードの識別子がX’03’の場合は、7140へ進む。7140では、MSTH(7500)が管理するJOBHキューの中から、下記の3条件を満たすJOBH(7600)を検索する。
(1)入力レコードのジョブ名(532)とJOBHのジョブ名(7670) が等しい。
(2)入力レコードのジョブ開始時刻(532)と、JOBHのジョブ開始時 刻(7650)が等しい。
(3)JOBH(7600)のジョブ終了時刻(7660)が未登録である。
当該JOBH検索処理において、入力レコードに記したジョブステップが属するジョブの開始情報レコード(510)は、すでに出力されており、当該ジョブ開始情報レコード(510)に対応するJOBH(7600)を作成済みである。
次に検索したJOBH(7600)が管理するSTPH(7700)キューにおいて、下記3条件を満たすSTPH(7700)を検索する。
(1)入力したレコードのジョブステップ名(534)とSTPH(7700) のジョブステップ名(7750)が等しい。
(2)入力レコードのジョブステップ開始時刻(535)と、STPH(77 00)のジョブステップ開始時刻(7760)が等しい。
(3)STPH(7700)のジョブステップ終了時刻(7770)が未登録 である。
当該STPH(7700)の検索処理において、上記3条件を満たすSTPHを検索できた場合は、入力レコードの中より、ジョブステップ終了時刻(536)をSTPH(7700)に登録する。
【0027】
上記STPH検索処理で、条件を満たすSTPH(7700)を検索できなかった場合、新しくSTPH領域を確保し、入力レコードの情報をもとに、534から536の領域に対応する情報をコピーする。次に、上記JOBH(7700)により、検索したJOBHによって管理されるSTPHキューの最後尾に当該STPHを接続する。
7135において、入力レコードの識別子がX’03’でなかった場合、7145に進む。7145では、入力レコードがジョブ終了情報レコードであるか否かをチェックする。すなわち、入力レコードの識別子がX’02’であるか否かをチェックする。入力レコードの識別子がX’02’である場合は、7150へ進む。7150では、まず、下記3条件を満たすJOBH(7500)を検索する。
(1)入力レコードのジョブ名(522)とJOBHのジョブ名(7670)が等しい。
(2)入力レコードのジョブ開始時刻(523)と、JOBH(7600)のジョブ開始時刻(7650)が等しい。
(3)JOBH(7600)のジョブ終了了時刻(7660)が未登録である。
当該JOBH検索処理において、入力レコードに記したジョブ終了情報に対応するジョブ開始情報レコード(510)は出力されており、OS適用ジョブ検索手段(1300)は、当該ジョブ開始情報レコード(300)に対応するJOBHを作成済みである。従って、当該JOBH検索処理では、必ず上記3条件を満たすJOBHが存在する。
次に、上記JOBH検索処理で求めたJOBHに対して、入力レコードより、ジョブ終了時刻(524)を登録する。
【0028】
7145において、入力レコードがジョブ終了情報レコードでなかった場合は、7155へ進む。同様に、7130、7140、および7150での処理を完了した後も、7155へ進む。7155では、今回入力したレコードが、最終レコードか否かをチェックする。最終レコードの場合は、当該システム稼働情報の入力処理を完了する。最終レコードでない場合は、7105へ進み、次レコードを入力して、同様の処理をする。
これにより、ジョブとジョブステップの関係、およびジョブステップとアクセスしたファイルとの関係を関係づけることができた。これを用いて、各ジョブステップの実行開始条件を求め、EXCN(7900)を作成する。
【0029】
図24を用いて、実行条件解析のフローを説明する。
まず、解析の対象をJOBHキューの先頭エントリとする(7205)。まず、これで、解析するジョブを選定する。
次に、解析対象となったジョブに属するジョブステップがアクセスしたファイルを逐一調べることにより、ジョブステップの実行開始条件を定めていく。そこで、7210では、解析対象を最終ジョブステップに定めるために、解析対象のJOBHが管理するSTPHキューの中の最終エントリを解析の対象とする。
7215では、解析対象となったSTPHが先頭エントリか否かを調べ、もし先頭エントリであれば、7250へ進む。それ以外は、7220へ進む。
7220では、解析対象となったSTPHが管理するFDHの中から、入出力識別子が入力であるFDHをサーチする。これは、複数でもかまわない。7225で判断した結果、ある場合には7230に進み、ない場合には7245へ進む。
7230では、現在解析対象となっているSTPHの前段から上段のSTPHに向かって、サーチしたFDHとファイル名が同一で、入出力識別子が出力であるFDHをサーチする。もしある場合には7240へ進み、ない場合には7245へ進む。
7230および7235の検索の結果、上記条件を満たすSTPHが存在する場合には、解析対象としたSTPHに対応するジョブステップは、7230でサーチしたSTPHに対応するジョブステップが終了しないかぎり、実行を開始することができない。そこで、7240では、EXCN(7900)に解析対象となったジョブ名、ジョブステップ名、および、7230でサーチしたジョブステップ名を登録する。
7245では、次のジョブステップの実行条件を調べるために、前段のSTPHを解析対象として、7215へ戻る。
7215から分岐した7250では、次のジョブを解析対象とする前に、現在解析対象となっているJOBHが、JOBHキューの最終エントリかを調べ、最終エントリの場合は処理を終了する。最終エントリでない場合には、7255へ進み、次JOBHを解析対象として、7210へ戻る。
実行履歴解析部(7000)により得られたEXCN(7900)をもとに、JCS解析部では、ジョブステップの実行条件を入力したJCSに付加して、ジョブ受付部に渡す。
【0030】
第25図を用いて、JCS解析部のフローを説明する。
まず、1ジョブ文のJCSを10005で読み込む。10010では、EXCN(7900)から入力したJCSとジョブ名が等しいエントリをサーチする。
もし、存在しない場合は、10015から10055へ分岐し、ジョブ受付部(2000)にJCSを渡す。
存在する場合には、10020へ進み、10010でサーチしたエントリを解析の対象に絞る。10025ではJCS中の2番目のSTEP文を解析の対象にする。
10030では、解析対象となったEXCNのエントリから、STEP文に示されたジョブステップ名と等しいエントリをサーチする。
存在する場合には10040へ進み、存在しない場合は10045へ進む(10035)。
10040では、STEP文にEXECオペランドを付加し、サーチしたEXCNの実行条件をEXECオペランドのパラメタに指定する。
10045では全てのSTEP文について上記の検索を行ったかをチックし、検索した場合は10055へ進む。まだ全てのSTEP文を解析していない場合には、10050へ進み、次のSTEP文を解析の対象にして、10030へ戻る。
【0031】
【発明の効果】
本発明によれば、複数のジョブステップから構成されるジョブにおいて、ファイルの受け渡し関係のないジョブステップを並列実行させることを可能とする事で、ジョブの実行時間を短縮することができる。
【図面の簡単な説明】
【図1】本発明の構成を示す機能ブロック図である。
【図2】ジョブ制御文の例を示す図である。
【図3】本発明を使用する場合におけるジョブ制御文の1例を示す図である。
【図4】第1の実施例におけるJCS解析部のフローチャートを示す図である。
【図5】ジョブ受付部のフローチャートを示す図である。
【図6】ジョブ受付部、ジョブステップ実行処理部、ステップ終了受付部、およびジョブ完了部で使用するテーブルのテーブル関連を示す図である。
【図7】実行空間管理テーブルのテーブル構造を示す図である。
【図8】JCSテーブルのテーブル構造を示す図である。
【図9】ジョブステップ実行処理部のフローチャートを示す図である。
【図10】ステップ終了受付部のフローチャートを示す図である。
【図11】ジョブ完了部のフローチャートを示す図である。
【図12】第2の実施例で参照するジョブ開始情報レコードの構造を示す図である。
【図13】ジョブ終了情報レコードの構造を示す図である。
【図14】ジョブステップ終了情報レコードの構造を示す図である。
【図15】ファイルアクセス履歴情報レコードの構造を示す図である。
【図16】第2の実施例における実行履歴解析部のフローチャートを示す図である。
【図17】実行履歴解析部で使用するテーブルの関連を示す図である。
【図18】履歴マスタテーブルの構造を示す図である。
【図19】ジョブ実行履歴テーブルの構造を示す図である。
【図20】ジョブステップ実行履歴テーブルの構造を示す図である。
【図21】ファイルアクセス履歴テーブルの構造を示す図である。
【図22】実行条件テーブルの構造を示す図である。
【図23】第2の実施例における履歴情報入力のフローチャートを示す図である。
【図24】第2の実施例における実行条件解析のフローチャートを示す図である。
【図25】第2の実施例におけるJCS解析部のフローチャートを示す図である。
【符号の説明】
100 計算機システム
200 中央処理装置
300 メモリ
400 ジョブ制御文を格納する外部記憶装置
500 実行履歴を格納する外部記憶装置
510 ジョブ開始情報レコード
520 ジョブ終了情報レコード
530 ジョブステップ終了情報レコード
540 ファイルアクセス履歴情報レコード
1000 JCS解析部
2000 ジョブ受付部
3000 ジョブステップ実行処理部
3100 実行管理マスタテーブル
3200 実行空間管理テーブル
3300 JCSテーブル
4000 ステップ終了受付部
5000 ジョブ完了部
6000 履歴情報収集部
7000 実行履歴解析部
7500 履歴マスタテーブル
7600 ジョブ実行履歴テーブル
7700 ジョブステップ実行履歴テーブル
7800 ファイルアクセス履歴テーブル
7900 実行条件テーブル
[0001]
[Industrial applications]
The present invention relates to a job scheduling method for a computer system, and particularly to a job execution control method.
[0002]
[Prior art]
One of the usage forms of the computer is a batch process in which collected data such as sales information and inventory information is collected in units of one day, one week, one month, and the like, and is collectively counted. The batch totaling process is a system that obtains a final execution result by executing some processing programs.
A logical unit of work for obtaining such an execution result is called a job. In one job, a plurality of processing programs are executed, and an execution result is obtained. An execution unit of one program is called a job step.
The programs to be executed in such a batch process and the files accessed by the programs are written in the job control language (JCL). Described Defined by job control statement (JCS).
In general, the lower job step refers to the execution result of the upper job step, and the lower job step refers to the execution result of the lower job step to repeat the process of performing the final execution. Get results.
As described above, the method of executing a job including a plurality of job steps is described in ANDREW S.A. As described in TANENBAUM, "MODERN OPERATING SYSTEMS" (Prentice-Hall International Editions, pages 6 to 7), generally, a method of sequentially executing the job steps one by one from the upper job step is generally used. In this case, one address space is allocated for execution of each job, and job steps are executed one by one on that space. As a result, in an operating system that generates and manages multiple address spaces, a plurality of jobs can be executed in parallel, and the processing time of the entire batch process can be reduced.
[0003]
[Problems to be solved by the invention]
2. Description of the Related Art In recent years, with the progress of semiconductor technology and the like, the processing capabilities of a central processing unit (CPU) and an input / output device for performing data calculation and the like have been remarkably advanced. Further, in the CPU, a distributed environment for improving the throughput of the program by arranging a large number of CPUs, distributing the execution of the program to each CPU, and improving the degree of parallelism of the processing is intended.
However, the above conventional technique has a problem that job steps cannot be processed in parallel in the execution schedule of the job steps.
Here, a job including three job steps of job step 1, job step 2, and job step 3 will be described as an example. The job processing configuration is such that the job step 3 refers to the execution results of the job steps 1 and 2. In the prior art, the job steps are executed one by one in the order of job step 1, job step 2, and job step 3. However, job step 1 and job step 2 can be executed in parallel because there is no data transfer relationship.
An object of the present invention is to reduce batch processing time by executing job steps that can be executed in parallel in one job.
[0004]
[Means for Solving the Problems]
In order to achieve the above object, in the present invention,
A computer system that specifies a program to be executed using a job control statement (JCS) and a resource used by the program, accesses a file, and executes a plurality of jobs including a plurality of job steps in parallel or sequentially. At
For each job step, a parameter specifying an execution start condition, which is a condition under which execution can be started, is provided in the JCS. When a job is submitted, the JCS defining the job is input, and all job steps of the job are input. Obtaining the maximum value of the total number of job steps that can be executed in parallel (maximum degree of parallelism) by obtaining the maximum value of the sum of the number of job steps having the same content as the parameter and the number of job steps without the specification
Securing resources for the programs of the maximum degree of parallelism to be executed in parallel;
Allowing execution of a job step satisfying an execution start condition in the job;
The method further includes monitoring the execution status of all the job steps, and releasing the secured resources when all the job steps have completed execution.
In addition, in order to obtain from the JCS a parameter specifying an execution start condition, which is a condition under which the execution of each of the above job steps can be started,
When a job is submitted, a JCS defining the job is input, and a pair of job steps accessing the same file is obtained by referring to a file identifier accessed by each job step defined in the JCS. ,
In the paired job steps, the execution order of the job step defined by the JCS, which is later in execution order, is defined as after completion of execution of the other paired job step as the execution start condition. Determining an execution start condition;
A step of writing the determined execution start condition as a parameter in the input JCS is provided.
In addition, in order to obtain, from the job execution history, a parameter that specifies an execution start condition that is a condition under which execution of each of the above job steps can be started,
At the time of execution of the job, the job identifier, the job step identifier, the start time of the job step, the accessed all file identifiers, and whether or not the accessed all the accessed files were output, Collecting history information including an access type indicating whether or not there has been;
In the same job, the start time of a job step in which the file identifiers are equal, the access type is output and input, and the access type is output is the start time of a job step in which the access type is input Determining a pair of job steps preceding the time;
Determining an execution start condition that defines an execution start condition of the job step whose input is the access type as immediately after completion of the job step whose output is the access type, and saving;
When the same job as the job is re-submitted, a step of writing the stored execution start condition as a parameter into the input JCS is provided.
[0005]
[Action]
The JCS analysis unit extracts a parallel execution designation unit of the job step specified in the JCS, or extracts a parallel execution executable unit based on file information accessed in each job step defined in the JCS, or executes the job. By matching the result of the parallel execution analysis based on the history with the input JCS, a parallel executable part of the job step is extracted.
The job execution management unit secures resources such as an address space required for parallel execution based on the degree of parallelism notified from the JCS analysis unit, and assigns a job step to each address space as a job and executes the job. . The execution of each job step is managed by a job execution management unit, and after the execution is completed, the user is notified of the completion of the execution via a job receiving unit.
The history information collection unit collects job execution history information and file access history information in chronological order. The history information analysis unit obtains a job step that can be executed in parallel based on the access history information of the file.
As a result, job steps that can be executed in parallel in the job are extracted, and these job steps can be executed in parallel.
[0006]
【Example】
The present invention will be described with reference to examples.
In the first embodiment, in a job including a plurality of job steps, a job control statement that defines a program to be executed by the job and a file to be accessed includes a record that declares the start of each job step. Is described, and the job steps in one job are executed in parallel. In this case, the condition is described in advance in the record or the input job control statement is analyzed. A job step having no restriction on the file access order is extracted, and a condition for starting the job step is added to a record declaring the start of each job step.
The second embodiment compares a job control statement of a submitted job with an execution history of a previously executed job and an access history to a file to determine a condition under which a job step can start execution. Is a method for executing job steps in parallel.
[0007]
FIG. 1 is a functional block diagram of the present invention. First, the configuration of the present invention will be described with reference to FIG.
100 indicates a computer system. 100 includes a central processing unit (CPU) (200) for performing arithmetic operations and a memory (300). Reference numeral 400 denotes an external storage device. 400 stores a job control statement defining a program to be executed by a job and a file to be accessed. 500 is also an external storage device. The history information collection unit 6000 outputs job execution history information and file access history information to the file 500.
Reference numeral 1000 denotes a JCS analysis unit. The JCS analysis unit inputs a job control statement (JCS) of the input job from 400, and obtains an access order relationship to the file from the JCS and a constraint condition for starting execution of each job step. By collating with the analysis result of (7000), a constraint condition for starting execution of each job step of the input JCS is added, and the result is transferred to the job receiving unit (2000).
The job accepting unit determines the maximum multiplicity at which the job steps can be executed in parallel with respect to the JCS passed from the JCS analyzing unit, and passes the maximum multiplicity with the JCS to the job step execution processing unit (3000).
The job step execution processing unit (3000) secures resources (address space) necessary for parallel execution, and executes the job steps one after another from the job step for which the restriction on the execution start has been released.
At 4000, a notification is received each time the execution of the job step ends, and it is confirmed whether the job to which the notified job step belongs has ended. When the process has been completed, the job completion unit 5000 is notified, and when there is a job step which has not yet started execution in another job step, the job step execution processing unit is called.
6000 is a history information collection unit. In step 6000, when the job is started, job start information is received from the job receiving unit (2000), and when the job step is completed, the job step end information and the file access history information of the job step are received. Received from the department (4000). Further, when the job is completed, job completion information is received from the job completion section (5000). The history information collection unit (6000) stores such job execution history information and file access history information in the external storage device (500) in the order of collection.
The execution history analysis unit (7000) receives the execution history (500) collected by the 6000 as an input, and restricts the start of execution of the job step based on the order of access to the file and the identification of input / output to the file. Find conditions. Job steps can be executed as soon as the file to be referenced is completed if the file to be referenced is completed. can do. A program execution unit 8000 executes a job step.
[0008]
FIG. 2 is a description example of the JCS described in the present invention. The description rules of JCS in this embodiment will be described with reference to FIG.
First. JOB is a control statement that declares a job as one processing unit. In this example, JOB1 is a job name.
In this job, a program called PGM1 is executed, then PGM2 is executed, and then PGM3 is executed. Thus, the STEP statement declares the designation of the program to be executed in the job and the execution order of the program. The execution unit of the program declared in the STEP statement is a job step. That is, a job step is an execution unit of a job, and means the execution of one program.
At 410, a program called PGM1 is executed in a job step whose job step name is STEP1. After the job step is completed, a program called PGM2 is executed in the job step whose job step name is STEP2. Further, after the execution of STEP2 is completed, a program called PGM3 is executed in a job step whose job step name is STEP3.
Files may be accessed during the execution of each program. The FD statement specifies the file to be accessed during the execution of the program. In the FD statement, a file name to be accessed is specified by a FILE operand.
Thus, it is necessary to associate a file to be accessed defined in the JCS with a program. That is the FD name. In the example of 410, IN1, OUT1, IN2, OUT2, IN3, OUT3 are FD names. Whether access to the file defined here is input or output is specified in the program.
[0009]
Next, the flow of the process of 410 will be described.
First, in STEP1, a program called PGM1 is executed. Here, A. Data is input from a file called DATA. The execution result is output to a file named DATA. Next, in STEP2, a program called PGM2 was created. Execute. here , PGM1, which is the execution result. Data of a file named DATA is input, and the execution result is set to C.DATA. Output to a file called DATA. After the execution of STEP2 is completed, a program called PGM3 is executed in STEP3. Here, the B.M. Data of a file named DATA is input, and the execution result is Output to a file called DATA.
Here, STEP2 and STEP3 are mutually B.D. Although a file named DATA is referred to, B. If the access to DATA is known to be an input, there is no data transfer relationship between STEP2 and STEP3, so that execution can be performed in parallel. However, B.I. If access to DATA is not known as input, it cannot be performed in parallel. Therefore, in the case of such a job step configuration, if there is no data transfer relationship between STEP 2 and STEP 3 after the execution of STEP 1 is completed, by executing these in parallel, the processing time is reduced. Is the object of the present invention.
[0010]
With reference to FIG. 3, a designation method for executing STEP2 and STEP3 of 410 in parallel will be described. This is the description rule in the present embodiment.
In 420, the specification of EXEC = STEP1 is added to the STEP sentences of STEP2 and STEP3. This declares an execution start condition indicating that execution can be started when the execution of the job step STEP1 is completed. This declaration may be made in advance by JCS.
In this embodiment, if the above-mentioned execution start condition is not declared in the JCS, an execution start condition which is a condition under which execution can be started by the JCS analyzer 1000 based on the input JCS is added to the operand of the STEP statement. Have to be able to.
The above is the description of the configuration and the job control statement description rules in the present embodiment.
[0011]
Next, a first embodiment will be described.
FIG. 4 is a flowchart of the JCS analysis unit.
First, all the JCSs of the input job are read (1005).
Next, it is checked whether or not there is a STEP statement specifying the EXEC operand for the JCS (1010).
If there is, the process branches to 1060 and passes the JCS to the job receiving unit. If not, input JCS line by line To analyze . First, the analysis target is set to the first line of the JCS (1015).
If the analysis target is a JOB sentence, the process proceeds to 1055, where the analysis target is the next one line. If it is not a JOB sentence, the process proceeds to 1025 to check whether it is a STEP sentence. If it is a STEP sentence, the process proceeds to 1030, where the address of the STEP sentence (the address where the STEP sentence is stored) is stored, and the process proceeds to 1055. If it is not a STEP statement, the remaining specification is an FD statement that specifies a file to be accessed.
Therefore, in 1035, an FD sentence specifying a file name equal to the FD sentence is searched from the preceding job step to the upper job step. When it is found first, the process proceeds to 1045, and when it is not found, the process branches to 1055 to set the analysis target in the next first line (1040).
At 1045, an EXEC operand is added to the STEP statement stored at 1030, and a job step name specifying an FD statement indicating the same file name retrieved at 1035 is designated.
Next, at 1050, it is checked whether the above analysis has been performed for all the input JCSs. If the analysis has been performed, the process proceeds to 1060 and the JCS is passed to the job receiving unit. If the search has not been performed, the process proceeds to 1055, and the above analysis is repeated with the target of analysis set as the next line.
[0012]
Next, the processing of the job receiving unit (2000) will be described with reference to FIG. FIG. 5 is a flowchart of the job execution receiving unit.
First, in 2005, the JCS is received from the JCS analysis unit.
Next, in 2010, the degree of parallelism of the job step is obtained. This is the maximum value of the number of STEP statements in which the execution start conditions of the input JCS EXEC operands are equal or the execution operands are not specified in the EXEC operand (STEPs in which the EXEC operand is not specified can be processed in parallel. is there).
Next, a job start record, which is execution history information, is created and passed to the history information collection unit (2015). Finally, a JCS table for monitoring the job execution status is created, and is linked to the last entry of the queue of the waiting JCS table pointed by the execution management master table. Here, the details of the job start record, the JCS table, and the execution management master table will be described later.
[0013]
FIG. 6 shows the structure of a table used by the job receiving unit (2000), the job step execution processing unit (3000), the step end receiving unit (4000), and the job completion unit (5000).
The execution management master table (3100) is a master table for monitoring a job execution status and managing a space in which a job can be executed.
The execution space management table (3200) is a table describing the job currently being executed. If the job is being executed, it is linked to the queue pointed from the JCS table (3300) of the corresponding job. , An empty execution space management table queue pointed by 3110 and 3120 in the execution management master table (3100).
The JCS table is a table for managing the contents of the JCS of each job and the execution space management table (3200) corresponding to the used space.
During the execution of the job, it is connected to the running JCS table queue pointed by 3130 and 3140, and when it is waiting for execution, it is connected to the JCS queue waiting for execution pointed to by 31503160. By passing the JCS table (3300) and the execution space management table (3200) to the program execution unit, one job step is executed on the space corresponding to the execution space management table (3200).
[0014]
FIG. 7 shows details of the execution space management table.
3210 and 3220 are pointers for generating queues managed by the execution management master table (3100) and the JCS table (3200). An area 3230 stores a job name to be executed, and an area 3240 stores a job step name. Reference numeral 3250 denotes a flag indicating an execution state, which is turned on during execution and turned off when not executed. 3260 is the number of the corresponding address space.
FIG. 8 shows the structure of the JCS table (3300). The JCS table is a table created for each job.
3310 and 3320 are pointers for generating a JCS table queue managed by the execution management master table.
Reference numerals 3330 and 3340 are pointers for managing queues of the execution space management table secured for executing the job step.
Reference numeral 3350 denotes a job step completion mask. From the upper job step, 2 bits are allocated left-justified. When these two bits are '00', it means not executed, and '10' means being executed. Further, when the execution is completed, it becomes "11".
Reference numeral 3360 denotes a storage area for the number of job steps. Reference numeral 3370 denotes an area for storing the degree of parallelism obtained by the job receiving unit 2010. An area 3380 stores the contents of the JCS.
[0015]
The flow of the job step execution processing unit will be described with reference to FIG. First, the number of entries in the free execution space management table queue is determined by 3010.
Next, in step 3020, a JCS table having a smaller parallelism (3370) than the number of entries obtained in step 3010 is searched from the head of the JCS queue waiting to be executed. If not, return to 3010 at 3030. In this case, the process may return to 3010 after waiting for a certain time interval.
If it is found that the number is 3030, the execution space management table corresponding to the degree of parallelism in the JCS table is separated from the empty queue in 3040, and 3110 and 3120 are updated. A connection is made to the execution space management table queue managed by the JCS table obtained in 3020. 3330 and 3340 are used for managing this queue. Reference numeral 3040 denotes an entry point when called by the step end receiving unit.
Next, in 3050, the analysis is advanced from the contents of the JCS (3380) from the upper STEP statement, and a job step that can be executed is searched. This search condition is
(1) A job step for which no EXEC operand is specified in the STEP statement and which has not been executed yet
Or
(2) The job step specified by the EXEC operand of the STEP statement is a job step that has already been executed
It is. Here, the execution status of the job step can be confirmed by referring to the field corresponding to each job step in the job step mask (3350).
At 3060, the executable job name and the job step name are stored in 3230 and 3240, respectively, and the execution flag (3250) is turned ON.
In step 3070, the corresponding field of the job step completion mask (3350) corresponding to the registered job step name is set to “10” to be in execution, and the updated execution space management table (3200) and JCS table (3300) are executed. Hand over to the department (8000).
The program execution unit executes the job step on the space number (3260) described in the execution space management table.
[0016]
Next, the step end receiving unit will be described with reference to FIG.
When the job step is completed, a notification is received from the program execution unit (8000).
First, the field of the job step completion mask (3350) corresponding to the job step notified of the execution completion in 4010 is set to '11'.
At 4020, the job name (3230) and job step name (3240) of the execution space management table (3200) that have been completed are cleared, and the execution flag (3250) is turned off.
Next, in 4030, a job step end record is created as an execution history and passed to the history information collection unit (6000).
Next, at 4040, the job step completion mask (3350) is looked at by 2 bits from the left for the number of job steps (3360) times to check whether there is a field set to '00'. In some cases, it means that there is a job step whose execution has not been started yet, so the process proceeds to 4070 to call the job step execution processing unit (proceed to step 3040 in FIG. 9).
If it does not exist, the job step completion mask (3350) is checked at 4050 by two bits from the left for the number of job steps (3360) times to check whether there is a field of '10'. If it exists, it means that there is still a job step being executed. Therefore, the execution of 4050 is repeated until there is no field of “10”. If there is no field with “10” in 4050, it means that all job steps have been executed. At 4060 Pass control to job completion section.
[0017]
Finally, the flow of the job completion unit (5000) will be described with reference to FIG.
First, in step 5010, a job end record is created as an execution history and passed to the history information collection unit (6000).
Next, in 5020, the execution space management table (3200) managed in the JCS table (3300) is connected to the empty queue managed by 3110 and 3120 in the execution management master table (3100).
Finally, the JCS table is released.
[0018]
Next, a second embodiment will be described.
In the second embodiment, parallel execution of job steps is analyzed based on past job execution history information and file access history information, and the results are used to execute the job steps in parallel.
Batch processing includes batch processing in which data is collected in units of one day, one week, one month, and the like, and processed collectively. , The same job is executed. In such a case, the second embodiment is effective.
In the first embodiment, when an execution start condition is obtained by the JCS analysis unit, whether a file access is an input or an output is specified in a program, so that it is impossible to identify whether the file access is an input or an output. Therefore, when the JCS shown in FIG. 2 is input, the EXEC operand of STEP2 becomes EXEC = STEP1, and the EXEC operand of STEP3 becomes EXEC = STEP2, and eventually the job steps are executed sequentially.
When the second embodiment shown here is used, the EXEC operand of STEP3 becomes EXEC = STEP1, and after the execution of STEP1 is completed, STEP2 and STEP3 can be executed in parallel.
The second embodiment differs from the first embodiment in that an execution history analysis unit (7000) is added and the flow of the JCS analysis unit (1000) is different.
[0019]
In the description of the present embodiment, first, details of a job execution history record and a file access history record will be described, and then, a flow of an execution history analysis unit using the history information will be described. Finally, the flow of the JCS analysis unit will be described.
The history information will be described with reference to FIG. 12, FIG. 13, FIG. 14, and FIG.
When the execution of the job is started, the job receiving unit (2000) outputs the job start information (510), and when the execution of the job ends, the job completion unit (5000) outputs the job end information (520).
Further, when the job step is completed during the execution of the job, the step completion receiving unit (4000) outputs the job step completion information (530).
When the program executed in each job step issues an instruction (CLOSE instruction) declaring the end of access, file access history information (540) is output for the closed file.
Each record has an identifier in the record in order to distinguish the type of information. The job start information (510) is X'01 '(511), the job end information (520) is X'02' (521), and the job step information (530) is X'03 '. The file access history information (540) differs depending on whether the program has input or output file data. The identifier (541) is X'04 'for input and X'05' for output.
Each of the above information is passed to the history information collection unit (6000) in time series every time an event occurs, and the history information collection unit (6000) outputs the information to the external storage device (500).
[0020]
Hereinafter, the output record format of each information will be described.
FIG. 12 shows the record format of the job start information.
The record is output by the job receiving unit (2000) when the execution of the job is started. 511 is an identifier, and the record is X'01 '. Reference numeral 512 denotes a job name. 513 is a job start time.
FIG. 13 shows the record format of the job end information.
521 is an identifier, and the record is X'02 '. 522 is a job name. 523 indicates the start time of the job execution, and 524 indicates the end time of the job execution.
FIG. 14 shows the record format of the job step end information.
531 is an identifier, which is X'03 'in the record. 532 is the name of the job to which the completed job step belongs. 533 is the start time of the job to which the finished job step belongs. 534 is a job step name. 535 is the start time of the job step, and 536 is the end time of the job step.
FIG. 15 shows the record format of the file access history information.
This record is output when the program issues a CLOSE instruction. 541 is an identifier. However, the contents of the identifier (541) are different depending on whether the program inputs data from a file or outputs data. X'04 'for input and X'05' for output.
542 is the job name of the job to which the program that accessed the file belongs. Reference numeral 543 denotes a start time of the job. 544 is the job step name of the job step executed by the program that accessed the file. 545 is the start time of the job step. 546 is the FD name. Reference numeral 547 denotes a file name which is an identifier of the file.
[0021]
The execution analysis unit (7000) obtains an execution start condition of each job step using the history information.
FIG. 16 shows the configuration of the execution history analysis unit (7000).
The execution history analysis unit (7000) is divided into history information input (7100) and execution condition analysis (7200). In the history information input (7100), the above-mentioned history information is input, and the job, the job step, and the file accessed by the job step are input. Relate. In the execution condition analysis (7200), an execution start condition is obtained for each job step from the result associated with the history information input (7100).
[0022]
17 to 22 show the relationships between the tables used in the execution history analysis unit and the details of each table.
FIG. 17 is a table relation diagram of a table group prepared for storing and analyzing the history information input by the execution condition analysis (7200). Details of each table are shown in FIGS.
The history master table (MSTH) (7500) is stored in the execution history analysis unit. (7000) It is a master table that manages a JOBH (7600) queue that stores job execution history and an execution condition table (7900) that stores execution start conditions for each job step.
The job execution history table (JOBH) (7600) is created for each job, and stores job start information (510) and job end information (520). The job (7600) queue follows the job execution order. Further, it manages a job step execution history table (STPH) (7700) queue that stores information on job step executed in the job.
The STPH (7700) is created for each job step, and is arranged in a queue in the order of execution within the same job. The STPH (7700) stores start information and end information of a job step. Further, the STPH (7700) manages a file access history table FDH (7800) queue that stores information of the file accessed in the job step.
The FDH (7800) is created for each file accessed by the program, and stores file information of an access destination. The FDH (7800) creates a queue for each job step executed by the program.
The execution condition table (EXCN) (7900) stores conditions under which execution can be started for all job steps stored in the history information.
[0023]
18 to 22 show details of the table described above.
FIG. 18 is a table structure of the history master table (MSTH) (7600).
The MSTH is a master table that manages a JOBH queue and an EXCN queue. The MSTH (7500) stores a first JOBH address (7510), a last JOBH address (7520), and an EXCN address storage area (7530).
FIG. 19 shows a table structure of JOBH (7600).
JOBH is created when the job start information (510) is input. 7610 is Next JOBH This is an address storage area, and reference numeral 7620 is a previous JOBH address storage area. The cues are formed using 7610 and 7620. Reference numeral 7630 denotes a first STPH address storage area, and reference numeral 7640 denotes a last STPH address storage area. Reference numerals 7630 and 7640 manage an STPH queue that stores job step information executed in a job corresponding to JOBH.
Reference numeral 7650 denotes a storage area for the job start time, and reference numeral 7660 denotes a storage area for the end time of the job. Reference numeral 7670 denotes a job name storage area. 7650 and 7670 are copied from the job start information record (510). 7660 is copied from the job end information record (520).
[0024]
FIG. 20 is a table structure of STPH (7700).
The STPH (7800) is created when the file access history information (540) is input and the STPH (7700) to which the program accessing the file belongs does not exist.
7710 is a storage area for the next STPH table address, and 7720 is a storage area for the previous STPH table address. 7710 and 7720 form an STPH queue that manages job steps executed in job units. Reference numeral 7730 denotes a head FDH address storage area, and reference numeral 7740 denotes a final FDH address storage area. Reference numerals 7730 and 7740 manage an FDH queue for storing file information accessed in a job step. Reference numeral 7750 denotes a storage area for the job step name. Reference numeral 7760 denotes a job step start time storage area, and reference numeral 7770 denotes a job step end time storage area.
FIG. 21 shows a table structure of FDH (7800).
The FDH (7800) is created when the file access history information (540) is input. FDH ( 7800 ) Is managed for each job step in which the program accessing the file is executed. Reference numeral 7810 denotes a next FDH address storage area, and reference numeral 7820 denotes a previous FDH address storage area. An FDH queue is created using 7810 and 7820. Reference numeral 7830 denotes a storage area of the FD name described in JCS. Similarly, 7840 is a storage area for file names. Reference numeral 7850 denotes an input / output identifier storage area.
FIG. 22 is a table structure of the execution condition table (EXCN) (7900).
7910 describes a job name, and 7920 describes a job step name executed in the job. Furthermore, 7930 stores a condition for starting execution, that is, a job step name that must be ended to start the job step.
[0025]
FIG. 23 is a flow of history information input (7100).
First, one history information record is input (7105). At 7110, it is checked whether or not the input record is the job start information record (510). That is, it is checked whether or not the identifier (511) is X'01 '. If the identifier (511) is X'01 ', the flow advances to 7115 to create a job (7600). Here, the job start time (7650) and the job name (7670) are registered in JOBH (7600). The created JOBH is managed by 7510 and 7520 JOB Register in the queue.
If the identifier is not X'01 'in step 7110, the flow advances to step 7120. At 7120, it is checked whether or not the input record is a file access history information record (540). That is, it is checked whether or not the identifier (541) of the input record is X'04 'or X'05'. If the input record satisfies the above condition, the process proceeds to 7125; otherwise, the process proceeds to 7135.
In 7125, first, the JOBH (7600) queue managed by the 7510 and 7520 is traced to search for a JOBH (7600) satisfying the following conditions.
(1) The job name (542) of the input record is equal to the job name (7670) of JOBH (7600).
(2) Job start time (543) of the input record and JOBH (7600)
The job start time (7650) is equal.
(3) The job end time (536) has not been registered.
In the JOBH search processing, the start information record (510) of the job to which the program that accessed the file described in the input record belongs already exists. Output to system In the JOBH search processing, there is always a JOBH (7600) satisfying the above three conditions in the JOBH queue.
Next, an STPH (7700) that satisfies the following three conditions is searched from the STPH (7700) queue managed by the JOBH (7600) obtained by the JOBH search processing.
(1) The job step name (544) of the input record is equal to the job step name (7750) of the STPH (7700).
(2) The job step start time (545) of the input record is equal to the job step start time (7760) of STPH (770).
(3) The job step end date and end time (7700) have not been registered.
If the STPH search process fails to search for an STPH that satisfies the three conditions, a new STPH area is secured, and the job step name (542) and the job step start time (544) are entered from the input record. make a copy. Thereafter, the STPH to be operated in this step is set as the STPH, and the process proceeds to 7130.
If the STPH (7770) that satisfies the above three conditions can be found in the STPH search process, the process proceeds to 7130 with the searched STPH (7700) as an operation target.
At 7130, first, an FDH area is secured. For the secured FDH (7800), the FD name (546), the file name (547), and the input / output identifier (548) are registered from the input record information. Here, the identifier (548) of the file access history information record (540) is copied to the input / output identifier (7860). The FDH that has been registered is connected to the end of the FDH queue managed by the STPH (7700) that has been operated in the STPH search process.
[0026]
7135 Check whether the input record is a job step end information record. That is, it is checked whether the identifier of the input record is X'03 '.
If the identifier of the input record is X'03 ', the flow advances to 7140. In step 7140, the JOBH (7600) that satisfies the following three conditions is searched from the JOBH queue managed by the MSTH (7500).
(1) The job name (532) of the input record is equal to the job name (7670) of JOBH.
(2) The job start time (532) of the input record is equal to the job start time (7650) of JOBH.
(3) The job end time (7660) of JOBH (7600) has not been registered.
In the JOBH search process, the job start information record (510) to which the job step described in the input record belongs has already been output, and the JOBH (7600) corresponding to the job start information record (510) has been created. is there.
Next, in the STPH (7700) queue managed by the searched JOBH (7600), an STPH (7700) satisfying the following three conditions is searched.
(1) The job step name (534) of the input record is equal to the job step name (7750) of the STPH (7700).
(2) The job step start time (535) of the input record is equal to the job step start time (7760) of STPH (770).
(3) The job step end time (7770) of STPH (7700) has not been registered.
In the search process of the STPH (7700), when the STPH that satisfies the above three conditions can be searched, the job step end time (536) is registered in the STPH (7700) from the input records.
[0027]
If the STPH (7700) that satisfies the condition cannot be searched in the STPH search processing, a new STPH area is secured, and information corresponding to the areas 534 to 536 is copied based on the information of the input record. Next, the STPH is connected to the end of the STPH queue managed by the searched JOBH by the JOBH (7700).
In 7135, if the identifier of the input record is not X'03 ', the flow advances to 7145. At 7145, it is checked whether the input record is a job end information record. That is, it is checked whether or not the identifier of the input record is X'02 '. If the identifier of the input record is X'02 ', the flow advances to 7150. In 7150, first, a job (7500) that satisfies the following three conditions is searched.
(1) The job name (522) of the input record is equal to the job name (7670) of JOBH.
(2) The job start time (523) of the input record is equal to the job start time (7650) of JOBH (7600).
(3) The job end time (7660) of JOBH (7600) has not been registered.
In the JOBH search processing, the job start information record (510) corresponding to the job end information described in the input record has been output, and the OS application job search means (1300) has corresponded to the job start information record (300). JOBH to be created has already been created. Therefore, in the JOBH search processing, there is always a JOBH that satisfies the above three conditions.
Next, the job end time (524) is registered for the JOBH obtained in the JOBH search process from the input record.
[0028]
If it is determined in step 7145 that the input record is not the job end information record, the process advances to step 7155. Similarly, after completing the processes in 7130, 7140, and 7150, the process proceeds to 7155. At 7155, it is checked whether the record input this time is the last record. In the case of the last record, the input processing of the system operation information is completed. If it is not the last record, the flow advances to step 7105 to input the next record and perform the same processing.
As a result, the relationship between the job and the job step and the relationship between the job step and the accessed file could be related. Using this, the execution start condition of each job step is obtained, and EXCN (7900) is created.
[0029]
The flow of the execution condition analysis will be described with reference to FIG.
First, the analysis target is set to the first entry of the JOBH queue (7205). First, a job to be analyzed is selected.
Next, the job step execution start condition is determined by examining the files accessed by the job steps belonging to the job to be analyzed one by one. Therefore, in 7210, in order to determine the analysis target as the final job step, the last entry in the STPH queue managed by the job to be analyzed is set as the analysis target.
At 7215, it is checked whether or not the STPH to be analyzed is the first entry. If it is the first entry, the process proceeds to 7250. Otherwise, proceed to 7220.
In 7220, an FDH whose input / output identifier is an input is searched from among the FDHs managed by the STPH that has been analyzed. This may be more than one. As a result of the determination in 7225, if there is, the process proceeds to 7230; otherwise, the process proceeds to 7245.
In 7230, the FDH whose file name is the same as the searched FDH and whose input / output identifier is an output is searched from the preceding stage of the STPH currently being analyzed to the upper stage STPH. If yes, go to 7240; otherwise, go to 7245.
As a result of the search in 7230 and 7235, if there is an STPH that satisfies the above condition, the execution of the job step corresponding to the STPH to be analyzed starts unless the job step corresponding to the STPH searched in 7230 ends. Can not do it. In step 7240, the job name, the job step name, and the job step name searched in step 7230 are registered in the EXCN (7900).
In step 7245, the process returns to step 7215 with the preceding STPH as an analysis target in order to check the execution conditions of the next job step.
At 7250 branched from 7215, before the next job is analyzed, it is checked whether the JOBH currently being analyzed is the last entry in the JOBH queue, and if it is the last entry, the process ends. If it is not the last entry, the flow advances to 7255, and the next JOBH is analyzed, and the flow returns to 7210.
Based on the EXCN (7900) obtained by the execution history analysis unit (7000), the JCS analysis unit adds the execution conditions of the job step to the input JCS and passes it to the job reception unit.
[0030]
The flow of the JCS analysis unit will be described with reference to FIG.
First, the JCS of one job statement is read by 10005. In step 10010, an entry having the same job name as the JCS input from EXCN (7900) is searched.
If it does not exist, the process branches from 10015 to 10055, and passes the JCS to the job receiving unit (2000).
If there is, the process proceeds to 10020, and the entry searched in 10010 is narrowed down to the analysis target. In step 10025, the second STEP sentence in the JCS is set as an analysis target.
In step 10030, an entry equal to the job step name indicated in the STEP statement is searched from the EXCN entry to be analyzed.
If it exists, the process proceeds to 10040, and if it does not exist, the process proceeds to 10045 (10035).
In 10040, an EXEC operand is added to the STEP statement, Searched The execution condition of EXCN is specified in the parameter of the EXEC operand.
In step 10045, it is checked whether the above search has been performed for all the STEP sentences. If not all STEP statements have been analyzed yet, the process proceeds to 10050, where the next STEP statement is analyzed, and the process returns to 10030.
[0031]
【The invention's effect】
According to the present invention, in a job composed of a plurality of job steps, job steps having no file transfer relationship can be executed in parallel, so that the execution time of the job can be reduced.
[Brief description of the drawings]
FIG. 1 is a functional block diagram showing a configuration of the present invention.
FIG. 2 is a diagram illustrating an example of a job control statement.
FIG. 3 is a diagram illustrating an example of a job control statement when the present invention is used.
FIG. 4 is a diagram illustrating a flowchart of a JCS analysis unit in the first embodiment.
FIG. 5 is a diagram illustrating a flowchart of a job receiving unit.
FIG. 6 is a diagram illustrating a table relation of tables used by a job receiving unit, a job step execution processing unit, a step end receiving unit, and a job completion unit.
FIG. 7 is a diagram showing a table structure of an execution space management table.
FIG. 8 is a diagram showing a table structure of a JCS table.
FIG. 9 is a diagram illustrating a flowchart of a job step execution processing unit.
FIG. 10 is a diagram illustrating a flowchart of a step end receiving unit.
FIG. 11 is a diagram illustrating a flowchart of a job completion unit.
FIG. 12 is a diagram illustrating a structure of a job start information record referred to in the second embodiment.
FIG. 13 is a diagram showing a structure of a job end information record.
FIG. 14 is a diagram showing the structure of a job step end information record.
FIG. 15 is a diagram showing a structure of a file access history information record.
FIG. 16 is a diagram illustrating a flowchart of an execution history analysis unit according to the second embodiment.
FIG. 17 is a diagram showing a relation between tables used in the execution history analysis unit.
FIG. 18 is a diagram showing a structure of a history master table.
FIG. 19 is a diagram showing a structure of a job execution history table.
FIG. 20 is a diagram showing a structure of a job step execution history table.
FIG. 21 is a diagram showing a structure of a file access history table.
FIG. 22 is a diagram showing the structure of an execution condition table.
FIG. 23 is a diagram illustrating a flowchart of history information input in the second embodiment.
FIG. 24 is a diagram illustrating a flowchart of execution condition analysis in the second embodiment.
FIG. 25 is a diagram illustrating a flowchart of a JCS analyzer in the second embodiment.
[Explanation of symbols]
100 computer system
200 central processing unit
300 memory
400 External storage device for storing job control statements
500 External storage device for storing execution history
510 Job start information record
520 Job end information record
530 Job step end information record
540 File access history information record
1000 JCS analysis unit
2000 Job reception unit
3000 Job step execution processing unit
3100 Execution management master table
3200 execution space management table
3300 JCS table
4000 Step end reception unit
5000 Job Completion Department
6000 History information collection unit
7000 execution history analysis unit
7500 History master table
7600 Job execution history table
7700 Job step execution history table
7800 File access history table
7900 Execution condition table

Claims (3)

ジョブ制御文(JCS:Job Control Statements)を用いて実行するプログラムと、当該プログラムが使用する資源を指定し、
ファイルにアクセスし、複数のジョブステップから構成される複数のジョブが並列あるいは逐次的に実行する計算機システムにおいて、
各ジョブステップについて、実行を開始できる条件である実行開始条件を指定するパラメタをJCSに設け、
ジョブが投入されると、当該ジョブを定義したJCSを入力し、
前記ジョブの全ての各ジョブステップから、前記パラメタの指定内容が等しいジョブステップと前記指定のないジョブステップの数の合計の最大値を求めることで、並列に実行できるジョブステップの最大値(最大並列度)を求めるステップと、
前記最大並列度の数のプログラムが平行して実行できるための資源を確保するステップと、
前記ジョブの中で、実行開始条件を満たしたジョブステップの実行を許可するステップと、
前記全てのジョブステップの実行状況を監視し、全ての前記ジョブステップが実行を完了した時点で、確保した前記資源を解放するステップを有することを特徴とするジョブ実行制御方法。
A program to be executed by using a job control statement (JCS) and resources to be used by the program are specified.
In a computer system that accesses a file and executes a plurality of jobs composed of a plurality of job steps in parallel or sequentially,
For each job step, a parameter for specifying an execution start condition which is a condition for starting execution is provided in JCS,
When a job is submitted, enter the JCS that defines the job,
By calculating the maximum value of the total number of job steps having the same contents of the parameter and the number of unspecified job steps from all the job steps of the job, the maximum value of the job steps that can be executed in parallel (maximum parallel Degree), and
Securing resources for the programs of the maximum degree of parallelism to be executed in parallel;
Allowing execution of a job step satisfying an execution start condition in the job;
A job execution control method for monitoring the execution status of all the job steps and releasing the secured resources when all the job steps have completed execution.
請求項1の記載のジョブ実行制御方法において、
ジョブが投入されると、当該ジョブを定義したJCSを入力し、
前記JCSに定義されている各ジョブステップがアクセスするファイル識別子を参照して同一のファイルへアクセスするジョブステップのペアを求めるステップと、
前記ペアとなったジョブステップにおいて、前記JCSで定義されたジョブステップの実行順序が後となっているジョブステップの実行開始条件として、前記ペアとなったもう一方のジョブステップの実行完了後と定める実行開始条件を決定するステップと、
前記決定した実行開始条件をパラメタとして入力したJCSに書き込むステップを有することを特徴とするジョブ実行制御方法。
The job execution control method according to claim 1,
When a job is submitted, enter the JCS that defines the job,
Requesting a pair of job steps accessing the same file by referring to a file identifier accessed by each job step defined in the JCS;
In the paired job steps, the execution order of the job step defined by the JCS, which is later in execution order, is defined as after completion of execution of the other paired job step as the execution start condition. Determining an execution start condition;
A step of writing the determined execution start condition as a parameter in the input JCS.
請求項1記載のジョブ実行制御方法において、
上記ジョブの実行時に該ジョブについて、
ジョブの識別子と、
ジョブステップの識別子と、
ジョブステップの開始時刻と、
アクセスした全てのファイル識別子と、
アクセスした前記全てのファイルへのアクセスが出力であったか、入力であったかを示すアクセス種別を含む履歴情報を収集するステップと、
同一ジョブ内で、
前記ファイル識別子が等しく、かつ、
前記アクセス種別が出力と入力であり、かつ、
前記アクセス種別が出力であるジョブステップの開始時刻が、前記アクセス種別が入力であるジョブステップの開始時刻より先行しているジョブステップのペアを求めるステップと、
前記アクセス種別が入力であるジョブステップの実行開始条件を、前記アクセス種別が出力であるジョブステップが完了した直後と定める実行開始条件を決定し、保存するステップと、
前記ジョブと同一のジョブが再び投入された時に、前記保存された実行開始条件をパラメタとして入力したJCSに書き込むステップを有することを特徴とするジョブ実行制御方法。
The job execution control method according to claim 1,
When the job is executed,
A job identifier,
An identifier for the job step,
The start time of the job step,
All file identifiers accessed,
Collecting history information including an access type indicating whether access to all the accessed files was output or input;
In the same job,
The file identifiers are equal, and
The access types are output and input, and
Obtaining a pair of job steps in which the start time of the job step whose output is the access type is earlier than the start time of the job step whose input is the access type;
Determining an execution start condition that defines an execution start condition of the job step whose input is the access type as immediately after completion of the job step whose output is the access type, and saving;
And a step of writing the stored execution start condition as a parameter to the input JCS when the same job as the job is input again.
JP33975793A 1993-12-06 1993-12-06 Job execution control method Expired - Fee Related JP3559581B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33975793A JP3559581B2 (en) 1993-12-06 1993-12-06 Job execution control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33975793A JP3559581B2 (en) 1993-12-06 1993-12-06 Job execution control method

Publications (2)

Publication Number Publication Date
JPH07160517A JPH07160517A (en) 1995-06-23
JP3559581B2 true JP3559581B2 (en) 2004-09-02

Family

ID=18330521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33975793A Expired - Fee Related JP3559581B2 (en) 1993-12-06 1993-12-06 Job execution control method

Country Status (1)

Country Link
JP (1) JP3559581B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3846222B2 (en) * 2001-05-01 2006-11-15 日本電気株式会社 Job re-execution method
JP5512215B2 (en) * 2009-09-30 2014-06-04 株式会社日立システムズ Job processing system and method, and program thereof

Also Published As

Publication number Publication date
JPH07160517A (en) 1995-06-23

Similar Documents

Publication Publication Date Title
JP7090778B2 (en) Impact analysis
Beyer et al. Reliable benchmarking: requirements and solutions
JP7023718B2 (en) Selecting a query to execute against a real-time data stream
Baer A survey of some theoretical aspects of multiprocessing
US9747086B2 (en) Transmission point pattern extraction from executable code in message passing environments
JP5940503B2 (en) Management method of computational resources in graph type computation
JP5813165B2 (en) Parallelizing sequential frameworks using transactions
CN108509556B (en) Data migration method and device, server and storage medium
JPH0810440B2 (en) Application event collection method
DE102016214786A1 (en) Application profiling job management system, program and method
US5280615A (en) Out of order job processing method and apparatus
US20040181782A1 (en) System and method for optimizing memory usage by locating lingering objects
JPH05143332A (en) Computer system having instruction scheduler and method for rescheduling input instruction sequence
JP3268338B2 (en) Computer system
WO2001059561A9 (en) System and method for rapid completion of data processing tasks distributed on a network
US7913206B1 (en) Method and mechanism for performing partitioning of DRC operations
US20110023044A1 (en) Scheduling highly parallel jobs having global interdependencies
US20040194090A1 (en) Tracking customer defined workloads of a computing environment
JP3559581B2 (en) Job execution control method
JP2005148901A (en) Job scheduling system
Bündgen et al. A fine-grained parallel completion procedure
Eich et al. Database concurrency control using data flow graphs
Nanda et al. A Comprehensive Survey of Machine Learning in Scheduling of Transactions
JP3826602B2 (en) System operation management device
Azaiez et al. Proving determinacy of the PharOS real-time operating system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20031216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040216

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040316

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040325

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040524

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080528

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090528

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees