JP2011164876A - Task processing device, task processing method, and program - Google Patents

Task processing device, task processing method, and program Download PDF

Info

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
Application number
JP2010026212A
Other languages
Japanese (ja)
Inventor
Noriyuki Nakazawa
紀之 中澤
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2010026212A priority Critical patent/JP2011164876A/en
Publication of JP2011164876A publication Critical patent/JP2011164876A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To execute a task efficiently while taking into consideration of performance of a computer which processes the task and a level of processing of each task without providing an upper limit of the number of tasks and without interrupting a task being executed. <P>SOLUTION: When activating a new task, a task activation controlling section 101 provided at a host computer capable of executing a plurality of tasks in parallel determines a run value to be designated for the task to be activated so that a sum of a run value designated for the task to be activated which is managed by a run queue task managing section 103 in a range of a run value which can be designated for the task to be activated, and a total value of run values of the tasks being executed managed by a running task managing section 102 does not exceed an upper limit run value determined from the performance of the computer (a maximum value of the total value of the run values of the plurality of tasks which can be executed at the computer in parallel, measured by a performance measuring section 104). <P>COPYRIGHT: (C)2011,JPO&INPIT

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).

特開平10−177490号公報JP-A-10-177490 特開平8−16410号公報JP-A-8-16410

しかし、特許文献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 Patent Document 2, in the method of temporarily stopping the execution of a non-priority execution job, for example, a job that communicates with a device on a network transmits a request to the device and waits to receive a response to the request. If the job stops, the job cannot receive a response from the device. Alternatively, when a job is stopped during transmission of a large amount of data such as print data to the device, the data must be error-processed on the device side. In this way, if the job is stopped at a place where it should not be stopped, exception processing, error processing and retry processing are required, and unnecessary data flows over the network. there were.

本発明は、上記の問題点を解決するためになされたものである。本発明の目的は、タスクを処理する装置の性能と各タスクの処理負荷の高低を考慮し、タスクを効率よく実行する仕組みを提供することである。   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.

本発明に係るタスクの実行を制御するためのシステムの構成の概念を示すブロック図である。It is a block diagram which shows the concept of the structure of the system for controlling execution of the task which concerns on this invention. 本発明に係るタスクの実行を制御するためのシステムが動作するホストコンピュータのハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the host computer with which the system for controlling execution of the task which concerns on this invention operate | moves. 本発明に係るタスクの実行を制御するためのシステムをネットワークデバイス管理ソフトウェアに応用した場合のネットワーク上の各機器の構成図である。It is a block diagram of each apparatus on a network at the time of applying the system for controlling execution of the task which concerns on this invention to network device management software. 実行待ちタスクテーブルの一例を示す図である。It is a figure which shows an example of an execution waiting task table. 実行中タスクテーブルの例を示す図である。It is a figure which shows the example of an executing task table. タスク起動制御部のタスク起動時の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process at the time of task starting of a task starting control part. 実行中のタスクとこれから起動しようとする実行待ちタスクの実行値との関係の一例を示す図である。It is a figure which shows an example of the relationship between the task in execution and the execution value of the waiting task to be started from now on. 実行中タスクの実行値の下方調整処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the downward adjustment process of the execution value of a task in execution. タスクを起動するクラスのUMLのクラス図である。It is a class diagram of UML of the class which starts a task. タスクのメイン処理の例を示すフローチャートである。It is a flowchart which shows the example of the main process of a task. 各スレッドにより実行されるアドレス帳取得処理の一例を示すフローチャートである。It is a flowchart which shows an example of the address book acquisition process performed by each thread. 本実施例のスレッド管理テーブルの一例を示す図である。It is a figure which shows an example of the thread management table of a present Example. タスク処理プログラム内の実行値変更処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the execution value change process in a task processing program. 実行中タスクの実行値の上方調整処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the upward adjustment process of the execution value of the task in execution. 各タスクが処理する対象要素を示すタスク対象要素テーブルの一例を示す図である。It is a figure which shows an example of the task target element table which shows the target element which each task processes. タスクの作成時にタスクの最大実行値と最小実行値を個別に指定するためのユーザインタフェースの一例を示す図である。It is a figure which shows an example of the user interface for designating separately the maximum execution value and minimum execution value of a task at the time of task creation. 実施例2の実行待ちタスクテーブルの一例を示す図である。FIG. 10 illustrates an example of an execution waiting task table according to the second embodiment.

以下、本発明を実施するための形態について図面を用いて説明する。   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, reference numeral 101 denotes a task activation control unit that controls task activation. The task activation control unit 101 includes a running task management unit 102 that manages a task that is currently being executed, a pending task management unit 103 that manages a task that is waiting to be executed, and the performance of the host computer on which the system operates. There is a performance measurement unit 104 to measure.

実行中タスク管理部102は、実行中のタスクの現在実行値の合計を集計する現在実行値集計部102aを有する。105、106、及び107は実行中のタスクであり、実行中タスク管理部102により管理されている。   The in-execution task management unit 102 includes a current execution value totaling unit 102a that totals the total current execution values of tasks being executed. Reference numerals 105, 106, and 107 denote running tasks, which are managed by the running task management unit 102.

実行待ちタスク管理部103は、実行待ちタスクの最大実行値と最小実行値を求める実行値取得部103aを有する。108及び109は実行待ちのタスクであり、実行待ちタスク管理部103により管理されている。   The execution waiting task management unit 103 includes an execution value acquisition unit 103a that obtains the maximum execution value and the minimum execution value of the execution waiting task. Reference numerals 108 and 109 denote tasks waiting for execution, which are managed by the task waiting management unit 103.

性能計測部104は、上限実行値決定部104aを有する。上限実行値決定部104aは、本システムが動作するホストコンピュータの性能を計測し、実行可能なタスクの実行値の合計の最大値(以下、上限実行値と呼ぶ)を決定するものである。上限実行値決定部104aは、例えば、ベンチマーク処理の実行時間を計測することにより上限実行値(後述する図7の703)を決定する。さらに、上限実行値決定部104aは、この上限実行値にネットワークの転送速度を加味することも考えられる。なお、上限実行値決定部104aは、タスク起動制御部101の起動時等に、上述の上限実行値を決定してホストコンピュータ301のRAM203や外部記憶装置209内に格納しておくものとする。   The performance measurement unit 104 includes an upper limit execution value determination unit 104a. The upper limit execution value determination unit 104a measures the performance of the host computer on which this system operates, and determines the maximum total execution value of executable tasks (hereinafter referred to as the upper limit execution value). For example, the upper limit execution value determination unit 104a determines the upper limit execution value (703 in FIG. 7 described later) by measuring the execution time of the benchmark process. Further, the upper limit execution value determining unit 104a may consider adding the network transfer rate to the upper limit execution value. The upper limit execution value determination unit 104a determines the above-described upper limit execution value and stores it in the RAM 203 of the host computer 301 or the external storage device 209 when the task activation control unit 101 is activated.

図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 host computer 201 includes a CPU 202, a RAM 203, a ROM 204, and an external storage device 209. The CPU 202 executes software (programs) recorded in the ROM 204 and the external storage device 209 so as to be readable by a computer, or downloaded from the LAN 213, and generally controls each device connected to the system bus 211. The RAM 203 functions as a main memory or a work area for the CPU 202.

外部記憶装置209は、ハードディスク(HD)、フロッピー(登録商標)ディスク(FD)等からなる。外部記憶装置209は、ブートプログラム、オペレーティングシステム、認証サーバ、認証クライアントを含む各種のアプリケーション、データベースデータ、ユーザファイル等を記憶する。   The external storage device 209 includes a hard disk (HD), a floppy (registered trademark) disk (FD), and the like. The external storage device 209 stores a boot program, an operating system, an authentication server, various applications including an authentication client, database data, user files, and the like.

さらに、ホストコンピュータ201において、206はキーボードコントローラ(KBDC)であり、キーボード(KBD)205や図示しないポインティングデバイスからの入力情報をCPU202に送る。208はビデオコントローラ(VC)であり、CRTやLDC等からなる表示装置207の表示を制御する。210はディスクコントローラ(DKC)であり、外部記憶装置209とのアクセスを制御する。212は通信コントローラ(COMM I/F)であり、これを介してローカルエリアネットワーク(LAN)213に接続される。   In the host computer 201, reference numeral 206 denotes a keyboard controller (KBDC), which sends input information from a keyboard (KBD) 205 and a pointing device (not shown) to the CPU 202. Reference numeral 208 denotes a video controller (VC), which controls display on the display device 207 made up of CRT, LDC, or the like. A disk controller (DKC) 210 controls access to the external storage device 209. A communication controller (COMM I / F) 212 is connected to a local area network (LAN) 213 through this communication controller (COMM I / F).

図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, reference numeral 301 denotes a host computer (that is, a task processing apparatus) on which network device management software operates. A host computer 302 operates a WEB browser for operating the network device management software. A user of network device management software, such as a network administrator, uses network device management software that operates on 301 via a WEB browser that operates on 302.

303及び304はネットワークに接続された印刷装置である。305及び306はネットワークに接続されたデジタル複合機(MFP)である。ネットワークデバイス管理ソフトウェアは、これら印刷装置やデジタル複合機と通信し、装置の監視や設定を行うものである。   Reference numerals 303 and 304 denote printing apparatuses connected to the network. Reference numerals 305 and 306 denote digital multi-function peripherals (MFPs) connected to the network. The network device management software communicates with these printing apparatuses and digital multifunction peripherals to monitor and set the apparatuses.

なお、図1に示したタスク起動制御部101は、ホストコンピュータ301のCPU202が、ホストコンピュータ301の外部記憶装置209等に記録されたソフトウェア(プログラム)を実行することにより実現される機能に対応する。なお、プログラムは、LAN213よりダウンロードしたものでもよい。また、タスク起動制御部101により起動されるタスク(図1の105〜107)は、ホストコンピュータ301のCPU202がホストコンピュータ301の外部記憶装置209等に記録されたソフトウェア(プログラム)を実行することにより起動実行される。   The task activation control unit 101 illustrated in FIG. 1 corresponds to a function realized by the CPU 202 of the host computer 301 executing software (program) recorded in the external storage device 209 or the like of the host computer 301. . The program may be downloaded from the LAN 213. Further, the tasks (105 to 107 in FIG. 1) activated by the task activation control unit 101 are executed when the CPU 202 of the host computer 301 executes software (program) recorded in the external storage device 209 or the like of the host computer 301. Launched and executed.

図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 task management unit 103 stores and manages this waiting task table in, for example, the RAM 203 of the host computer 301. The task activation control unit 101 searches the execution waiting task table for the execution waiting task whose scheduled execution date has passed, starts the task whose scheduled execution time has passed, and deletes the record corresponding to the task from the execution waiting task table To do.

各実行待ちタスクは、タスクを一意に識別する登録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 (registration ID 401, task name 402, scheduled execution date and time 403, class name 404, minimum execution value 405, and maximum execution value 406) of each execution waiting task are stored and managed in the execution waiting task table.

タスク名402は、ユーザがタスクを識別するために、ユーザ或いはシステムが付けた名前である。実行予定日時403は、そのタスクを実行する日時を示す。この時刻を経過したタスクがタスク起動制御部101により起動される。クラス名404は、タスクの実行を行うクラスのクラス名であり、クラスはタスクの実行制御を行うためのインターフェイスを実装している。実行時の最小実行値405及び最大実行値406は、そのタスクの実行時の処理負荷の高低を示す値(例えば整数値)が取りうる値の範囲を規定する。本実施例のネットワークデバイス管理ソフトウェアにおけるタスクの場合、例えば、同時に通信可能なデバイス(図3の303〜306等の各種機器)の数に、規定値を加算した値が実行値となる。即ち、本実施例の場合、「同時に通信可能なデバイスの数+規定値」が実行値となる。   The task name 402 is a name given by the user or the system so that the user can identify the task. The scheduled execution date and time 403 indicates the date and time when the task is executed. A task that has passed this time is activated by the task activation control unit 101. A class name 404 is a class name of a class that executes a task, and the class implements an interface for performing task execution control. The minimum execution value 405 and the maximum execution value 406 at the time of execution define a range of values that can be taken by values (for example, integer values) indicating the level of processing load at the time of execution of the task. In the case of a task in the network device management software of the present embodiment, for example, a value obtained by adding a specified value to the number of devices (various devices such as 303 to 306 in FIG. 3) that can communicate simultaneously becomes an execution value. That is, in the case of the present embodiment, “the number of devices that can communicate simultaneously + the specified value” is the execution value.

なお、実施例1では、各タスクの最小実行値405、及び、最大実行値406は、タスクの種類に固有の値とする。例えば、アドレス帳取得タスクは、どの実行待ちタスクや実行中タスクも、最小実行値3、最大実行値7を持つ。即ち、実行待ちタスクテーブル(図4)は、実行待ちタスクに指定可能な実行値の範囲(最小実行値405、及び、最大実行値406)を含む実行待ちタスクの情報をタスク毎に保持管理(第1のタスク管理)するものである。   In the first embodiment, the minimum execution value 405 and the maximum execution value 406 of each task are values specific to the type of task. For example, the address book acquisition task has a minimum execution value 3 and a maximum execution value 7 for any waiting task or executing task. That is, the waiting task table (FIG. 4) holds and manages waiting task information for each task including the range of execution values that can be specified for the waiting task (minimum execution value 405 and maximum execution value 406). (First task management).

図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 task management unit 102 stores and manages the executing task table in, for example, the RAM 203 of the host computer 301. The in-execution task management unit 102 uses this in-execution task table to aggregate the current execution values of the tasks being executed by the CPU 202 of the host computer 301, and to issue a request for changing the execution values of the currently executing tasks. Or send it to a running task. When the execution of the task is completed, the record corresponding to the task is deleted from the executing task table.

各実行中タスクは、実行中のタスクを一意に識別する実行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 execution ID 501 that uniquely identifies the task being executed, a task name 502 that can be identified by the user, a port number 503 used when communicating with each executing task, a task start date and time 504, and a task Current execution value 505, minimum execution value 506, and maximum execution value 507 as attributes. Note that the task name 502, the minimum execution value 506, and the maximum execution value 507 use the attributes of the waiting task (task name 402, minimum execution value 405, and maximum execution value 406) as they are. The attributes (execution ID 501, task name 502, port number 503, start date and time 504, current execution value 505, minimum execution value 506, and maximum execution value 507) of each execution task are stored and managed in the execution task table. Has been. That is, the running task table (FIG. 5) holds and manages (second task management) information on a task being executed including the current execution value of the task being executed for each task.
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 activation control unit 101 activates a task. Note that the processing of this flowchart is periodically called by a timer or the like. The processing of this flowchart is realized by the CPU 202 of the host computer 301 executing software (program) recorded in an external storage device 209 of the host computer 301 so as to be readable by the computer. The program may be downloaded from the LAN 213. The operation executed when the CPU 202 of the host computer 301 executes a program that implements the processing of the task activation control unit 101 is hereinafter referred to as “the task activation control unit 101 performs” with the task activation control unit 101 as the subject. And so on.

図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. Reference numeral 701 denotes a task group currently being executed. Reference numeral 702 denotes a total of the current execution values of the currently executing task, reference numeral 703 denotes an upper limit execution value determined by the performance measuring unit 104, and reference numeral 704 denotes a total of the minimum execution values of the currently executing task. Reference numeral 705 denotes a task that is waiting to be activated. Reference numeral 706 denotes a minimum execution value of the activation wait task 705, and reference numeral 707 denotes a maximum execution value of the activation wait task 705.

以下、図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 activation control unit 101 uses the execution value acquisition unit 103a of the execution waiting task management unit 103 to obtain a list of execution waiting tasks that have already passed the scheduled execution date and time from the execution waiting task table (FIG. 4). get. In step S601, if the list is created in the order of the execution start date and time, the execution waiting task is activated with priority given to the order of the execution date and time. If a list is created in ascending order of minimum execution values in step S601, as many execution waiting tasks as possible are activated.

次に、ステップS602において、タスク起動制御部101は、上記S601で作成したリストが空(起動する実行待ちタスクが存在しない)と判定した場合、ステップS615において、実行中タスクの実行値の上方調整処理を呼び出した後、処理を終了する。なお、上記ステップS615の上方調整処理については後に詳細を記す。   Next, in step S602, when the task activation control unit 101 determines that the list created in S601 is empty (there is no execution waiting task to be activated), in step S615, the task activation control unit 101 adjusts the execution value of the running task upward. After calling the process, the process ends. The details of the upward adjustment process in step S615 will be described later.

一方、ステップ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 activation control unit 101 advances the process to step S603.

次に、ステップS603以降において、タスク起動制御部101は、上記ステップS601で作成したリストから実行待ちタスクを順に取り出し、各実行タスクに対する起動処理(S604〜S614)を行う。なお、全ての実行待ちタスクの処理が終了すると終了する。   Next, in step S603 and subsequent steps, the task activation control unit 101 sequentially retrieves execution waiting tasks from the list created in step S601, and performs activation processing (S604 to S614) for each execution task. Note that the process ends when all the tasks waiting to be executed are completed.

まず、ステップS603において、タスク起動制御部101は、上記ステップS601で作成したリストから実行待ちタスクを1つ取り出す処理を実行し、ステップS604において、リストが終了でないか(実行待ちタスクを取り出せたか)否かを判定する。そして、ステップS604において、リストが終了でない(実行待ちタスクを取り出せた)と判定した場合、タスク起動制御部101は、ステップS605に処理を進める。ステップS605では、タスク起動制御部101は、実行中タスク管理部102の現在実行値集計部102aを用いて、現在実行中のタスクの現在実行値の合計702を求める。   First, in step S603, the task activation control unit 101 executes a process of extracting one task waiting for execution from the list created in step S601. In step S604, the list is not finished (whether the task waiting for execution has been extracted). Determine whether or not. If it is determined in step S604 that the list is not finished (the task waiting for execution has been extracted), the task activation control unit 101 advances the process to step S605. In step S <b> 605, the task activation control unit 101 uses the current execution value totaling unit 102 a of the executing task management unit 102 to obtain a total 702 of the current execution values of the currently executing 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 activation control unit 101 calculates A = (upper limit execution value 703—total of current execution values 702—minimum execution value 706 of tasks waiting to be executed).
If it is determined in step S607 that the calculation result A in step S606 is 0 or more (A ≧ 0), the task activation control unit 101 determines the execution value of the waiting task 705 in step S608. This execution value is determined to be a lesser value by comparing the difference between the upper limit execution value 703 and the total execution time 702 and the maximum execution value 707 of the execution waiting task 705. That is, a maximum value that does not exceed the difference between the upper limit execution value 703 and the total execution value 702 of the current execution values of each task being executed within the range of execution values that can be specified for the task to be started is specified for the task to be started. Determine the execution value. The relationship between the execution values in this case corresponds to FIG.

