JP3975795B2 - Task management apparatus, method and program - Google Patents
Task management apparatus, method and program Download PDFInfo
- Publication number
- JP3975795B2 JP3975795B2 JP2002080799A JP2002080799A JP3975795B2 JP 3975795 B2 JP3975795 B2 JP 3975795B2 JP 2002080799 A JP2002080799 A JP 2002080799A JP 2002080799 A JP2002080799 A JP 2002080799A JP 3975795 B2 JP3975795 B2 JP 3975795B2
- Authority
- JP
- Japan
- Prior art keywords
- task
- determination
- tasks
- execution
- controllable
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、マルチタスクシステムにおけるタスク管理装置およびプログラムに関し、特にシステムのリソース量に応じた実行保証機能を有するものに関する。
【0002】
【従来の技術】
コンピュータ間通信において、動画や音声といったリアルタイム情報の通信を行いたいという要求は近年、一段と増している。動画や音声を扱うリアルタイム通信端末では、例えば相手側の端末から動画や音声といった情報を受信するタスク、受信した情報を表示するタスク、相手側の端末に対して情報を送信するタスク等の複数のタスクを実行しなければならない。したがって、この端末は、リアルタイム処理を必要とする複数のタスクを実行するマルチタスクシステムとなり、このようなマルチタスクシステムにおいて、サービス品質(Qos;Quality of service)の保証が必要となる。
【0003】
このようなマルチタスクシステムにおいて、サービス品質を保証する技術としては、OS(Operating System)のタスク優先度設定機能を用いて、動画や音声といった情報を扱うリアルタイム性を要求されるタスクの優先度を他のタスクより高く設定して、遅延要求の厳しいタスクの処理を優先させるという手法が一般的に使用されている。また、サービス品質を保証する他の技術として、実行終了目標時刻が設定されたタスクについて、その実行終了目標時刻が近づくほど優先度を上げて優先的に処理することにより、タスク処理を実行終了目標時刻までに完了させるという手法も提案されている(特開昭62−284437号公報)。
【0004】
【発明が解決しようとする課題】
しかし、いずれの従来技術も、実行の予約が要求されているタスクの所要リソース量の合計が、その時点でシステムが提供可能なリソース量を上回る場合には、処理能力を超えたタスクをシステムが実行しようとしてしまい、優先度の低いタスクや新規に実行の予約が要求されたタスクを実行できない、あるいは全てのタスクを実行できないか、遅延が許容される所定のデッドライン内に実行できないことになる。
【0005】
例えば、図9(a)に示すように、ある時点でシステムが提供できるリソース量R1が、要求されているタスクの合計の所要リソース量がr1+r2より大である場合には、システムは実行が要求されている全てのタスクを実行できる。しかし、この状態から、図9(b)に示すように所要リソース量r3の追加のタスクの処理が要求された場合には、合計の所要リソース量r1+r2+r3が、提供できるリソース量R1を上回るため、追加のタスクの受付がリジェクトされるか、あるいは全てのタスクの受付がリジェクトされることになる。
【0006】
また、図10(a)〜(c)に示すように、周期がS1、要求処理時間がT1、デッドライン(その時間内で処理が完了すれば品質が満足されるような許容時間、許容遅延時間)がH1に設定されたタスクA1,A2,A3がある場合についてみると、タスクA1およびタスクA2は、両者をこの順で実行する場合にそれぞれのデッドラインを満足(デッドライン以前に処理を終了)できるため、共に実行可能である。しかし、タスクA1,A2,A3をこの順で実行する場合には、タスクA1,A2のデッドラインを満足できてもタスクA3のデッドラインを満足できないため、タスクA3は実行できないことになる。
【0007】
そこで本発明の目的は、タスクの遅延保証とタスクの効率的な実行とを両立できる手段を提供することを目的とする。
【0008】
【課題を解決するための手段】
第1の本発明は、複数のタスクのいずれかを選択的に実行するマルチタスクシステムにおいて、各タスクの所要リソース量に基づいて各タスクの実行可能性を判定する判定手段と、判定手段の判定結果に基づいて実行対象となるタスクを選択するタスク選択手段と、を備えたタスク管理装置であって、少なくともいずれかのタスクについて規定された保証部分と制御可能部分との所要リソース量情報を取得する所要リソース量情報取得手段を更に備え、前記判定手段は、少なくともいずれかの予約済みのタスクの処理レベルを前記制御可能部分の範囲内で仮想的に変更して前記判定を実行し、前記タスク選択手段は、実行可能と判定された処理レベルで前記選択を実行することを特徴とするタスク管理装置である。
【0009】
タスクの中には、例えば画像における解像度や、動画におけるフレームレート(秒あたりの描画数)など、ある程度の実行品質の低下がユーザに許容できる場合が少なくない。したがって、優先度の高いタスクや現在実行中であるタスクに、いわば削れる部分があるにも関わらず、優先度の低いタスクや新規に予約要求がされたタスクがリジェクトされるのでは不合理といえる。
【0010】
この点、第1の本発明では、タスクそのものを保証部分と制御可能部分とに分けて段階的に設定し、後者を制御可能、つまり場合に応じて付加・削除・増加または減少できる部分として扱うこととした。すなわち第1の本発明では、判定手段が、各タスクの所要リソース量に基づいて、少なくともいずれかの予約済みのタスクの処理レベルを制御可能部分の範囲内で仮想的に変更して各タスクの実行可能性を判定すると共に、タスク選択手段が、実行可能と判定された処理レベルで、実行対象となるタスクの選択を実行するようにしたので、システムのリソース量、各タスクのデッドラインや実行周期などの外的制約がある場合にも、予約済みのタスクについて品質を調整することで、優先度の低いタスクや新規に予約要求がされたタスクを受付けて実行することができ、タスクの遅延保証とタスクの効率的な実行とを両立できる。
【0011】
第2の本発明は、タスク管理装置であって、前記判定手段は、予約済みのタスクのうち、実行が開始されていないタスクの少なくともいずれかのタスクのみについて、その保証部分と制御可能部分との両者が実行可能かを、新規タスクの予約要求があった際に判定する第1判定手段と、第1判定手段によって不可との判定があった場合に、第1判定手段で不可と判定された前記実行が開始されていないタスクについて、その保証部分が実行可能かを判定する第2判定手段と、を備え、前記タスク選択手段は、第1判定手段により実行可能と判定された前記実行が開始されていないタスクにつきその保証部分と制御可能部分との両者を実行対象として選択し、第2判定手段により実行可能と判定された前記実行が開始されていないタスクにつきその保証部分のみを実行対象として選択することを特徴とするタスク管理装置である。
【0012】
第2の本発明では、制御可能部分の付加または削除により、判定処理と品質の調整とを行うこととした。すなわち、図4(a)に示すように、各タスクの所要リソース量r1,r2を、予め保証部分に係る所要リソース量r1a,r2aと、制御可能部分に係る所要リソース量r1b,r2bとに分割して設定しておき、例えば所要リソース量r3の新たなタスク(図4(b))の登録の要求があった場合などには、まず、要求されている全タスクの保証部分と制御可能部分(所要リソース量r1+r2+r3)が実行可能かを判定し、実行可能と判定された場合にはその保証部分と制御可能部分とが選択される。他方、保証部分と制御可能部分とが実行不能と判定された場合、次に、要求されている全タスクの保証部分のみ(図4(c)、所要リソース量r1a+r2a+r3a)が実行可能かが判定され、実行可能と判定された場合には全タスクの保証部分のみが選択される。このように第2の本発明では、制御可能部分の付加または削除によって所要リソース量を調整するので、簡易な構成により第1の本発明と同様の効果を得ることができる。
【0013】
第3の本発明は、タスク管理装置であって、前記判定手段が、実行が開始されていない予約済みのタスクの全てについて、前記第1判定手段及び第2判定手段による判定を実行することを特徴とするタスク管理装置である。
【0014】
第3の本発明では、前記第1判定手段及び第2判定手段による判定を実行することによる処理レベルの仮想的な変更を、実行が開始されていない予約済みのタスクの全てについて行うこととしたので、大きな変更量をとることにより要求リソース量の大きな変化を許容できる。
【0015】
本発明における判定手段による判定は、所要リソース量の変動が予想される場合に行うのが特に好適であり、第4の本発明のように処理対象となるタスク数の変更要求があった場合に行うこととしたり、第5の本発明のように少なくともいずれかのタスクについてパラメータの変更要求があった場合に行うこととしてもよい。また、第5の本発明におけるパラメータは、第6の本発明のように前記少なくともいずれかのタスクのデッドラインとしたり、第7の本発明のように前記少なくともいずれかのタスクの実行周期とするのが好適である。
【0016】
第8の本発明は、タスク管理装置であって、少なくともいずれかのタスクについてその保証部分と制御可能部分とを識別するための保証対象識別子を取得する保証対象識別子取得手段を更に備え、前記タスク選択手段が、前記保証対象識別子を利用して、前記選択を行うことを特徴とするタスク管理装置である。
【0017】
第8の本発明では、タスク選択手段が、保証対象識別子の利用によって、実行対象となるタスクを選択できるので、簡易な構成により第1の本発明と同様の効果を得ることができる。
【0018】
第9の本発明は、タスク管理装置であって、少なくともいずれかのタスクに含まれる複数の制御可能部分に付与されたこれら複数の制御可能部分の選択順位を識別するための順位識別子を取得する順位識別子取得手段を更に備え、前記判定手段が、判定対象となるタスクのうち選択される制御可能部分を前記順位識別子を利用しその選択順位に従って選択すると共に、その選択および前記判定を前記選択の対象を変えながら試行することを特徴とするタスク管理装置である。
【0019】
第9の本発明では、判定手段が、判定対象となるタスクにおける制御可能部分を、順位識別子を利用しその選択順位に従って選択すると共に、その選択および前記判定を選択の対象を変えながら試行することにより、そのタスクに係る所要リソース量を更にきめ細やかに調整できる。
【0020】
第10の本発明は、タスク管理装置であって、所定の主タスクと、前記主タスクの実行が実行の条件となる従タスクと、を識別するための主従タスク識別子を取得する主従タスク識別子取得手段を更に備え、前記判定手段および前記タスク選択手段が、前記主従タスク識別子を利用して、前記主タスクを前記保証部分として処理し、前記従タスクを前記制御可能部分として処理することを特徴とするタスク管理装置である。
【0021】
第10の本発明では、互いに主従関係のある複数のタスクを、主従タスク識別子の利用によって保証部分や制御可能部分として処理できるので、タスク内での制御可能部分の処理とタスク間での主従関係の処理とを共通のアルゴリズムで実行できる。
【0022】
第11の本発明は、複数のタスクのいずれかを選択的に実行するマルチタスクシステムにおいて、各タスクの所要リソース量に基づいて各タスクの実行可能性を判定する判定ステップと、判定ステップの判定結果に基づいて実行対象となるタスクを選択するタスク選択ステップと、を含むタスク管理方法であって、少なくともいずれかのタスクについて規定された保証部分と制御可能部分との所要リソース量情報を取得する所要リソース量情報取得ステップを更に含み、前記判定ステップでは、少なくともいずれかの予約済みのタスクの処理レベルを前記制御可能部分の範囲内で仮想的に変更して前記判定を実行し、前記タスク選択ステップでは、実行可能と判定された処理レベルで前記選択を実行することを特徴とするタスク管理方法である。第11の本発明によれば、第1の本発明と同様の効果を得ることができる。
【0023】
第12の本発明は、タスク管理方法であって、少なくともいずれかのタスクについてその保証部分と制御可能部分とを識別するための保証対象識別子を取得する保証対象識別子取得ステップを更に含み、前記タスク選択ステップでは、前記保証対象識別子を利用して、前記選択を行うことを特徴とするタスク管理方法である。第12の本発明によれば、第8の本発明と同様の効果を得ることができる。
【0024】
第13の本発明は、タスク管理方法であって、少なくともいずれかのタスクに含まれる複数の制御可能部分に付与されたこれら複数の制御可能部分の選択順位を識別するための順位識別子を取得する順位識別子取得ステップを更に含み、前記判定ステップでは、判定対象となるタスクのうち選択される制御可能部分を前記順位識別子を利用しその選択順位に従って選択すると共に、その選択および前記判定を前記選択の対象を変えながら試行することを特徴とするタスク管理方法である。第13の本発明によれば、第9の本発明と同様の効果を得ることができる。
【0025】
第14の本発明は、タスク管理方法であって、所定の主タスクと、前記主タスクの実行が実行の条件となる従タスクと、を識別するための主従タスク識別子を取得する主従タスク識別子取得ステップを更に含み、前記判定ステップおよび前記タスク選択ステップでは、前記主従タスク識別子を利用して、前記主タスクを前記保証部分として処理し、前記従タスクを前記制御可能部分として処理することを特徴とするタスク管理方法である。第14の本発明によれば、第10の本発明と同様の効果を得ることができる。
【0026】
第15の本発明は、複数のタスクのいずれかを選択的に実行するマルチタスクシステムにおいて、各タスクの所要リソース量に基づいて各タスクの実行可能性を判定する判定処理と、判定処理の判定結果に基づいて実行対象となるタスクを選択するタスク選択処理と、を前記システムに実行させるためのプログラムであって、少なくともいずれかのタスクについて規定された保証部分と制御可能部分との所要リソース量情報を取得する所要リソース量情報取得処理を更に含み、前記判定処理では、少なくともいずれかの予約済みのタスクの処理レベルを前記制御可能部分の範囲内で仮想的に変更して前記判定を実行し、前記タスク選択処理では、実行可能と判定された処理レベルで前記選択を実行することを特徴とするプログラムである。第15の本発明では、第1の本発明と同様の効果を得ることができる。
【0027】
本発明のタスク管理方法と関連して用いられるプログラムは、第16の本発明のように、タスクの処理レベルの変更前後の所要リソース量を格納する所要リソース量情報格納手段を備えることとしたり、第17の本発明のように、タスクの保証部分と制御可能部分とを識別するための保証対象識別子を備えることとしたり、第18の本発明のように、タスクに含まれる複数の制御可能部分の順位を識別するための順位識別子を備えることとすれば、実行されるプログラムとこれに含まれるタスクの諸情報とを組として取り扱うことができ好適である。
【0028】
また、本発明のタスク管理方法と関連して用いられるプログラムは、第19の本発明のように、所定の主タスクを保証部分として前記システムに認識させ、前記主タスクの実行が実行の条件となる従タスクを制御可能部分として前記システムに認識させるように、前記保証対象識別子を備えることとすれば、互いに主従関係のある複数のタスクを、主従タスク識別子の利用によって保証部分や制御可能部分として処理できるので、タスク内での制御可能部分の処理とタスク間での主従関係の処理とを共通のアルゴリズムで実行できる。他方、第20の本発明のように、保証対象識別子に代えて、主従関係の処理のための主従タスク識別子を備えることとしてもよい。
【0029】
【発明の実施の形態】
本発明の実施形態について、以下に図面を参照して説明する。図1において、本発明の実施形態に係るマルチタスクシステム1は、CPU2、タイマ3、例えばハードディスク装置等の記憶装置4、メモリ5、ネットワーク11とのインタフェースとなるインタフェース制御部6を備えている。これらCPU2、タイマ3、記憶装置4、メモリ5、ネットワーク制御部6は、内部バス7で接続されている。
【0030】
タイマ3は、設定された一定時間までの計時を繰り返すものであり、設定時間ごとにCPU2に割り込みをかけることにより、設定時間の経過をCPU2に通知することが可能である。記憶装置4にはタスクプログラム等が記録されており、必要に応じてメモリ5に読み出される。
【0031】
本発明に係るタスク管理機能を実現するにはCPU制御が必要であり、タスク管理の機能をOS(Operating System)に組み込む必要がある。そこで、メモリ5上には、後述するタスク受付処理をCPU2に実行させるためのタスク受付プログラムが格納されるタスク受付プログラム格納部8と、同様にタスク実行処理をCPU2に実行させるためのタスク実行プログラムが格納されるタスク実行プログラム格納部9が存在する。そして、これらプログラムを格納部8、9に格納することにより、本発明に係るタスク管理機能がOSに組み込まれる。
【0032】
本実施形態におけるリソース量としては、CPU2の使用時間が用いられる。なお、本発明におけるリソース量は、CPU2のほかに記憶装置4やメモリ5、あるいは図示しないビデオメモリの使用時間および記憶容量、ネットワークの通信速度やネットワークサーバの記憶容量・メモリ容量など、特定のタスクを実行するために必要なハードウェア資源およびソフトウェア資源の全てを選択的に用いることができる。また、リソース量としては、タスクの種類および機能に応じて異なるものを利用でき、例えばタスクがデータ読込に係るものである場合にはCPU2の使用時間・ハードディスクの記憶容量・メモリの使用時間と記憶容量、タスクが復号処理に係るものである場合にはCPU2の使用時間・メモリの使用時間と記憶容量、タスクが映像出力に係るものである場合にはCPU2の使用時間・メモリの使用時間と記憶容量・ビデオメモリの使用時間と記憶容量を、それぞれリソース量として用いることができる。
【0033】
本実施形態では、各タスクについて、予め保証部分と制御可能部分とが設定されている。例えば、タスクがMP3音声再生プログラムである場合、保証部分は復号処理に係る処理部分であり、制御可能部分は、高音質化のための補完処理に係る処理部分である。
【0034】
また、タスクがMPEG動画再生プログラムである場合、保証部分は描画間隔1/15秒のフレームレートに相当する処理部分であり、制御可能部分は、描画間隔1/30秒のフレームレートに相当する処理部分である。なお、タスクが静止画または動画の再生プログラムである場合には、受認できる最低限の解像度に相当する処理部分を保証部分とし、それ以上の解像度に相当する処理部分を制御可能部分とする、というように解像度を調整するのも好適である。
【0035】
また、アプリケーションがWebブラウザである場合、保証部分は、ネットワークタイムアウト時間内のパケット通信間隔の通信レートに相当する処理部分であり、制御可能部分は、より大きい通信レート、例えば(パケットサイズ)/(スループット)の通信レートに相当する処理部分である。
【0036】
なお、本実施形態におけるアプリケーションプログラムでは、各タスクの保証部分のプログラム文と制御可能部分のプログラム文とが互いに分離して記述されており、また保証部分のメモリアドレスには、本発明における保証対象識別子としての所定の保証対象フラグが付されている。
【0037】
また、各タスクの保証部分、すなわち最低限の割当を保証すべきリソース量は、実行されるハードウェアおよびソフトウェア環境におけるスケジューラプログラムの時間計測機能を用いて計測する。具体的には、最低限保証すべきリソース量は、対象となる処理が、割り当てタイミングごとに開始してから終了するまでに、各リソースを使用する時間を測定することによって予め計測される。また、各タスクのデッドラインは、割り当てタイミングから処理開始までの時間をずらし、品質が満足できなくなるまでの空白時間を測定することで計測できる。また、制御可能部分のリソース量は、各タスクの最高の処理品質による処理を実行しながら同様のスケジューラプログラムを利用した計測値から、保証部分の計測値を減算することで算出できる。これらのリソース量情報は、このような測定をシステム上で実際に行うことで取得してもよいし、アプリケーションプログラムのベンダーから提供される諸元値をそのまま利用してもよい。
【0038】
さらに、メモリ5上には、リアルタイム性が要求されるタスク、すなわち遅延時間を小さくする必要のあるタスク(以下、このようなタスクを遅延保証が必要なタスクと呼ぶ)を管理するために、これら各タスクの情報を格納しておくためのタスク管理テーブル10が存在する。
【0039】
図2はタスク管理テーブル10の一例を示す図である。タスク管理テーブル10は、タスク情報管理テーブル21とタスク実行管理テーブル22とから構成される。
【0040】
タスク情報管理テーブル21は、後述するタスク受付処理で受付けられた遅延保証が必要なタスクに関する情報を管理するテーブルである。
【0041】
このタスク情報管理テーブル21に格納される情報には、タスク識別子格納部21a、タスクポインタ格納部21b、周期格納部21c、保証部分処理時間格納部21d、制御部分処理時間格納部21e、許容遅延時間格納部21fに格納されるタスク識別子ID、タスクポインタP、周期S、保証部分処理時間G、制御可能部分処理時間C、デッドラインH、があり、これらの情報がそれぞれタスクごとに格納されている。なお、図2では、横1列が1つのタスクに関する情報を示している。
【0042】
タスク識別子IDは、各タスクを識別するためのものであり、タスクポインタPは、記憶装置4あるいはメモリ5上に存在する各タスクのプログラムの位置を指し示すものである。周期Sは、各タスクにおける実行開始時点から次の実行開始時点までの時間であり、あるタスクが実行されると、設定された周期Sの間、このタスクが新たに実行されることはない。
【0043】
保証部分処理時間Gは、本発明における保証部分の所要リソース量であり、各タスクにおける保証部分の実行に要する処理時間である。制御可能部分処理時間Cは、本発明における制御可能部分の所要リソース量であり、各タスクにおける制御可能部分の実行に要する処理時間である。なお、これら保証部分処理時間G・制御可能部分処理時間Cは、予め設定されるサンプル値なので、実際のタスクがこれらの値より前に終了することもあり得る。
【0044】
デッドラインHは、その時間内で処理が完了すれば品質が満足されるような許容時間であって、周期Sで示される時間内に設定される。あるタスクに対してイベントが発行された状態で前回の実行開始時点からの経過時間が周期Sを超えたり、タスク処理が中断したりすると、このタスクに遅延が生じる。このような遅延の発生は、許容遅延時間Hを消費することを意味する。したがって、この許容遅延時間Hが全て消費される前にタスク処理が終了しなければならない。
【0045】
なお、これらの周期S、保証部分処理時間G、制御可能部分処理時間C、デッドラインHは、このタスク予約を要求したアプリケーションプログラムに予め格納されており、このアプリケーションプログラムの外部記憶媒体経由やネットワーク経由でのインストールにより記憶装置4に記憶され、後述するシステムコールによってOSに渡され、受付が許可されると、タスク識別子ID3が付与されてタスク情報管理テーブル21に格納されることになる。
【0046】
タスク実行管理テーブル22は、受付けられたタスク、すなわちタスク情報管理テーブル21に登録されたタスクの実行時に使用される情報を管理するテーブルである。このタスク実行管理テーブル22に格納される情報としては、タスク識別子ID、実行識別フラグF、および部分実行フラグFPがあり、これらの情報はタスクごとに、それぞれタスク識別子格納部22a、実行識別フラグ格納部22b、部分実行フラグ格納部22cに格納される。
【0047】
実行識別フラグFは、実行中または実行を中断しているタスクを識別するためのものである。この実行識別フラグFは、各タスクが実行中または実行中断状態ならばセットされ(例えば、「1」となる)、タスクの実行が終了した場合はリセットされる(例えば、「0」となる)。
【0048】
部分実行フラグFPは、実行対象が保証部分のみであるタスクを識別するためのものである。この部分実行フラグFPは、各タスクの実行対象が保証部分のみであるならばセットされ(例えば、「1」となる)、各タスクの実行対象が保証部分と制御可能部分の両方である場合にはリセットされる(例えば、「0」となる)。
【0049】
次に、遅延保証が必要なタスクの受付処理について、図3に従って説明する。例えばタスクA1,A2,A3について、予め所要リソース量r1,r2,r3、保証部分に係る所要リソース量r1a,r2a,r3a、制御可能部分に係る所要リソース量r1b,r2b,r3b、デッドラインH1,H2,H3が設定されている場合であって、タスクA1,A2が既に予約されている場合において、いま、アプリケーションからのシステムコールにより、新規タスクA3の予約が要求されると、CPU2は、タスク受付プログラム格納部8に格納されたプログラムに従って以下のような処理を実行する。
【0050】
図3において、まずCPU2は、システムの現在のリソース量、既に受付けられた予約済みのタスクA1,A2の保証部分・制御可能部分の各所要リソース量、および新規タスクA3の保証部分・制御可能部分の各所要リソース量を読み込む(S1)。予約済みのタスクA1,A2の各所要リソース量は、タスク情報管理テーブル21に登録された情報に基づいて、タスク管理テーブル10から抽出される。また新規タスクA3の各所要リソース量は、システムコールと共に入力され、メモリ5の所定領域に保持されている。
【0051】
次に、予約済みのタスクA1,A2と、新たに予約が要求されたタスクA3の、全ての保証部分と制御可能部分(所要リソース量r1+r2+r3)が実行可能かが、外的制約である各タスクのデッドラインH1,H2,H3との比較に基づいて判定される(S2)。
【0052】
ステップS2で実行可能と判定された場合には、これらタスクA1,A2,A3の保証部分と制御可能部分とが、実行対象として選択され、タスク情報管理テーブル21に登録される(S3)。
【0053】
他方、図5(a)の例のように、各タスクA1,A2,A3の保証部分と制御可能部分とを順に実行したと仮定した場合にタスクA3についてデッドラインH3を満たせず遅れ時間を生じてしまうような場合には、ステップS2で実行不能と判定され、次に、要求されている全タスクの保証部分の所要リソース量として、各タスクの保証部分処理時間Gの合計が各タスクのデッドラインH1,H2,H3と比較され、これにより、全タスク(図5(c)、所要リソース量r1a+r2a+r3a)が実行可能かが判定される(S4)。
【0054】
実行可能と判定された場合には、全タスクの保証部分のみが、実行対象として選択され、タスク情報管理テーブル21に登録される(S5)。すなわち、要求された新規タスクA3と受付済みのタスクA1,A2の遅延保証が可能な場合であるとして受付許可とされ、タスクA1,A2,A3の各タスク識別子ID1,ID2,ID3と、保証部分のみが実行対象である旨を示す部分実行フラグFPとが、メモリ5のタスク管理テーブル10に書き込まれ、続いて、保証部分のみを実行対象として受付できた旨がアプリケーションに返答されて、受付処理が終了する。
【0055】
ステップS4で実行不能と判定された場合には、新規タスクが予約できない場合であるとして、その旨の登録不可信号が出力され(S6)、また受付できない旨がアプリケーション側に通知される。なお、アプリケーションの処理により、新規タスクの登録ができない旨が、例えば図示しない表示装置における文字メッセージによってユーザに提示され、ユーザは不要なアプリケーションを閉じるなどしてこれに対処する。
【0056】
以上の処理の結果、タスクA1,A2,A3が、それぞれデッドラインH1,H2,H3を満足しつつ、保証部分のみのリソース割当を確保して実行されることになる。なお、各タスクの実行の開始タイミングは、システムのスケジューラで制御されることになるので、例えばタスクが動画の表示に係るものである場合には、その実行は図6に示すように該当フレームの読込み(S11)とフレーム出力(S12)のように機能ごとに構成すれば足り、タイマ等を利用した各タスクの実行タイミング管理をアプリケーション側で行う必要はない。
【0057】
以上のとおり、第1実施形態では、タスクA1,A2,A3そのものを保証部分と制御可能部分とに分けて段階的に設定し、後者を制御可能、つまり場合に応じて削除できる部分として扱うこととした。すなわち本実施形態では、予約済みのタスクA1,A2の処理レベルを、制御可能部分を含む場合(S1)と含まない場合(S4)の両者の間で仮想的に変更しながら、新規に予約要求がされたタスクA3の実行可能性を判定すると共に、実行可能と判定された処理レベルで、実行対象となるタスクA1,A2,A3の選択を実行するようにした。したがって本実施形態では、予約済みのタスクA1,A2について品質を調整することで、新規に予約要求がされたタスクA3を受付けて実行することができ、タスクの遅延保証とタスクの効率的な実行とを両立できる。
【0058】
また本実施形態では、制御可能部分の付加または削除により、判定処理と品質の調整とを行うこととしたので、簡易な構成により本発明に所期の効果を得ることができる。
【0059】
また本実施形態では、タスクの処理レベルの仮想的な変更を、全ての予約済みのタスクA1,A2と予約が要求されているタスクA3とについて行うこととしたので、大きな変更量をとることにより要求リソース量の大きな変化を許容できる。
【0060】
また本実施形態では、保証対象識別子の利用によって、実行対象となるタスクを選択できるので、簡易な構成により本発明に所期の効果を得ることができる。
【0061】
なお、本実施形態では、各タスクの相互間の優先度を特に考慮せずにこれを選択する構成について説明したが、各タスクは所定の優先度(例えば、要求処理時間と許容遅延時間との和が大きいタスクほど処理の優先度を下げる、優先度の高いタスクの要求処理時間が優先度の低いタスクの許容遅延時間内に収まらなければならない等)に従って登録されることとしてもよい。
【0062】
次に、第2実施形態について説明する。上記第1実施形態では、処理対象となるタスク数の変更要求があった場合に、所要リソース量を仮想的に変更しながら実行可能性の判定を行うこととした。しかし、タスク数の変更要求がなくても、例えば映像や音声の早送り再生の場合など、所要リソース量の変動が予想される場合があり、そのような場合であれば本発明における判定手段による判定、つまり所要リソース量を仮想的に変更しながらの実行可能性の判定を好適に実施できる。第2実施形態は、少なくともいずれかのタスクについてパラメータの変更要求、とくにデッドラインの変更要求があった場合に、このような判定を行うものである。なお、第2実施形態においても、マルチタスクシステムの構成は上記第1実施形態のものと同様であるため、その説明は省略する。
【0063】
例えばタスクA1,A2,A3の実行中に、アプリケーションからのシステムコールにより、タスクA3のデッドラインの変更(例えば、標準値からの所定値の減算)が要求されると、CPU2は、タスク受付プログラム格納部8に格納されたプログラムに従って以下のような処理を実行する。
【0064】
図7において、まずCPU2は、システムの現在のリソース量、実行中のタスクA1,A2,A3のデッドライン、および保証部分・制御可能部分の各所要リソース量を読み込む(S21)。
【0065】
次に、現在の所要リソース量設定でデッドラインの変更が可能かが、デッドラインを仮想的に変更した場合のタスクA1,A2,A3の所要リソース量(保証部分と制御可能部分の両者についてのもの)と、外的制約である各タスクのデッドライン(変更後のもの)との比較に基づいて判定される(S22)。
【0066】
ステップS22で実行可能と判定された場合には、現在の所要リソース量設定(すなわち、タスクA1,A2,A3の保証部分と制御可能部分とが選択された状態)で、タスクA3のデッドラインが変更され、タスク情報管理テーブル21に登録される(S23)。
【0067】
他方、ステップS22で実行不能と判定された場合には、次に、制御可能部分の範囲内で減少された所要リソース量設定(すなわち、保証部分のみについての所要リソース量)において、デッドラインの変更が可能かが、この場合の最適化演算および各タスクのデッドライン(変更後のもの)との比較に基づいて判定される(S24)。
【0068】
実行可能と判定された場合には、減少された所要リソース量設定が採用され(すなわち、全タスクの保証部分のみが実行対象として選択され)、その状態でデッドラインが変更されて、タスク情報管理テーブル21に登録される(S25)。すなわち、要求されたデッドライン変更がされた状態で、タスクA1,A2,A3の遅延保証が可能な場合であるとして受付許可とされ、タスクA1,A2,A3の各タスク識別子ID1,ID2,ID3と、保証部分のみが実行対象である旨を示す部分実行フラグFPとが、メモリ5のタスク管理テーブル10に書き込まれ、続いて、保証部分のみを実行対象として受付できた旨がアプリケーションに返答されて、受付処理が終了する。
【0069】
ステップS24で実行不能と判定された場合には、デッドラインが変更できない場合であるとして、その旨の変更不可信号が出力され(S26)、また受付できない旨がアプリケーション側に通知される。なお、アプリケーションの処理により、デッドラインの変更ができない旨が、例えば図示しない表示装置における文字メッセージによってユーザに提示され、ユーザは不要なアプリケーションを閉じるなどしてこれに対処する。
【0070】
以上の処理の結果、タスクA1,A2,A3が、それぞれ変更されたデッドラインを満足しつつ、保証部分のみのリソース割当を確保して実行されることになる。したがって第2実施形態では、上記第1実施形態と同様に、タスクA1,A2,A3について品質を調整することで、デッドラインを変更して実行を継続でき、タスクの遅延保証とタスクの効率的な実行とを両立できる。
【0071】
次に、第3実施形態について説明する。第3実施形態は、上記第2実施形態と同様にパラメータの変更要求に応じた実行可能性の判定を行うものであって、これを周期の変更要求があった場合に適用したものである。なお、第3実施形態においても、マルチタスクシステムの構成は上記第1実施形態のものと同様であるため、その説明は省略する。
【0072】
例えばタスクA1,A2,A3の実行中に、アプリケーションからのシステムコールにより、タスクA3の周期の変更(例えば、標準値からの所定値の減算)が要求されると、CPU2は、タスク受付プログラム格納部8に格納されたプログラムに従って以下のような処理を実行する。
【0073】
図8において、まずCPU2は、システムの現在のリソース量、実行中のタスクA1,A2,A3の周期、および保証部分・制御可能部分の各所要リソース量を読み込む(S31)。
【0074】
次に、現在の所要リソース量設定で周期の変更が可能かが、周期を仮想的に変更した場合のタスクA1,A2,A3の所要リソース量(保証部分と制御可能部分の両者についてのもの)と、各タスクの実行周期(変更後のもの)との比較に基づいて判定される(S32)。
【0075】
ステップS32で実行可能と判定された場合には、現在の所要リソース量設定(すなわち、タスクA1,A2,A3の保証部分と制御可能部分とが選択された状態)で、タスクA3の周期が変更され、タスク情報管理テーブル21に登録される(S33)。
【0076】
他方、ステップS32で実行不能と判定された場合には、次に、制御可能部分の範囲内で減少された所要リソース量設定(すなわち、保証部分のみについての所要リソース量)において、周期の変更が可能かが、この場合の最適化演算および各タスクの実行周期(変更後のもの)との比較に基づいて判定される(S34)。
【0077】
実行可能と判定された場合には、減少された所要リソース量設定が採用され(すなわち、全タスクの保証部分のみが実行対象として選択され)、その状態で周期が変更されて、タスク情報管理テーブル21に登録される(S35)。すなわち、要求された周期の変更がされた状態で、タスクA1,A2,A3の遅延保証が可能な場合であるとして受付許可とされ、タスクA1,A2,A3の各タスク識別子ID1,ID2,ID3と、保証部分のみが実行対象である旨を示す部分実行フラグFPとが、メモリ5のタスク管理テーブル10に書き込まれ、続いて、保証部分のみを実行対象として受付できた旨がアプリケーションに返答されて、受付処理が終了する。
【0078】
ステップS34で実行不能と判定された場合には、周期が変更できない場合であるとして、その旨の変更不可信号が出力され(S6)、また受付できない旨がアプリケーション側に通知される。なお、アプリケーションの処理により、周期の変更ができない旨が、例えば図示しない表示装置における文字メッセージによってユーザに提示され、ユーザは不要なアプリケーションを閉じるなどしてこれに対処する。
【0079】
以上の処理の結果、タスクA1,A2,A3が、それぞれ変更された周期を満足しつつ、保証部分のみのリソース割当を確保して実行されることになる。したがって第3実施形態では、上記第2実施形態と同様に、タスクA1,A2,A3について品質を調整することで、周期を変更して実行を継続でき、タスクの遅延保証とタスクの効率的な実行とを両立できる。
【0080】
なお、上記各実施形態では、各タスクについての制御可能部分を1つとし、その保証部分への付加の有無によって所要リソース量を変更する構成としたが、各タスクについての制御可能部分は複数としてもよい。この場合には更に、複数設けられた制御可能部分に相互の選択順位を設定(付与)し、これら複数の制御可能部分がこの選択順位に従って選択されることとするのが好適であり、とくに、複数設けられた制御可能部分のうちの選択順位を識別するための所定の順位識別子(例えば、所定の順位フラグ)を、各タスクのプログラム文における各対応する部分に付すと共に、その各制御可能部分の所要リソース量情報を予めタスク情報管理テーブル21に記憶させておき、動作の際には、判定対象となるタスクについて制御可能部分をその順位識別子が示す選択順位に従って選択すると共に、その選択および判定を選択の対象を変えながら(例えば、選択される制御可能部分の個数を変えながら)試行することとするのが好適である。このような構成とすれば、動作上の重要度の低い部分から処理対象を削除していくことで処理量を段階的に減少させつつ、実行可能性の判断を繰り返すことにより、そのタスクに係る所要リソース量を更にきめ細かに調整でき、またシステムのリソース量の有効利用を図ることができる。
【0081】
また、上記第1ないし第3実施形態では、タスク内での制御可能部分を利用した増減によって所要リソース量を調整したが、このような所要リソース量の調整は、実行順序に依存関係があり互いに主従関係にある複数のタスク間での動作の調整にも適用できる。
【0082】
すなわち、所定の主タスクと、この主タスクの実行が実行の条件となるような従タスクとがある場合に、上記第1実施形態において用いられていたものと同様の保証対象フラグを主タスクの全体に付し、また従タスクには保証対象フラグを付さない構成とする。このような主タスクと従タスクとについて、上記第1実施形態におけるタスク受付プログラムをそのまま実行させた場合には、主タスクの全体が保証部分として、また従タスクの全体が制御可能部分として、それぞれシステムに認識されることになる。その結果、リソース量に余裕がある場合には、主タスクと従タスクの両方が実行され、またリソース量に余裕がない場合には、主タスクのみが実行されることになり、これによって、タスク内での制御可能部分の処理とタスク間での主従関係の処理とを共通のアルゴリズムで実行でき、また、主タスクと従タスクとを併せて一つのタスクとして扱うことができるためタスク数の節約を図ることができる。
【0083】
なお、このようにタスク内での保証部分と制御可能部分との識別に用いられる保証対象識別子としての保証対象フラグを利用する構成に代えて、専ら主タスクと従タスクとの識別のために利用される所定の主従タスク識別子(例えば、主従フラグ)を、主タスクと従タスクの一方または両方に設け、またタスク受付プログラムが、主タスクを保証部分として処理し、従タスクを制御可能部分として処理することとしてもよく、同様の効果を得ることができる。
【0084】
本発明のタスク管理装置と関連して用いられるプログラムは、第12の本発明のように、タスクの処理レベルの変更前後の所要リソース量を格納する所要リソース量情報格納手段を備えることとしたり、第13の本発明のように、タスクの保証部分と制御可能部分とを識別するための保証対象識別子を備えることとしたり、第14の本発明のように、タスクに含まれる複数の制御可能部分の順位を識別するための順位識別子を備えることとすれば、実行されるプログラムとこれに含まれるタスクの諸情報とを組として取り扱うことができ好適である。
【0085】
また、本発明のタスク管理装置と関連して用いられるプログラムは、第15の本発明のように、所定の主タスクを保証部分として前記システムに認識させ、前記主タスクの実行が実行の条件となる従タスクを制御可能部分として前記システムに認識させるように、前記保証対象識別子を備えることとすれば、互いに主従関係のある複数のタスクを、主従タスク識別子の利用によって保証部分や制御可能部分として処理できるので、タスク内での制御可能部分の処理とタスク間での主従関係の処理とを共通のアルゴリズムで実行できる。他方、第16の本発明のように、保証対象識別子に代えて、主従関係の処理のための主従タスク識別子を備えることとしてもよい。
【0086】
なお、上記各実施形態では、制御可能部分を全体として仮想的に削除することで処理量を調整する構成としたが、逆に、リソース量に余裕がある場合(すなわち、例えば、現在の提供可能なリソース量と現在の全タスクの所要リソース量の合計との差が所定値を上回る場合)に、処理品質を上げるような追加的な制御可能部分を、全てのタスクに付加する構成としてもよい。また、上記各実施形態では、リソース量の余裕の有無に応じて、タスクの処理品質を段階的に増減変更する構成について説明したが、タスクの処理品質は無段階的に増減変更することとしてもよい。
【0087】
また、上記各実施形態では、全てのタスクについて処理品質を変更することとしたので、要求リソース量の大きな変化を許容できるという利点があるが、本発明における処理品質の変更は一部のタスクについて実行することとしてもよく、このような構成によっても本発明に所期の効果を相当程度に実現できる。
【0088】
また、本発明におけるタスク受付プログラムは、複数のタスクのいずれかを選択的に実行するマルチタスクシステムにおいて、各タスクの所要リソース量に基づいて各タスクの実行可能性を判定する判定処理と、判定処理の判定結果に基づいて実行対象となるタスクを選択するタスク選択処理と、を前記システムに実行させるためのプログラムであって、少なくともいずれかのタスクについて規定された保証部分と制御可能部分との所要リソース量情報を取得する所要リソース量情報取得処理を更に含み、前記判定処理では、少なくともいずれかの予約済みのタスクの処理レベルを前記制御可能部分の範囲内で仮想的に変更して前記判定を実行し、前記タスク選択処理では、実行可能と判定された処理レベルで前記選択を実行することを特徴とするプログラムとして構成でき、これをCD−ROMなどの公知の記録媒体に記録した状態で、あるいはネットワーク経由のダウンロードによって取引でき、本発明の効果を実現するための有用な手段として用いることができる。
【図面の簡単な説明】
【図1】 本発明の第1実施形態に係るマルチタスクシステムのブロック図である。
【図2】 タスク管理テーブルの一例を示す説明図である。
【図3】 第1実施形態におけるタスク受付処理を示すフロー図である。
【図4】 本発明の作用を示す説明図である。
【図5】 第1実施形態の作用を示す説明図である。
【図6】 第1実施形態における画像の表示処理を示すフロー図である。
【図7】 第2実施形態におけるデッドライン変更受付処理を示すフロー図である。
【図8】 第3実施形態における周期変更受付処理を示すフロー図である。
【図9】 本発明による改良前のタスク受付処理の一例を示す説明図である。
【図10】 本発明による改良前のタスク受付処理の他の一例を示す説明図である。
【符号の説明】
1 マルチタスクシステム、2 CPU、3 タイマ、4 記憶装置、5 メモリ、6 インタフェース制御部、7 内部バス、10 タスク管理テーブル、11 ネットワーク、21 タスク情報管理テーブル、22 タスク実行管理テーブル。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a task management apparatus and program in a multitask system, and more particularly to an apparatus having an execution guarantee function according to the amount of system resources.
[0002]
[Prior art]
In recent years, there has been an increasing demand for communication of real-time information such as moving images and voices in computer-to-computer communication. In a real-time communication terminal that handles video and audio, there are a plurality of tasks such as a task of receiving information such as video and audio from a partner terminal, a task of displaying received information, and a task of transmitting information to the partner terminal. The task must be executed. Therefore, this terminal becomes a multitask system that executes a plurality of tasks that require real-time processing, and in such a multitask system, it is necessary to guarantee quality of service (QoS).
[0003]
In such a multi-task system, as a technology for guaranteeing service quality, the task priority setting function of the OS (Operating System) is used to set the priority of a task that requires real-time processing such as video and audio. A method is generally used in which higher priority is given to processing of a task having a severe delay requirement by setting it higher than other tasks. As another technique for guaranteeing service quality, task processing is performed by increasing the priority of tasks for which execution end target times are set and increasing priority as the execution end target time approaches. There has also been proposed a method of completing by the time (Japanese Patent Laid-Open No. 62-284437).
[0004]
[Problems to be solved by the invention]
However, in any of the conventional techniques, if the total amount of resources required for a task that is requested to be executed exceeds the amount of resources that can be provided by the system at that time, the system will handle tasks that exceed the processing capacity. Trying to execute, you can not execute a low priority task or a task that has been newly requested for reservation, or you can not execute all tasks, or you can not execute within a predetermined deadline that allows delay .
[0005]
For example, as shown in FIG. 9 (a), when the resource amount R1 that can be provided by the system at a certain point in time is greater than the total required resource amount of the requested tasks than r1 + r2, the system is requested to execute. Can perform all the tasks that are done. However, from this state, as shown in FIG. 9B, when processing of an additional task with the required resource amount r3 is requested, the total required resource amount r1 + r2 + r3 exceeds the resource amount R1 that can be provided. The acceptance of additional tasks will be rejected, or the acceptance of all tasks will be rejected.
[0006]
Further, as shown in FIGS. 10A to 10C, the cycle is S1, the required processing time is T1, and the deadline (allowable time and allowable delay that the quality is satisfied if the processing is completed within that time) Assuming that there are tasks A1, A2, and A3 whose time is set to H1, task A1 and task A2 satisfy each deadline when both are executed in this order (processing before the deadline). Both can be executed. However, when the tasks A1, A2, and A3 are executed in this order, the task A3 cannot be executed because the deadline of the task A3 cannot be satisfied even if the deadlines of the tasks A1 and A2 can be satisfied.
[0007]
SUMMARY OF THE INVENTION An object of the present invention is to provide means capable of achieving both task delay guarantee and efficient task execution.
[0008]
[Means for Solving the Problems]
The first aspect of the present invention is , Double In a multitask system that selectively executes one of a number of tasks, a determination unit that determines the feasibility of each task based on a required resource amount of each task, and an execution target based on a determination result of the determination unit A task management device comprising: a task selection unit that selects a task to be obtained, and a required resource amount information acquisition unit that acquires required resource amount information of a guaranteed part and a controllable part specified for at least one of the tasks The determination means executes the determination by virtually changing the processing level of at least one of the reserved tasks within the controllable portion, and the task selection means is executable. A task management device that performs the selection at a determined processing level.
[0009]
In some tasks, for example, the user can tolerate a certain degree of reduction in execution quality, such as the resolution of an image and the frame rate (number of drawings per second) of a moving image. Therefore, it can be said that it is unreasonable to reject a task with a low priority or a request for a new reservation even though there is a part that can be deleted in a task with a high priority or a task currently being executed. .
[0010]
In this regard, in the first aspect of the present invention, the task itself is divided into a guaranteed part and a controllable part, and the latter is controlled step by step, and the latter is controlled, that is, treated as a part that can be added, deleted, increased or decreased according to circumstances. It was decided. That is, in the first aspect of the present invention, the determination means virtually changes the processing level of at least one of the reserved tasks within the controllable portion based on the required resource amount of each task. In addition to determining the feasibility, the task selection means selects the task to be executed at the processing level determined to be executable, so the amount of system resources, deadlines and execution of each task Even when there are external constraints such as the period, by adjusting the quality of the reserved task, it is possible to accept and execute a task with a low priority or a newly requested task, and delay the task. Both assurance and efficient execution of tasks can be achieved.
[0011]
2nd this invention is a task management apparatus, Comprising: The said determination means is at least any one of the tasks which have not started execution among the reserved tasks Only tasks Whether both the guarantee part and the controllable part are feasible When there is a new task reservation request If the first determination means and the first determination means determine that the determination is impossible, the first determination means determines that the determination is impossible. Execution has not started Second determination means for determining whether the guaranteed part of the task can be executed, and the task selection means is determined to be executable by the first determination means Execution has not started The guaranteed part and the controllable part are selected as execution targets for the task, and the second determination means determines that the task is executable. Execution has not started A task management device is characterized in that only the guaranteed part of a task is selected as an execution target.
[0012]
In the second aspect of the present invention, determination processing and quality adjustment are performed by adding or deleting a controllable portion. That is, as shown in FIG. 4A, the required resource amounts r1 and r2 of each task are divided in advance into required resource amounts r1a and r2a related to the guaranteed portion and required resource amounts r1b and r2b related to the controllable portion. For example, when there is a request for registration of a new task (FIG. 4B) with the required resource amount r3, first, the guaranteed part and the controllable part of all the requested tasks It is determined whether (required resource amount r1 + r2 + r3) can be executed, and when it is determined that it can be executed, the guaranteed part and the controllable part are selected. On the other hand, if it is determined that the guaranteed part and the controllable part are not executable, it is then determined whether only the guaranteed part of all the requested tasks (FIG. 4C, required resource amount r1a + r2a + r3a) can be executed. When it is determined that execution is possible, only the guaranteed part of all tasks is selected. As described above, in the second aspect of the present invention, the required resource amount is adjusted by adding or deleting a controllable portion, and therefore the same effect as that of the first aspect of the present invention can be obtained with a simple configuration.
[0013]
The third aspect of the present invention is , Ta Disk management device, wherein the determination means is Execution has not started Reserved tasks All of about, Performs determination by the first determination unit and the second determination unit The task management device is characterized by:
[0014]
In the third aspect of the present invention, By executing the determination by the first determination means and the second determination means Virtual change of processing level, Execution has not started Reserved tasks All of Therefore, a large change in the required resource amount can be allowed by taking a large change amount.
[0015]
The determination by the determination means in the present invention is particularly preferable when the required resource amount is expected to change, and when there is a request for changing the number of tasks to be processed as in the fourth aspect of the present invention. It may be performed when there is a parameter change request for at least one of the tasks as in the fifth aspect of the present invention. The parameter in the fifth aspect of the invention is the deadline of the at least one task as in the sixth aspect of the invention, or the execution cycle of the at least one of the tasks as in the seventh aspect of the invention. Is preferred.
[0016]
The eighth aspect of the present invention is , Ta And a guarantee object identifier obtaining means for obtaining a guarantee object identifier for identifying a guarantee part and a controllable part for at least one of the tasks, wherein the task selection means includes the guarantee object A task management device that performs the selection using an identifier.
[0017]
In the eighth aspect of the present invention, the task selection means can select the task to be executed by using the guarantee target identifier, so that the same effect as in the first aspect of the present invention can be obtained with a simple configuration.
[0018]
The ninth aspect of the present invention , Ta And a rank identifier obtaining means for obtaining a rank identifier for identifying the selection order of the plurality of controllable parts assigned to the plurality of controllable parts included in at least one of the tasks. The determination means selects a controllable part to be selected from the tasks to be determined according to the selection order using the rank identifier, and tries the selection and the determination while changing the selection target. Is a task management device characterized by
[0019]
In the ninth aspect of the present invention, the determination means selects a controllable portion in the task to be determined according to the selection order using the rank identifier, and tries the selection and the determination while changing the selection target. Thus, the required resource amount related to the task can be adjusted more finely.
[0020]
The tenth aspect of the present invention is , Ta And a master / slave task identifier acquiring unit for acquiring a master / slave task identifier for identifying a predetermined master task and a slave task whose execution condition is the execution condition of the master task, the determination The task management device is characterized in that the means and the task selection means use the master / slave task identifier to process the master task as the guarantee part and process the slave task as the controllable part.
[0021]
In the tenth aspect of the present invention, a plurality of tasks having a master-slave relationship with each other can be processed as a guaranteed part or a controllable part by using a master-slave task identifier, so that the process of the controllable part within a task and the master-slave relationship between tasks Can be executed with a common algorithm.
[0022]
The eleventh aspect of the present invention is , Double In a multitask system that selectively executes one of a number of tasks, a determination step that determines the feasibility of each task based on the required resource amount of each task, and an execution target based on the determination result of the determination step A task selection method for selecting a task, and a required resource amount information acquisition step for acquiring required resource amount information of a guaranteed part and a controllable part specified for at least one of the tasks In the determination step, the determination is performed by virtually changing the processing level of at least one of the reserved tasks within the controllable portion, and the determination in the task selection step The task management method is characterized in that the selection is executed at a specified processing level. According to the eleventh aspect of the present invention, the same effect as in the first aspect of the present invention can be obtained.
[0023]
The twelfth aspect of the present invention , Ta And a guarantee target identifier obtaining step for obtaining a guarantee target identifier for identifying a guarantee part and a controllable part for at least one of the tasks, wherein the task selection step includes the guarantee target The task management method is characterized in that the selection is performed using an identifier. According to the twelfth aspect of the present invention, the same effect as that of the eighth aspect of the present invention can be obtained.
[0024]
The thirteenth aspect of the present invention , Ta And a rank identifier obtaining step of obtaining a rank identifier for identifying selection orders of the plurality of controllable parts assigned to the plurality of controllable parts included in at least one of the tasks. In the determination step, the controllable part to be selected among the tasks to be determined is selected according to the selection order using the rank identifier, and the selection and the determination are tried while changing the selection target. Is a task management method characterized by According to the thirteenth aspect of the present invention, the same effect as in the ninth aspect of the present invention can be obtained.
[0025]
The fourteenth aspect of the present invention , Ta And a master / slave task identifier obtaining step for obtaining a master / slave task identifier for identifying a predetermined master task and a slave task whose execution condition is the execution condition of the master task, In the step and the task selecting step, the master task is processed as the guaranteed part and the slave task is processed as the controllable part by using the master / slave task identifier. According to the fourteenth aspect of the present invention, the same effect as in the tenth aspect of the present invention can be obtained.
[0026]
The fifteenth aspect of the present invention , Double In a multitask system that selectively executes one of a number of tasks, a determination process that determines the feasibility of each task based on the required resource amount of each task, and an execution target based on the determination result of the determination process A program for causing the system to execute a task selection process for selecting a task to be obtained, and a required resource amount for acquiring required resource amount information of a guaranteed part and a controllable part specified for at least one of the tasks An information acquisition process, and in the determination process, the determination is performed by virtually changing the processing level of at least one reserved task within the controllable portion, and in the task selection process, The program is characterized in that the selection is executed at a processing level determined to be executable. In the fifteenth aspect of the invention, the same effect as in the first aspect of the invention can be obtained.
[0027]
The program used in connection with the task management method of the present invention includes required resource amount information storage means for storing the required resource amount before and after the change of the task processing level, as in the sixteenth aspect of the present invention. As in the seventeenth aspect of the present invention, a guarantee target identifier for identifying a guaranteed part and a controllable part of a task is provided, or a plurality of controllable parts included in a task as in the eighteenth aspect of the present invention. If a rank identifier for identifying the rank of each is provided, it is preferable that a program to be executed and various information of tasks included therein can be handled as a set.
[0028]
Further, as in the nineteenth aspect of the present invention, a program used in connection with the task management method of the present invention causes the system to recognize a predetermined main task as a guaranteed part, and execution of the main task is a condition for execution. In order to allow the system to recognize the subordinate task as a controllable part, it is assumed that the guarantee target identifier is provided. Since it can be processed, the process of the controllable part in the task and the process of the master-slave relationship between tasks can be executed by a common algorithm. On the other hand, as in the twentieth aspect of the present invention, a master-slave task identifier for master-slave relationship processing may be provided instead of the guarantee target identifier.
[0029]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. 1, a
[0030]
The
[0031]
In order to realize the task management function according to the present invention, CPU control is required, and it is necessary to incorporate the task management function into an OS (Operating System). Therefore, on the
[0032]
As the resource amount in this embodiment, the usage time of the
[0033]
In this embodiment, a guaranteed part and a controllable part are set in advance for each task. For example, when the task is an MP3 audio reproduction program, the guaranteed part is a process part related to the decoding process, and the controllable part is a process part related to the complementary process for improving the sound quality.
[0034]
When the task is an MPEG video reproduction program, the guaranteed part is a process part corresponding to a frame rate of a drawing interval of 1/15 seconds, and the controllable part is a process corresponding to a frame rate of a drawing interval of 1/30 seconds. Part. If the task is a still image or video playback program, the processing portion corresponding to the minimum acceptable resolution is the guaranteed portion, and the processing portion corresponding to the higher resolution is the controllable portion. Thus, it is also preferable to adjust the resolution.
[0035]
When the application is a Web browser, the guaranteed part is a processing part corresponding to the communication rate of the packet communication interval within the network timeout time, and the controllable part is a higher communication rate, for example, (packet size) / ( Throughput) is a processing portion corresponding to the communication rate.
[0036]
Note that in the application program in this embodiment, the program statement of the guaranteed part of each task and the program sentence of the controllable part are described separately from each other, and the memory address of the guaranteed part is the object to be guaranteed in the present invention. A predetermined guarantee target flag as an identifier is attached.
[0037]
In addition, the guaranteed part of each task, that is, the resource amount that should guarantee the minimum allocation, is measured by using the time measurement function of the scheduler program in the hardware and software environment to be executed. Specifically, the minimum resource amount to be guaranteed is measured in advance by measuring the time for which each process is used from the start to the end of the target process at each allocation timing. Also, the deadline of each task can be measured by shifting the time from the allocation timing to the start of processing and measuring the blank time until quality is not satisfactory. Further, the resource amount of the controllable part can be calculated by subtracting the measurement value of the guaranteed part from the measurement value using the same scheduler program while executing the process with the highest processing quality of each task. Such resource amount information may be obtained by actually performing such measurement on the system, or may use the specification value provided by the vendor of the application program as it is.
[0038]
Furthermore, in order to manage tasks that require real-time properties, that is, tasks that require a small delay time (hereinafter, such tasks are referred to as tasks that require a delay guarantee) on the
[0039]
FIG. 2 is a diagram illustrating an example of the task management table 10. The task management table 10 includes a task information management table 21 and a task execution management table 22.
[0040]
The task information management table 21 is a table for managing information related to a task requiring delay guarantee received in a task reception process described later.
[0041]
Information stored in the task information management table 21 includes a task
[0042]
The task identifier ID is for identifying each task, and the task pointer P indicates the program position of each task existing on the storage device 4 or the
[0043]
The guaranteed partial processing time G is a required resource amount of the guaranteed part in the present invention, and is a processing time required for executing the guaranteed part in each task. The controllable part processing time C is the required resource amount of the controllable part in the present invention, and is the processing time required to execute the controllable part in each task. Note that the guaranteed partial processing time G and the controllable partial processing time C are sample values set in advance, so that the actual task may end before these values.
[0044]
The deadline H is an allowable time in which the quality is satisfied if the processing is completed within that time, and is set within the time indicated by the cycle S. If the elapsed time from the previous execution start time exceeds the period S or the task processing is interrupted while an event is issued for a certain task, the task is delayed. The occurrence of such a delay means that the allowable delay time H is consumed. Therefore, the task process must be completed before all the allowable delay time H is consumed.
[0045]
The period S, the guaranteed partial processing time G, the controllable partial processing time C, and the deadline H are stored in advance in the application program that has requested the task reservation. It is stored in the storage device 4 by installation via, passed to the OS by a system call to be described later, and when acceptance is permitted, a task identifier ID3 is given and stored in the task information management table 21.
[0046]
The task execution management table 22 is a table for managing received tasks, that is, information used when executing tasks registered in the task information management table 21. Information stored in the task execution management table 22 includes a task identifier ID, an execution identification flag F, and a partial execution flag FP. These pieces of information are stored in a task
[0047]
The execution identification flag F is for identifying a task that is being executed or whose execution has been interrupted. The execution identification flag F is set (for example, “1”) if each task is being executed or is in an execution suspended state, and is reset (for example, “0”) when the execution of the task is completed. .
[0048]
The partial execution flag FP is for identifying a task whose execution target is only a guaranteed part. This partial execution flag FP is set if the execution target of each task is only the guaranteed part (for example, “1”), and when the execution target of each task is both the guaranteed part and the controllable part. Is reset (for example, “0”).
[0049]
Next, task acceptance processing that requires delay guarantee will be described with reference to FIG. For example, for tasks A1, A2, and A3, required resource amounts r1, r2, and r3, required resource amounts r1a, r2a, and r3a related to the guaranteed portion, required resource amounts r1b, r2b, and r3b related to the controllable portion, deadline H1, In the case where H2 and H3 are set and the tasks A1 and A2 are already reserved, if the reservation of the new task A3 is requested by the system call from the application, the
[0050]
In FIG. 3, the
[0051]
Next, each task whose external restriction is whether or not all guaranteed parts and controllable parts (required resource amount r1 + r2 + r3) of the reserved tasks A1 and A2 and the newly requested task A3 are executable Is determined based on comparison with the deadlines H1, H2, and H3 (S2).
[0052]
If it is determined in step S2 that it can be executed, the guaranteed part and the controllable part of these tasks A1, A2, and A3 are selected as execution targets and registered in the task information management table 21 (S3).
[0053]
On the other hand, as in the example of FIG. 5A, assuming that the guaranteed part and the controllable part of the tasks A1, A2, and A3 are sequentially executed, the deadline H3 is not satisfied for the task A3, and a delay time is generated. In such a case, it is determined in step S2 that the task cannot be executed. Next, as a required resource amount of the guaranteed part of all tasks requested, the total of the guaranteed partial processing time G of each task is dead for each task. It is compared with the lines H1, H2, and H3 to determine whether all tasks (FIG. 5C, required resource amount r1a + r2a + r3a) can be executed (S4).
[0054]
If it is determined that execution is possible, only the guaranteed part of all tasks is selected as an execution target and registered in the task information management table 21 (S5). In other words, it is permitted to accept that the requested new task A3 and the accepted tasks A1 and A2 are guaranteed to be delayed, and the task identifiers ID1, ID2 and ID3 of the tasks A1, A2 and A3, and the guaranteed part Is written in the task management table 10 of the
[0055]
If it is determined in step S4 that the task cannot be executed, it is determined that a new task cannot be reserved, a registration disable signal indicating that the task cannot be reserved is output (S6), and the application side is notified that it cannot be accepted. Note that the fact that registration of a new task cannot be performed by application processing is presented to the user by, for example, a text message on a display device (not shown), and the user deals with this by closing unnecessary applications.
[0056]
As a result of the above processing, the tasks A1, A2, and A3 are executed while securing the resource allocation of only the guaranteed portion while satisfying the deadlines H1, H2, and H3, respectively. Since the start timing of each task execution is controlled by the system scheduler, for example, when the task is related to the display of a moving image, the execution is executed in the corresponding frame as shown in FIG. It is sufficient to configure each function such as reading (S11) and frame output (S12), and it is not necessary to manage the execution timing of each task using a timer or the like on the application side.
[0057]
As described above, in the first embodiment, the tasks A1, A2 and A3 themselves are divided into a guaranteed part and a controllable part and set in stages, and the latter is handled as a part which can be controlled, that is, can be deleted depending on the case. It was. In other words, in the present embodiment, a reservation request is newly made while virtually changing the processing levels of the reserved tasks A1 and A2 between the case where the controllable portion is included (S1) and the case where the controllable portion is not included (S4). In addition to determining the feasibility of the task A3, the selection of the tasks A1, A2, and A3 to be executed is executed at the processing level determined to be executable. Therefore, in the present embodiment, by adjusting the quality of the reserved tasks A1 and A2, it is possible to accept and execute the task A3 for which a new reservation request has been made, and to guarantee the task delay and efficiently execute the task. And both.
[0058]
In the present embodiment, the determination process and the quality adjustment are performed by adding or deleting a controllable part, so that the intended effect of the present invention can be obtained with a simple configuration.
[0059]
In this embodiment, since the virtual change of the processing level of the task is performed for all the reserved tasks A1 and A2 and the task A3 for which a reservation is requested, a large change amount is taken. A large change in the required resource amount can be allowed.
[0060]
Further, in the present embodiment, since the task to be executed can be selected by using the guarantee target identifier, the expected effect of the present invention can be obtained with a simple configuration.
[0061]
In the present embodiment, the configuration for selecting each task without considering the priority among the tasks has been described. However, each task has a predetermined priority (for example, a request processing time and an allowable delay time). Tasks with higher sums may be registered in accordance with lower processing priority, request processing time for tasks with higher priority must be within the allowable delay time for tasks with lower priority, etc.
[0062]
Next, a second embodiment will be described. In the first embodiment, when there is a request for changing the number of tasks to be processed, the feasibility is determined while virtually changing the required resource amount. However, even if there is no request for changing the number of tasks, there may be a case where the required resource amount is expected to change, for example, in the case of fast-forward playback of video or audio. That is, the feasibility determination can be suitably performed while virtually changing the required resource amount. In the second embodiment, such a determination is made when there is a parameter change request, particularly a deadline change request, for at least one of the tasks. In the second embodiment, the configuration of the multitask system is the same as that of the first embodiment, and the description thereof is omitted.
[0063]
For example, if a change in the deadline of the task A3 (for example, subtraction of a predetermined value from the standard value) is requested by a system call from the application during execution of the tasks A1, A2, and A3, the
[0064]
In FIG. 7, first, the
[0065]
Next, whether the deadline can be changed with the current required resource amount setting, the required resource amount of tasks A1, A2, and A3 when the deadline is virtually changed (for both the guaranteed part and the controllable part) And the deadline (changed one) of each task that is an external restriction (S22).
[0066]
If it is determined in step S22 that the task A3 can be executed, the deadline of the task A3 is set in the current required resource amount setting (that is, the guaranteed part and the controllable part of the tasks A1, A2, and A3 are selected). It is changed and registered in the task information management table 21 (S23).
[0067]
On the other hand, if it is determined in step S22 that the execution is impossible, then the deadline is changed in the required resource amount setting that is reduced within the controllable part range (that is, the required resource quantity for the guaranteed part only). Is determined based on the optimization calculation in this case and the comparison with the deadline (changed one) of each task (S24).
[0068]
If it is determined that execution is possible, the reduced required resource amount setting is adopted (that is, only the guaranteed part of all tasks is selected as the execution target), and the deadline is changed in that state, and task information management is performed. It is registered in the table 21 (S25). That is, it is permitted to accept that the delay of the tasks A1, A2, and A3 can be guaranteed with the requested deadline change, and the task identifiers ID1, ID2, and ID3 of the tasks A1, A2, and A3 are permitted. Then, a partial execution flag FP indicating that only the guaranteed part is the execution target is written in the task management table 10 of the
[0069]
If it is determined in step S24 that the deadline cannot be changed, it is determined that the deadline cannot be changed (S26), and an application side is notified that the change cannot be accepted. Note that the fact that the deadline cannot be changed by application processing is presented to the user by, for example, a text message on a display device (not shown), and the user deals with this by closing unnecessary applications.
[0070]
As a result of the above processing, the tasks A1, A2, and A3 are executed while securing the resource allocation of only the guaranteed portion while satisfying the changed deadline. Therefore, in the second embodiment, similarly to the first embodiment, by adjusting the quality of the tasks A1, A2, and A3, the deadline can be changed and the execution can be continued, and the task delay guarantee and the task efficiency are improved. It is possible to achieve both proper execution.
[0071]
Next, a third embodiment will be described. As in the second embodiment, the third embodiment determines the feasibility according to the parameter change request, and applies this when there is a cycle change request. In the third embodiment, the configuration of the multitask system is the same as that of the first embodiment, and the description thereof is omitted.
[0072]
For example, if a change in the period of the task A3 is requested by a system call from the application (for example, subtraction of a predetermined value from the standard value) during execution of the tasks A1, A2 and A3, the
[0073]
In FIG. 8, the
[0074]
Next, whether the cycle can be changed with the current required resource amount setting, or the required resource amount of tasks A1, A2, A3 when the cycle is virtually changed (for both the guaranteed part and the controllable part) And a comparison with the execution cycle (changed one) of each task (S32).
[0075]
If it is determined in step S32 that the task A3 can be executed, the period of the task A3 is changed with the current required resource amount setting (that is, the guaranteed part and the controllable part of the tasks A1, A2, and A3 are selected). And registered in the task information management table 21 (S33).
[0076]
On the other hand, if it is determined in step S32 that the execution is impossible, then in the required resource amount setting reduced within the controllable portion (that is, the required resource amount for only the guaranteed portion), the cycle is changed. Whether this is possible or not is determined based on the optimization calculation in this case and a comparison with the execution cycle of each task (after the change) (S34).
[0077]
If it is determined that execution is possible, the reduced required resource amount setting is adopted (that is, only the guaranteed part of all tasks is selected as the execution target), and the cycle is changed in that state, and the task information management table 21 (S35). In other words, it is permitted to accept that the delay of the tasks A1, A2, and A3 can be guaranteed while the requested cycle is changed, and the task identifiers ID1, ID2, and ID3 of the tasks A1, A2, and A3 are permitted. Then, a partial execution flag FP indicating that only the guaranteed part is the execution target is written in the task management table 10 of the
[0078]
If it is determined in step S34 that it cannot be executed, it is determined that the period cannot be changed, and a change impossible signal indicating that change is output (S6), and the application side is notified that the change cannot be accepted. Note that the fact that the period cannot be changed by application processing is presented to the user by, for example, a text message on a display device (not shown), and the user deals with this by closing unnecessary applications.
[0079]
As a result of the above processing, the tasks A1, A2, and A3 are executed while securing the resource allocation of only the guaranteed portion while satisfying the changed periods. Therefore, in the third embodiment, as in the second embodiment, by adjusting the quality of the tasks A1, A2, and A3, the execution can be continued by changing the cycle, and the task delay is guaranteed and the task is efficiently performed. You can balance execution.
[0080]
In each of the above embodiments, one controllable part is set for each task, and the required resource amount is changed depending on whether or not the guaranteed part is added. However, a plurality of controllable parts are set for each task. Also good. In this case, it is further preferable that a mutual selection order is set (given) to a plurality of controllable parts provided, and the plurality of controllable parts are selected according to this selection order. A predetermined rank identifier (for example, a predetermined rank flag) for identifying a selection order among a plurality of controllable parts provided is attached to each corresponding part in the program statement of each task, and each controllable part thereof The required resource amount information is stored in the task information management table 21 in advance, and at the time of operation, a controllable part for the task to be determined is selected according to the selection order indicated by the rank identifier, and the selection and determination are performed. It is preferable to try while changing the selection target (for example, changing the number of controllable parts to be selected). With such a configuration, it is possible to reduce the amount of processing in stages by deleting the processing target from the part with low operational importance, and repeat the determination of feasibility to The required resource amount can be finely adjusted, and the system resource amount can be effectively used.
[0081]
In the first to third embodiments, the required resource amount is adjusted by the increase / decrease using the controllable part in the task. However, such adjustment of the required resource amount depends on the execution order and is mutually dependent. It can also be applied to the adjustment of operations among multiple tasks in a master-slave relationship.
[0082]
That is, when there is a predetermined main task and a subtask in which execution of this main task is a condition for execution, the same guarantee target flag as that used in the first embodiment is set to the main task. It is attached to the whole, and the subordinate task does not have the guarantee target flag. For such a main task and a subtask, when the task reception program in the first embodiment is executed as it is, the whole main task is a guaranteed part, and the whole subtask is a controllable part. It will be recognized by the system. As a result, when there is a margin in the resource amount, both the primary task and the subtask are executed, and when there is no margin in the resource amount, only the primary task is executed. The control of the controllable part and the master-slave relationship between tasks can be executed with a common algorithm, and the main task and slave task can be handled together as one task, saving the number of tasks Can be achieved.
[0083]
Instead of using the guarantee target flag as the guarantee target identifier used to distinguish between the guarantee part and the controllable part in the task in this way, it is used exclusively for identifying the primary task and the secondary task. Predetermined master-slave task identifier (for example, master-slave flag) is provided in one or both of the master task and the slave task, and the task reception program processes the master task as a guaranteed part and processes the slave task as a controllable part The same effect can be obtained.
[0084]
The program used in connection with the task management device of the present invention includes required resource amount information storage means for storing the required resource amount before and after the change of the task processing level, as in the twelfth aspect of the present invention, As in the thirteenth aspect of the present invention, a guaranteed object identifier is provided for identifying the guaranteed part and the controllable part of the task, or a plurality of controllable parts included in the task as in the fourteenth aspect of the present invention. If a rank identifier for identifying the rank of each is provided, it is preferable that a program to be executed and various information of tasks included therein can be handled as a set.
[0085]
Further, as in the fifteenth aspect of the present invention, a program used in connection with the task management device of the present invention causes the system to recognize a predetermined main task as a guaranteed part, and execution of the main task is a condition for execution. In order to allow the system to recognize the subordinate task as a controllable part, it is assumed that the guarantee target identifier is provided. Since the processing can be performed, the processing of the controllable part in the task and the processing of the master-slave relationship between the tasks can be executed by a common algorithm. On the other hand, as in the sixteenth aspect of the present invention, a master-slave task identifier for master-slave relationship processing may be provided instead of the guarantee target identifier.
[0086]
In each of the above embodiments, the processing amount is adjusted by virtually deleting the controllable part as a whole, but conversely, when there is a margin in the resource amount (ie, for example, the current provision possible) A configuration in which an additional controllable part that increases the processing quality is added to all tasks when the difference between the current resource amount and the total of the required resource amounts of all current tasks exceeds a predetermined value) . In each of the above embodiments, the configuration has been described in which the task processing quality is increased or decreased in a stepwise manner depending on whether there is a margin of the resource amount. However, the task processing quality may be increased or decreased in a stepless manner. Good.
[0087]
In each of the above embodiments, since the processing quality is changed for all tasks, there is an advantage that a large change in the required resource amount can be allowed. However, the change of the processing quality in the present invention is for some tasks. It is also possible to execute this, and even with such a configuration, the effect expected in the present invention can be substantially realized.
[0088]
The task reception program according to the present invention includes a determination process for determining the feasibility of each task based on a required resource amount of each task in a multitask system that selectively executes one of a plurality of tasks, A program for causing the system to execute a task selection process for selecting a task to be executed based on a determination result of the process, and comprising a guarantee part and a controllable part defined for at least one of the tasks It further includes required resource amount information acquisition processing for acquiring required resource amount information. In the determination processing, the determination is performed by virtually changing the processing level of at least one reserved task within the controllable portion. In the task selection process, the selection is executed at a process level determined to be executable. To be configured as a program, which in a state recorded in the known recording medium such as a CD-ROM, or can be traded by downloading via the network, can be used as a useful means to achieve the effect of the present invention.
[Brief description of the drawings]
FIG. 1 is a block diagram of a multitask system according to a first embodiment of the present invention.
FIG. 2 is an explanatory diagram showing an example of a task management table.
FIG. 3 is a flowchart showing task reception processing in the first embodiment.
FIG. 4 is an explanatory diagram showing the operation of the present invention.
FIG. 5 is an explanatory diagram showing the operation of the first embodiment.
FIG. 6 is a flowchart showing image display processing in the first embodiment.
FIG. 7 is a flowchart showing deadline change acceptance processing in the second embodiment.
FIG. 8 is a flowchart showing cycle change acceptance processing in the third embodiment.
FIG. 9 is an explanatory diagram showing an example of a task reception process before improvement according to the present invention.
FIG. 10 is an explanatory diagram showing another example of task reception processing before improvement according to the present invention.
[Explanation of symbols]
1 multitask system, 2 CPU, 3 timer, 4 storage device, 5 memory, 6 interface controller, 7 internal bus, 10 task management table, 11 network, 21 task information management table, 22 task execution management table.
Claims (14)
少なくともいずれかのタスクについて規定された保証部分と制御可能部分との所要リソース量情報を取得する所要リソース量情報取得手段を更に備え、
前記判定手段は、
予約済みのタスクのうち、実行が開始されていないタスクの少なくともいずれかのタスクのみについて、その保証部分と制御可能部分との両者が実行可能かを、新規タスクの予約要求があった際に判定する第1判定手段と、
前記第1判定手段によって不可との判定があった場合に、前記第1判定手段で不可と判定された前記実行が開始されていないタスクについて、その保証部分が実行可能かを判定する第2判定手段と、
を備え、
前記タスク選択手段は、
前記第1判定手段により実行可能と判定された前記実行が開始されていないタスクにつきその保証部分と制御可能部分との両者を実行対象として選択し、
前記第2判定手段により実行可能と判定された前記実行が開始されていないタスクにつきその保証部分のみを実行対象として選択することを特徴とするタスク管理装置。In a multitask system that selectively executes one of a plurality of tasks, a determination unit that determines the feasibility of each task based on a required resource amount of each task, and an execution target based on a determination result of the determination unit A task management device comprising a task selection means for selecting a task to be
A required resource amount information acquiring means for acquiring required resource amount information of the guaranteed part and the controllable part defined for at least one of the tasks;
The determination means includes
Of reserved task, determined for at least only one of the tasks of the task execution is not started, whether the guarantee portion and both the controllable sections executable, when there is a reservation request for a new task First determining means for
A second determination for determining whether or not the guaranteed part can be executed for a task that has not been started and that is determined to be impossible by the first determination unit when the first determination unit determines that the determination is impossible Means,
With
The task selection means includes
For the task that has been determined to be executable by the first determination means and has not started execution , both the guaranteed part and the controllable part are selected as execution targets,
A task management device that selects only a guaranteed portion of a task that has been determined to be executable by the second determination means and that has not started as an execution target.
前記判定手段が、実行が開始されていない予約済みのタスクの全てについて、前記第1判定手段及び第2判定手段による判定を実行することを特徴とするタスク管理装置。The task management device according to claim 1,
The task management apparatus, wherein the determination unit executes determination by the first determination unit and the second determination unit for all reserved tasks that have not started to be executed.
前記判定手段による判定が、処理対象となるタスク数の変更要求があった場合に実行されることを特徴とするタスク管理装置。The task management device according to claim 1 or 2,
A task management apparatus, wherein the determination by the determination means is executed when a request for changing the number of tasks to be processed is made.
前記判定手段による判定が、少なくともいずれかのタスクについてパラメータの変更要求があった場合に実行されることを特徴とするタスク管理装置。The task management device according to any one of claims 1 to 3,
A task management apparatus, wherein the determination by the determination means is executed when a parameter change request is made for at least one of the tasks.
前記パラメータが前記少なくともいずれかのタスクのデッドラインであることを特徴とするタスク管理装置。The task management device according to claim 4,
The task management apparatus, wherein the parameter is a deadline of the at least one task.
前記パラメータが前記少なくともいずれかのタスクの実行周期であることを特徴とするタスク管理装置。The task management device according to claim 4,
The task management apparatus, wherein the parameter is an execution cycle of the at least one task.
少なくともいずれかのタスクについてその保証部分と制御可能部分とを識別するための保証対象識別子を取得する保証対象識別子取得手段を更に備え、
前記タスク選択手段が、前記保証対象識別子を利用して、前記選択を行うことを特徴とするタスク管理装置。The task management device according to any one of claims 1 to 6,
A guarantee object identifier obtaining unit for obtaining a guarantee object identifier for identifying the guarantee part and the controllable part for at least one of the tasks;
The task management device, wherein the task selection means performs the selection using the guarantee target identifier.
少なくともいずれかのタスクに含まれる複数の制御可能部分に付与されたこれら複数の制御可能部分の選択順位を識別するための順位識別子を取得する順位識別子取得手段を更に備え、
前記判定手段が、判定対象となるタスクのうち選択される制御可能部分を前記順位識別子を利用しその選択順位に従って選択すると共に、その選択および前記判定を前記選択の対象を変えながら試行することを特徴とするタスク管理装置。A task management device according to any one of claims 1 to 7,
It further comprises rank identifier acquisition means for acquiring a rank identifier for identifying the selection order of the plurality of controllable parts assigned to the plurality of controllable parts included in at least one of the tasks,
The determination means selects a controllable part to be selected from the tasks to be determined according to the selection order using the rank identifier, and tries the selection and the determination while changing the selection target. A featured task management device.
所定の主タスクと、前記主タスクの実行が実行の条件となる従タスクと、を識別するための主従タスク識別子を取得する主従タスク識別子取得手段を更に備え、
前記判定手段および前記タスク選択手段が、前記主従タスク識別子を利用して、前記主タスクを前記保証部分として処理し、前記従タスクを前記制御可能部分として処理することを特徴とするタスク管理装置。A task management device according to any one of claims 1 to 8,
A master-slave task identifier obtaining unit for obtaining a master-slave task identifier for identifying a predetermined master task and a slave task whose execution condition is the execution of the master task;
The task management apparatus, wherein the determination unit and the task selection unit use the master / slave task identifier to process the master task as the guaranteed part and process the slave task as the controllable part.
少なくともいずれかのタスクについて規定された保証部分と制御可能部分との所要リソース量情報を取得する所要リソース量情報取得ステップを更に含み、
前記判定ステップは、
予約済みのタスクのうち、実行が開始されていないタスクの少なくともいずれかのタスクのみについて、その保証部分と制御可能部分との両者が実行可能かを、新規タスクの予約要求があった際に判定する第1判定ステップと、
前記第1判定ステップによって不可との判定があった場合に、前記第1判定ステップで不可と判定された前記実行が開始されていないタスクについて、その保証部分が実行可能かを判定する第2判定ステップと、
を含み、
前記タスク選択ステップは、
前記第1判定ステップにより実行可能と判定された前記実行が開始されていないタスクにつきその保証部分と制御可能部分との両者を実行対象として選択し、
前記第2判定ステップにより実行可能と判定された前記実行が開始されていないタスクにつきその保証部分のみを実行対象として選択することを特徴とするタスク管理方法。In a multitask system that selectively executes one of a plurality of tasks, a determination step that determines the feasibility of each task based on the required resource amount of each task, and an execution target based on the determination result of the determination step A task management method comprising: a task selection step of selecting a task to be
A required resource amount information acquisition step of acquiring required resource amount information of the guaranteed part and the controllable part specified for at least one of the tasks;
The determination step includes
Of reserved task, determined for at least only one of the tasks of the task execution is not started, whether the guarantee portion and both the controllable sections executable, when there is a reservation request for a new task A first determination step,
A second determination for determining whether or not the guaranteed portion of the task that has been determined to be impossible in the first determination step and that has not been started can be executed when the first determination step determines that it is impossible Steps,
Including
The task selection step includes:
Selecting both the guaranteed part and the controllable part as execution targets for the task which has been determined to be executable by the first determination step and has not started execution ;
A task management method comprising: selecting, as an execution target, only a guaranteed portion of a task that has been determined to be executable in the second determination step and that has not started execution .
少なくともいずれかのタスクについてその保証部分と制御可能部分とを識別するための保証対象識別子を取得する保証対象識別子取得ステップを更に含み、
前記タスク選択ステップでは、前記保証対象識別子を利用して、前記選択を行うことを特徴とするタスク管理方法。The task management method according to claim 10, comprising:
A guarantee object identifier obtaining step for obtaining a guarantee object identifier for identifying the guarantee part and the controllable part for at least one of the tasks;
In the task selection step, the selection is performed by using the guarantee target identifier.
少なくともいずれかのタスクに含まれる複数の制御可能部分に付与されたこれら複数の制御可能部分の選択順位を識別するための順位識別子を取得する順位識別子取得ステップを更に含み、
前記判定ステップでは、判定対象となるタスクのうち選択される制御可能部分を前記順位識別子を利用しその選択順位に従って選択すると共に、その選択および前記判定を前記選択の対象を変えながら試行することを特徴とするタスク管理方法。The task management method according to claim 10 or 11,
A rank identifier obtaining step for obtaining a rank identifier for identifying a selection order of the plurality of controllable parts assigned to the plurality of controllable parts included in at least one of the tasks;
In the determination step, the controllable part to be selected among the tasks to be determined is selected according to the selection order using the rank identifier, and the selection and the determination are tried while changing the selection target. A featured task management method.
所定の主タスクと、前記主タスクの実行が実行の条件となる従タスクと、を識別するための主従タスク識別子を取得する主従タスク識別子取得ステップを更に含み、
前記判定ステップおよび前記タスク選択ステップでは、前記主従タスク識別子を利用して、前記主タスクを前記保証部分として処理し、前記従タスクを前記制御可能部分として処理することを特徴とするタスク管理方法。A task management method according to any one of claims 10 to 12, comprising:
A master / slave task identifier acquiring step for acquiring a master / slave task identifier for identifying a predetermined master task and a slave task whose execution condition is the execution of the master task;
In the determination step and the task selection step, the master task is processed as the guaranteed part and the slave task is processed as the controllable part using the master / slave task identifier.
少なくともいずれかのタスクについて規定された保証部分と制御可能部分との所要リソース量情報を取得する所要リソース量情報取得処理を更に含み、
前記判定処理は、
予約済みのタスクのうち、実行が開始されていないタスクの少なくともいずれかのタスクのみについて、その保証部分と制御可能部分との両者が実行可能かを、新規タスクの予 約要求があった際に判定する第1判定処理と、
前記第1判定処理によって不可との判定があった場合に、前記第1判定処理で不可と判定された前記実行が開始されていないタスクについて、その保証部分が実行可能かを判定する第2判定処理と、
を含み、
前記タスク選択処理では、
前記第1判定処理により実行可能と判定された前記実行が開始されていないタスクにつきその保証部分と制御可能部分との両者を実行対象として選択し、
前記第2判定処理により実行可能と判定された前記実行が開始されていないタスクにつきその保証部分のみを実行対象として選択することを特徴とするプログラム。In a multitask system that selectively executes one of a plurality of tasks, a determination process that determines the feasibility of each task based on the required resource amount of each task, and an execution target based on the determination result of the determination process A program for causing the system to execute a task selection process for selecting a task to be
A required resource amount information acquisition process for acquiring required resource amount information of the guaranteed part and the controllable part specified for at least one of the tasks;
The determination process includes
Of reserved task, only for at least one of the tasks of the task execution is not started, whether the guarantee portion and both the controllable sections executable, when there reservation request of the new task A first determination process for determining;
A second determination for determining whether or not the guaranteed part of the task that has been determined to be impossible in the first determination process and that has not been started can be executed when the first determination process determines that the guarantee is impossible Processing,
Including
In the task selection process,
For the task that has been determined to be executable by the first determination process and has not started execution , both the guaranteed part and the controllable part are selected as execution targets,
A program that selects only a guaranteed portion of a task that has been determined to be executable by the second determination process and that has not started as an execution target.
Priority Applications (8)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002080799A JP3975795B2 (en) | 2002-03-22 | 2002-03-22 | Task management apparatus, method and program |
| US10/504,189 US8589930B2 (en) | 2002-03-22 | 2003-03-17 | Determining whether to execute a new task by deleting task objects of existing tasks |
| AU2003213406A AU2003213406A1 (en) | 2002-03-22 | 2003-03-17 | Task management device and method, operation judgment device and method, and program to be judged |
| DE60318560T DE60318560T2 (en) | 2002-03-22 | 2003-03-17 | TASK MANAGEMENT APPARATUS AND METHOD, OPERATING APPRAISAL DEVICE AND METHOD AND PROGRAM TO BE ASSESSED |
| KR1020047014864A KR100654414B1 (en) | 2002-03-22 | 2003-03-17 | Computer-readable recording medium recording task management apparatus and method thereof, task management program |
| PCT/JP2003/003172 WO2003081429A1 (en) | 2002-03-22 | 2003-03-17 | Task management device and method, operation judgment device and method, and program to be judged |
| CNB038067021A CN1332310C (en) | 2002-03-22 | 2003-03-17 | Task management device and method, operation judgment device and method, and program to be judged |
| EP03708645A EP1489508B1 (en) | 2002-03-22 | 2003-03-17 | Task management device and method, operation judgment device and method, and program to be judged |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002080799A JP3975795B2 (en) | 2002-03-22 | 2002-03-22 | Task management apparatus, method and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003280929A JP2003280929A (en) | 2003-10-03 |
| JP3975795B2 true JP3975795B2 (en) | 2007-09-12 |
Family
ID=29229684
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002080799A Expired - Fee Related JP3975795B2 (en) | 2002-03-22 | 2002-03-22 | Task management apparatus, method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3975795B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7356631B2 (en) * | 2005-01-21 | 2008-04-08 | Himax Technologies, Inc. | Apparatus and method for scheduling requests to source device in a memory access system |
| JP4781089B2 (en) * | 2005-11-15 | 2011-09-28 | 株式会社ソニー・コンピュータエンタテインメント | Task assignment method and task assignment device |
| JP2007328125A (en) * | 2006-06-07 | 2007-12-20 | Sharp Corp | Sound recording apparatus |
| JP6443760B2 (en) | 2014-06-16 | 2018-12-26 | パナソニックIpマネジメント株式会社 | Management device, imaging device, imaging system, and determination method |
-
2002
- 2002-03-22 JP JP2002080799A patent/JP3975795B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003280929A (en) | 2003-10-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100654414B1 (en) | Computer-readable recording medium recording task management apparatus and method thereof, task management program | |
| US8312229B2 (en) | Method and apparatus for scheduling real-time and non-real-time access to a shared resource | |
| JP5065566B2 (en) | Resource manager architecture | |
| TWI590085B (en) | Apparatuses and methods for policy awareness in hardware accelerated video systems | |
| TWI473478B (en) | Network communication control method and system | |
| US20110035751A1 (en) | Soft Real-Time Load Balancer | |
| US20090083746A1 (en) | Method for job management of computer system | |
| JP2019165380A (en) | Transfer control device, transfer control method, and program | |
| US20160210174A1 (en) | Hybrid Scheduler and Power Manager | |
| US20040054998A1 (en) | Program execution apparatus | |
| CN111045816B (en) | A performance optimization method and related device | |
| CN101216786B (en) | The method of scheduler task, medium and equipment in real time operating system | |
| KR970017012A (en) | Dynamic Hierarchical Resource Scheduling for Continuous Media | |
| JP2007058601A (en) | Task execution apparatus and method | |
| JP2003521775A (en) | Method of efficiently performing scheduling process in electronic equipment | |
| JP2004513454A (en) | Method and apparatus for determining the best case reaction time of a periodic task | |
| JP3975795B2 (en) | Task management apparatus, method and program | |
| JPH10240548A (en) | Task scheduling apparatus and method | |
| JP2008276666A (en) | Information processing apparatus and method, and program | |
| US20100306855A1 (en) | Content Processing Apparatus and Content Processing Method | |
| CN111614526B (en) | Method, device, storage medium and terminal for rapidly maintaining HINOC link | |
| WO2006009261A1 (en) | Real time processing software control device and method | |
| JP2009508215A (en) | Delayed arbitration of memory access requests | |
| JPH10171667A (en) | Task management method | |
| JP2001236236A (en) | Task controller and its task scheduling method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041130 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060509 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060703 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20060703 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20070306 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070418 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20070511 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070529 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070611 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100629 Year of fee payment: 3 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 3975795 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110629 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110629 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120629 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120629 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130629 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |