JP2009169790A - Task controller and task control method - Google Patents

Task controller and task control method Download PDF

Info

Publication number
JP2009169790A
JP2009169790A JP2008008700A JP2008008700A JP2009169790A JP 2009169790 A JP2009169790 A JP 2009169790A JP 2008008700 A JP2008008700 A JP 2008008700A JP 2008008700 A JP2008008700 A JP 2008008700A JP 2009169790 A JP2009169790 A JP 2009169790A
Authority
JP
Japan
Prior art keywords
priority
task
original
execution
mask data
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.)
Pending
Application number
JP2008008700A
Other languages
Japanese (ja)
Inventor
Taketsugu Matsubara
岳次 松原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Electronics Corp
Original Assignee
NEC Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Electronics Corp filed Critical NEC Electronics Corp
Priority to JP2008008700A priority Critical patent/JP2009169790A/en
Publication of JP2009169790A publication Critical patent/JP2009169790A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a task controller and a task control method for flexibly changing priority of each task. <P>SOLUTION: The task controller 1 controls order of processing of a plurality of tasks on the basis of priority and includes: an running task priority register 11 for storing original priority to be bit data of many digits having a running task; an execution waiting task priority register 12 for the task waiting to be executed to store original priority; a priority hierarchy mask register 16 for storing mask data to be bit data of many digits whose validity/invalidity is set in a digit unit; a masking means 13 for performing mask operation according to the original priority of the running task and mask data to calculate a first priority; a masking means 14 for performing mask operation according to the original priority of the task waiting to be executed and the mask data to calculate a second priority; and a determining means 15 for comparing the first priority with the second priority to determine a task of higher priority. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、タスク制御装置、及びタスク制御方法に関し、特に優先度に基づいて複数のタスクの処理順序を制御することで、各タスクが有機的に実行されることにより、ある所定の機能を実現する処理システムにおけるタスク制御装置、及びタスク制御方法に関する。   The present invention relates to a task control apparatus and a task control method, and in particular, by controlling the processing order of a plurality of tasks based on priority, each task is organically executed, thereby realizing a predetermined function. The present invention relates to a task control device and a task control method in a processing system.

処理システムにおけるある機能として録音機能を考えた場合、タスクとしては入力処理タスク、音声圧縮処理タスク、出力処理タスクの3つのタスクが有機的に動作することで録音機能を実現する。この様にある機能は複数のタスクが有機的に実行されることで所定の機能を実現するのが一般的である。   When the recording function is considered as a certain function in the processing system, the recording function is realized by organically operating three tasks as an input processing task, a voice compression processing task, and an output processing task. In general, a certain function is realized by executing a plurality of tasks organically.

また、機能によっては、パフォーマンスを保証しなければならないものもある。ここで言うパフォーマンスとは、処理時間や処理精度などである。例えば、前述の録音機能の場合、リアルタイム録音を行うためには、3つのタスク全てが一定時間内に処理を完了しなければならない。そのため、リアルタイム録音を実現するためには、各タスクの処理時間を保証しなければならない。   Some functions require performance to be guaranteed. The performance here refers to processing time, processing accuracy, and the like. For example, in the case of the recording function described above, in order to perform real-time recording, all three tasks must complete processing within a certain time. Therefore, in order to realize real-time recording, the processing time of each task must be guaranteed.

また、処理システムにおいて、全てのタスクに優先度を付け、優先度の高い順にタスクを実行するタスク制御方法を、一般的には優先度ベースのスケジューリングと呼ぶ。優先度は処理システムの設計段階にて決定され、一元管理される。   In the processing system, a task control method for assigning priorities to all tasks and executing the tasks in descending order of priority is generally called priority-based scheduling. Priorities are determined at the design stage of the processing system and are managed centrally.

特許文献1には、タスクをグループ化してグループ単位で優先度を持たせるようにすることで、機能としてのパフォーマンスを維持する方法が提示されている。特許文献1では、主優先度テーブル(グループ0)と従優先度テーブル(グループ1、グループ2)を作成し、通常は主優先度テーブルにより定められたタスク優先度によりタスク処理が実行され、グループ1、グループ2に属するタスクが最優先となると、それぞれの従優先度テーブルにより定められたタスク優先度によりタスク処理が実行される。これにより、グループ1、グループ2でグループ化された機能が他のタスク、グループに影響されずに機能としてのパフォーマンスを得ることができる。   Patent Document 1 proposes a method of maintaining performance as a function by grouping tasks and giving priority in units of groups. In Patent Document 1, a main priority table (group 0) and a sub priority table (group 1, group 2) are created, and task processing is normally executed with task priorities determined by the main priority table. When the tasks belonging to 1 and group 2 have the highest priority, task processing is executed according to the task priority determined by the respective sub priority tables. As a result, the functions grouped in group 1 and group 2 can obtain performance as functions without being influenced by other tasks and groups.

また、特許文献2は、プログラム処理の実行単位であるタスクが複数存在し、前記各タスクは優先順位を示す実行優先度情報を有し、それらのタスクを複数のグループに分けてこのタスクグループごとにタスクの実行を管理するタスク管理装置に関するものである。特許文献2におけるタスク管理装置の備えるタスクグループ切り替え手段は、各タスクグループの実行を有効とする順序、及び割り当てる実行時間のデータ、並びに、指令タイミングに応じて、実行を有効とするタスクグループを決定する。そして、当該タスク管理装置の備えるタスクグループ切り替え手段は、実行状態、実行可能状態、及び実行待ち状態の全てタスクに対して、実行を有効にするタスクグループに所属する各タスクの実行優先度を高くし、実行を無効にするタスクグループに所属する各タスクの実行優先度を低くする。これにより、実行状態、及び実行可能状態のタスクの中から実行優先度の最も高いタスクを選択して実行することができる。
特開2002−163120号公報 特開2004−326486号公報
Further, Patent Document 2 has a plurality of tasks which are execution units of program processing, each of the tasks has execution priority information indicating a priority, and these tasks are divided into a plurality of groups for each task group. The present invention relates to a task management device that manages task execution. The task group switching means included in the task management device in Patent Document 2 determines a task group whose execution is enabled according to the order in which execution of each task group is enabled, execution time data to be assigned, and command timing. To do. Then, the task group switching means included in the task management device increases the execution priority of each task belonging to the task group that enables execution for all tasks in the execution state, the executable state, and the execution waiting state. And lower the execution priority of each task belonging to the task group for which execution is disabled. As a result, the task having the highest execution priority can be selected and executed from the tasks in the execution state and the executable state.
JP 2002-163120 A JP 2004-326486 A

しかしながら、特許文献2では、優先度を変更させるタスクのグループが固定的であるという問題点がある。それは、特許文献2では、予め定めたタスクグループ単位で優先度を変更させるものだからである。また、特許文献1には、タスクの優先度を変更することが考慮されていない。   However, Patent Document 2 has a problem that a group of tasks whose priority is changed is fixed. This is because in Patent Document 2, the priority is changed in units of predetermined task groups. Further, Patent Document 1 does not consider changing the task priority.

しかし、当該タスクグループ自体におけるパフォーマンスを保証できても、処理システム全体では、パフォーマンスを保証できない可能性もある。これは、対象とする処理システムが大規模であるほど、顕著となる。   However, even if the performance of the task group itself can be guaranteed, the performance of the entire processing system may not be guaranteed. This becomes more significant as the target processing system is larger.

また、QoS(Quality of Service)の概念を用いると、機能やタスクは、あるタイミングではパフォーマンスが必要であるし、別のタイミングではパフォーマンスを必要としない場合もある。すなわち、処理システムの状況に応じて必要なパフォーマンスは一定ではない。   In addition, when using the concept of QoS (Quality of Service), functions and tasks may require performance at a certain timing and may not require performance at another timing. That is, the required performance is not constant depending on the status of the processing system.

すなわち、処理システムにおけるタスクの実行順序は、固定的なグループ分けだけで、要求されるパフォーマンスを保証できるものではなく、状況に応じて柔軟にタスクの優先度を変更できる必要がある。   That is, the task execution order in the processing system cannot guarantee the required performance only by a fixed grouping, and it is necessary to be able to change the priority of the task flexibly according to the situation.

本発明の第1の態様にかかるタスク制御装置(例えば、本発明の実施の形態1におけるタスク制御装置1)は、優先度に基づいて複数のタスクの処理順序を制御するものであって、第1のタスクが有する複数桁のビットデータである原優先度を格納する第1の原優先度格納部(例えば、本発明の実施の形態1における実行中タスク優先度レジスタ11)と、第2のタスクが有する複数桁のビットデータである原優先度を格納する第2の原優先度格納部(例えば、本発明の実施の形態1における実行待ちタスク優先度レジスタ12)と、有効無効が桁単位に設定された複数桁のビットデータであるマスクデータを格納するマスクデータ格納部(例えば、本発明の実施の形態1における優先度階層マスクレジスタ16)と、前記第1の原優先度格納部に格納された原優先度から、前記マスクデータ格納部に格納された前記マスクデータにおける有効と設定された桁に対応する桁を抽出して第1の優先度を算出し、前記第2の原優先度格納部に格納された原優先度から、前記マスクデータにおける有効と設定された桁に対応する桁を抽出して第2の優先度を算出する優先度算出部(例えば、本発明の実施の形態1におけるマスク手段13、及びマスク手段14)と、前記第1の優先度と、前記第2の優先度とを比較し、優先度の高いタスクを判定する判定部(例えば、本発明の実施の形態1における判定手段15)とを備える。   The task control device according to the first aspect of the present invention (for example, the task control device 1 according to the first embodiment of the present invention) controls the processing order of a plurality of tasks based on the priority. A first original priority storage unit (for example, an in-execution task priority register 11 according to the first embodiment of the present invention) that stores original priorities that are multi-digit bit data included in one task; A second original priority storage unit (for example, an execution waiting task priority register 12 according to the first embodiment of the present invention) that stores original priorities that are multi-digit bit data of a task, and validity / invalidity in units of digits A mask data storage unit (for example, the priority hierarchy mask register 16 according to the first embodiment of the present invention) that stores mask data that is bit data of a plurality of digits set to the first original priority rank A first priority is calculated by extracting a digit corresponding to a digit set as valid in the mask data stored in the mask data storage unit from the original priority stored in the mask data storage unit; A priority calculation unit that extracts a digit corresponding to a digit set as valid in the mask data from the original priority stored in the original priority storage unit and calculates a second priority (for example, according to the present invention) A determining unit (for example, the present invention) that compares the first priority and the second priority with the mask unit 13 and the mask unit 14 in the first embodiment and determines a task with a high priority. Determination means 15) in the first embodiment.

このように、本発明の第1の態様にかかるタスク制御装置は、各タスクの原優先度のそれぞれの各桁に意味を持たせて設定しておくことで、マスクデータに有効と設定された桁に対応する桁を抽出する処理により優先度を算出することができる。そのため、タスクの優先度の変更を柔軟に行うことができる。   As described above, the task control device according to the first aspect of the present invention is set to be effective in the mask data by giving each digit of the original priority of each task meaningful. The priority can be calculated by the process of extracting the digit corresponding to the digit. Therefore, task priority can be changed flexibly.

本発明の第2の態様にかかるタスク制御方法は、優先度に基づいて複数のタスクの処理順序を制御するものであって、第1のタスクが有する複数桁のビットデータである原優先度から、有効無効が桁単位に設定された複数桁のビットデータであるマスクデータにおける有効と設定された桁に対応する桁を抽出して第1の優先度を算出するステップと、第2のタスクが有する前記原優先度から、前記マスクデータにおける有効と設定された桁に対応する桁を抽出して第2の優先度を算出するステップと、前記第1の優先度と、前記第2の優先度とを比較し、優先度の高いタスクを判定するステップと、を備える。   The task control method according to the second aspect of the present invention controls the processing order of a plurality of tasks based on the priority, and is based on the original priority that is the multiple-digit bit data of the first task. A step of calculating a first priority by extracting a digit corresponding to a digit set as valid in mask data which is bit data of a plurality of digits in which valid / invalid is set in units of digits, and a second task A step of calculating a second priority by extracting a digit corresponding to a digit set to be valid in the mask data from the original priority, and the first priority and the second priority And determining a task having a high priority.

本発明の第2の態様にかかるタスク制御方法は、第1のタスク、及び第2のタスクの優先度をそれぞれマスクデータから算出することができる。これにより、タスクの優先度の変更を簡易に行うことができる。   The task control method according to the second aspect of the present invention can calculate the priorities of the first task and the second task from the mask data, respectively. This makes it possible to easily change the task priority.

本発明により、各タスクの桁ごとに意味を持たせた優先度を付けることで、状況に応じて、各タスクの優先度の変更を柔軟に行うタスク制御装置、及びタスク制御方法を提供することができる。   According to the present invention, a task control device and a task control method for flexibly changing the priority of each task according to the situation by assigning a priority having a meaning to each digit of each task are provided. Can do.

以下では、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。各図面において、同一要素には同一の符号が付されており、説明の明確化のため、必要に応じて重複説明は省略する。   Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings. In the drawings, the same elements are denoted by the same reference numerals, and redundant description will be omitted as necessary for the sake of clarity.

発明の実施の形態1.
本発明の実施の形態1で対象とするタスクは、優先度を算出するための原優先度を有するものである。原優先度は、複数ビットのデータであり、ここでは、原優先度の桁数は、8ビットであるとする。但し、原優先度の桁数は、これに限定されず、例えば、16ビット、32ビット、その他であって構わない。
Embodiment 1 of the Invention
The task targeted in the first embodiment of the present invention has the original priority for calculating the priority. The original priority is data of a plurality of bits, and here, it is assumed that the number of digits of the original priority is 8 bits. However, the number of digits of the original priority is not limited to this, and may be 16 bits, 32 bits, or the like.

また、以降の説明の前提として、優先度の値は絶対値が小さい方を高優先度とする。すなわち、0が最高優先度となる。   Further, as a premise for the following description, the priority value having a smaller absolute value is set as the higher priority. That is, 0 is the highest priority.

図1は、本発明の実施の形態1にかかるタスク制御装置1の構成例を示すブロック図である。タスク制御装置1は、実行タスク切り替え手段10と、タスク実行手段20と、実行待ちタスクキュー30と、優先度階層選択手段40とを備える。   FIG. 1 is a block diagram illustrating a configuration example of a task control device 1 according to the first embodiment of the present invention. The task control device 1 includes an execution task switching unit 10, a task execution unit 20, an execution waiting task queue 30, and a priority level selection unit 40.

実行タスク切り替え手段10は、タスク実行手段20により実行されるタスクと、実行待ちタスクキュー30に格納されたタスクとを切り替える手段である。実行タスク切り替え手段10は、実行中タスク優先度レジスタ11と、実行待ちタスク優先度レジスタ12と、マスク手段13と、マスク手段14と、判定手段15と、優先度階層マスクレジスタ16とを備える。   The execution task switching unit 10 is a unit that switches between a task executed by the task execution unit 20 and a task stored in the execution waiting task queue 30. The execution task switching unit 10 includes an executing task priority register 11, an execution waiting task priority register 12, a mask unit 13, a mask unit 14, a determination unit 15, and a priority hierarchy mask register 16.

実行中タスク優先度レジスタ11は、タスク実行手段20により実行されるタスクの原優先度が格納されるレジスタである。実行待ちタスク優先度レジスタ12は、実行待ちタスクキュー30に格納された実行待ちのタスクの内、先頭のタスクの原優先度が格納されるレジスタである。優先度階層マスクレジスタ16は、優先度階層選択手段40により設定される複数ビットのデータであるマスクデータが格納されるレジスタである。ここで、マスクデータの桁数は、8ビットとする。但し、マスクデータの桁数は、原優先度の桁数と同様に、これに限定されない。   The in-execution task priority register 11 is a register in which the original priority of a task executed by the task execution means 20 is stored. The execution waiting task priority register 12 is a register that stores the original priority of the first task among the execution waiting tasks stored in the execution waiting task queue 30. The priority hierarchy mask register 16 is a register in which mask data which is data of a plurality of bits set by the priority hierarchy selection means 40 is stored. Here, the number of digits of the mask data is 8 bits. However, the number of digits of the mask data is not limited to this, like the number of digits of the original priority.

マスク手段13は、実行中タスク優先度レジスタ11に格納された原優先度と、優先度階層マスクレジスタ16に格納されたマスクデータとをAND演算し、第1の演算結果を算出する手段である。マスク手段14は、実行待ちタスク優先度レジスタ12に格納された原優先度と、優先度階層マスクレジスタ16に格納されたマスクデータとをAND演算し、第2の演算結果を算出する手段である。判定手段15は、第1の演算結果と第2の演算結果とを比較し、第2の演算結果の絶対値の方が小さい場合、実行待ちタスク優先度レジスタ12の値を実行中タスク優先度レジスタ11に格納する手段である。   The mask unit 13 is a unit that performs an AND operation on the original priority stored in the executing task priority register 11 and the mask data stored in the priority hierarchy mask register 16 and calculates a first calculation result. . The mask means 14 is a means for performing an AND operation on the original priority stored in the execution waiting task priority register 12 and the mask data stored in the priority hierarchy mask register 16 and calculating a second operation result. . The determination unit 15 compares the first calculation result and the second calculation result, and if the absolute value of the second calculation result is smaller, the determination unit 15 sets the value of the execution waiting task priority register 12 to the executing task priority. Means for storing in the register 11.

実行タスク切り替え手段10は、タスクの制御タイミングにより処理を開始する。ここで、制御タイミングとは、例えば、割り込みや、タスク実行手段20によるタスク実行終了などのイベントである。また、実行タスク切り替え手段10は、処理の終了後にその旨をタスク実行手段20へ通知する。   The execution task switching means 10 starts processing at the task control timing. Here, the control timing is, for example, an event such as interruption or task execution end by the task execution means 20. Further, the execution task switching unit 10 notifies the task execution unit 20 of the fact after the processing is completed.

タスク実行手段20は、実行待ちタスクキュー30に格納されるタスクを取得し、当該タスクを実行状態とし、実行する手段である。タスク実行手段20は、通常、実行待ちタスクキュー30のキューの先頭のタスクから順番に取得する。また、タスク実行手段20は、実行タスク切り替え手段10の処理の終了の通知を受けて起動する。その場合、タスク実行手段20は、実行対象のタスクの原優先度と、実行中タスク優先度レジスタ11の値とを比較する。そして、一致しない場合、タスク実行手段20は、実行中タスク優先度レジスタ11の値を原優先度とするタスクを実行待ちタスクキュー30から検索し、検索されたタスクをタスク実行手段20の実行対象のタスクとして取得し、実行する。また、タスク実行手段20は、処理の終了後にその旨を実行タスク切り替え手段10へ通知する。尚、具体的なタスクの切り替え手段は、公知技術としてよく知られているものであるから、ここでは詳細な説明を省略する。   The task execution unit 20 is a unit that acquires a task stored in the execution waiting task queue 30, sets the task to an execution state, and executes the task. The task execution means 20 usually acquires the task in order from the first task in the queue of the execution waiting task queue 30. Further, the task execution means 20 is activated upon receiving a notification of the end of the process of the execution task switching means 10. In that case, the task execution means 20 compares the original priority of the task to be executed with the value of the executing task priority register 11. If they do not match, the task execution means 20 searches the execution waiting task queue 30 for a task whose original priority is the value of the executing task priority register 11, and executes the searched task as an execution target of the task execution means 20. Acquire and execute as a task. Further, the task execution unit 20 notifies the execution task switching unit 10 of the fact after the processing is completed. The specific task switching means is well known as a publicly known technique, and therefore detailed description thereof is omitted here.

実行待ちタスクキュー30は、実行可能な状態となり、実行待ちとなっているタスクを格納するキューである。   The waiting task queue 30 is a queue that stores tasks that are ready to be executed and are waiting to be executed.

優先度階層選択手段40は、マスクデータの有効とする桁を選択し、優先度階層マスクレジスタ16へ格納された当該マスクデータを更新する手段である。   The priority hierarchy selection means 40 is a means for selecting a digit to be valid in the mask data and updating the mask data stored in the priority hierarchy mask register 16.

図2は、本発明の実施の形態1にかかる優先度階層選択手段40と優先度階層マスクレジスタ16の構成例を示すブロック図である。図2に示すように、優先度階層選択手段40は、各階層の設定SW(スイッチ)であるLayer1設定SW41、Layer2設定SW42、及びLayer3設定SW43を備える。Layer1設定SW41、Layer2設定SW42、及びLayer3設定SW43は、それぞれ1ビットの情報を保持する手段であり、優先度階層マスクレジスタ16の各ビットに接続される。   FIG. 2 is a block diagram showing a configuration example of the priority hierarchy selection means 40 and the priority hierarchy mask register 16 according to the first exemplary embodiment of the present invention. As shown in FIG. 2, the priority level selection means 40 includes a Layer1 setting SW41, a Layer2 setting SW42, and a Layer3 setting SW43, which are setting SWs (switches) for each level. The Layer 1 setting SW 41, the Layer 2 setting SW 42, and the Layer 3 setting SW 43 are means for holding 1-bit information, and are connected to each bit of the priority hierarchy mask register 16.

図2では、Layer1設定SW41は、優先度階層マスクレジスタ16のマスクレジスタ第0ビット160、マスクレジスタ第1ビット161、マスクレジスタ第2ビット162、マスクレジスタ第3ビット163の4ビット分に接続される。Layer2設定SW42は、優先度階層マスクレジスタ16のマスクレジスタ第4ビット164、マスクレジスタ第5ビット165、マスクレジスタ第6ビット166の3ビット分に接続される。Layer3設定SW43は、優先度階層マスクレジスタ16のマスクレジスタ第7ビット167の1ビット分に接続される。   In FIG. 2, the Layer1 setting SW 41 is connected to 4 bits of the mask register 0th bit 160, the mask register 1st bit 161, the mask register 2nd bit 162, and the mask register 3rd bit 163 of the priority hierarchy mask register 16. The The Layer 2 setting SW 42 is connected to 3 bits of the mask register fourth bit 164, the mask register fifth bit 165, and the mask register sixth bit 166 of the priority hierarchy mask register 16. The Layer 3 setting SW 43 is connected to one bit of the seventh bit 167 of the mask register of the priority hierarchy mask register 16.

例えば、優先度階層選択手段40において、Layer1設定SW41の設定値を「1」、Layer2設定SW42の設定値を「1」、Layer3設定SW43の設定値を「0」とした場合、優先度階層マスクレジスタ16に格納されるマスクデータの値は、「01111111」となり、16進数で表すと「7F」となる。以下、16進数を表わすものにはhを付加する。例えば、上記の例では「7Fh」と表現する。   For example, when the priority level selection means 40 sets the setting value of the Layer 1 setting SW 41 to “1”, the setting value of the Layer 2 setting SW 42 to “1”, and the setting value of the Layer 3 setting SW 43 to “0”, the priority level mask The value of the mask data stored in the register 16 is “01111111”, which is “7F” in hexadecimal. Hereinafter, h is added to those representing hexadecimal numbers. For example, in the above example, it is expressed as “7Fh”.

ここで、本発明の実施の形態1にかかる原優先度、及びマスクデータの桁の定義について例を挙げて説明する。例えば、原優先度の桁について、第0ビット〜第3ビットの4桁をタスクのグループ内における個別の優先度を表わす個別優先度(第1の領域)とする。これは、同一グループ内における優先度が、16段階で設定できることを示す。   Here, the definition of the original priority and the digit of the mask data according to the first exemplary embodiment of the present invention will be described with an example. For example, regarding the digits of the original priority, the four digits from the 0th bit to the third bit are set as individual priorities (first regions) representing individual priorities in the task group. This indicates that the priority within the same group can be set in 16 levels.

また、原優先度の桁について、第4ビット〜第6ビットの3桁をグループ間の優先度表わすグループ優先度(第2の領域)とする。これは、グループ間の優先度が、8段階で設定できることを示す。   In addition, regarding the digits of the original priority, three digits from the fourth bit to the sixth bit are set as a group priority (second region) representing the priority between groups. This indicates that the priority between groups can be set in eight stages.

そして、原優先度の桁について、第7ビットの1桁を特定の場合に、優先させるためのフラグを表わす特定優先度(第3の領域)とする。これは、グループに関わらず優先させる特定のタスクであるか否かを(2段階で)設定できることを示す。または、特定優先度は、グループ優先度の上位又は下位階層のグループとして用いることができる。さらに、特定優先度は、グループ優先度で定めたグループとは別のグループとして、用いることもできる。   Then, with respect to the original priority digit, when the first digit of the seventh bit is specified, it is set as a specific priority (third region) representing a flag for giving priority. This indicates that it can be set (in two steps) whether or not it is a specific task to be prioritized regardless of the group. Or specific priority can be used as a group of the upper or lower hierarchy of group priority. Furthermore, the specific priority can be used as a group different from the group defined by the group priority.

また、マスクデータについては、上記の原優先度の桁に対応させて、Layer1設定SW41を個別優先度、Layer2設定SW42をグループ優先度、Layer3設定SW43を特定優先度に割り当てればよい。   Further, with respect to the mask data, the Layer 1 setting SW 41 may be assigned to the individual priority, the Layer 2 setting SW 42 to the group priority, and the Layer 3 setting SW 43 to the specific priority in correspondence with the above-described original priority digits.

このように、優先度階層選択手段40により各設定SWを都度切り替えることで、優先度の変更が容易となる。つまり、各タスクをグループごとに管理する場合は、予め、同じグループのタスクにおけるグループ優先度を同じ値にしておく。そして、Layer2設定SW42の設定値を「1」にすることで、グループ優先度を有効にして、タスクの実行順序を決定することができる。   In this way, the priority can be easily changed by switching each setting SW by the priority level selection means 40 each time. That is, when managing each task for each group, the group priority of tasks in the same group is set to the same value in advance. Then, by setting the setting value of the Layer 2 setting SW 42 to “1”, the group priority can be validated and the task execution order can be determined.

また、グループ優先度とは別に、特定のタスクを優先させる場合には、特定優先度を用いればよい。その場合、Layer3設定SW43を「1」にすることで、特定優先度を有効にして、タスクの実行順序を決定することができる。   In addition to the group priority, a specific priority may be used when giving priority to a specific task. In this case, by setting the Layer 3 setting SW 43 to “1”, the specific priority can be validated and the task execution order can be determined.

尚、第1の領域、第2の領域、及び第3の領域は、相互に接続するビットの位置、及び桁数を入れ替えても構わない。   In the first area, the second area, and the third area, the positions of bits connected to each other and the number of digits may be interchanged.

尚、優先度階層選択手段40における設定SWの種類、また、各設定SWに接続されたビットの桁数は、上述したものに限定されない。さらに、特定優先度に対応する設定SWは複数存在しても構わない。また、グループ優先度を複数の設定SWにより表わしても構わない。   Note that the type of setting SW and the number of digits connected to each setting SW in the priority level hierarchy selection means 40 are not limited to those described above. Furthermore, a plurality of setting SWs corresponding to the specific priority may exist. The group priority may be represented by a plurality of setting SWs.

以下に、本発明の実施の形態1にかかるタスク制御装置1の処理について具体的に説明する。まず、以降で用いられるデータについて説明する。ここでは、原優先度、及びマスクデータの桁の定義については、上述した例を用いるものとする。   The process of the task control device 1 according to the first embodiment of the present invention will be specifically described below. First, data used in the following will be described. Here, for the definition of the original priority and the digit of the mask data, the above-described example is used.

図3は、本発明の実施の形態1にかかるタスク制御装置1において実行されるタスクの名称、及び原優先度の例を示した図である。図3に示すように、グループ1に属するタスクのグループ優先度は、"001"であり、グループ2に属するタスクのグループ優先度は、"010"である。つまり、グループ1は、グループ2に比べ、優先度が高いことを示す。また、タスクYのみ特定優先度に"0"が設定してあり、他のタスクA〜D、X、Zでは、特定優先度に"1"が設定されている。   FIG. 3 is a diagram showing examples of task names and original priorities executed in the task control apparatus 1 according to the first embodiment of the present invention. As shown in FIG. 3, the group priority of tasks belonging to group 1 is “001”, and the group priority of tasks belonging to group 2 is “010”. That is, group 1 has a higher priority than group 2. In addition, “0” is set as the specific priority only for the task Y, and “1” is set as the specific priority in the other tasks A to D, X, and Z.

図4は、本発明の実施の形態1にかかる実行待ちタスクキュー30のキュー状態の例を示した図である。ここでは、タスク実行手段20で実行されているタスクをタスクXとし、他のタスクは図4に示す順で実行待ちタスクキュー30に入っているとする。   FIG. 4 is a diagram showing an example of the queue state of the execution waiting task queue 30 according to the first embodiment of the present invention. Here, it is assumed that the task being executed by the task execution means 20 is a task X, and other tasks are in the execution waiting task queue 30 in the order shown in FIG.

また、優先度階層マスクレジスタ16に格納されるマスクデータの値は、「7Fh」とする。すなわち、個別優先度、及びグループ優先度を有効とし、特定優先度を無効としている。   The value of the mask data stored in the priority hierarchy mask register 16 is “7Fh”. That is, the individual priority and the group priority are valid, and the specific priority is invalid.

次に、図7は、本発明の実施の形態1にかかる実行タスク切り替え手段10の処理の流れ示すフローチャート図である。まず、制御タイミングとなり、実行タスク切り替え手段10が起動する。そこで、実行タスク切り替え手段10は、タスク実行手段20より、実行中のタスクの原優先度を実行中タスク優先度レジスタ11に格納する(S11)。ここでは、実行中タスク優先度レジスタ11に格納された値は、実行中のタスクXの原優先度である「A0h」となる。   Next, FIG. 7 is a flowchart showing a processing flow of the execution task switching unit 10 according to the first exemplary embodiment of the present invention. First, at the control timing, the execution task switching means 10 is activated. Therefore, the execution task switching unit 10 stores the original priority of the task being executed in the execution task priority register 11 from the task execution unit 20 (S11). Here, the value stored in the executing task priority register 11 is “A0h” which is the original priority of the task X being executed.

次に、実行タスク切り替え手段10は、実行待ちタスクキュー30に未処理のタスクが存在するか否かを判定する(S12)。つまり、実行タスク切り替え手段10は、実行待ちタスクキュー30の全てのタスクに対して、ステップS12乃至S17を繰り返す。   Next, the execution task switching means 10 determines whether or not there is an unprocessed task in the execution waiting task queue 30 (S12). That is, the execution task switching unit 10 repeats steps S12 to S17 for all tasks in the execution waiting task queue 30.

実行待ちタスクキュー30に未処理のタスクが存在する場合、ステップS13へ進み、存在しない場合、すなわち、実行待ちタスクキュー30の全てのタスクに対して、実行タスク切り替え手段10による処理が行われた場合、実行タスク切り替え手段10は、処理を終了する。ここでは、実行待ちタスクキュー30に図4に示すタスクが存在するため、ステップS13へ進む。   If there is an unprocessed task in the waiting task queue 30, the process proceeds to step S13. If not, that is, all tasks in the waiting task queue 30 are processed by the executing task switching means 10. In this case, the execution task switching unit 10 ends the process. Here, since the task shown in FIG. 4 exists in the waiting task queue 30, the process proceeds to step S13.

そして、実行タスク切り替え手段10のマスク手段13は、優先度階層マスクレジスタ16に格納されたマスクデータと、実行中タスク優先度レジスタ11に格納された値とからAND演算により第1の演算結果を算出する(S13)。具体的には、第1の演算結果は、式(1)により求められる。
7Fh & A0h=20h ・・・(1)
Then, the mask means 13 of the execution task switching means 10 obtains the first calculation result by AND operation from the mask data stored in the priority hierarchy mask register 16 and the value stored in the executing task priority register 11. Calculate (S13). Specifically, the first calculation result is obtained by Expression (1).
7Fh & A0h = 20h (1)

続いて、実行タスク切り替え手段10は、実行待ちタスクキュー30に格納された未処理のタスクの内、先頭のタスクの原優先度を実行待ちタスク優先度レジスタ12に格納する(S14)。ここでは、図4に示すように、タスクBの原優先度「91h」が実行待ちタスク優先度レジスタ12に格納される。   Subsequently, the execution task switching means 10 stores the original priority of the first task among the unprocessed tasks stored in the execution waiting task queue 30 in the execution waiting task priority register 12 (S14). Here, as shown in FIG. 4, the original priority “91h” of task B is stored in the execution waiting task priority register 12.

そして、実行タスク切り替え手段10のマスク手段14は、優先度階層マスクレジスタ16に格納されたマスクデータと、実行待ちタスク優先度レジスタ12に格納された値とからAND演算により第2の演算結果を算出する(S15)。具体的には、第2の演算結果は、式(2)により求められる。
7Fh & 91h=11h ・・・(2)
Then, the mask means 14 of the execution task switching means 10 obtains the second operation result by AND operation from the mask data stored in the priority hierarchy mask register 16 and the value stored in the execution waiting task priority register 12. Calculate (S15). Specifically, the second calculation result is obtained by Expression (2).
7Fh & 91h = 11h (2)

その後、実行タスク切り替え手段10の判定手段15は、第1の演算結果と第2の演算結果とを比較し、絶対値の大小を判定する(S16)。第1の演算結果の絶対値に比べ、第2の演算結果の絶対値が小さい場合、ステップS17へ進み、第2の演算結果の絶対値が大きいか等しい場合、ステップS12へ戻る。ここでは、20h > 11hとなり、第2の演算結果の絶対値が小さいと判定され、ステップS17へ進む。   Thereafter, the determination unit 15 of the execution task switching unit 10 compares the first calculation result and the second calculation result, and determines the magnitude of the absolute value (S16). If the absolute value of the second calculation result is smaller than the absolute value of the first calculation result, the process proceeds to step S17. If the absolute value of the second calculation result is large or equal, the process returns to step S12. Here, 20h> 11h, and it is determined that the absolute value of the second calculation result is small, and the process proceeds to step S17.

判定手段15は、実行待ちタスク優先度レジスタ12の値を実行中タスク優先度レジスタ11に格納する(S17)。ここでは、実行中タスク優先度レジスタ11の値が、タスクXの原優先度「A0h」からタスクBの原優先度「91h」へ書き換わることになる。   The determination unit 15 stores the value of the waiting task priority register 12 in the executing task priority register 11 (S17). Here, the value in the task priority register 11 being executed is rewritten from the original priority “A0h” of the task X to the original priority “91h” of the task B.

以降、実行タスク切り替え手段10は、実行待ちタスクキュー30の全てのタスクに対して、ステップS12乃至S17を繰り返す。ここでは、図4に示す実行待ちタスクキュー30の残りのタスクについて実行される。その結果、実行中タスク優先度レジスタ11には、タスクAの原優先度「90h」が格納される。   Thereafter, the execution task switching unit 10 repeats steps S12 to S17 for all tasks in the execution waiting task queue 30. Here, the remaining tasks in the execution waiting task queue 30 shown in FIG. 4 are executed. As a result, the original priority “90h” of task A is stored in the executing task priority register 11.

実行タスク切り替え手段10は、処理の終了後にその旨をタスク実行手段20へ通知する。タスク実行手段20は、処理を開始し、上述したように実行中タスクの原優先度と実行中タスク優先度レジスタ11の原優先度とを比較する。ここでは、実行中のタスクXの原優先度「A0h」と、実行中タスク優先度レジスタ11に格納された「90h」が一致しないため、タスク実行手段20は、実行待ちタスクキュー30の中から原優先度が「90h」であるタスクAを検索し、実行対象のタスクとして取得し、実行する。   The execution task switching unit 10 notifies the task execution unit 20 of the fact after the processing is completed. The task execution means 20 starts the processing, and compares the original priority of the executing task with the original priority of the executing task priority register 11 as described above. Here, since the original priority “A0h” of the task X being executed and “90h” stored in the executing task priority register 11 do not match, the task execution means 20 can select from the waiting task queue 30. The task A having the original priority of “90h” is searched, acquired as a task to be executed, and executed.

これにより、タスク実行手段20は、実行権をタスクXからタスクAに切り替えることができる。また、実行権を失ったタスクXは、実行待ちタスクキュー30に入れられる。   Thereby, the task execution means 20 can switch the execution right from the task X to the task A. Further, the task X that has lost the execution right is placed in the execution waiting task queue 30.

そして、タスク実行手段20によりタスクAの処理が終了すると、再度、実行タスク切り替え手段10が起動し、以後、実行待ちタスクキュー30の残りのタスクに対しても同様に優先度に基づき実行順序が決定され、実行される。その結果、タスクの実行順序は、図5に示すように、グループ1からグループ2のグループ優先度に基づいた順序となり、グループ1及びグループ2内の各タスクは、個別優先度に基づいた順序となる。すなわち、タスクの実行順序は、グループ単位でスケジューリングされることとなる。   Then, when the task A is completed by the task execution means 20, the execution task switching means 10 is activated again. Thereafter, the execution order of the remaining tasks in the execution waiting task queue 30 is similarly set based on the priority. Determined and executed. As a result, as shown in FIG. 5, the task execution order is based on the group priority of group 1 to group 2, and each task in group 1 and group 2 is ordered based on the individual priority. Become. That is, the task execution order is scheduled in units of groups.

ここで、マスクデータの設定を変更した場合について説明する。以下では、優先度階層マスクレジスタ16に格納されるマスクデータの値は、「FFh」とする。すなわち、個別優先度、及びグループ優先度に加え、特定優先度を有効としている。マスクデータの値を「FFh」とし、図4の実行待ちタスクキュー30に対して、図7の処理を適用した場合、タスクの実行順序は図6のようになる。これにより、優先度階層選択手段40により、Layer3設定SW43の設定値を「1」と変更することで、特定優先度が"0"であるタスクYのみを最高優先度で処理させることができる。   Here, a case where the mask data setting is changed will be described. Hereinafter, the value of the mask data stored in the priority hierarchy mask register 16 is “FFh”. That is, the specific priority is made effective in addition to the individual priority and the group priority. When the mask data value is “FFh” and the processing of FIG. 7 is applied to the execution waiting task queue 30 of FIG. 4, the task execution order is as shown in FIG. Accordingly, by changing the set value of the Layer3 setting SW 43 to “1” by the priority level selecting means 40, only the task Y having the specific priority “0” can be processed with the highest priority.

以上のように、本発明の実施の形態1にかかるタスク制御装置1により、予め、各タスクに原優先度として、複数の桁を一つの領域とし、領域ごとに異なる意味を持たせて設定しておき、当該領域に対応させて有効無効を設定したマスクデータを用いることで、マスク演算により柔軟に優先度の算出を行うことができる。   As described above, the task control device 1 according to the first embodiment of the present invention previously sets each task as an original priority with a plurality of digits as one area and different meanings for each area. By using mask data in which validity / invalidity is set corresponding to the area, priority can be calculated flexibly by mask calculation.

また、原優先度の桁を階層化して設定することで、グループ単位でタスクを管理することができる。さらに、マスクデータを任意に変更することで、特定タスク、グループのみの優先度を容易に変更することができる。   In addition, tasks can be managed in units of groups by setting the original priority digits in a hierarchy. Furthermore, by arbitrarily changing the mask data, it is possible to easily change the priority of only the specific task and group.

また、処理システムの状況に応じて必要なパフォーマンスは一定ではないため、ある状況では、グループ単位で最高のパフォーマンスを発揮させ、別の状況では、グループにとらわれず、特定のタスクのみを優先させることでパフォーマンスを向上できる場合にも対応することができる。   Also, the required performance is not constant depending on the status of the processing system, so that in some situations the best performance can be achieved in groups, and in other situations, only specific tasks can be prioritized without being bound by groups. It is possible to cope with the case where the performance can be improved.

また、本発明の実施の形態1にかかる実行タスク切り替え手段10では、1回のマスク演算のみにより最終的な優先度を決定できるため、優先度を算出するステップ数はタスク、グループに依存せず一定であり、パフォーマンスへの影響が少ない。   In addition, since the execution task switching unit 10 according to the first exemplary embodiment of the present invention can determine the final priority only by one mask operation, the number of steps for calculating the priority does not depend on the task or the group. It is constant and has little impact on performance.

その他の発明の実施の形態.
尚、本発明の実施の形態1におけるタスクは、情報処理装置などにおける複数の実行処理単位であるため、タスクに限定されない。すなわち、タスクは、ジョブ、又は、プロセスと呼ばれるものであっても構わない。
Other Embodiments of the Invention
The task in Embodiment 1 of the present invention is not limited to a task because it is a plurality of execution processing units in the information processing apparatus or the like. That is, the task may be called a job or a process.

本発明の実施の形態1にかかるタスク制御装置1において、実行待ちのタスクを原優先度に従ってソートして、実行待ちタスクキュー30へ登録する手段を持つようにしてもよい。例えば、各タスクが実行可能状態となり、実行待ちタスクキュー30に登録される都度、原優先度に従ってソートを行うようにすることで実現できる。   The task control device 1 according to the first exemplary embodiment of the present invention may include a unit that sorts waiting tasks according to the original priority and registers them in the waiting task queue 30. For example, it can be realized by performing sorting according to the original priority every time each task becomes executable and is registered in the waiting task queue 30.

これにより、タスク実行手段20が、実行中タスク優先度レジスタ11の値を原優先度とするタスクを実行待ちタスクキュー30から検索する時間を短縮することができる。ひいては、本発明の実施の形態1にかかるタスク制御装置1におけるタスクの処理順序をスケジューリングに要する時間も短縮することができる。   As a result, it is possible to shorten the time for the task execution means 20 to search the task queue 30 for a task whose original priority is the value of the executing task priority register 11. As a result, the time required for scheduling the task processing order in the task control apparatus 1 according to the first embodiment of the present invention can also be shortened.

本発明の実施の形態1にかかる優先度階層選択手段40は、ユーザからの指示に基づき設定してもよい。または、優先度階層選択手段40は、所定のアルゴリズムに基づき変更するようにしてもよい。例えば、一定時間経過後に変更する、又は、特定のタスクが実行待ちタスクキュー30に入ったら変更するなどとしてもよい。   The priority level selection means 40 according to the first exemplary embodiment of the present invention may be set based on an instruction from the user. Alternatively, the priority level selection means 40 may be changed based on a predetermined algorithm. For example, it may be changed after a predetermined time has elapsed, or may be changed when a specific task enters the execution waiting task queue 30.

本発明の実施の形態1にかかるマスク手段13、及びマスク手段14は、AND演算としたが、これに限定されない。マスクデータのビットの値が"1"となっている原優先度の対応する桁を抽出できればよい。   The mask unit 13 and the mask unit 14 according to the first embodiment of the present invention are AND operations, but are not limited to this. It is only necessary to extract the digit corresponding to the original priority in which the bit value of the mask data is “1”.

さらに、本発明は上述した実施の形態のみに限定されるものではなく、既に述べた本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。   Furthermore, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the gist of the present invention described above.

本発明の実施の形態1にかかるタスク制御装置1の構成例を示すブロック図である。It is a block diagram which shows the structural example of the task control apparatus 1 concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかる優先度階層選択手段40と優先度階層マスクレジスタ16の構成例を示すブロック図である。FIG. 3 is a block diagram showing a configuration example of a priority hierarchy selection unit 40 and a priority hierarchy mask register 16 according to the first exemplary embodiment of the present invention. 本発明の実施の形態1にかかるタスク制御装置1において実行されるタスクの名称、及び原優先度の例を示した図である。It is the figure which showed the example of the name of the task performed in the task control apparatus 1 concerning Embodiment 1 of this invention, and original priority. 本発明の実施の形態1にかかる実行待ちタスクキュー30のキュー状態の例を示した図である。It is the figure which showed the example of the queue state of the waiting task queue 30 concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかるタスク制御装置1によるタスク実行順序の例を示した図(その1)である。It is FIG. (The 1) which showed the example of the task execution order by the task control apparatus 1 concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかるタスク制御装置1によるタスク実行順序の例を示した図(その2)である。It is FIG. (2) which showed the example of the task execution order by the task control apparatus 1 concerning Embodiment 1 of this invention. 本発明の実施の形態1にかかるタスク制御方法の処理の流れ示すフローチャート図である。It is a flowchart figure which shows the flow of a process of the task control method concerning Embodiment 1 of this invention.

符号の説明Explanation of symbols

1 タスク制御装置
10 実行タスク切り替え手段
11 実行中タスク優先度レジスタ
12 実行待ちタスク優先度レジスタ
13 マスク手段
14 マスク手段
15 判定手段
16 優先度階層マスクレジスタ
20 タスク実行手段
30 実行待ちタスクキュー
40 優先度階層選択手段
41 Layer1設定SW
42 Layer2設定SW
43 Layer3設定SW
160 マスクレジスタ第0ビット
161 マスクレジスタ第1ビット
162 マスクレジスタ第2ビット
163 マスクレジスタ第3ビット
164 マスクレジスタ第4ビット
165 マスクレジスタ第5ビット
166 マスクレジスタ第6ビット
167 マスクレジスタ第7ビット
DESCRIPTION OF SYMBOLS 1 Task control apparatus 10 Execution task switching means 11 Executing task priority register 12 Execution task priority register 13 Mask means 14 Mask means 15 Judgment means 16 Priority hierarchy mask register 20 Task execution means 30 Waiting task queue 40 Priority Hierarchy selection means 41 Layer1 setting SW
42 Layer2 setting SW
43 Layer3 setting SW
160 Mask register 0th bit 161 Mask register 1st bit 162 Mask register 2nd bit 163 Mask register 3rd bit 164 Mask register 4th bit 165 Mask register 5th bit 166 Mask register 6th bit 167 Mask register 7th bit

Claims (16)

優先度に基づいて複数のタスクの処理順序を制御するタスク制御装置であって、
第1のタスクが有する複数桁のビットデータである原優先度を格納する第1の原優先度格納部と、
第2のタスクが有する複数桁のビットデータである原優先度を格納する第2の原優先度格納部と、
有効無効が桁単位に設定された複数桁のビットデータであるマスクデータを格納するマスクデータ格納部と、
前記第1の原優先度格納部に格納された原優先度から、前記マスクデータ格納部に格納された前記マスクデータにおける有効と設定された桁に対応する桁を抽出して第1の優先度を算出し、前記第2の原優先度格納部に格納された原優先度から、前記マスクデータにおける有効と設定された桁に対応する桁を抽出して第2の優先度を算出する優先度算出部と、
前記第1の優先度と前記第2の優先度とを比較し、優先度の高いタスクを判定する判定部とを備える、タスク制御装置。
A task control device that controls the processing order of a plurality of tasks based on priority,
A first original priority storage unit for storing an original priority which is bit data of a plurality of digits included in the first task;
A second original priority storage unit for storing an original priority which is bit data of a plurality of digits included in the second task;
A mask data storage unit that stores mask data that is multi-digit bit data in which valid / invalid is set in units of digits,
A first priority is obtained by extracting, from the original priority stored in the first original priority storage unit, a digit corresponding to a digit set as valid in the mask data stored in the mask data storage unit. Priority for calculating the second priority by calculating a digit corresponding to the digit set as valid in the mask data from the original priority stored in the second original priority storage unit A calculation unit;
A task control device comprising: a determination unit that compares the first priority with the second priority and determines a task with a high priority.
前記原優先度は、
タスクグループ内の優先度を示す第1の領域と、
タスクグループの間の優先度を示す第2の領域と、
を含む、請求項1に記載のタスク制御装置。
The original priority is
A first area indicating the priority within the task group;
A second area indicating priority between task groups;
The task control device according to claim 1, comprising:
前記原優先度は、特定のタスクを指定するための識別子に割り当てられる第3の領域をさらに含む、請求項2に記載のタスク制御装置。   The task control device according to claim 2, wherein the original priority further includes a third area assigned to an identifier for designating a specific task. 前記原優先度は、複数の前記第3の領域をさらに含む、請求項3に記載のタスク制御装置。   The task control device according to claim 3, wherein the original priority further includes a plurality of the third areas. 前記優先度算出部は、前記マスクデータと前記原優先度とのマスク演算により当該タスクの優先度を算出する、請求項1乃至4のいずれか1項に記載のタスク制御装置。   5. The task control device according to claim 1, wherein the priority calculation unit calculates a priority of the task by a mask calculation of the mask data and the original priority. 6. 前記原優先度は、桁単位で階層化されたものである、請求項1乃至5のいずれか1項に記載のタスク制御装置。   The task control apparatus according to claim 1, wherein the original priority is hierarchized in units of digits. 複数の実行待ちのタスクを記憶する実行待ちタスク記憶部をさらに備え、
前記実行待ちタスク記憶部は、
複数の前記実行待ちのタスクが原優先度に基づいてソートされる、請求項1乃至6のいずれか1項に記載のタスク制御装置。
An execution waiting task storage unit for storing a plurality of execution waiting tasks;
The execution task storage unit is
The task control device according to claim 1, wherein the plurality of tasks waiting for execution are sorted based on an original priority.
前記マスクデータを更新するマスクデータ更新部をさらに備える、請求項1乃至7のいずれか1項に記載のタスク制御装置。   The task control device according to claim 1, further comprising a mask data update unit configured to update the mask data. 優先度に基づいて複数のタスクの処理順序を制御するタスク制御方法であって、
第1のタスクが有する複数桁のビットデータである原優先度から、有効無効が桁単位に設定された複数桁のビットデータであるマスクデータにおける有効と設定された桁に対応する桁を抽出して第1の優先度を算出するステップと、
第2のタスクが有する前記原優先度から、前記マスクデータにおける有効と設定された桁に対応する桁を抽出して第2の優先度を算出するステップと、
前記第1の優先度と前記第2の優先度とを比較し、優先度の高いタスクを判定するステップと、を備えるタスク制御方法。
A task control method for controlling the processing order of a plurality of tasks based on priority,
Extract the digit corresponding to the digit set as valid in the mask data, which is the bit data of multiple digits with valid / invalid set for each digit, from the original priority that is the multiple digit bit data of the first task Calculating the first priority by:
Calculating a second priority by extracting a digit corresponding to a digit set to be valid in the mask data from the original priority of a second task;
Comparing the first priority with the second priority and determining a task with a higher priority.
前記原優先度は、
タスクグループ内の優先度を示す第1の領域と、
タスクグループの間の優先度を示す第2の領域と、
を含む、請求項9に記載のタスク制御方法。
The original priority is
A first area indicating the priority within the task group;
A second area indicating priority between task groups;
The task control method according to claim 9, comprising:
前記原優先度は、特定のタスクを指定するための識別子に割り当てられる第3の領域をさらに含む、請求項10に記載のタスク制御方法。   The task control method according to claim 10, wherein the original priority further includes a third area assigned to an identifier for designating a specific task. 前記原優先度は、複数の前記第3の領域をさらに含む、請求項11に記載のタスク制御方法。   The task control method according to claim 11, wherein the original priority further includes a plurality of the third areas. 前記第1の優先度を算出するステップ、及び前記第2の優先度を算出するステップは、
前記マスクデータと前記原優先度とのマスク演算により当該タスクの優先度を算出する、請求項9乃至12のいずれか1項に記載のタスク制御方法。
The step of calculating the first priority and the step of calculating the second priority include:
The task control method according to claim 9, wherein the priority of the task is calculated by a mask calculation of the mask data and the original priority.
前記原優先度は、桁単位で階層化されたものである、請求項9乃至13のいずれか1項に記載のタスク制御方法。   The task control method according to claim 9, wherein the original priority is hierarchized in units of digits. 複数の実行待ちのタスクを原優先度でソートするステップをさらに備える、請求項9乃至14のいずれか1項に記載のタスク制御方法。   The task control method according to claim 9, further comprising a step of sorting a plurality of tasks waiting to be executed according to an original priority. 前記マスクデータを更新するマスクデータ更新ステップをさらに備える、請求項9乃至15のいずれか1項に記載のタスク制御方法。   The task control method according to claim 9, further comprising a mask data update step of updating the mask data.
JP2008008700A 2008-01-18 2008-01-18 Task controller and task control method Pending JP2009169790A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008008700A JP2009169790A (en) 2008-01-18 2008-01-18 Task controller and task control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008008700A JP2009169790A (en) 2008-01-18 2008-01-18 Task controller and task control method

Publications (1)

Publication Number Publication Date
JP2009169790A true JP2009169790A (en) 2009-07-30

Family

ID=40970860

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008008700A Pending JP2009169790A (en) 2008-01-18 2008-01-18 Task controller and task control method

Country Status (1)

Country Link
JP (1) JP2009169790A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09251387A (en) * 1996-03-18 1997-09-22 Sharp Corp Interruption request priority deciding circuit
JP2003067201A (en) * 2001-08-30 2003-03-07 Hitachi Ltd Controller and operating system
WO2004114132A1 (en) * 2003-06-20 2004-12-29 Fujitsu Limited Interrupt control method, interrupt control device, and interrupt control program
JP2005284760A (en) * 2004-03-30 2005-10-13 Nec Electronics Corp Interrupt control circuit
JP2007299128A (en) * 2006-04-28 2007-11-15 Nec Electronics Corp Interrupt control circuit and interruption control method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09251387A (en) * 1996-03-18 1997-09-22 Sharp Corp Interruption request priority deciding circuit
JP2003067201A (en) * 2001-08-30 2003-03-07 Hitachi Ltd Controller and operating system
WO2004114132A1 (en) * 2003-06-20 2004-12-29 Fujitsu Limited Interrupt control method, interrupt control device, and interrupt control program
JP2005284760A (en) * 2004-03-30 2005-10-13 Nec Electronics Corp Interrupt control circuit
JP2007299128A (en) * 2006-04-28 2007-11-15 Nec Electronics Corp Interrupt control circuit and interruption control method

Similar Documents

Publication Publication Date Title
JP5971334B2 (en) Task allocation device, task allocation method, and computer program
CN109445851B (en) Multithreaded processor
JP5770721B2 (en) Information processing system
US10541858B2 (en) Thin client system, management server, workplace environment setting method and workplace environment setting program
JP2010086129A (en) Multi-thread processor
JP2005044326A (en) Improved edf scheduling method
JP2007133481A (en) Distributed system
JP2007207136A (en) Data processor, data processing method, and data processing program
US9170839B2 (en) Method for job scheduling with prediction of upcoming job combinations
JP4409568B2 (en) Band control program and multiprocessor system
JP2006268168A (en) Vector instruction management circuit, vector processor, vector instruction management method, vector processing method, vector instruction management program, and vector processing program
JP6729567B2 (en) Parameter determination device, parameter determination method, and program
JP2009169790A (en) Task controller and task control method
CN110737533B (en) Task scheduling method and device, electronic equipment and storage medium
CN101535956A (en) Multiprocessor system, system configuration method in multiprocessor system, and program thereof
JP6349837B2 (en) Scheduler apparatus, scheduling method therefor, arithmetic processing system, and computer program
US20100223596A1 (en) Data processing device and method
KR101470695B1 (en) Method and system of biogeography based optimization for grid computing scheduling
JP6387626B2 (en) Information processing system, information processing method, and scheduling program
JPWO2014038334A1 (en) I / O response control setting device
JPWO2018198745A1 (en) Computing resource management device, computing resource management method, and program
US20240134932A1 (en) Distributed matrix computation control method and apparatus supporting matrix fused operation
CN116521347A (en) Two-stage priority scheduling method of embedded real-time operating system
JP2011154505A (en) Arithmetic processing unit and arithmetic execution method
JP5946566B2 (en) Scheduling method of hardware thread in multi-thread processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100806

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120110

A02 Decision of refusal

Effective date: 20120529

Free format text: JAPANESE INTERMEDIATE CODE: A02