そして、最後に、ステップS614において、タスク起動制御部101は、ステップS608で決定した実行値を指定して実行待ちタスク705を起動する。なお、タスクの起動については図9を用いて後述する。そして、タスク起動制御部101は、ステップS603に処理を戻し、次の実行待ちタスクに対する起動処理を行う。   Finally, in step S614, the task activation control unit 101 activates the execution waiting task 705 by specifying the execution value determined in step S608. The task activation will be described later with reference to FIG. Then, the task activation control unit 101 returns the processing to step S603 and performs activation processing for the next execution waiting 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 activation control unit 101 advances the process to step S609. In step S <b> 609, the task activation control unit 101 uses the current execution value totaling unit 102 a of the currently executing task management unit 102 to calculate the sum 704 of the minimum execution values of the currently executing tasks.

次に、ステップS610において、タスク起動制御部101は、B=(上限実行値703−最小実行値の合計704−最小実行値706)の値を計算する。
そして、ステップS611において、上記ステップS610の計算結果Bが負(B<0)と判定した場合、実行待ちタスク705は起動できないため、タスク起動制御部101は、ステップS603に処理を戻し、次の実行待ちタスクに対する起動処理を行う。この場合の各実行値間の関係は図7(c)に対応する。
Next, in step S610, the task activation control unit 101 calculates a value of B = (upper limit execution value 703—minimum execution value 704—minimum execution value 706).
If it is determined in step S611 that the calculation result B in step S610 is negative (B <0), the task waiting control unit 705 cannot start, so the task start control unit 101 returns the process to step S603, Performs startup processing for tasks that are waiting to be executed. The relationship between the execution values in this case corresponds to FIG.

一方、ステップ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 activation control unit 101 advances the process to steps S612 to S614. In this case, the current execution value of the task being executed is reduced, and the difference between the upper limit execution value 703 and the total of the current execution values 702 is made equal to the minimum execution value 706 of the execution waiting task 705, thereby starting the execution waiting task 705. It becomes possible to do. The relationship between the execution values in this case corresponds to FIG.

まず、ステップS612において、タスク起動制御部101は、実行中のタスクの実行値を変更して実行待ちタスク705の最小実行値706の空きを作るための下方調整処理(後述する図8)を呼び出す。なお、呼び出しの際、タスク起動制御部101は、実行待ちタスク705の起動に必要な最小実行値706を下方調整処理(図8)に渡す。   First, in step S612, the task activation control unit 101 calls a downward adjustment process (FIG. 8 to be described later) for changing the execution value of the task that is being executed to make a space for the minimum execution value 706 of the execution waiting task 705. . At the time of the call, the task activation control unit 101 passes the minimum execution value 706 necessary for activation of the execution waiting task 705 to the downward adjustment process (FIG. 8).

上記S612の下方調整処理が終了すると、タスク起動制御部101は、ステップS613において、実行待ちタスク705の実行値を、そのタスクの最小実行値706(実行待ちタスク705に指定可能な実行値の最小値)に決定する。そして、最後に、ステップS614において、タスク起動制御部101は、ステップS613で決定した実行値を指定して実行待ちタスク705を起動する。なお、タスクの起動については図9を用いて後述する。そして、タスク起動制御部101は、ステップS603に処理を戻し、次の実行待ちタスクに対する起動処理を行う。   When the downward adjustment process in S612 is completed, the task activation control unit 101 sets the execution value of the execution waiting task 705 as the minimum execution value 706 of the task (the minimum execution value that can be specified for the execution waiting task 705) in step S613. Value). Finally, in step S614, the task activation control unit 101 activates the execution waiting task 705 by specifying the execution value determined in step S613. The task activation will be described later with reference to FIG. Then, the task activation control unit 101 returns the processing to step S603 and performs activation processing for the next execution waiting 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 activation control unit 101 ends the processing of this flowchart.

以下、図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 CPU 202 of the host computer 301 executing software (program) recorded in a computer-readable manner in the external storage device 209 of the host computer 301 or the like. The program may be downloaded from the LAN 213.

