JP2011164876A - Task processing device, task processing method, and program - Google Patents
Task processing device, task processing method, and program Download PDFInfo
- Publication number
- JP2011164876A JP2011164876A JP2010026212A JP2010026212A JP2011164876A JP 2011164876 A JP2011164876 A JP 2011164876A JP 2010026212 A JP2010026212 A JP 2010026212A JP 2010026212 A JP2010026212 A JP 2010026212A JP 2011164876 A JP2011164876 A JP 2011164876A
- Authority
- JP
- Japan
- Prior art keywords
- task
- execution
- value
- executed
- execution value
- 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.)
- Withdrawn
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、複数のタスクを並行して実行する際のタスクの制御に関する。 The present invention relates to task control when a plurality of tasks are executed in parallel.
従来より、実行可能なジョブの上限数を決めておき、この上限数を超えない範囲でジョブの起動を制御する制御方法があった(特許文献1参照)。
また、各ジョブに割り当てられている優先度に応じて実行するジョブを決定し、且つ、実行中の非優先実行ジョブの実行を一時停止し、優先実行が指定されているジョブを優先的に実行する制御方法があった(特許文献2参照)。
Conventionally, there has been a control method in which the upper limit number of jobs that can be executed is determined and job activation is controlled within a range not exceeding the upper limit number (see Patent Document 1).
Also, the job to be executed is determined according to the priority assigned to each job, the execution of the non-priority execution job being executed is suspended, and the job for which priority execution is specified is preferentially executed. There was a control method to perform (see Patent Document 2).
しかし、特許文献1のように、実行可能なジョブの上限数を決める方法では、ジョブ毎の処理量を考慮していない。このため、例えば、稼働しているジョブの処理量が少なく計算資源に余裕がある場合でも、ジョブ数が上限に達していると更なるジョブの起動は制限されることになり、ホストの計算資源を必ずしも有効に使用できないという問題があった。 However, the method for determining the upper limit number of jobs that can be executed as in Patent Document 1 does not consider the processing amount for each job. For this reason, for example, even if the amount of processing of running jobs is small and there is enough computing resources, if the number of jobs reaches the upper limit, further job startup will be restricted, and the computing resources of the host will be limited. There is a problem that cannot be used effectively.
また、特許文献2のように、非優先実行ジョブの実行を一時停止する方法では、例えば、ネットワーク上の機器と通信を行うジョブが、機器に要求を送信し、その要求に対する応答の受信待ち状態で停止状態になった場合、ジョブは機器からの応答は受信できない。或いは、ジョブが、機器に対して、印刷データなどの大量データを送信中に停止状態になった場合、そのデータは機器側でエラー処理されなければならない。このように、本来、停止すべきでない箇所でジョブが停止させられることにより、例外処理、エラー処理やリトライ処理が必要になったり、ネットワーク上に無駄なデータが流れたりすることになるという問題があった。
In addition, as disclosed in
本発明は、上記の問題点を解決するためになされたものである。本発明の目的は、タスクを処理する装置の性能と各タスクの処理負荷の高低を考慮し、タスクを効率よく実行する仕組みを提供することである。 The present invention has been made to solve the above problems. An object of the present invention is to provide a mechanism for efficiently executing a task in consideration of the performance of an apparatus for processing a task and the level of processing load of each task.
本発明は、複数のタスクを並行して実行可能なタスク処理装置であって、タスクの実行時の処理負荷の高低を示す実行値を指定してタスクを起動する起動制御手段と、前記起動制御手段によりタスクに指定された実行値に応じた処理量で前記タスクを実行する実行手段と、タスクに指定可能な実行値の範囲をタスク毎に保持管理する第1のタスク管理手段と、実行中のタスクの実行値をタスク毎に保持管理する第2のタスク管理手段と、当該タスク処理装置の性能から当該タスク処理装置で並行して実行可能な複数のタスクの実行値の合計値の最大値を示す上限実行値を決定する決定手段とを有し、前記起動制御手段は、新たにタスクを起動する場合に、該起動するタスクに指定可能な実行値の範囲で、該起動するタスクに指定する実行値と前記実行中の各タスクの実行値の合計値との和が前記上限実行値を超えないように、該起動するタスクの実行値を決定することを特徴とする。 The present invention is a task processing apparatus capable of executing a plurality of tasks in parallel, and a start control means for starting a task by specifying an execution value indicating the level of processing load at the time of executing the task, and the start control An execution means for executing the task with a processing amount corresponding to the execution value specified for the task by the means; a first task management means for holding and managing a range of execution values that can be specified for the task for each task; Second task management means for holding and managing the execution value of each task for each task, and the maximum of the total values of the execution values of a plurality of tasks that can be executed in parallel by the task processing device from the performance of the task processing device A determination means for determining an upper limit execution value that indicates, in the case of newly starting a task, the activation control means designates the task to be activated within a range of execution values that can be designated for the task to be activated Run value to As the sum of the total value of the actual values of each task in the serial execution does not exceed the upper limit execution value, and determines the execution value of the task to the start.
本発明によれば、タスクを処理する装置の性能と各タスクの処理負荷の高低を考慮し、タスクを効率よく実行することができる等の効果を奏する。 According to the present invention, it is possible to efficiently execute a task in consideration of the performance of an apparatus for processing a task and the level of processing load of each task.
以下、本発明を実施するための形態について図面を用いて説明する。 Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
図1は、本発明の実施例1に係るタスクの実行を制御するためのシステムの構成の概念を示すブロック図である。
図1において、101はタスクの起動を制御するタスク起動制御部である。タスク起動制御部101内には、現在実行中のタスクの管理を行う実行中タスク管理部102、実行待ちのタスクの管理を行う実行待ちタスク管理部103、本システムが動作するホストコンピュータの性能を計測する性能計測部104が存在する。
FIG. 1 is a block diagram illustrating a concept of a system configuration for controlling task execution according to the first embodiment of the present invention.
In FIG. 1,
実行中タスク管理部102は、実行中のタスクの現在実行値の合計を集計する現在実行値集計部102aを有する。105、106、及び107は実行中のタスクであり、実行中タスク管理部102により管理されている。
The in-execution
実行待ちタスク管理部103は、実行待ちタスクの最大実行値と最小実行値を求める実行値取得部103aを有する。108及び109は実行待ちのタスクであり、実行待ちタスク管理部103により管理されている。
The execution waiting
性能計測部104は、上限実行値決定部104aを有する。上限実行値決定部104aは、本システムが動作するホストコンピュータの性能を計測し、実行可能なタスクの実行値の合計の最大値(以下、上限実行値と呼ぶ)を決定するものである。上限実行値決定部104aは、例えば、ベンチマーク処理の実行時間を計測することにより上限実行値(後述する図7の703)を決定する。さらに、上限実行値決定部104aは、この上限実行値にネットワークの転送速度を加味することも考えられる。なお、上限実行値決定部104aは、タスク起動制御部101の起動時等に、上述の上限実行値を決定してホストコンピュータ301のRAM203や外部記憶装置209内に格納しておくものとする。
The
図2は、図1に示したタスクの実行を制御するためのシステムが動作するホストコンピュータ(即ち、タスク処理装置)のハードウェア構成を示すブロック図である。
図2に示すように、ホストコンピュータ201は、CPU202、RAM203、ROM204、外部記憶装置209を備える。CPU202は、ROM204や外部記憶装置209にコンピュータ読み取り可能に記録された、或いはLAN213よりダウンロードしたソフトウェア(プログラム)を実行し、システムバス211に接続された各デバイスを総括的に制御する。RAM203は、CPU202の主メモリあるいはワークエリアなどとして機能する。
FIG. 2 is a block diagram showing a hardware configuration of a host computer (that is, a task processing device) in which the system for controlling the execution of the task shown in FIG. 1 operates.
As shown in FIG. 2, the
外部記憶装置209は、ハードディスク(HD)、フロッピー(登録商標)ディスク(FD)等からなる。外部記憶装置209は、ブートプログラム、オペレーティングシステム、認証サーバ、認証クライアントを含む各種のアプリケーション、データベースデータ、ユーザファイル等を記憶する。
The
さらに、ホストコンピュータ201において、206はキーボードコントローラ(KBDC)であり、キーボード(KBD)205や図示しないポインティングデバイスからの入力情報をCPU202に送る。208はビデオコントローラ(VC)であり、CRTやLDC等からなる表示装置207の表示を制御する。210はディスクコントローラ(DKC)であり、外部記憶装置209とのアクセスを制御する。212は通信コントローラ(COMM I/F)であり、これを介してローカルエリアネットワーク(LAN)213に接続される。
In the
図3は、本発明のタスクの実行を制御するためのシステムをネットワークデバイス管理ソフトウェアに応用した場合のネットワーク上の各機器の構成図である。
図3において、301はネットワークデバイス管理ソフトウェアが動作するホストコンピュータ(即ち、タスク処理装置)である。302はネットワークデバイス管理ソフトウェアを操作するためのWEBブラウザが動作するホストコンピュータである。ネットワーク管理者等のネットワークデバイス管理ソフトウェアのユーザは、302上で動作するWEBブラウザを経由して301で動作するネットワークデバイス管理ソフトウェアを利用する。
FIG. 3 is a configuration diagram of each device on the network when the system for controlling the execution of the task of the present invention is applied to network device management software.
In FIG. 3,
303及び304はネットワークに接続された印刷装置である。305及び306はネットワークに接続されたデジタル複合機(MFP)である。ネットワークデバイス管理ソフトウェアは、これら印刷装置やデジタル複合機と通信し、装置の監視や設定を行うものである。
なお、図1に示したタスク起動制御部101は、ホストコンピュータ301のCPU202が、ホストコンピュータ301の外部記憶装置209等に記録されたソフトウェア(プログラム)を実行することにより実現される機能に対応する。なお、プログラムは、LAN213よりダウンロードしたものでもよい。また、タスク起動制御部101により起動されるタスク(図1の105〜107)は、ホストコンピュータ301のCPU202がホストコンピュータ301の外部記憶装置209等に記録されたソフトウェア(プログラム)を実行することにより起動実行される。
The task
図4は、実行待ちのタスクの一覧(実行待ちタスクテーブル)の一例を示す図である。
実行待ちタスク管理部103は、この実行待ちタスクテーブルを例えばホストコンピュータ301のRAM203内に記憶し管理する。タスク起動制御部101は、実行待ちタスクテーブルから、実行予定日時を過ぎた実行待ちタスクを検索し、実行予定時刻を過ぎたタスクを起動し、そのタスクに対応するレコードを実行待ちタスクテーブルから削除する。
FIG. 4 is a diagram illustrating an example of a list of tasks waiting to be executed (execution waiting task table).
The waiting
各実行待ちタスクは、タスクを一意に識別する登録ID、ユーザが識別可能なタスク名、実行予定日時、タスクの実行を司るクラスのクラス名、実行時の最小実行値及び最大実行値を属性として持つ。これら各実行待ちタスクの属性(登録ID401、タスク名402、実行予定日時403、クラス名404、最小実行値405、及び、最大実行値406)が、実行待ちタスクテーブルに格納され管理されている。
Each pending task has as attributes the registration ID that uniquely identifies the task, the task name that the user can identify, the scheduled execution date and time, the class name of the class that executes the task, the minimum execution value and the maximum execution value at the time of execution Have. The attributes (
タスク名402は、ユーザがタスクを識別するために、ユーザ或いはシステムが付けた名前である。実行予定日時403は、そのタスクを実行する日時を示す。この時刻を経過したタスクがタスク起動制御部101により起動される。クラス名404は、タスクの実行を行うクラスのクラス名であり、クラスはタスクの実行制御を行うためのインターフェイスを実装している。実行時の最小実行値405及び最大実行値406は、そのタスクの実行時の処理負荷の高低を示す値(例えば整数値)が取りうる値の範囲を規定する。本実施例のネットワークデバイス管理ソフトウェアにおけるタスクの場合、例えば、同時に通信可能なデバイス(図3の303〜306等の各種機器)の数に、規定値を加算した値が実行値となる。即ち、本実施例の場合、「同時に通信可能なデバイスの数+規定値」が実行値となる。
The
なお、実施例1では、各タスクの最小実行値405、及び、最大実行値406は、タスクの種類に固有の値とする。例えば、アドレス帳取得タスクは、どの実行待ちタスクや実行中タスクも、最小実行値3、最大実行値7を持つ。即ち、実行待ちタスクテーブル(図4)は、実行待ちタスクに指定可能な実行値の範囲(最小実行値405、及び、最大実行値406)を含む実行待ちタスクの情報をタスク毎に保持管理(第1のタスク管理)するものである。
In the first embodiment, the
図5は、実行中タスクの一覧(実行中タスクテーブル)の例を示す図である。
実行中タスク管理部102は、この実行中タスクテーブルを例えばホストコンピュータ301のRAM203内に記憶し管理する。実行中タスク管理部102は、この実行中タスクテーブルを用いて、ホストコンピュータ301のCPU202により実行中のタスクの現在実行値を集計したり、実行中のタスクの実行値を変更するための要求を実行中のタスクに送信したりする。タスクの実行が終了すると、そのタスクに対応するレコードは実行中タスクテーブルから削除される。
FIG. 5 is a diagram illustrating an example of a list of running tasks (running task table).
The executing
各実行中タスクは、実行中のタスクを一意に識別する実行ID501、ユーザが識別可能なタスク名502、各実行中タスクと通信する際に使用するポート番号503、タスクの開始日時504、及びタスクの現在実行値505、最小実行値506、最大実行値507を属性として持つ。なお、タスク名502、最小実行値506、最大実行値507は、実行待ちタスクの属性(タスク名402、最小実行値405、最大実行値406)がそのまま使用される。これら各実行中タスクの属性(実行ID501、タスク名502、ポート番号503、開始日時504、現在実行値505、最小実行値506、及び、最大実行値507)が、実行中タスクテーブルに格納され管理されている。即ち、実行中タスクテーブル(図5)は、実行中のタスクの現在の実行値を含む実行中のタスクの情報をタスク毎に保持管理(第2のタスク管理)するものである。
なお、図4、図5に示すタスクは、ほんの一例であり、本発明は、これに限定されるものではない。
Each executing task includes an
Note that the tasks shown in FIGS. 4 and 5 are only examples, and the present invention is not limited to these.
図6は、タスク起動制御部101のタスク起動時の処理の流れを示すフローチャートである。なお、このフローチャートの処理は、タイマー等により定期的に呼び出される。また、このフローチャートの処理は、ホストコンピュータ301のCPU202が、ホストコンピュータ301の外部記憶装置209等にコンピュータ読み取り可能に記録されたソフトウェア(プログラム)を実行することにより実現される。なお、プログラムは、LAN213よりダウンロードしたものでもよい。なお、ホストコンピュータ301のCPU202がタスク起動制御部101の処理を実現するプログラムを実行することにより実行される動作を、以下、タスク起動制御部101を主語として、「タスク起動制御部101が行う」等と表現する。
FIG. 6 is a flowchart showing the flow of processing when the task
図7は、実行中のタスクとこれから起動しようとする実行待ちタスクの実行値との関係の一例を示す図である。
図7において、高さはタスクの実行値の量を示す。701は現在実行中のタスク群を示す。702は現在実行中のタスクの現在実行値の合計、703は性能計測部104が決定した上限実行値、704は現在実行中のタスクの最小実行値の合計を示す。705はこれから起動しようとしている起動待ちのタスクを示す。706は起動待ちタスク705の最小実行値、707は起動待ちタスク705の最大実行値を示す。
FIG. 7 is a diagram illustrating an example of a relationship between a task being executed and an execution value of a task waiting to be started.
In FIG. 7, height indicates the amount of task execution values.
以下、図6の処理を、図7の例を参照しながら順に説明する。
タスク起動制御部101は、先ずステップS601において、実行待ちタスク管理部103の実行値取得部103aを用いて実行待ちタスクテーブル(図4)から、既に実行予定日時を経過した実行待ちタスクのリストを取得する。なお、ステップS601にて、リストを実行開始日時の早い順に作成すると、実行日時の順番を優先して実行待ちタスクの起動を行ことになる。また、ステップS601にて、リストを最小実行値の小さい順に作成すると、可能な限り多くの実行待ちタスクの起動を行うことになる。
Hereinafter, the processing of FIG. 6 will be described in order with reference to the example of FIG.
First, in step S601, the task
次に、ステップS602において、タスク起動制御部101は、上記S601で作成したリストが空(起動する実行待ちタスクが存在しない)と判定した場合、ステップS615において、実行中タスクの実行値の上方調整処理を呼び出した後、処理を終了する。なお、上記ステップS615の上方調整処理については後に詳細を記す。
Next, in step S602, when the task
一方、ステップS602において、上記ステップS601で作成したリストが空でない場合(起動する実行待ちタスクが存在する場合)、タスク起動制御部101は、ステップS603に処理を進める。
On the other hand, in step S602, when the list created in step S601 is not empty (when there is an execution waiting task to be activated), the task
次に、ステップS603以降において、タスク起動制御部101は、上記ステップS601で作成したリストから実行待ちタスクを順に取り出し、各実行タスクに対する起動処理(S604〜S614)を行う。なお、全ての実行待ちタスクの処理が終了すると終了する。
Next, in step S603 and subsequent steps, the task
まず、ステップS603において、タスク起動制御部101は、上記ステップS601で作成したリストから実行待ちタスクを1つ取り出す処理を実行し、ステップS604において、リストが終了でないか(実行待ちタスクを取り出せたか)否かを判定する。そして、ステップS604において、リストが終了でない(実行待ちタスクを取り出せた)と判定した場合、タスク起動制御部101は、ステップS605に処理を進める。ステップS605では、タスク起動制御部101は、実行中タスク管理部102の現在実行値集計部102aを用いて、現在実行中のタスクの現在実行値の合計702を求める。
First, in step S603, the task
次に、ステップS606において、タスク起動制御部101は、A=(上限実行値703−現在実行値の合計702−実行待ちタスクの最小実行値706)を計算する。
そして、ステップS607において、上記ステップS606の計算結果Aが0以上(A≧0)と判定した場合、タスク起動制御部101は、ステップS608において、実行待ちタスク705の実行値を決定する。この実行値は、上限実行値703と現在実行時の合計702の差と、実行待ちタスク705の最大実行値707を比較して、大きくない方の値に決定する。即ち、起動するタスクに指定可能な実行値の範囲で、上限実行値703と実行中の各タスクの現在の実行値の合計値702との差を超えない最大値を、起動するタスクに指定する実行値に決定する。なお、この場合の各実行値間の関係は図7(a)に対応する。
Next, in step S606, the task
If it is determined in step S607 that the calculation result A in step S606 is 0 or more (A ≧ 0), the task
そして、最後に、ステップS614において、タスク起動制御部101は、ステップS608で決定した実行値を指定して実行待ちタスク705を起動する。なお、タスクの起動については図9を用いて後述する。そして、タスク起動制御部101は、ステップS603に処理を戻し、次の実行待ちタスクに対する起動処理を行う。
Finally, in step S614, the task
一方、ステップS607において、上記ステップS606の計算結果Aが負(A<0)と判定した場合、タスク起動制御部101は、ステップS609に処理を進める。ステップS609では、タスク起動制御部101は、実行中タスク管理部102の現在実行値集計部102aを用いて、現在実行中のタスクの最小実行値の合計704を計算する。
On the other hand, if it is determined in step S607 that the calculation result A in step S606 is negative (A <0), the task
次に、ステップS610において、タスク起動制御部101は、B=(上限実行値703−最小実行値の合計704−最小実行値706)の値を計算する。
そして、ステップS611において、上記ステップS610の計算結果Bが負(B<0)と判定した場合、実行待ちタスク705は起動できないため、タスク起動制御部101は、ステップS603に処理を戻し、次の実行待ちタスクに対する起動処理を行う。この場合の各実行値間の関係は図7(c)に対応する。
Next, in step S610, the task
If it is determined in step S611 that the calculation result B in step S610 is negative (B <0), the task waiting
一方、ステップS611において、上記ステップS610の計算結果Bが0以上(A≧0)と判定した場合、タスク起動制御部101は、ステップS612〜S614に処理を進める。この場合、実行中のタスクの現在実行値を減じ、上限実行値703と現在実行値の合計702との差が実行待ちタスク705の最小実行値706と等しくすることにより、実行待ちタスク705を起動することが可能となる。この場合の各実行値間の関係は図7(b)に対応する。
On the other hand, if it is determined in step S611 that the calculation result B in step S610 is 0 or more (A ≧ 0), the task
まず、ステップS612において、タスク起動制御部101は、実行中のタスクの実行値を変更して実行待ちタスク705の最小実行値706の空きを作るための下方調整処理(後述する図8)を呼び出す。なお、呼び出しの際、タスク起動制御部101は、実行待ちタスク705の起動に必要な最小実行値706を下方調整処理(図8)に渡す。
First, in step S612, the task
上記S612の下方調整処理が終了すると、タスク起動制御部101は、ステップS613において、実行待ちタスク705の実行値を、そのタスクの最小実行値706(実行待ちタスク705に指定可能な実行値の最小値)に決定する。そして、最後に、ステップS614において、タスク起動制御部101は、ステップS613で決定した実行値を指定して実行待ちタスク705を起動する。なお、タスクの起動については図9を用いて後述する。そして、タスク起動制御部101は、ステップS603に処理を戻し、次の実行待ちタスクに対する起動処理を行う。
When the downward adjustment process in S612 is completed, the task
そして、上記ステップS604において、リスト終了(もう取り出すタスクがないため実行待ちタスクを取り出せなかった)と判定した場合、タスク起動制御部101は、本フローチャートの処理を終了する。
If it is determined in step S604 that the list is finished (the task waiting to be executed cannot be taken out because there is no more task to be taken out), the task
以下、図8を参照して、図6のステップS612の実行中タスクの実行値の下方調整処理に関して説明する。
図8は、図6のステップS612の実行中タスクの実行値の下方調整処理の流れの一例を示すフローチャートである。即ち、このフローチャートの処理は、ホストコンピュータ301のCPU202が、ホストコンピュータ301の外部記憶装置209等にコンピュータ読み取り可能に記録されたソフトウェア(プログラム)を実行することにより実現される。なお、プログラムは、LAN213よりダウンロードしたものでもよい。
Hereinafter, with reference to FIG. 8, the downward adjustment process of the execution value of the task being executed in step S612 of FIG. 6 will be described.
FIG. 8 is a flowchart showing an example of the downward adjustment process of the execution value of the task being executed in step S612 of FIG. That is, the processing of this flowchart is realized by the
この下方調整処理は、これから起動するタスクに指定可能な実行値の最小値(最小実行値706)と実行中の各タスクの現在の実行値の合計値702との和が上限実行値703を超える場合、実行中のタスクの現在の実行値を下方に変更制御(調整)する処理である。なお、図6のステップS612で示したように、下方調整処理の呼び出しの際、実行待ちタスク705の起動に必要な最小実行値706が下方調整処理に渡されている。
In this downward adjustment process, the sum of the minimum execution value (minimum execution value 706) that can be specified for the task to be started and the
下方調整処理が呼び出されると、まず、ステップS801において、タスク起動制御部101は、上限実行値703から現在実行中のタスクの実行値の合計702と最小実行値706を引いた数を計算し、変数Xに格納する。即ち、X=(上限実行値703−現在実行値の合計702−最小実行値706)を計算する。なお、現在実行中のタスクの現在実行値の合計702は、実行中タスク管理部102の現在実行値集計部102aを用いて求められる。
When the downward adjustment process is called, first, in step S801, the task
なお、現在実行中のタスクの現在実行値の合計を、上記ステップS801で求めたXだけ減ずれば、最小実行値706だけの空きが出来るので、実行待ちタスク705を起動することが出来るようになる。本下方調整処理では、現在実行値と最小実行値の差の大きい実行中タスクから順に、現在実行中のタスクの現在実行値を減ずることにより、この空きを作る。なお、差が同じ実行中タスクが複数ある場合は、実行中タスクテーブル(図5)の上位にあるものから順に現在実行値を減ずる。以下、詳細に説明する。
Note that if the total of the current execution values of the currently executed tasks is reduced by X obtained in step S801, a space corresponding to the
次に、タスク起動制御部101は、ステップS802において、実行中タスクテーブル(図5)から、タスクの実行ID,現在実行値、最小実行値からなるテーブル(以下、テーブルT)をホストコンピュータ301のRAM203内に作成する。
Next, in step S802, the task
次に、ステップS803において、タスク起動制御部101は、このテーブルTを「現在実行値−最小実行値」の大きい順に並べ替える。ここで、(現在実行値−最小実行値)が同じ値を取る場合は、実行中タスクテーブル(図5)で上位にあるものが上位になるように並べ替える。
Next, in step S803, the task
次に、タスク起動制御部101は、ステップS804において、上記テーブルTの最初にあるタスクのテーブル内の現在実行値を「1」減じ、ステップS805において、Xの値を「1」減じる。
Next, in step S804, the task
そして、ステップS806において、タスク起動制御部101は、Xの値が「0」でない場合(X>0の場合)、ステップS803〜S806の処理を繰り返す。
一方、ステップS806において、タスク起動制御部101は、Xの値が「0」になった場合(X=0の場合)、実行中のタスクの実行値をテーブルT内の現在実行値に変更する処理を行う(S807〜S811)。以下、詳細に説明する。
In step S806, when the value of X is not “0” (when X> 0), the task
On the other hand, in step S806, the task
まず、ステップS807において、タスク起動制御部101は、上記テーブルTからデータを1行ずつ取り出す処理を実行する。そして、ステップS808において、タスク起動制御部101は、取出成功(行を取り出せた)と判定した場合、ステップS809において、取り出した実行中タスクのテーブル内の現在実行値と、実際の実行中タスクの現在実行値を比較する。
First, in step S807, the task
そして、ステップS810において、タスク起動制御部101は、テーブル内の現在実行値と実際の実行中タスクの現在実行値が一致する(同じ)と判定した場合は、ステップS807に処理を戻し、次の行に対する処理を続ける。
In step S810, when the task
一方、ステップS810において、タスク起動制御部101は、テーブル内の現在実行値と実際の実行中タスクの現在実行値が一致しない(異なる)と判定した場合は、ステップS811に処理を進める。
On the other hand, if the task
ステップS811において、タスク起動制御部101は、現在実行中のタスクの実行値を、上記ステップS807で取り出したテーブルT内の現在実行値に変更する処理を行う。なお、各実行中のタスクは、図5の実行中タスクテーブルのポート番号503で示されるTCP/IPのポートを受信待ち状態にして、実行値の変更要求を受け付けている。上記S811等の実行値の変更要求の送信側は、例えばXMLで記載された変更要求を、ローカルホストのこのポートに送信する。タスクの実行処理をしているプログラムは、受信したXMLの内容に従って、タスクの実行値を動的に変更する。この処理の詳細は図13を用いて後述する。
In step S811, the task
上記S811の処理が終了すると、タスク起動制御部101は、ステップS807に処理を戻し、次の行に対する処理を続ける。そして、ステップS808において、全行終了(もう取り出す行がないため行を取り出せなかった)と判定した場合、タスク起動制御部101は、下方調整処理を終了する。
When the process of S811 ends, the task
図9は、タスクを起動するクラスのUMLのクラス図の一例を示す図である。
タスクを起動する各クラスは、共通のインターフェイスIExecuteTask901を実装する。共通インターフェイス901は、メンバメソッドとしてExecuteメソッドを定義している。Executeメソッドは、引数として、実行待ちタスクの登録IDと、タスクの実行値を持つ。
FIG. 9 is a diagram illustrating an example of a UML class diagram of a class that starts a task.
Each class that starts a task implements a
図9に示した例では、IExecuteTask901のサブクラスとして、902、903、904、・・・が示されている。902は、デジタル複合機(MFP)のアドレス帳取得用のタスクを起動するクラスである。また、903は、印刷装置の各種カウンタ(例えば、総印刷枚数、カラー印刷枚数、両面印刷枚数等)を取得するタスクを起動するクラスである。904は、印刷装置の設定を取得するタスクを起動する。また、図示しないが、IExecuteTask901のサブクラスとして、印刷装置を探索するタスクを起動するクラス、印刷装置の設定を配信するタスクを起動するクラス、印刷装置のログを取得するタスクを起動するクラス等も定義されている。なお、ここに示すタスクを起動するクラスは、ほんの一例であり、本発明は、これに限定されるものではない。
In the example shown in FIG. 9, 902, 903, 904,... Are shown as subclasses of
これらのクラスが、図4の実行待ちタスクテーブルのクラス名に記載される。タスクを実行する各クラスが共通インターフェイスを実装するため、図6のステップS614のタスクの起動処理では、タスク起動制御部101は、図4の実行待ちタスクテーブルのクラス名で示されるクラスのインスタンスを作成する。そして、Executeメソッドを呼び出すことにより、タスクの起動を行う。ホストコンピュータ301のCPU202は、例えば、起動されたタスクの処理を実行するプログラムに適当な引数を指定してプログラムを起動することにより、指定されたタスクの実行を行う。なお、ホストコンピュータ301のCPU202がタスクの処理を実行するプログラムを実行することにより実行される動作を、以下、タスクを主語として、「タスクが行う」等と表現する。なお、実行されるタスクの例を図10に示す。
These classes are described in the class name of the waiting task table in FIG. Since each class that executes a task implements a common interface, in the task activation process in step S614 in FIG. 6, the task
図10は、指定された実行値に従って処理を行うタスクのメイン処理の例を示すフローチャートである。このフローチャートの処理は、ホストコンピュータ301のCPU202が、ホストコンピュータ301の外部記憶装置209等にコンピュータ読み取り可能に記録されたソフトウェア(プログラム)を実行することにより実現される。なお、プログラムは、LAN213よりダウンロードしたものでもよい。
FIG. 10 is a flowchart illustrating an example of a main process of a task that performs a process according to a specified execution value. The processing of this flowchart is realized by the
ここでは、タスクとして、MFPからファクシミリの送信先等のアドレス帳情報を取得するアドレス帳取得タスクを例にしてい説明する。なお、アドレス帳取得タスクは、実行待ちタスクテーブル(図4)に示すように、最小実行値として「3」を、最大実行値として「7」を持つ。 Here, as an example, an address book acquisition task for acquiring address book information such as a facsimile transmission destination from the MFP will be described. The address book acquisition task has “3” as the minimum execution value and “7” as the maximum execution value, as shown in the execution waiting task table (FIG. 4).
なお、図6のステップS614で示したように、タスクの起動の際、登録タスクの登録IDと、タスクの実行値とが、タスクのメイン処理に渡されている。
メイン処理において、タスクは、まずステップS1001において、実行するタスクの登録タスクIDを取得する。
次に、タスクは、ステップS1002において、ホストコンピュータ301の外部記憶装置209に格納されるタスク対象要素テーブル(後述する図15)から、上記S1001で取得した登録IDに関連付けられた、アドレス帳を取得するMFPの一覧を取得する。さらに、タスクは、上記取得した一覧から対象MFPのリスト(以下、リストL)をホストコンピュータ301のRAM203に作成し、次に処理するMFPを示す処理ポインタ(ホストコンピュータ301のRAM203内に設けられる)を「0」にする。
As shown in step S614 of FIG. 6, when the task is activated, the registration ID of the registered task and the execution value of the task are passed to the main process of the task.
In the main process, the task first acquires the registered task ID of the task to be executed in step S1001.
Next, in step S1002, the task acquires an address book associated with the registration ID acquired in S1001 from the task target element table (FIG. 15 described later) stored in the
図15は、各タスクが処理する対象要素を示すタスク対象要素テーブルの一例を示す図である。図15に示すように、タスク対象要素テーブルは、タスクの登録IDと、そのタスクが処理する対象要素1502を示すデバイス名が格納されている。このタスク対象要素テーブルは、ユーザ又はコンピュータにより実行される処理により作成されて、ホストコンピュータ301の外部記憶装置209に格納されているものとする。なお、ユーザがこのタスク対象要素テーブルを作成する場合、ユーザは、ホストコンピュータ302からの操作によりこのタスク対象要素テーブルを作成可能である。
FIG. 15 is a diagram illustrating an example of a task target element table indicating target elements to be processed by each task. As shown in FIG. 15, the task target element table stores a task registration ID and a device name indicating the
以下、図10の説明に戻る。続いて、タスクは、ステップS1003において、スレッド管理テーブル(後述する図12)をホストコンピュータ301のRAM203に作成する。さらに、タスクは、ステップS1004において、タスクの起動時に指定された実行値を取得する。
Returning to the description of FIG. Subsequently, in step S1003, the task creates a thread management table (FIG. 12 described later) in the
次に、タスクは、ステップS1005において、上記S1004で取得した「指定された実行値」から「2」を減じた「指定された実行値−2」の数のスレッドを作成する。即ち、実行値「3」が指定された場合は「1」つのスレッド、実行値「4」が指定された場合は「2」つのスレッド、また、実行値「7」が指定された場合は「5」つのスレッドを作成する。なお、「指定された実行値」から「2」を減じるのは、本タスクのメイン処理の実行により使用されたコンピュータ資源(本タスクのメイン処理の実行値)を考慮するためである。この「指定された実行値」から減じる値「2」は、上述した「規定値」に対応するものであり、「2」に限定されるものではない。 Next, in step S1005, the task creates threads of “specified execution value−2” obtained by subtracting “2” from the “specified execution value” acquired in S1004. That is, if the execution value “3” is designated, “1” thread, “2” if the execution value “4” is designated, and “7” if the execution value “7” is designated. 5 ”threads are created. The reason why “2” is subtracted from the “designated execution value” is to consider the computer resources (execution value of the main process of this task) used by the execution of the main process of this task. The value “2” subtracted from the “designated execution value” corresponds to the “specified value” described above, and is not limited to “2”.
次に、タスクは、ステップS1006において、上記S1005で作成した各スレッドに一意なIDを付け、このIDと、MFPからアドレス帳を取得するための処理を指定して、作成したスレッドを起動し、これをスレッド管理テーブル(図12)に登録する。なお、スレッド管理テーブルは、後述する図12に示すように、スレッドのID1201と、スレッドの稼働状況1202とを含む。稼働状況1202は、「実行中」、「終了処理中」、「終了」の3つの状態を取る。
Next, in step S1006, the task assigns a unique ID to each thread created in step S1005, specifies the ID and processing for acquiring an address book from the MFP, and starts the created thread. This is registered in the thread management table (FIG. 12). The thread management table includes a
このように、本実施例のタスクは、タスクに指定された実行値に応じた数のスレッドを実行する(タスクに指定された実行値に応じた数の処理を並行して実行する)ものである。言い換えると、本実施例のタスクは、タスクに指定された実行値に応じた処理量でタスクを処理するものである。 As described above, the task of this embodiment executes the number of threads corresponding to the execution value specified for the task (the number of processes corresponding to the execution value specified for the task is executed in parallel). is there. In other words, the task of the present embodiment processes the task with a processing amount corresponding to the execution value specified for the task.
最後に、ステップS1007において、タスクは、上記S1006で起動した全てのスレッドの終了を待ち、全てのスレッドの終了を確認して、アドレス帳の取得処理を終了する。なお、タスクは、スレッド管理テーブル(図12)内の全てのスレッドの稼働状況1202が「終了」であることにより、全てのスレッドの終了を確認するものとする。また、タスクは、タスクを終了する際、実行中タスクテーブル(図5)から、そのタスクに対応するレコードは削除する。
Finally, in step S1007, the task waits for the end of all threads activated in S1006, confirms the end of all threads, and ends the address book acquisition process. It should be noted that the task confirms the end of all threads when the
なお、上記S1006にて、タスクによりスレッドが起動されると、ホストコンピュータ301のCPU202は、例えば、指定されたスレッドの処理を実行するプログラムを起動することにより、指定されたスレッドの実行を行う。なお、ホストコンピュータ301のCPU202がスレッドの処理を実行するプログラムを実行することにより実行される動作を、以下、スレッドを主語として、「スレッドが行う」等と表現する。なお、実行されるスレッドの例を後述する図11に示す。
In S1006, when a thread is activated by a task, the
図11は、図10のステップS1006により指定される、各スレッドにより実行されるアドレス帳取得処理(以下、単に取得処理と記す)の一例を示すフローチャートである。このフローチャートの処理は、ホストコンピュータ301のCPU202が、ホストコンピュータ301の外部記憶装置209等にコンピュータ読み取り可能に記録されたソフトウェア(プログラム)を実行することにより実現される。なお、プログラムは、LAN213よりダウンロードしたものでもよい。
FIG. 11 is a flowchart illustrating an example of an address book acquisition process (hereinafter simply referred to as an acquisition process) executed by each thread specified in step S1006 of FIG. The processing of this flowchart is realized by the
なお、図10のステップS1006で示したように、スレッドの起動の際、タスクのメイン処理から、スレッドIDが取得処理に渡されている。
取得処理が開始されると、スレッドは、ステップS1101において、処理ポインタ(図10のS1002に示した処理ポインタ)をロックする。処理ポインタは、複数のスレッドから参照され更新される可能性があるため、ここでは、他のスレッドからの参照と更新がなされないように処理ポインタを一時的にロックする。
As shown in step S1006 of FIG. 10, when starting a thread, the thread ID is transferred from the main process of the task to the acquisition process.
When the acquisition process is started, the thread locks the process pointer (the process pointer shown in S1002 of FIG. 10) in step S1101. Since the processing pointer may be referred to and updated from a plurality of threads, here, the processing pointer is temporarily locked so that the reference and update from other threads are not performed.
次に、スレッドは、ステップS1102において、ロックされた処理ポインタの値を取得し、これを変数P(ホストコンピュータ301のRAM203に設けられる)に格納し、該変数Pに格納された処理ポインタの値に1加える。
Next, in step S1102, the thread acquires the value of the locked processing pointer, stores it in a variable P (provided in the
次に、ステップS1103において、スレッドは、上記S1103でロックした処理ポインタをアンロックする。
次に、ステップS1104において、スレッドは、変数Pの値と上記S1102にて作成されたMFPのリストLの要素数を比較する。そして、ステップS1104の比較の結果、変数Pの値が要素数よりも小さいと判定した場合(S1105で「P<要素数」)、スレッドは、ステップS1106に処理を進める。ステップS1106では、スレッドは、MFPのリストLから「変数Pの値+1」番目のMFP情報を取り出し、該MFP情報を用いて対象MFPからアドレス帳を取得し、該取得してアドレス帳をホストコンピュータ301の外部記憶装置209に保存する。
In step S1103, the thread unlocks the processing pointer locked in step S1103.
In step S1104, the thread compares the value of the variable P with the number of elements in the MFP list L created in step S1102. If it is determined in step S1104 that the value of variable P is smaller than the number of elements (“P <number of elements” in S1105), the thread advances the process to step S1106. In step S1106, the thread retrieves the “variable P value + 1” -th MFP information from the MFP list L, acquires an address book from the target MFP using the MFP information, and acquires the address book by using the host computer. 301 is stored in the
次に、スレッドは、ステップS1107において、スレッド管理テーブル(図12)の自身のスレッドIDに対応する稼働状況1202の値を調べる(確認する)。そして、ステップS1108において、稼働状況1202が「実行中」と判定した場合、スレッドは、MFPのリストL中の次のMFPに対する処理を続行するために、ステップS1101に処理を戻す。
Next, in step S1107, the thread checks (confirms) the value of the
そして、変数Pの値がリストLの要素数と同じ或いは大きいと判定した場合(S1105で「P≧要素数」)、リストL中の全てのMFPに対する処理が実行済あるいは実行中であることを意味するため、スレッドは、ステップS1109に処理を進める。 If it is determined that the value of the variable P is the same as or larger than the number of elements in the list L (“P ≧ number of elements” in S1105), it is determined that the processing for all MFPs in the list L has been executed or is being executed. For the meaning, the thread advances the process to step S1109.
また、ステップS1108において、スレッド管理テーブル(図12)内の稼働状況1202が「終了処理中」と判定した場合、スレッドは、ステップS1109に処理を進める。
If it is determined in step S1108 that the
ステップS1109では、スレッドは、スレッド管理テーブル(図12)の自身のスレッドIDに対応する稼働状況1202を「終了」に変更して、処理を終了する。
図12は、図10のステップS1003で作成されるスレッド管理テーブルの一例を示す図である。
スレッド管理テーブルには、指定した処理(例えば図11に示した取得処理)を行う各スレッドを一意に識別するスレッドID1201と、そのスレッドの稼働状況1202を示す文字列が格納されている。
In step S1109, the thread changes the
FIG. 12 is a diagram showing an example of the thread management table created in step S1003 of FIG.
The thread management table stores a
例えば、稼働状況1202が「実行中」の場合、そのスレッドは実行中であることを示す。また、稼働状況1202が「終了」の場合、そのスレッドは処理を終了し、スレッドが存在しないことを示す。また、稼働状況1202が「終了処理中」の場合、実行値の変更要求により、そのスレッドの実行終了がスレッド外から指示されたことを示す。なお、稼働状況1202が「終了処理中」であることを検出したスレッドは、図11のステップS1107に示すように、直ちに処理を終了する。
For example, when the
以下、図13を参照して、タスク処理プログラム内の実行値変更処理について説明する。
図13は、図8のステップS811や後述する図14のステップS1413等により、処理中のタスクの実行値の変更要求を受け付けた、タスク処理プログラム内の実行値変更処理の流れの一例を示すフローチャートである。このフローチャートの処理は、ホストコンピュータ301のCPU202が、ホストコンピュータ301の外部記憶装置209等にコンピュータ読み取り可能に記録されたソフトウェア(プログラム)を実行することにより実現される。なお、プログラムは、LAN213よりダウンロードしたものでもよい。
Hereinafter, the execution value changing process in the task processing program will be described with reference to FIG.
FIG. 13 is a flowchart showing an example of the flow of execution value change processing in the task processing program that has received a request for changing the execution value of the task being processed in step S811 of FIG. 8, step S1413 of FIG. It is. The processing of this flowchart is realized by the
タスクは、XMLで記載された変更要求を受信すると、本フローチャートに示す実行値変更処理を開始する。実行値変更処理では、タスクは、まずステップS1301において、変更要求の送信先から送信されたXMLを解析して、要求された実行値を求める。 When the task receives the change request described in XML, the task starts the execution value change process shown in this flowchart. In the execution value changing process, the task first analyzes the XML transmitted from the change request transmission destination in step S1301 to obtain the requested execution value.
次に、タスクは、ステップS1302において、「要求された実行値−現在の実行値」を計算し、変数Dに格納する。なお、現在の実行値は、自身が管理するスレッド管理テーブル(図12)の稼働状況1202が「実行中」のスレッドの数に対応する。なお、S1302で計算したDの値は、実行値変更処理で増減するスレッドの数を示す。
Next, in step S1302, the task calculates “requested execution value−current execution value” and stores it in the variable D. The current execution value corresponds to the number of threads whose
そして、ステップS1303において、タスクは、Dの値が「0」と判定した場合(S1303で「D=0」)、要求された実行値と現在の実行値の値が等しいため、何もせず実行値変更処理を終了する。 In step S1303, if the task determines that the value of D is “0” (“D = 0” in step S1303), the task is executed without doing anything because the requested execution value is equal to the current execution value. The value change process ends.
また、ステップS1303において、Dの値が正であると判定した場合(S1303で「D>0」)、タスクは、スレッドの数をD増やす。即ち、ステップS1304において、タスクは、D個のスレッドを作成し、処理(例えば、図11の取得処理)を指定して作成したスレッドを起動し、スレッド管理テーブル(図12)に作成したスレッドを登録し、実行値変更処理を終了する。 If it is determined in step S1303 that the value of D is positive (“D> 0” in S1303), the task increases the number of threads by D. That is, in step S1304, the task creates D threads, activates the created thread by specifying the process (for example, the acquisition process in FIG. 11), and creates the created thread in the thread management table (FIG. 12). Register and complete the execution value change process.
また、ステップS1303において、Dの値が負であると判定した場合(S1303で「D<0」)、タスクは、スレッドの数を「−D」だけ減らす。即ち、タスクは、ステップS1305において、スレッド管理テーブル(図12)の先頭から(−D)個の稼働状況1202が「実行中」のスレッドの稼働状況1202を「終了処理中」に変更し、実行値変更処理を終了する。実行中のスレッドは、図11のステップS1107に示したように、スレッド管理テーブル(図12)の稼働状況1202を参照し、「稼働状況1202が「終了処理中」の場合は、処理の実行を終了することになる。
When it is determined in step S1303 that the value of D is negative (“D <0” in S1303), the task reduces the number of threads by “−D”. That is, in step S1305, the task changes the
以下、図14を用いて、図6のステップS615の実行中タスクの実行値の上方調整処理の流れを説明する。
図14は、図6のステップS615の実行中タスクの実行値の上方調整処理の流れの一例を示すフローチャートである。このフローチャートの処理は、ホストコンピュータ301のCPU202が、ホストコンピュータ301の外部記憶装置209等にコンピュータ読み取り可能に記録されたソフトウェア(プログラム)を実行することにより実現される。なお、プログラムは、LAN213よりダウンロードしたものでもよい。
Hereinafter, the flow of the upward adjustment process of the execution value of the task being executed in step S615 of FIG. 6 will be described with reference to FIG.
FIG. 14 is a flowchart showing an example of the upward adjustment process of the execution value of the task being executed in step S615 of FIG. The processing of this flowchart is realized by the
この上方修正処理は、起動するタスクが存在しない場合で、実行中タスクの現在実行値の合計が、上限実行値よりも小さく、且つ、実行中タスクの現在実行値が最大実行値よりも小さい場合に、実行中タスクの実行値を増加させる処理である。即ち、起動するタスクが存在しない場合、実行中の各タスクの現在の実行値の合計値702が、前記上限実行値を超えない範囲で最大となるように、前記実行中のタスクの現在の実行値を上方に変更制御(調整)する処理である。
This upward correction process is performed when there is no task to be started, and the total of the current execution values of the running tasks is smaller than the upper limit execution value, and the current execution value of the running task is smaller than the maximum execution value In addition, this is a process for increasing the execution value of the running task. In other words, when there is no task to be activated, the current execution of the task being executed is set so that the
上方調整処理が呼び出されると、タスク起動制御部101は、まずステップS1401において、上限実行値703から現在実行中のタスクの実行値の合計702を引いた数を変数Zに格納する。即ち、Z=(上限実行値703−現在実行値の合計702)を計算する。なお、現在実行中のタスクの現在実行値の合計702は、実行中タスク管理部102の現在実行値集計部102aを用いて求められる。なお、上記S801で算出したZの値が「0」の場合、タスク起動制御部101は、実行中のタスクの現在実行値の合計が上限実行値に達しているため、上方修正処理は処理を終了する(図示せず)。
When the upward adjustment process is called, the task
次に、タスク起動制御部101は、ステップS1402において、実行中タスクテーブル(図5)から、タスクの実行ID,現在実行値、最大実行値からなるテーブル(以下、テーブルTBL)をホストコンピュータ301のRAM203内に作成する。
Next, in step S1402, the task
次に、ステップS1403において、タスク起動制御部101は、このテーブルTBLを「最大実行値−最小実行値」の大きい順に並べ替える。ここで、「最大実行値−最小実行値」が同じ値を取る場合は、実行中タスクテーブル(図5)で上位にあるものが上位になるように並べ替える。
In step S1403, the task
続いて、ステップS1404において、タスク起動制御部101は、上記S1403で並べ替えたテーブルの先頭の行の現在実行値と最大実行値とを比較する。そして、ステップS1405において、上記先頭の行の現在実行値と最大実行値が等しいと判定した場合、全ての実行中タスクの現在実行値が最大実行値であることを意味する。この場合、タスク起動制御部101は、ステップS1409以降の、実行中のタスクに対して実行値の変更要求を送信する処理へと移行する。
Subsequently, in step S1404, the task
一方、S1405において、上記先頭の行の現在実行値と最大実行値が等しくない(異なる)と判定した場合、上方修正処理は、ステップS1406においてテーブルの先頭の現在実行値の値を「1」増やし、ステップS1407にてZの値を「1」減ずる。 On the other hand, if it is determined in S1405 that the current execution value of the top row and the maximum execution value are not equal (different), the upward correction process increases the value of the current execution value of the top of the table by “1” in step S1406. In step S1407, the value of Z is decreased by “1”.
次に、ステップS1408において、Zの値が「0」でないと判定した場合(Z≠0の場合)、タスク起動制御部101は、ステップS1403〜S1408の処理を繰り返す。
Next, when it is determined in step S1408 that the value of Z is not “0” (when Z ≠ 0), the task
一方、S1408において、Zの値が「0」と判定した場合(Z=0の場合)、タスク起動制御部101は、実行中タスクの現在実行値の値を、上記S1403〜S1408の処理により求めた新しい現在実行値に変更する処理を行う(S1409〜S1413)。以下、詳細に説明する。
On the other hand, if it is determined in S1408 that the value of Z is “0” (when Z = 0), the task
まず、タスク起動制御部101は、ステップS1409にて、テーブルTBLから1行取り出す処理を実行する。そして、ステップS1410において、タスク起動制御部101は、取出成功(行を取り出せた)と判定した場合、ステップS1311において、取り出した実行中タスクのテーブル内の現在実行値と、実際の実行中タスクの現在実行値を比較する。
First, in step S1409, the task
そして、ステップS1412において、タスク起動制御部101は、テーブル内の現在実行値と実際の実行中タスクの現在実行値が一致する(同じ)と判定した場合は、ステップS1409に処理を戻し、次の行に対する処理を続ける。
In step S1412, when the task
一方、ステップS1412において、タスク起動制御部101は、テーブル内の現在実行値と実際の実行中タスクの現在実行値が一致しない(異なる)と判定した場合は、ステップS1413に処理を進める。
On the other hand, if the task
ステップS1413において、タスク起動制御部101は、現在実行中のタスクの実行値を、上記ステップS1409で取り出したテーブルTBL内の現在実行値に変更する処理を行う。なお、各実行中のタスクは、図5の実行中タスクテーブルのポート番号503で示されるTCP/IPのポートを受信待ち状態にして、実行値の変更要求を受け付けている。上記S1413等の実行値の変更要求の送信側は、例えばXMLで記載された変更要求を、ローカルホストのこのポートに送信する。タスクの実行処理をしているプログラムは、図13に示したように、受信したXMLの内容に従って、タスクの実行値を動的に変更する。
In step S1413, the task
上記S1413の処理が終了すると、タスク起動制御部101は、ステップS1409に処理を戻し、次の行に対する処理を続ける。そして、ステップS1410において、全行終了(もう取り出す行がないため行を取り出せなかった)と判定した場合、タスク起動制御部101は、上方調整処理を終了する。
When the process of S1413 ends, the task
本実施例によれば、従来のように、タスクの数に上限を設けることなく、また、実行中のタスクを中断することなく、タスクを処理するホストコンピュータの性能と各タスクの処理負荷の高低を考慮し、タスクの実行を効率的に制御することが可能となる。 According to the present embodiment, the performance of the host computer that processes the task and the processing load of each task without increasing the number of tasks and without interrupting the task that is being executed as in the past. This makes it possible to efficiently control task execution.
上記実施例1では、各タスクの最大実行値及び最小実行値が、タスクの種類に固有の値である場合について説明した。例えば、アドレス帳取得タスクは、どの実行待ちタスクや実行中タスクも、最小実行値3、最大実行値7を持つ構成であった。しかし、ある特定のタスクに対しては実行時間を出来る限り短縮したい、といった場合がある。本実施例は、タスクの作成時に、タスクの最大実行値と最小実行値を個別に指定可能な構成とする。
In the first embodiment, the case where the maximum execution value and the minimum execution value of each task are values specific to the type of task has been described. For example, the address book acquisition task has a configuration in which any waiting task or running task has a
図16は、タスクの作成時にタスクの最大実行値と最小実行値を個別に指定するためのユーザインタフェース(UI)の一例を示す図である。この画面(タスク実行値指定画面)1600は、タスク起動制御部101が実行するタスク作成処理により、ホストコンピュータ301の表示装置207、又は、ホストコンピュータ302で動作するWEBブラウザ上に表示される。
FIG. 16 is a diagram illustrating an example of a user interface (UI) for individually specifying the maximum execution value and the minimum execution value of a task when the task is created. This screen (task execution value designation screen) 1600 is displayed on the
タスク起動制御部101は、ユーザによる「登録」ボタン1605の押下を検出すると、ラジオボタン1601,1602の内容を検出する。「デフォルトを使用する」1601が選択されている場合、タスク起動制御部101は、タスクの最大実行値と最小実行値として規定値である「3」と「7」をそれぞれ指定して、実行待ちタスクテーブル(図4)に、作成したタスクを追加する。
When the task
「実行値を指定する」1602が選択されている場合、タスク起動制御部101は、1603に入力された最大実行値、及び、1604に入力された最小実行値を検査する。そして、最大実行値及び最小実行値とも規定の範囲(デフォルト)内で、且つ、入力された最大実行値が最小実行値以下の場合に、タスク起動制御部101は、入力された最大実行値及び最小実行値を使用してタスクを作成し、実行待ちタスクテーブルに追加する。
When “specify execution value” 1602 is selected, the task
一方、検査の結果、最大実行値及び最小実行値の少なくとも1つが規定の範囲(デフォルト)外、又は、入力された最大実行値が最小実行値より小さい場合に、タスク起動制御部101は、ユーザに警告を出力する。例えば、タスク実行値指定画面1600を表示している画面上に、入力値が不正である旨(エラーメッセージ)を表示して、タスクの作成処理を続ける。
On the other hand, as a result of the inspection, when at least one of the maximum execution value and the minimum execution value is outside the specified range (default), or the input maximum execution value is smaller than the minimum execution value, the task
例えば、ユーザが、図16のように、「実行値を指定する」1602を選択し、1603に「6」、1604に「7」を入力し、「登録」ボタン1605の押下すると、図17の1702に示すようなタスクが実行待ちタスクテーブル(図4)に登録される。
For example, as shown in FIG. 16, when the user selects “Specify an execution value” 1602, inputs “6” in 1603, “7” in 1604, and presses the “Register”
図17は、実施例2の実行待ちタスクテーブルの一例を示す図である。
実施例2では、図17の1701、1702に示すように、最小実行値、最大実行値が異なる「アドレス帳取得タスク」を作成し、実行待ちタスクテーブルに登録可能である。
本実施例によれば、ある特定のタスクに対しては、最小実行値や最大実行値を大きくして、実行時間を短縮したりすることが可能となる。
FIG. 17 is a diagram illustrating an example of an execution waiting task table according to the second embodiment.
In the second embodiment, as shown by 1701 and 1702 in FIG. 17, “address book acquisition tasks” having different minimum execution values and maximum execution values can be created and registered in the execution waiting task table.
According to the present embodiment, for a specific task, it is possible to increase the minimum execution value and the maximum execution value to shorten the execution time.
上記実施例1では、図10のS1005に示したように、タスクのメイン処理において起動するスレッド(並行して実行される処理)の数を、「指定された実行値−規定値(図10の例では「2」)」と決定する例を示した。しかし、起動するスレッドの決定方法はタスクの種類毎に異なるものである。例えば、あるタスクでは、「起動するスレッドの数=(1/2)×(指定された実行値)−(規定値)」としてもよいし、他のタスクでは、「起動するスレッドの数=(1/3)×(指定された実行値)−(規定値)」、「起動するスレッドの数=(2)×(指定された実行値)−(規定値)」等としてもよい。即ち、「起動するスレッドの数」を、「指定された実行値」の傾き正の一次関数値としてもよい。 In the first embodiment, as shown in S1005 of FIG. 10, the number of threads activated in the main process of the task (processes executed in parallel) is “specified execution value−specified value (of FIG. 10). In the example, “2”) ”is determined. However, the method for determining the thread to be activated differs for each task type. For example, in a certain task, “the number of threads to be activated = (1/2) × (specified execution value) − (specified value)” may be set, and in other tasks, “the number of threads to be activated = ( 1/3) × (designated execution value) − (prescribed value) ”,“ number of threads to be activated = (2) × (designated execution value) − (prescribed value) ”, etc. That is, “the number of threads to be activated” may be a linear function value with a positive slope of “specified execution value”.
(他の実施例)
なお、上述した各種データの構成及びその内容はこれに限定されるものではなく、用途や目的に応じて、様々な構成や内容で構成されることは言うまでもない。
以上、一実施形態について示したが、本発明は、例えば、システム、装置、方法、プログラムもしくは記憶媒体等としての実施態様をとることが可能である。具体的には、複数の機器から構成されるシステムに適用しても良いし、また、一つの機器からなる装置に適用しても良い。
(Other examples)
It should be noted that the configuration and contents of the various data described above are not limited to this, and it goes without saying that the various data and configurations are configured according to the application and purpose.
Although one embodiment has been described above, the present invention can take an embodiment as, for example, a system, apparatus, method, program, or storage medium. Specifically, the present invention may be applied to a system composed of a plurality of devices, or may be applied to an apparatus composed of a single device.
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。 The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
また、本発明は、複数の機器から構成されるシステムに適用しても、1つの機器からなる装置に適用してもよい。
本発明は上記実施例に限定されるものではなく、本発明の趣旨に基づき種々の変形(各実施例の有機的な組合せを含む)が可能であり、それらを本発明の範囲から除外するものではない。即ち、上述した各実施例及びその変形例を組み合わせた構成も全て本発明に含まれるものである。
Further, the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device.
The present invention is not limited to the above-described embodiments, and various modifications (including organic combinations of the embodiments) are possible based on the spirit of the present invention, and these are excluded from the scope of the present invention. is not. That is, the present invention includes all the combinations of the above-described embodiments and modifications thereof.
Claims (11)
タスクの実行時の処理負荷の高低を示す実行値を指定してタスクを起動する起動制御手段と、
前記起動制御手段によりタスクに指定された実行値に応じた処理量で前記タスクを実行する実行手段と、
タスクに指定可能な実行値の範囲をタスク毎に保持管理する第1のタスク管理手段と、
実行中のタスクの実行値をタスク毎に保持管理する第2のタスク管理手段と、
当該タスク処理装置の性能から当該タスク処理装置で並行して実行可能な複数のタスクの実行値の合計値の最大値を示す上限実行値を決定する決定手段とを有し、
前記起動制御手段は、新たにタスクを起動する場合に、該起動するタスクに指定可能な実行値の範囲で、該起動するタスクに指定する実行値と前記実行中の各タスクの実行値の合計値との和が前記上限実行値を超えないように、該起動するタスクの実行値を決定することを特徴とするタスク処理装置。 A task processing device capable of executing a plurality of tasks in parallel,
Start control means for starting a task by specifying an execution value indicating the level of processing load during task execution,
Execution means for executing the task with a processing amount corresponding to an execution value specified for the task by the activation control means;
A first task management means for holding and managing a range of execution values that can be specified for a task for each task;
A second task management means for holding and managing the execution value of the task being executed for each task;
Determining means for determining an upper limit execution value indicating a maximum value of a total value of execution values of a plurality of tasks that can be executed in parallel by the task processing device from the performance of the task processing device;
The start control means, when newly starting a task, the sum of the execution value specified for the task to be started and the execution value of each task being executed within the range of execution values that can be specified for the task to be started An execution value of a task to be activated is determined so that a sum with a value does not exceed the upper limit execution value.
該起動するタスクに指定する実行値と前記実行中の各タスクの実行値の合計値との和が前記上限実行値を超えないように、前記起動するタスクに指定する実行値を決定することを特徴とする請求項1又は2に記載のタスク処理装置。 When the sum of the minimum value of execution values that can be specified for the task to be activated and the total value of the execution values of each task being executed exceeds the upper limit execution value, the activation control unit The execution value is controlled to change downward,
Determining an execution value to be specified for the task to be started so that a sum of an execution value to be specified for the task to be started and a total value of the execution values of the tasks being executed does not exceed the upper limit execution value; The task processing device according to claim 1 or 2, characterized in that
前記起動制御手段から実行中のタスクに対して変更するように要求された実行値が、前記実行中のタスクの実行値より小さい場合、前記実行中の処理のうち、前記要求された実行値と前記実行中のタスクの実行値との差に応じた数の処理を終了し、
前記起動制御手段から実行中のタスクに対して変更するように要求された実行値が、前記実行中のタスクの実行値より大きい場合、前記要求された実行値と前記実行中のタスクの実行値との差に応じた数の処理を起動することを特徴とする請求項1乃至6のいずれか1項に記載のタスク処理装置。 The execution means processes the task by executing in parallel the number of processes corresponding to the execution value specified for the task from the activation control means,
When the execution value requested to be changed for the task being executed by the activation control unit is smaller than the execution value of the task being executed, the requested execution value of the processing being executed and End the number of processes according to the difference with the execution value of the task being executed,
If the execution value requested to be changed for the task being executed by the activation control means is larger than the execution value of the task being executed, the requested execution value and the execution value of the task being executed The task processing apparatus according to claim 1, wherein a number of processes corresponding to the difference between the first and second processes are started.
前記タスクは、前記機器と通信する処理を含むものであり、
前記タスクに指定可能な実行値の最大値は、前記通信手段が同時に通信可能な前記機器の数に規定値を加算した値を示すことを特徴とする請求項7に記載のタスク処理装置。 Having communication means for communicating with devices on the network;
The task includes a process of communicating with the device,
The task processing apparatus according to claim 7, wherein the maximum value of execution values that can be specified for the task indicates a value obtained by adding a specified value to the number of the devices that the communication unit can simultaneously communicate with.
コンピュータが、第1のタスク管理手段にタスク毎に保持管理される、タスクの実行時の処理負荷の高低を示す実行値の指定可能な範囲の中で、実行値を指定してタスクを起動する起動制御ステップと、
コンピュータが、前記起動制御ステップによりタスクに指定された実行値に応じた処理量で前記タスクを実行する実行ステップと、
コンピュータが、実行中のタスクの実行値をタスク毎に保持管理する第2のタスク管理手段に、実行中のタスクの実行値を登録するステップと、
コンピュータが、当該コンピュータの性能から当該コンピュータで並行して実行可能な複数のタスクの実行値の合計値の最大値を示す上限実行値を決定する決定ステップとを有し、
前記起動制御ステップでは、新たにタスクを起動する場合に、該起動するタスクに指定可能な実行値の範囲で、該起動するタスクに指定する実行値と前記実行中の各タスクの実行値の合計値との和が前記上限実行値を超えないように、該起動するタスクの実行値を決定することを特徴とするタスク処理方法。 A task processing method in a computer capable of executing a plurality of tasks in parallel,
The computer activates the task by specifying the execution value within the specifiable range of the execution value indicating the level of processing load at the time of execution of the task, which is held and managed for each task by the first task management means. An activation control step;
An execution step in which the computer executes the task at a processing amount corresponding to an execution value specified for the task by the activation control step;
A step in which the computer registers the execution value of the task being executed in the second task management means for holding and managing the execution value of the task being executed for each task;
A determination step of determining an upper limit execution value indicating a maximum value of a total value of execution values of a plurality of tasks that can be executed in parallel by the computer from the performance of the computer;
In the activation control step, when a task is newly activated, the total of the execution value specified for the task to be started and the execution value of each task being executed within the range of execution values that can be specified for the task to be activated A task processing method comprising: determining an execution value of a task to be activated so that a sum of the values does not exceed the upper limit execution value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010026212A JP2011164876A (en) | 2010-02-09 | 2010-02-09 | Task processing device, task processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010026212A JP2011164876A (en) | 2010-02-09 | 2010-02-09 | Task processing device, task processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011164876A true JP2011164876A (en) | 2011-08-25 |
Family
ID=44595490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010026212A Withdrawn JP2011164876A (en) | 2010-02-09 | 2010-02-09 | Task processing device, task processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011164876A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013164670A (en) * | 2012-02-09 | 2013-08-22 | Fuji Electric Co Ltd | Object-oriented program generation device, method thereof and program |
KR102062945B1 (en) | 2015-11-02 | 2020-01-06 | 캐논 가부시끼가이샤 | Information processing apparatus and method of controlling the same, and program |
-
2010
- 2010-02-09 JP JP2010026212A patent/JP2011164876A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013164670A (en) * | 2012-02-09 | 2013-08-22 | Fuji Electric Co Ltd | Object-oriented program generation device, method thereof and program |
KR102062945B1 (en) | 2015-11-02 | 2020-01-06 | 캐논 가부시끼가이샤 | Information processing apparatus and method of controlling the same, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7086754B2 (en) | Information processing equipment, control method of information processing equipment, and computer program | |
KR20090105830A (en) | Apparatus and method for managing remote application configuration | |
JP2023057114A (en) | Information processing device, control method, and program | |
JP5462610B2 (en) | Information processing system, information processing apparatus, control method therefor, and program | |
US9007629B2 (en) | Information processing apparatus, method for controlling information processing apparatus, and computer program | |
JP7013165B2 (en) | Management device, control method of management device, and program | |
JP7102129B2 (en) | Image forming apparatus, control method of image forming apparatus, and program | |
JP2017004175A (en) | Management system and control method thereof, information processing device, and program | |
JP2015162078A (en) | Image processing condition setting program, image processing condition setting method, and image processing apparatus | |
JP7102216B2 (en) | program | |
JP6187518B2 (en) | Information processing terminal and program | |
EP2426595A2 (en) | Image forming system and storage medium | |
JP2011164876A (en) | Task processing device, task processing method, and program | |
JP6790666B2 (en) | Image forming device and program | |
JP2012165325A (en) | Image processing apparatus, screen control program and recording medium | |
JP5804686B2 (en) | Document management system and management method | |
JP2016197334A (en) | Information processing device and program | |
JP2015232754A (en) | Information processing apparatus, data processing apparatus, printer, method of processing driver of information processing apparatus, method of processing driver of data processing apparatus, method of processing driver of printer, and program | |
JP2009110050A (en) | Information processor, information processing system, display control method, display control program, and recording medium | |
JP2003308192A (en) | Management system, information processor and management method | |
US9270853B2 (en) | Exporting and importing for display on an image forming apparatus environment setting information of an application | |
JP7328405B2 (en) | Information processing apparatus, information processing apparatus control method, and print setting application | |
EP3296858A1 (en) | Information processing apparatus, information processing method, and carrier means | |
JP2018116361A (en) | Information processing apparatus, management apparatus, control method of information processing apparatus, and program, information processing system | |
US11481171B2 (en) | Image forming system, server, control method for image forming system, control method for server, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20130507 |