この下方調整処理は、これから起動するタスクに指定可能な実行値の最小値(最小実行値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 total execution value 702 of the current execution values of each task being executed exceeds the upper limit execution value 703. In this case, the current execution value of the task being executed is controlled to be changed downward (adjusted). As shown in step S612 of FIG. 6, when the downward adjustment process is called, the minimum execution value 706 necessary for starting the execution waiting task 705 is passed to the downward adjustment process.

下方調整処理が呼び出されると、まず、ステップ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 activation control unit 101 calculates the number obtained by subtracting the total execution value 702 and the minimum execution value 706 of the currently executing tasks from the upper limit execution value 703, Store in variable X. That is, X = (upper limit execution value 703-total of current execution values 702-minimum execution value 706) is calculated. The total current execution value 702 of the currently executing task is obtained using the current execution value totaling unit 102a of the executing task management unit 102.

なお、現在実行中のタスクの現在実行値の合計を、上記ステップ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 minimum execution value 706 is created, so that the execution waiting task 705 can be activated. Become. In this downward adjustment process, this empty space is created by subtracting the current execution value of the currently executing task in order from the executing task having the largest difference between the current execution value and the minimum execution value. When there are a plurality of running tasks having the same difference, the current running value is decreased in order from the top of the running task table (FIG. 5). Details will be described below.

次に、タスク起動制御部101は、ステップS802において、実行中タスクテーブル(図5)から、タスクの実行ID,現在実行値、最小実行値からなるテーブル(以下、テーブルT)をホストコンピュータ301のRAM203内に作成する。   Next, in step S802, the task activation control unit 101 stores a table (hereinafter, table T) including the task execution ID, the current execution value, and the minimum execution value from the in-execution task table (FIG. 5). Created in the RAM 203.

次に、ステップS803において、タスク起動制御部101は、このテーブルTを「現在実行値−最小実行値」の大きい順に並べ替える。ここで、(現在実行値−最小実行値)が同じ値を取る場合は、実行中タスクテーブル(図5)で上位にあるものが上位になるように並べ替える。   Next, in step S803, the task activation control unit 101 rearranges this table T in descending order of “current execution value−minimum execution value”. Here, if (current execution value−minimum execution value) takes the same value, rearrangement is performed so that the upper task in the task table being executed (FIG. 5) is higher.

次に、タスク起動制御部101は、ステップS804において、上記テーブルTの最初にあるタスクのテーブル内の現在実行値を「1」減じ、ステップS805において、Xの値を「1」減じる。   Next, in step S804, the task activation control unit 101 decrements the current execution value in the table of the task at the beginning of the table T by “1”, and decrements the value of X by “1” in step S805.

そして、ステップ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 activation control unit 101 repeats the processes of steps S803 to S806.
On the other hand, in step S806, the task activation control unit 101 changes the execution value of the task being executed to the current execution value in the table T when the value of X becomes “0” (when X = 0). Processing is performed (S807 to S811). Details will be described below.

まず、ステップS807において、タスク起動制御部101は、上記テーブルTからデータを1行ずつ取り出す処理を実行する。そして、ステップS808において、タスク起動制御部101は、取出成功(行を取り出せた)と判定した場合、ステップS809において、取り出した実行中タスクのテーブル内の現在実行値と、実際の実行中タスクの現在実行値を比較する。   First, in step S807, the task activation control unit 101 executes processing for extracting data line by line from the table T. In step S808, if the task activation control unit 101 determines that the fetching has succeeded (the row has been fetched), in step S809, the current execution value in the table of the running task that has been fetched and the actual running task Compare the current run value.

そして、ステップS810において、タスク起動制御部101は、テーブル内の現在実行値と実際の実行中タスクの現在実行値が一致する(同じ)と判定した場合は、ステップS807に処理を戻し、次の行に対する処理を続ける。   In step S810, when the task activation control unit 101 determines that the current execution value in the table matches the current execution value of the task currently being executed (same), the process returns to step S807, and the next step Continue processing on the line.

一方、ステップS810において、タスク起動制御部101は、テーブル内の現在実行値と実際の実行中タスクの現在実行値が一致しない(異なる)と判定した場合は、ステップS811に処理を進める。   On the other hand, if the task activation control unit 101 determines in step S810 that the current execution value in the table does not match (is different from) the actual execution value of the currently executing task, the process proceeds to step S811.

ステップS811において、タスク起動制御部101は、現在実行中のタスクの実行値を、上記ステップS807で取り出したテーブルT内の現在実行値に変更する処理を行う。なお、各実行中のタスクは、図5の実行中タスクテーブルのポート番号503で示されるTCP/IPのポートを受信待ち状態にして、実行値の変更要求を受け付けている。上記S811等の実行値の変更要求の送信側は、例えばXMLで記載された変更要求を、ローカルホストのこのポートに送信する。タスクの実行処理をしているプログラムは、受信したXMLの内容に従って、タスクの実行値を動的に変更する。この処理の詳細は図13を用いて後述する。   In step S811, the task activation control unit 101 performs a process of changing the execution value of the currently executing task to the current execution value in the table T extracted in step S807. Note that each executing task accepts an execution value change request with the TCP / IP port indicated by the port number 503 in the executing task table of FIG. The transmission side of the execution value change request such as S811 transmits a change request described in XML, for example, to this port of the local host. The program executing the task execution process dynamically changes the task execution value in accordance with the content of the received XML. Details of this processing will be described later with reference to FIG.

上記S811の処理が終了すると、タスク起動制御部101は、ステップS807に処理を戻し、次の行に対する処理を続ける。そして、ステップS808において、全行終了(もう取り出す行がないため行を取り出せなかった)と判定した場合、タスク起動制御部101は、下方調整処理を終了する。   When the process of S811 ends, the task activation control unit 101 returns the process to step S807 and continues the process for the next line. If it is determined in step S808 that all lines have been completed (the line cannot be extracted because there are no more lines to be extracted), the task activation control unit 101 ends the downward adjustment process.

図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 common interface IExecuteTask 901. The common interface 901 defines an Execute method as a member method. The Execute method has a registration ID of an execution waiting task and an execution value of the task as arguments.

図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 IExecuteTask 901. A class 902 activates a task for acquiring an address book of a digital multifunction peripheral (MFP). Reference numeral 903 denotes a class for starting a task for acquiring various counters of the printing apparatus (for example, total printing number, color printing number, duplex printing number, etc.). A task 904 activates a task for acquiring the setting of the printing apparatus. Although not shown, as a subclass of IExecuteTask 901, a class for starting a task for searching for a printing device, a class for starting a task for distributing settings of the printing device, a class for starting a task for acquiring a log of the printing device, and the like are also defined. Has been. Note that the class for starting the task shown here is only an example, and the present invention is not limited to this.

これらのクラスが、図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 activation control unit 101 creates an instance of the class indicated by the class name in the execution waiting task table in FIG. create. Then, the task is started by calling the Execute method. The CPU 202 of the host computer 301 executes the specified task by, for example, starting the program by specifying an appropriate argument for the program that executes the processing of the started task. Hereinafter, an operation executed when the CPU 202 of the host computer 301 executes a program for executing a task process is expressed as “task performs” or the like with the task as a subject. An example of the task to be executed is shown in FIG.

図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 CPU 202 of the host computer 301 executing software (program) recorded in a computer-readable manner in the external storage device 209 of the host computer 301 or the like. The program may be downloaded from the LAN 213.

ここでは、タスクとして、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 external storage device 209 of the host computer 301. A list of MFPs to be acquired is acquired. Further, the task creates a list of target MFPs (hereinafter, list L) from the acquired list in the RAM 203 of the host computer 301, and a processing pointer indicating the MFP to be processed next (provided in the RAM 203 of the host computer 301). Is set to “0”.

図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 target element 1502 processed by the task. This task target element table is created by processing executed by a user or a computer and is stored in the external storage device 209 of the host computer 301. When the user creates this task target element table, the user can create this task target element table by an operation from the host computer 302.

以下、図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 RAM 203 of the host computer 301. Further, in step S1004, the task acquires an execution value specified when the task is activated.

次に、タスクは、ステップ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 thread ID 1201 and a thread operation status 1202, as shown in FIG. The operation status 1202 has three states of “being executed”, “ending process”, and “finished”.

このように、本実施例のタスクは、タスクに指定された実行値に応じた数のスレッドを実行する(タスクに指定された実行値に応じた数の処理を並行して実行する)ものである。言い換えると、本実施例のタスクは、タスクに指定された実行値に応じた処理量でタスクを処理するものである。   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 operating status 1202 of all threads in the thread management table (FIG. 12) is “End”. Further, when a task ends the task, the record corresponding to the task is deleted from the executing task table (FIG. 5).

なお、上記S1006にて、タスクによりスレッドが起動されると、ホストコンピュータ301のCPU202は、例えば、指定されたスレッドの処理を実行するプログラムを起動することにより、指定されたスレッドの実行を行う。なお、ホストコンピュータ301のCPU202がスレッドの処理を実行するプログラムを実行することにより実行される動作を、以下、スレッドを主語として、「スレッドが行う」等と表現する。なお、実行されるスレッドの例を後述する図11に示す。   In S1006, when a thread is activated by a task, the CPU 202 of the host computer 301 executes the designated thread by, for example, activating a program that executes processing of the designated thread. Hereinafter, an operation executed when the CPU 202 of the host computer 301 executes a program for executing a thread process is expressed as “performed by a thread” with the thread as a subject. An example of a thread to be executed is shown in FIG.

図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 CPU 202 of the host computer 301 executing software (program) recorded in a computer-readable manner in the external storage device 209 of the host computer 301 or the like. The program may be downloaded from the LAN 213.

なお、図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 RAM 203 of the host computer 301), and stores the value of the processing pointer stored in the variable P. Add 1 to

次に、ステップ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 external storage device 209.

次に、スレッドは、ステップS1107において、スレッド管理テーブル(図12)の自身のスレッドIDに対応する稼働状況1202の値を調べる(確認する)。そして、ステップS1108において、稼働状況1202が「実行中」と判定した場合、スレッドは、MFPのリストL中の次のMFPに対する処理を続行するために、ステップS1101に処理を戻す。   Next, in step S1107, the thread checks (confirms) the value of the operation status 1202 corresponding to its own thread ID in the thread management table (FIG. 12). If it is determined in step S1108 that the operation status 1202 is “execution”, the thread returns the process to step S1101 to continue the process for the next MFP in the MFP list L.

そして、変数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 operating status 1202 in the thread management table (FIG. 12) is “processing in progress”, the thread proceeds to step S1109.

ステップS1109では、スレッドは、スレッド管理テーブル(図12)の自身のスレッドIDに対応する稼働状況1202を「終了」に変更して、処理を終了する。
図12は、図10のステップS1003で作成されるスレッド管理テーブルの一例を示す図である。
スレッド管理テーブルには、指定した処理(例えば図11に示した取得処理)を行う各スレッドを一意に識別するスレッドID1201と、そのスレッドの稼働状況1202を示す文字列が格納されている。
In step S1109, the thread changes the operation status 1202 corresponding to its own thread ID in the thread management table (FIG. 12) to “end” and ends the process.
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 thread ID 1201 that uniquely identifies each thread that performs a specified process (for example, the acquisition process shown in FIG. 11), and a character string that indicates the operating status 1202 of the thread.

例えば、稼働状況1202が「実行中」の場合、そのスレッドは実行中であることを示す。また、稼働状況1202が「終了」の場合、そのスレッドは処理を終了し、スレッドが存在しないことを示す。また、稼働状況1202が「終了処理中」の場合、実行値の変更要求により、そのスレッドの実行終了がスレッド外から指示されたことを示す。なお、稼働状況1202が「終了処理中」であることを検出したスレッドは、図11のステップS1107に示すように、直ちに処理を終了する。   For example, when the operation status 1202 is “executing”, this indicates that the thread is being executed. Further, when the operation status 1202 is “end”, the thread ends the processing and indicates that no thread exists. Further, when the operation status 1202 is “ending process”, it indicates that the execution end of the thread is instructed from outside the thread by the execution value change request. Note that the thread that has detected that the operation status 1202 is “ending process” immediately ends the process, as shown in step S1107 of FIG.

以下、図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 CPU 202 of the host computer 301 executing software (program) recorded in a computer-readable manner in the external storage device 209 of the host computer 301 or the like. The program may be downloaded from the LAN 213.

タスクは、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 operation status 1202 in the thread management table (FIG. 12) managed by itself is “in execution”. Note that the value of D calculated in S1302 indicates the number of threads that increase or decrease in the execution value change process.

そして、ステップ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 operation status 1202 of the thread whose (-D) operation status 1202 is “executed” from the top of the thread management table (FIG. 12) to “end processing” and executes it. The value change process ends. As shown in step S1107 of FIG. 11, the thread being executed refers to the operation status 1202 of the thread management table (FIG. 12). If the “operation status 1202 is“ ending process ”, the process is executed. Will end.

以下、図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 CPU 202 of the host computer 301 executing software (program) recorded in a computer-readable manner in the external storage device 209 of the host computer 301 or the like. The program may be downloaded from the LAN 213.

この上方修正処理は、起動するタスクが存在しない場合で、実行中タスクの現在実行値の合計が、上限実行値よりも小さく、且つ、実行中タスクの現在実行値が最大実行値よりも小さい場合に、実行中タスクの実行値を増加させる処理である。即ち、起動するタスクが存在しない場合、実行中の各タスクの現在の実行値の合計値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 total value 702 of the current execution values of the respective tasks being executed is maximized within a range not exceeding the upper limit execution value. This is a process of controlling (adjusting) the value upward.

上方調整処理が呼び出されると、タスク起動制御部101は、まずステップS1401において、上限実行値703から現在実行中のタスクの実行値の合計702を引いた数を変数Zに格納する。即ち、Z=(上限実行値703−現在実行値の合計702)を計算する。なお、現在実行中のタスクの現在実行値の合計702は、実行中タスク管理部102の現在実行値集計部102aを用いて求められる。なお、上記S801で算出したZの値が「0」の場合、タスク起動制御部101は、実行中のタスクの現在実行値の合計が上限実行値に達しているため、上方修正処理は処理を終了する(図示せず)。   When the upward adjustment process is called, the task activation control unit 101 first stores the number obtained by subtracting the total execution value 702 of the currently executing tasks from the upper limit execution value 703 in the variable Z in step S1401. That is, Z = (upper limit execution value 703 -total of the current execution values 702) is calculated. The total current execution value 702 of the currently executing task is obtained using the current execution value totaling unit 102a of the executing task management unit 102. When the value of Z calculated in S801 is “0”, the task activation control unit 101 performs the upward correction process since the total of the current execution values of the tasks being executed has reached the upper limit execution value. End (not shown).

次に、タスク起動制御部101は、ステップS1402において、実行中タスクテーブル(図5)から、タスクの実行ID,現在実行値、最大実行値からなるテーブル(以下、テーブルTBL)をホストコンピュータ301のRAM203内に作成する。   Next, in step S1402, the task activation control unit 101 stores a table (hereinafter, table TBL) including the task execution ID, the current execution value, and the maximum execution value from the in-execution task table (FIG. 5). Created in the RAM 203.

次に、ステップS1403において、タスク起動制御部101は、このテーブルTBLを「最大実行値−最小実行値」の大きい順に並べ替える。ここで、「最大実行値−最小実行値」が同じ値を取る場合は、実行中タスクテーブル(図5)で上位にあるものが上位になるように並べ替える。   In step S1403, the task activation control unit 101 rearranges the table TBL in descending order of “maximum execution value−minimum execution value”. Here, when “maximum execution value−minimum execution value” takes the same value, rearrangement is performed so that the upper task in the task table being executed (FIG. 5) is higher.

続いて、ステップS1404において、タスク起動制御部101は、上記S1403で並べ替えたテーブルの先頭の行の現在実行値と最大実行値とを比較する。そして、ステップS1405において、上記先頭の行の現在実行値と最大実行値が等しいと判定した場合、全ての実行中タスクの現在実行値が最大実行値であることを意味する。この場合、タスク起動制御部101は、ステップS1409以降の、実行中のタスクに対して実行値の変更要求を送信する処理へと移行する。   Subsequently, in step S1404, the task activation control unit 101 compares the current execution value and the maximum execution value of the top row of the table rearranged in S1403. If it is determined in step S1405 that the current execution value of the first row is equal to the maximum execution value, it means that the current execution values of all the running tasks are the maximum execution values. In this case, the task activation control unit 101 shifts to a process of transmitting an execution value change request to the task being executed after step S1409.

一方、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 activation control unit 101 repeats the processing of steps S1403 to S1408.

一方、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 activation control unit 101 obtains the value of the current execution value of the task being executed by the processing of S1403 to S1408. A process of changing to a new current execution value is performed (S1409 to S1413). Details will be described below.

まず、タスク起動制御部101は、ステップS1409にて、テーブルTBLから1行取り出す処理を実行する。そして、ステップS1410において、タスク起動制御部101は、取出成功(行を取り出せた)と判定した場合、ステップS1311において、取り出した実行中タスクのテーブル内の現在実行値と、実際の実行中タスクの現在実行値を比較する。   First, in step S1409, the task activation control unit 101 executes processing for extracting one row from the table TBL. In step S1410, when the task activation control unit 101 determines that the fetching has succeeded (the row has been fetched), in step S1311, the current execution value in the table of the running task that has been fetched and the actual running task Compare the current run value.

そして、ステップS1412において、タスク起動制御部101は、テーブル内の現在実行値と実際の実行中タスクの現在実行値が一致する(同じ)と判定した場合は、ステップS1409に処理を戻し、次の行に対する処理を続ける。   In step S1412, when the task activation control unit 101 determines that the current execution value in the table matches the current execution value of the task currently being executed (same), the process returns to step S1409, and the next step Continue processing on the line.

一方、ステップS1412において、タスク起動制御部101は、テーブル内の現在実行値と実際の実行中タスクの現在実行値が一致しない(異なる)と判定した場合は、ステップS1413に処理を進める。   On the other hand, if the task activation control unit 101 determines in step S1412 that the current execution value in the table does not match (is different from) the actual execution value of the currently executing task, the process proceeds to step S1413.

ステップS1413において、タスク起動制御部101は、現在実行中のタスクの実行値を、上記ステップS1409で取り出したテーブルTBL内の現在実行値に変更する処理を行う。なお、各実行中のタスクは、図5の実行中タスクテーブルのポート番号503で示されるTCP/IPのポートを受信待ち状態にして、実行値の変更要求を受け付けている。上記S1413等の実行値の変更要求の送信側は、例えばXMLで記載された変更要求を、ローカルホストのこのポートに送信する。タスクの実行処理をしているプログラムは、図13に示したように、受信したXMLの内容に従って、タスクの実行値を動的に変更する。   In step S1413, the task activation control unit 101 performs a process of changing the execution value of the currently executing task to the current execution value in the table TBL extracted in step S1409. Note that each executing task accepts an execution value change request with the TCP / IP port indicated by the port number 503 in the executing task table of FIG. The transmission side of the execution value change request in S1413 or the like transmits, for example, a change request described in XML to this port of the local host. As shown in FIG. 13, the program executing the task execution process dynamically changes the task execution value in accordance with the contents of the received XML.

上記S1413の処理が終了すると、タスク起動制御部101は、ステップS1409に処理を戻し、次の行に対する処理を続ける。そして、ステップS1410において、全行終了(もう取り出す行がないため行を取り出せなかった)と判定した場合、タスク起動制御部101は、上方調整処理を終了する。   When the process of S1413 ends, the task activation control unit 101 returns the process to step S1409 and continues the process for the next line. If it is determined in step S1410 that all lines have been completed (the line cannot be extracted because there are no more lines to be extracted), the task activation control unit 101 ends the upward adjustment process.

本実施例によれば、従来のように、タスクの数に上限を設けることなく、また、実行中のタスクを中断することなく、タスクを処理するホストコンピュータの性能と各タスクの処理負荷の高低を考慮し、タスクの実行を効率的に制御することが可能となる。   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 minimum execution value 3 and a maximum execution value 7. However, there are cases where it is desired to shorten the execution time as much as possible for a specific task. In this embodiment, a configuration is such that the maximum execution value and the minimum execution value of the task can be individually specified when the task is created.

図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 display device 207 of the host computer 301 or the WEB browser operating on the host computer 302 by the task creation processing executed by the task activation control unit 101.

タスク起動制御部101は、ユーザによる「登録」ボタン1605の押下を検出すると、ラジオボタン1601,1602の内容を検出する。「デフォルトを使用する」1601が選択されている場合、タスク起動制御部101は、タスクの最大実行値と最小実行値として規定値である「3」と「7」をそれぞれ指定して、実行待ちタスクテーブル(図4)に、作成したタスクを追加する。   When the task activation control unit 101 detects that the user has pressed the “Register” button 1605, the task activation control unit 101 detects the contents of the radio buttons 1601 and 1602. When “use default” 1601 is selected, the task activation control unit 101 designates “3” and “7”, which are specified values as the maximum execution value and the minimum execution value of the task, and waits for execution. The created task is added to the task table (FIG. 4).

「実行値を指定する」1602が選択されている場合、タスク起動制御部101は、1603に入力された最大実行値、及び、1604に入力された最小実行値を検査する。そして、最大実行値及び最小実行値とも規定の範囲(デフォルト)内で、且つ、入力された最大実行値が最小実行値以下の場合に、タスク起動制御部101は、入力された最大実行値及び最小実行値を使用してタスクを作成し、実行待ちタスクテーブルに追加する。   When “specify execution value” 1602 is selected, the task activation control unit 101 checks the maximum execution value input in 1603 and the minimum execution value input in 1604. When both the maximum execution value and the minimum execution value are within a specified range (default) and the input maximum execution value is equal to or less than the minimum execution value, the task activation control unit 101 determines that the input maximum execution value and Create a task using the minimum execution value and add it to the pending task table.

一方、検査の結果、最大実行値及び最小実行値の少なくとも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 activation control unit 101 Output a warning. For example, the fact that the input value is invalid (error message) is displayed on the screen displaying the task execution value designation screen 1600, and the task creation processing is continued.

例えば、ユーザが、図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” button 1605, FIG. A task as shown in 1702 is registered in the execution waiting task table (FIG. 4).

図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に記載のタスク処理装置。   The activation control means activates the maximum value that does not exceed the difference between the upper limit execution value and the total value of the execution values of the tasks being executed within a range of execution values that can be specified for the task to be activated. The task processing apparatus according to claim 1, wherein the task processing apparatus determines an execution value to be specified for the task. 前記起動制御手段は、前記起動するタスクに指定可能な実行値の最小値と前記実行中の各タスクの実行値の合計値との和が前記上限実行値を超える場合、前記実行中のタスクの実行値を下方に変更制御し、
該起動するタスクに指定する実行値と前記実行中の各タスクの実行値の合計値との和が前記上限実行値を超えないように、前記起動するタスクに指定する実行値を決定することを特徴とする請求項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
前記起動制御手段は、前記実行中のタスクの実行値を下方に変更した場合、前記起動するタスクに指定可能な実行値の最小値を、前記起動するタスクに指定する実行値に決定することを特徴とする請求項3に記載のタスク処理装置。   When the execution control means changes the execution value of the task being executed downward, it determines that the minimum execution value that can be specified for the task to be started is the execution value that is specified for the task to be started. The task processing device according to claim 3, wherein: 前記起動制御手段は、起動するタスクが存在しない場合、前記実行中の各タスクの実行値の合計値が、前記上限実行値を超えない範囲で最大となるように、前記実行中のタスクの実行値を上方に変更制御することを特徴とする請求項1乃至4のいずれか1項に記載のタスク処理装置。   The activation control unit executes the execution of the task being executed so that the total value of the execution values of the tasks being executed is maximized within a range not exceeding the upper limit execution value when there is no task to be activated. 5. The task processing apparatus according to claim 1, wherein the value is controlled to be changed upward. 前記起動制御手段は、前記実行中のタスクの実行値を変更する場合、前記実行中のタスクで指定可能な実行値の範囲で変更するように制御することを特徴とする請求項3乃至5のいずれか1項に記載のタスク処理装置。   6. The activation control unit according to claim 3, wherein when the execution value of the task being executed is changed, the activation control unit performs control so as to change the value within a range of execution values that can be specified by the task being executed. The task processing device according to any one of claims. 前記実行手段は、前記起動制御手段からタスクに対して指定された実行値に応じた数の処理を並行して実行して前記タスクを処理し、
前記起動制御手段から実行中のタスクに対して変更するように要求された実行値が、前記実行中のタスクの実行値より小さい場合、前記実行中の処理のうち、前記要求された実行値と前記実行中のタスクの実行値との差に応じた数の処理を終了し、
前記起動制御手段から実行中のタスクに対して変更するように要求された実行値が、前記実行中のタスクの実行値より大きい場合、前記要求された実行値と前記実行中のタスクの実行値との差に応じた数の処理を起動することを特徴とする請求項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のタスク管理手段に、タスクに指定可能な実行値の範囲を設定する設定手段を有することを特徴とする請求項1乃至8のいずれか1項に記載のタスク処理装置。   The task processing apparatus according to claim 1, wherein the first task management unit includes a setting unit that sets a range of execution values that can be specified for the task. 複数のタスクを並行して実行可能なコンピュータにおけるタスク処理方法であって、
コンピュータが、第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.
複数のタスクを並行して実行可能なコンピュータを、請求項1乃至9のいずれか1項に記載されたタスク処理装置の手段として機能させるためのプログラム。   A program for causing a computer capable of executing a plurality of tasks in parallel to function as means of a task processing device according to any one of claims 1 to 9.
JP2010026212A 2010-02-09 2010-02-09 Task processing device, task processing method, and program Withdrawn JP2011164876A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (2)

* Cited by examiner, † Cited by third party
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