JP4206653B2 - Task scheduling system and method, program - Google Patents

Task scheduling system and method, program Download PDF

Info

Publication number
JP4206653B2
JP4206653B2 JP2001213599A JP2001213599A JP4206653B2 JP 4206653 B2 JP4206653 B2 JP 4206653B2 JP 2001213599 A JP2001213599 A JP 2001213599A JP 2001213599 A JP2001213599 A JP 2001213599A JP 4206653 B2 JP4206653 B2 JP 4206653B2
Authority
JP
Japan
Prior art keywords
task
processor
execution time
tasks
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001213599A
Other languages
Japanese (ja)
Other versions
JP2003029988A (en
Inventor
康広 山崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 Corp filed Critical NEC Corp
Priority to JP2001213599A priority Critical patent/JP4206653B2/en
Publication of JP2003029988A publication Critical patent/JP2003029988A/en
Application granted granted Critical
Publication of JP4206653B2 publication Critical patent/JP4206653B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Multi Processors (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、複数の演算処理装置(プロセッサ)を備えるマルチプロセッサシステムにおけるマルチタスク処理のタスクのスケジューリングをタスクの実行前に行う静的なタスクスケジューリングシステムおよび方法に関する。
【0002】
【従来の技術】
従来、複数の演算処理装置を備えるマルチタスクのマルチプロセッサシステムでは、各プロセッサで実行されるタスクのタスクスケジューリングを行って各タスクの実行時刻を決定してから、各タスクを実行している静的なタスクスケジューリングシステムが用いられることがある。特開平4−253228号公報には、静的なタスクスケジューリングを行うタスクスケジューリングシステムが記載されている。図11は、そのタスクスケジューリングシステムの構成を示すブロック図である。図11に示すように、従来のタスクスケジューリングシステムは、プロセッサ指定タスク待ち行列513と、実行可能タスク待ち行列512と、タスク登録手段511と、タスク選択手段514とから構成されている。
【0003】
プロセッサ指定タスク待ち行列513には、プロセッサが指定されたタスクが登録される。実行可能タスク待ち行列512には実行可能タスクが登録される。タスク登録手段511は、実行プロセッサの指定の有無によって、プロセッサ指定タスク待ち行列513か実行可能タスク待ち行列512かに振り分けてタスクを登録する。タスク選択手段514は、実行可能タスク待ち行列512かプロセッサ指定タスク待ち行列513かのいずれか一方の待ち行列から最も優先度の高いタスクを選択する。
【0004】
このタスクスケジューリングシステムは、各タスクのブロック構造や、真データ依存、反依存、出力依存などの依存関係を示すタスクグラフ61に基づいて、タスクスケジューリングを行う。タスク登録手段511は、このタスクグラフ61を参照し、実行可能なタスクのプロセッサの指定の有無を調べ、指定がある場合には、そのタスクをプロセッサ指定タスク待ち行列513に登録し、指定がない場合には、そのタスクを実行可能タスク待ち行列512に登録する。タスク選択手段514は、プロセッサ指定タスク待ち行列513にタスクが存在する場合には、その中から最も高い優先度を持つタスクを選択し、タスクが存在しない場合には、実行可能タスク待ち行列512中から最も高い優先度を有するタスクを選択することによってタスクスケジューリングを行う。
【0005】
また、マルチプロセッサシステムでは、一般的に、各プロセッサ間がバスで接続されており、各タスクの中に、バスを使用してデータ転送を行うタスクがある場合には、各タスクのバスアクセスの調停を行なう必要がある。1996年に電気学会情報処理研究会から発行された資料IP−96−24、Sep.1996には、そのようなバスアクセス調停に関する論文「無同期近細粒度並列処理におけるデータ転送順序最適化」が掲載されている。この論文に掲載されたデータ転送に関するタスクスケジューリングでは、転送タスク毎に基本ブロック終端までの最長パス長に基づいたレベルを算出し、複数のデータ転送タスクが同時に発生した場合には、最もレベルの高いデータ転送タスクを優先してスケジューリングを行い、他のデータ転送タスクをバスが開放されるまで待機させる。
【0006】
【発明が解決しようとする課題】
以上述べたように、従来のタスクスケジューリングシステムおよび方法は、以下に示す問題を有する。
(1) 優先度の高いタスクであっても、そのタスクがプロセッサを指定するタスクとの依存関係があるタスクである場合には、そのプロセッサを指定するタスクが終了するまで、そのタスクを実行することができない。したがって、そのようなタスクが多い場合には、プロセッサの使用効率が低くなってしまう。
(2) 複数のデータ転送タスクが同時に発生した場合には、最もレベルの高いデータ転送タスクを優先するが、そのタスクのデータ転送待ち時間のために、プロセッサの使用効率が低くなってしまう場合がある。
【0007】
本発明は、プロセッサの使用効率を向上させることができるタスクスケジューリングシステムおよび方法を提供することを目的とする。
【0008】
上記課題を解決するために、本発明のタスクスケジューリングシステムでは、複数のプロセッサを備えるマルチプロセッサシステムで複数のタスクのマルチタスク処理を行う場合に、実行プロセッサが指定されているタスクを含む前記各タスクの依存関係を示すタスクグラフに基づいて、前記各タスクのタスクスケジューリングを前記各タスクの実行前に行う、静的なタスクスケジューリングシステムにおいて、
優先度の高いタスクから順に登録される順方向リストと、
優先度の低いタスクから順に登録される逆方向リストと、
前記順方向リストと前記逆方向リストとにタスクを登録するタスク登録手段と、
前記順方向リストと前記逆方向リストとを所定の条件に応じて選択し、前記選択されたリストに基づいて前記タスクの実行時刻を決定するタスク選択手段とを備えることを特徴とする。
【0009】
本発明のタスクスケジューリングシステムでは、トリガ発生器を設けることによって、プロセッサが設計対象に含まれて始めてそのプロセッサを指定する各タスクの実行時刻を決定するようになっており、順方向リストと逆方向リストとタスク選択手段とを設けることによって、各タスクの実行時刻の間隔が空かないように順方向と逆方向のスケジュールを選択して行えるようになっているため、各プロセッサの使用効率を向上させることができる。
【0010】
また、本発明の他のタスクスケジューリングシステムでは、スを介してデータ転送を行う転送タスクの実行時刻と、該実行時刻を変化させても他の転送タスクの実行時刻が変化しない前記転送タスクの実行時刻の設定可能範囲とが登録されているバス使用情報と、
前記バス使用情報を参照して、複数の転送タスクの実行時刻が重複する場合には、前記設定可能範囲の中で前記転送タスクの実行時刻を再配置するタスク再配置手段と、をさらに備える。
【0011】
本発明のタスクスケジューリングシステムでは、転送タスクの実行時刻の設定可能範囲をバス使用情報に記憶しておき、転送タスクで転送待ち時間が生じないように、設定可能範囲中の時刻に転送タスクを再配置するので、データ転送待ち時間を短くすることができるようになるため、各プロセッサの使用効率を向上させることができる。
【0012】
【発明の実施の形態】
次に、本発明の実施形態のタスクスケジューリングシステムおよび方法を図面を参照して詳細に説明する。全図において、同一の符号がつけられている構成要素は、すべて同一のものを示す。
【0013】
(第1の実施形態)
まず、本発明の第1の実施形態のタスクスケジューリングシステムおよび方法について図面を参照して詳細に説明する。図1は、本実施形態のタスクスケジューリングシステムが動作する環境の構成を示すブロック図である。図1に示すように、本実施形態のタスクスケジューリングシステム8は、3つのプロセッサPE1〜PE3から成るマルチプロセッサシステム100のタスクスケジューリングを行うためのシステムである。マルチプロセッサシステム100は、プロセッサの数が3つで、バスの本数が1本となっているが、本発明はこれらの数を限定するものではない。PE1〜3は、バス15を介して互いに接続されている。各プロセッサ間や、プロセッサと他の機器との間のデータ転送は、バス15を介して行われる。タスクスケジューリングシステム8は、タスク入力手段1からスケジューリング対象のタスクの集合を入力し、スケジューリングされた各タスクの実行時刻を実行時刻出力手段4に出力する。
【0014】
また、タスクスケジューリングシステム8では、タスクスケジューリングの結果をPE1〜PE3に送信する必要があるため、タスクスケジューリングシステム8とPE1〜PE3との間は、データ通信が可能となっている。タスクスケジューリングシステム8とPE1〜PE3とは、バス結合によって接続されていてもよいし、LAN等の通信回線によって接続されていてもよい。したがって、このタスクスケジューリングシステム8は、パーソナルコンピュータ(以下、PC)によっても実現することができる。タスクスケジューリングシステム8がPCである場合には、各タスクのプログラムファイルを記憶するディスクを読み取るディスク読み取り装置等がタスク入力手段1となり、そのPCのディスプレイや印刷装置などが実行時刻出力手段4となる。
【0015】
図2は、本実施形態のタスクスケジューリングシステム8の構成を示すブロック図である。図2に示すように、タスクスケジューリングシステム8は、データ処理部2とデータ記憶部3とから構成される。データ処理部2は、プログラム制御により動作し、例えば、タスクスケジューリングシステム8が前述のようにPCである場合には、PCのCPUがそのプログラムを実行することによって動作する。この場合、データ記憶部3は、PCの磁気ディスク装置等となる。
【0016】
データ処理部2は、タスクグラフ生成部21と、タスク配置手段22とを備えている。また、データ記憶部3は、タスクグラフ記憶部31と、タスク配置リスト記憶部32と、バス使用情報記憶部33とを有している。
【0017】
タスクグラフ生成部21は、タスク入力手段1から入力された各タスクのブロック構造や、真データ依存、反依存、出力依存などのタスク間の依存関係を調べ、その依存関係に基づいてタスクグラフを作成する。タスクグラフ生成部21によって生成されたタスクグラフは、タスクグラフ記憶部31に記憶される。このタスクグラフの一例を図3に示す。図3に示すように、グラフの節は各タスクA〜Pを示す。グラフの各辺の終点に位置するタスクは、その辺の始点に位置する全てのタスクの設計が終了しなければ実行することができない。なお、各節の()内は、そのタスクの実行プロセッサの指定を示す。
【0018】
バス使用情報とは、図1に示すマルチプロセッサシステム1のバス15の使用状況を示す情報である。プロセッサPE1〜PE3は、実行するタスクが転送タスクであった場合には、バス15を介してデータ転送を行う。通常、マルチプロセッサシステムでは、複数の機器が同時に1本のバスを使用することはできないため、転送タスクのスケジューリングを行う際に、このバス15の使用状況を把握しておく必要がある。バス使用情報は、転送タスクをスケジューリングする際の有益な情報となる。
【0019】
タスク配置リスト記憶部32は、配置済みのタスクの実行時刻や、実行プロセッサ情報などのタスクのスケジューリング結果、すなわちタスク配置リストを記憶しておくためのものである。タスク配置手段22は、タスクグラフ記憶部31に記録されたタスクグラフと、バス使用情報記憶部33に記憶されたバス使用情報とに基づいて各タスクの実行時刻を決定し、その実行時刻に基づいてタスク配置リストを作成してタスク配置リスト記憶部32に記憶するとともに、各タスクの実行時刻の決定によって更新されたバスの使用状況をバス使用情報記憶部33のバス使用情報に反映させる。タスク配置手段22は、トリガ発生器221と、タスク登録手段222と、順方向リスト223と、逆方向リスト224と、タスク選択手段225とを備えている。トリガ発生器221は、設計対象となるプロセッサを決定する。
【0020】
タスク登録手段222は、順方向リスト223と逆方向リスト224とに、タスクを登録する。順方向リスト223は、優先度の高い順に各タスクが記述されたリストであり、逆方向リスト224は、優先度の低い順に各タスクが記述されたリストである。タスク選択手段225は、順方向リスト223か、逆方向リスト224かのいずれか一方を選択し、選択されたリストに記述される順に、スケジュール対象となったタスクの実行時刻を決定する。
【0021】
次に、本実施形態のタスクスケジューリングシステムの動作について説明する。図4は、本実施形態のタスクスケジューリングシステムの動作を示すフローチャートである。まず、タスク入力手段1からタスク集合が供給されると、タスクグラフ生成部21は、前述のように、タスクグラフを生成してタスクグラフ記憶部31に記憶するとともに、各タスクの優先度を計算し、タスクグラフ記憶部31に記憶しておく(ステップA1)。各タスクの優先度は、順方向の優先度と、逆方向の優先度との両方を計算しておく。また、各タスクの優先度は、以下のようにして算出される。
【0022】
まず、各タスクの順方向の優先度については、各タスクから終端のタスクに至るまでのパス長が長いタスクに高い優先度が与えられる。パス長が同じタスクが存在する場合には、直接の後続タスク数の多いタスクが優先される。さらに、各タスクの逆方向の優先度については、終端のタスクから各タスクに至るまでのパス長が長いタスクに高い優先度が与えられる。パス長の同じタスクが存在する場合には、直接の先行タスク数の少ないタスクが優先される。
【0023】
ステップA1終了後、タスク配置手段22では、まずトリガ発生器221が動作する。トリガ発生器221は、タスクグラフ記憶部31に記憶されているタスクグラフに基づいて、設計対象に含めるプロセッサを決定する(ステップA2)。ステップA2において、トリガ発生器221は、まず、使用するプロセッサのうち、いずれのタスクにも指定されていないプロセッサを設計対象に含める。トリガ発生器221は、未設計のタスクがプロセッサを指定するタスクのみであって、指定されているプロセッサが設計対象に含まれていない場合には、未設計のタスクのうち、順方向の優先度が最も高いタスクが割り当てられているプロセッサを設計対象に含める。また、トリガ発生器221は、設計対象プロセッサに指定されているタスクと、設計対象になっていないプロセッサに指定されているタスクとの間にデータ転送が生じたときには、その設計対象になっていないプロセッサを設計対象に含める。
【0024】
ステップA2終了後、タスク配置手段22は、設計対象となっているプロセッサを対象にし、そのプロセッサが指定されているタスクで順方向の優先度が最も高いタスクが配置済みであるか否かを判断する(ステップA3)。ステップA3において、設計対象になっている全てのプロセッサで順方向の優先度が最も高いタスクが配置済みである場合には、タスク登録手段222によって順方向リスト223を作成し(ステップA4)、タスク選択手段225によって順方向のスケジュールを行って、そのタスクの実行時刻をタスク配置リスト32に登録する(ステップA5)。
【0025】
ステップA4、A5では、タスク登録手段222によって、先行タスクのスケジューリングが終了していてスケジューリングの対象、すなわち実行可能になっているタスクを算出し、順方向リスト223を作成する。ただし、設計対象となっていないプロセッサで実行が指定されているタスクからの先行タスクは未設計であってもよい。タスク配置手段22では、このリストにおいて順方向の優先度が最も高いタスクを取りだし、実行可能な時刻の最も早い時刻にタスク配置を行い、その結果をタスク選択手段225によって、タスク配置リスト32に登録する。また、タスク選択手段225は、実行時刻を決定したタスクが、バス15を使用する場合には、バス使用情報記憶部33に記憶されるバス使用情報を参照してバス15を使用する時刻をチェックしておく。
【0026】
ステップA3において、設計対象になっている全てのプロセッサで順方向の優先度が最も高いタスクが配置済みでない場合には、タスク登録手段222によって逆方向リスト223を作成し(ステップA6)、タスク選択手段225によって逆方向のスケジュールを行い、そのタスクの実行時刻をタスク配置リスト32に登録する(ステップA7)。
【0027】
ステップA6、A7、すなわち逆方向のタスクスケジューリング処理では、タスク登録手段222によって後続タスクの配置が終了していて、まだ設計されていないタスクについて逆方向リスト224を作成する。ただし、設計対象となっていないプロセッサに実行が指定されているタスクの後続タスクは未設計であってもよい。また、そのプロセッサで、設計を開始するきっかけとなったタスクより逆方向の優先度の低いタスクからの後続タスクは未設計でもよいものとする。
【0028】
図1のタスク配置手段22では、このリストにおいて逆方向の優先度が最も低いタスクを取りだし、実行可能な時刻のうち、最も遅い時刻にタスクの実行時刻としてスケジューリングし、タスク選択手段225によってそのスケジューリング結果をタスク配置リスト32に登録する。また、このとき実行時刻を決定したタスクがバス15を使用する場合には、バス使用情報記憶部33に記憶されているバス使用情報を参照してバス15を使用する時刻をチェックしておく。
【0029】
ステップA4、A5、ステップA6、A7の処理、すなわちタスクスケジュール操作を行って、あるタスクの配置を終えると、タスク配置手段22は、全てのタスクのスケジューリングが終了したか否かを調べる(ステップA8)。まだ、スケジューリングされていないタスクが存在する場合には、先ほどのタスク配置で、新たに設計対象に含まれるプロセッサが存在しないか調べるために、トリガ発生プロセス(ステップA2)に戻る。ステップA8において、全てのタスクのスケジューリングが終了していたと判断した場合には、スケジューリング結果を実行時刻出力手段4に出力して処理を終了する。
【0030】
本実施形態のタスクスケジューリングシステムでは、トリガ発生プロセスを設けて、プロセッサが設計対象に含まれてから各タスクを配置し、スケジュール状況に応じて順方向と逆方向のスケジュールを適宜行っていくため、各プロセッサの使用効率を向上させることができる。
【0031】
次に、図3のタスクグラフによって依存関係が示される各タスク集合のタスクスケジューリングを行った場合の本実施形態のタスクスケジューリングシステム動作について説明する。このタスクグラフでは、プロセッサPE1〜PE3が指定されており、いずれのタスクにも指定されていないプロセッサは存在しないため、図3のステップA2の処理に示すように、トリガ発生器221は、順方向の優先度が最も高いタスクAに割り当てられているPE1を設計対象に含める。そして、ステップA4、A5の処理によって、タスクAからタスクFまで順方向のタスクスケジューリングが行われる。
【0032】
順方向のタスクスケジューリングでは、各タスクA〜Fの実行時刻は、最高優先度を有するタスクAの配置時刻よりも後の時刻であって、指定プロセッサの空いている最も早い時刻とする。タスクがバス15を使用する転送タスクである場合には、その転送タスクがバスを使用する時刻をバス使用情報に反映させる。また、そのタスクが、設計対象に含まれていないプロセッサを指定するタスクにデータ転送を行うタスクである場合には、その設計対象になっていないプロセッサを設計対象に含める。例えば、タスクFは、PE2を指定するタスクIに対してデータ転送を行うタスクであるため、本実施形態のタスクスケジューリングシステムは、PE2を設計対象のプロセッサに含める。これ以後、PE2を指定するタスクもスケジューリング対象に含まれるようになる。
【0033】
次に、本実施形態のタスクスケジューリングシステムは、PE2が設計対象に含まれるきっかけとなったタスクIの設計を行うが、PE2が指定されている順方向の優先度が高いタスクGが配置済みでないため、以後、タスクIよりも優先度が高いタスクを対象にして、ステップA6、A7の処理によって、優先度の低いタスクから順に逆方向にタスクスケジューリングを行う。
【0034】
この逆方向のタスクスケジュールでは、設計対象となっているプロセッサが指定されている後続タスクや、プロセッサの指定されていない後続タスクの設計が終了しているタスクのうち、逆方向の優先度が最も低いタスクを選択する。ただし、プロセッサが設計対象に含まれる原因となったタスク(例えば、タスクI)より低いCP(クリティカルパス)値を有する後続タスクは、前述の後続タスクには含めない。タスクの配置時刻は、タスク配置リストとバス使用情報とを参照して、プロセッサが設計対象に含まれる原因となったタスクの配置時刻より前の時刻、すなわち配置可能な時刻のうち、最も遅い時刻とする。図3のタスクグラフでは、タスクI設計後の逆方向の優先度が最も低いタスクは、タスクJであるとすると、タスク選択手段225は、タスクJをタスクIの直前に配置する。
【0035】
タスクGが設計されると、設計対象となっているプロセッサ(PE1、PE2)の順方向の最高優先度タスクが設計された状態となるため、本実施形態のタスクスケジューリングシステムでは、再び順方向のタスクスケジュールを行う。タスクLの設計後には、トリガ発生器221によりPE3が設計対象に含まれるようになり、逆方向のタスクスケジュールが開始される。タスクMが設計されると、今度は再び、順方向のタスクスケジュールが行われるようになる。
【0036】
本実施形態のタスクスケジューリングシステムのスケジュール結果を図5に示す。図5(a)は、本実施形態のタスクスケジューリングシステムのスケジューリング結果を示し、図5(b)は、従来のタスクスケジューリングシステムのスケジューリング結果を示す。図5に示すように、各プロセッサでは、先頭タスクが実行される時間と最後のタスクが実行される時間との間には、タスクが実行されていない時間がないのがわかる。
【0037】
また、本実施形態のタスクスケジューリングシステムでは、タスク選択手段225は、バス15を用いてデータを転送する転送タスクについては、バス使用情報記憶部33に記憶されたバス使用情報を参照して、タスクの実行時刻を決定する。まず、プロセッサPE1を指定する各タスクのタスク配置リストが、図6(a)に示すようになっており、その時のバス使用情報が図6(b)に示すようになっているとして、転送タスクであるタスク4をスケジューリングする場合を考える。タスク4を時刻4に配置することを決定した後、タスク選択手段225は、タスク4を時刻4に配置した場合に、バスの使用が先に配置された他のタスクと衝突するか否かをチェックする。図6(b)に示すように、時刻4においては、タスクBがバスを使用するため、タスク4を時刻4に配置することができない。そこで、本実施形態のタスクスケジューリングシステムでは、時刻4以降の時刻のうち、バス15が他のタスクに使用されていない時刻である時刻6にタスク4を配置する。
【0038】
本実施形態のタスクスケジューリングシステムを用いることによって、各プロセッサの使用効率が上がると、タスクの処理コストが低減され、周期タスクの高速処理が可能となる。図3のタスクグラフに示される各タスクの周期処理を行う場合、従来のタスクスケジューリングシステムでは、図5(b)に示すように、先頭タスクを実行してから最終タスクを実行するまでの間に、各プロセッサにおいて、タスクを実行していない時間が存在する。そのため、例えばプロセッサPE3では、全タスクを実行するのに11サイクルを要する。これに対し、本実施形態のタスクスケジューリングシステムでは、図5(a)に示すように、各プロセッサ毎の実行時間は6サイクルとなる。プロセッサの使用効率を、各プロセッサにおける先頭タスクの開始時刻から最後のタスクの終了時刻までの時間に対する、プロセッサが実際にタスクを実行している時間の割合であるとすると、図5(b)の従来のタスクスケジューリングシステムでは、プロセッサの使用効率は62%であるのに対し、図5(a)の本実施形態のタスクスケジューリングシステムでは、プロセッサの使用効率は100%となる。
【0039】
(第2の実施形態)
次に、本発明の第2の実施形態のタスクスケジューリングシステムについて図面を参照して説明する。図7は、本実施形態のタスクスケジューリングシステムの構成を示すブロック図である。図7に示すように、本実施形態のタスクスケジューリングシステム9は、データ処理部2の代わりに、データ処理部5を備えている点が、図2のタスクスケジューリングシステム8と異なっている。データ処理部5は、タスクグラフ生成部21と、タスク配置手段24と、タスク再配置手段23とを備えている。タスク配置手段24は、図2のタスク配置手段22と同様に、タスクグラフ記憶部31に記憶されたタスクグラフに基づいて各タスクの実行時刻を決定してタスクスケジューリングを行い、それらのスケジューリング結果をタスク配置リストとしてタスク配置リスト記憶部32に記憶し、そのスケジューリング結果に合わせてバス使用情報記憶部34のバス使用情報を更新する。タスク再配置手段23は、タスク配置リスト記憶部32に記憶されたタスク配置リスト上のタスクの再配置を行う。
【0040】
また、データ記憶部6は、タスクグラフ記憶部31と、タスク配置リスト記憶部32と、バス使用情報記憶部34とを備えている。バス使用情報記憶部34は、図2のバス使用情報記憶部33と同様に、転送タスクがバスを使用可能な時刻を記憶する。タスク配置手段24は、前述のタスクスケジューリングを行ってバス使用情報を更新する際には、そのタスクがバス15の使用が可能な配置可能時刻をすべて記憶しておく。配置可能時刻とは、そのタスクの先行タスクのうち、そのタスクと配置時刻が最も近い先行タスクが配置された時刻と、そのタスクの後続タスクのうち、そのタスクともっとも配置時刻が近い後続タスクが配置された時刻との間の時間であって、そのタスクが指定するプロセッサを指定する各タスクの中でクリティカルパス値が等しい設定可能範囲の中の時刻とする。したがって、タスクの配置可能時刻を設定するためには、そのタスクの全ての先行タスクおよび後続タスクの配置時刻が決定されている必要がある。
【0041】
図8は、本実施形態のタスクスケジューリングシステムにおける配置可能時刻を示す図である。タスクグラフが図8(a)のようになっているとすると、タスクBは、タスクAとタスクDとの実行時刻の間に配置可能である。したがって、図8(b)に示すように、タスクBの配置可能時刻は時刻2、3となり、図8(c)、(d)に示すように、タスクBとタスクCとは、クリティカルパス値が同じであるため、その実行時刻を入れ替え可能となる。
【0042】
タスク再配置手段23は、タスク配置手段24によって転送タスクが配置されると、そのタスクのデータ転送待ち時間を調べる。本実施形態のタスクスケジューリングシステムでは、順方向のスケジュール時にバス15が使用できないためにプロセッサが空いているのに転送タスクを早い時刻に配置できない場合や、逆方向のスケジュール時にバスが使用できないためにプロセッサが空いているのに転送タスクを遅い時刻に配置できない場合には、データ転送待ちが生じる状態であると判定する。データ転送待ち時間が生じる場合には、タスク再配置手段24は、タスク再配置処理を試みる。
【0043】
タスク再配置手段24は、転送タスクを転送待ち時間が生じない時刻に仮配置する。仮配置を行う時刻は、順方向のスケジュールではプロセッサ空きが生じない最も早い時刻とし、逆方向のスケジュールではプロセッサ空きが生じない最も遅い時刻とする。
【0044】
次に、タスク再配置手段24は、バス使用情報を参照して仮配置を行ったタスクとバス衝突を生じるタスクを探し出し、その転送タスクの動かせる範囲を調べる。バス衝突相手の転送タスク全ての動かせる範囲が、動かした先でバス衝突を起こさない場合には、バス衝突相手の転送タスクの実行時刻を動かした先の命令と入れかえ、仮配置を行っていた転送タスクの実行時刻をその時刻に確定する。バス衝突相手の転送タスクを他の時間に移動させることができない場合には、転送タスクの仮配置時刻を1サイクルずらす。ずらす時刻は、順方向スケジュールでは、初め仮配置を行っていた時刻より1サイクル遅い時刻とし、逆方向のスケジュールでは、初め仮配置を行っていた時刻より1サイクル早い時刻とする。
【0045】
タスク再配置手段23は、転送タスクの再配置が終了すると、仮配置を行っていたタスクの実行時刻と、それとバス衝突を起こす転送タスクの再配置時刻と、再配置した転送タスクと実行時刻を入れ替えたタスクの実行時刻とをタスク配置リスト記憶部32に記憶するタスク配置リストに反映させ、さらに再配置後の転送タスクのバス使用時刻をバス使用情報記憶部32に記憶するバス使用情報に反映させる.
図9は、本実施形態のタスクスケジューリングシステムにおけるタスク再配置手段23の動作を示すフローチャートである。図9に示すように、まず、タスク再配置手段23は、タスク配置手段24によって作成されタスク配置リスト記憶部32に記憶されたタスク配置リストを参照し、各タスクのうち、バス15を使用する転送タスクについて、転送待ち時間が生じているか否かを判断する(ステップC1)。転送待ち時間が生じている場合には、タスク再配置手段23は、その転送タスクを転送待ちが生じない時刻に仮配置する(ステップC2)。ステップC2後、タスク再配置手段23は、バス使用情報記憶部34に記憶されているバス使用情報を参照して、ステップC2において仮配置を行ったタスクとバス衝突を生じるタスクがあるかどうか検出し、そのタスクがあれば、そのタスクの配置可能時刻を参照して、そのタスクが再配置可能であるか否かを検出する(ステップC3)。ステップC3において、バス衝突を生じるタスクが再配置可能でない場合には、仮配置したタスクをまた別の時刻に仮配置し(ステップC4)、ステップC3に戻る。
【0046】
ステップC3において、バス衝突を生じるタスクが再配置可能であった場合には、そのタスクの再配置を行い、ステップC2において行った仮配置を確定し(ステップC5)、処理を終了する。本実施形態のタスクスケジューリングシステムでは、タスク再配置手段23による再配置終了後、全てのタスクの配置が完了していない場合には、再び、タスク配置手段24によるタスクのスケジューリングを行う。
【0047】
図10は、本実施形態のタスクスケジューリングシステムにおいてバス使用情報記憶部34に記憶されるバス使用情報の一例を示す図である。転送タスクは、現在、図10(a)のように配置されており、バス使用情報は、図10(b)のようになっているとする。本実施形態のタスクスケジューリングシステムでは、転送タスクの配置でデータ転送待ち状態が生じた場合には、タスクの再配置を試みるが、図10では、タスク再配置手段23が、タスク4を時刻4(4clk)に仮配置する場合を示している。タスク再配置手段23は、バス使用情報記憶部34に記憶されているバス使用情報を参照して、仮配置を行ったタスクとバス衝突を生じるタスクを検出し、その転送タスクの配置時刻の移動可能範囲、すなわち配置可能時刻を調べる。図10では、タスクBがバス衝突相手となっており、タスクBの配置可能時刻は、時刻3と時刻4となっている。したがって、本実施形態のタスクスケジューリングシステムでは、タスクBは時刻3にも配置可能なため、タスクBの配置時刻を時刻4から時刻3に入れ替える。この入れ替えにより、タスクBはバス15を時刻3で使用することとなり、タスク4が時刻4にバス15を使用することが可能となる。しかし、タスクBの配置可能時刻が時刻4以外に存在しなかった場合には、タスク再配置手段23は、タスク4の仮配置時刻を時刻5とし、時刻5で上述した処理を行う。タスク再配置手段23は、バス衝突が生じなくなるまで、この動作を繰り返す。
【0048】
タスク再配置手段23は、タスクの配置が可能になった時点で、転送タスクの設計を行い、仮配置を行っていた転送タスクの実行時刻と、再配置されたタスクの実行時刻と、再配置したタスクと実行順序を入れ替えたタスクの実行時刻とを、タスク配置リスト記憶部32に記憶されているタスク配置リストに反映する。さらに、タスク再配置手段23は、再配置後の転送タスクのバス使用時刻をバス使用情報記憶部34に記憶されているバス使用情報に反映させる。上述のような、タスク入れ替えを行うことによって、時刻6に配置されていたタスク4を時刻4に配置することが可能となり、データ転送待ち時間を短くすることができる。
【0049】
また、バス衝突相手のタスクの配置可能時刻が他になかった場合でも、初めに配置していた時刻にタスクを配置することが可能である。このため、本実施形態のタスクスケジューリングシステムでは、タスクのデータ転送待ち時間を、第1の実施形態のタスクスケジューリングシステムと同じか、それよりも短くすることが可能となる。
【0050】
以上述べたように、本実施形態のタスクスケジューリングシステムでは、データ転送タスクを配置したときに、転送待ち時間が生じた場合には、そのタスクの再配置を行うことによって、転送待ち時間を低減することができる。
【0051】
なお、タスクスケジューリングシステム8、9は、前述のように、コンピュータのメモリおよびCPU(中央演算装置)によって構成され、上記の各部の機能を実現するためのプログラムをメモリにロードして実行することによりその機能を実現させるものであってもよい。このプログラムは、磁気ディスク、半導体メモリ、CD−ROMや、その他のコンピュータ読み取り可能な記録媒体に記録されているものであってもよい。
【0052】
また、本実施形態のタスクスケジューリングシステムでは、各タスクの優先度を、クリティカルパス値と、先行タスク数(順方向リスト作成時)、後続タスク数(逆方向リスト作成時)を基準として求めた。しかし、本発明は、これに限定されるものではなく、順方向リスト作成時と、逆方向リスト作成時とで、まったく同じ条件でタスクの優先度を求めてもよいし、CP法、CP/MISF法、CP/DT/MISF法など、他の方法を用いてタスクの優先度を求めてもよい。
【0053】
【発明の効果】
以上述べたように、本発明のタスクスケジューリングシステムは、以下に示す効果を有する。
(1) 各プロセッサの設計開始を決定するトリガ発生プロセスを設け、そのプロセスが実行されるまでそのプロセッサ指定のタスクを配置せず、各プロセッサの最優先タスクの設計状況によって、順方向と逆方向のタスクスケジュールを適宜行うため、実行プロセッサが指定されているタスクの待ち状態を少なくして、プロセッサの使用効率を向上させることができる。
(2) 転送タスクの配置可能時刻をバス使用情報に記憶しておき、データ転送タスクで待ち状態が生じる場合にはそのタスクの再配置を行って、データ転送待ち状態を短くすることができるため、プロセッサの使用効率を向上させることができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態のタスクスケジューリングシステムが動作する環境の構成を示すブロック図である。
【図2】本発明の第1の実施形態のタスクスケジューリングシステムの構成を示すブロック図である。
【図3】タスクグラフの一例を示す図である。
【図4】本発明の第1の実施形態のタスクスケジューリングシステムの動作を示すフローチャートである。
【図5】本発明の第1の実施形態のタスクスケジューリングシステムのスケジュール結果を示す図である。
【図6】本発明の第1の実施形態のタスクスケジューリングシステムにおけるタスク配置リストとバス使用情報とを示す図である。
【図7】本発明の第2の実施形態のタスクスケジューリングシステムの構成を示すブロック図である。
【図8】本発明の第2の実施形態のタスクスケジューリングシステムにおける配置可能時刻を示す図である。
【図9】本発明の第2の実施形態のタスクスケジューリングシステムにおけるタスク再配置手段の動作を示すフローチャートである。
【図10】本発明の第2の実施形態のタスクスケジューリングシステムにおいてバス使用情報記憶部に記憶されるバス使用情報の一例を示す図である。
【図11】従来のタスクスケジューリングシステムの構成を示す図である。
【符号の説明】
1 タスク入力手段
2、5 データ処理部
3、6 データ記憶部
4 実行時刻出力手段
8、9 タスクスケジューリングシステム
15 バス
21 タスクグラフ生成部
22、24、51 タスク配置手段
23 タスク再配置手段
31 タスクグラフ記憶部
32 タスク配置リスト記憶部
33、34 バス使用情報記憶部
61 タスクグラフ
62 タスク配置リスト
63 バス使用情報
100 マルチプロセッサシステム
221 トリガ発生器
222 タスク登録手段
223 順方向リスト
224 逆方向リスト
225 タスク選択手段
511 タスク登録手段
512 実行可能タスク待ち行列
513 プロセッサ指定タスク待ち行列
514 タスク選択手段
A1〜A8、C1〜C5 ステップ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a static task scheduling system and method for scheduling a task for multitask processing in a multiprocessor system including a plurality of arithmetic processing units (processors) before executing the task.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in a multitasking multiprocessor system having a plurality of arithmetic processing units, a task scheduling of tasks executed by each processor is performed to determine an execution time of each task, and then each task is executed. A simple task scheduling system may be used. Japanese Patent Laid-Open No. 4-253228 describes a task scheduling system that performs static task scheduling. FIG. 11 is a block diagram showing the configuration of the task scheduling system. As shown in FIG. 11, the conventional task scheduling system includes a processor designated task queue 513, an executable task queue 512, a task registration unit 511, and a task selection unit 514.
[0003]
In the processor designated task queue 513, a task for which a processor is designated is registered. Executable tasks are registered in the executable task queue 512. The task registration unit 511 distributes tasks to the processor designated task queue 513 or the executable task queue 512 depending on whether or not the execution processor is designated. The task selection means 514 selects the task with the highest priority from either the executable task queue 512 or the processor designated task queue 513.
[0004]
This task scheduling system performs task scheduling based on a block structure of each task and a task graph 61 showing dependency relationships such as true data dependence, anti-dependence, and output dependence. The task registration means 511 refers to the task graph 61 and checks whether or not a processor of an executable task is specified. If so, the task registration means 511 registers the task in the processor specified task queue 513, and there is no specification. If so, the task is registered in the executable task queue 512. When there is a task in the processor designated task queue 513, the task selection means 514 selects the task having the highest priority from the tasks, and when there is no task, the task selection means 514 is in the executable task queue 512. Task scheduling is performed by selecting the task having the highest priority from
[0005]
In a multiprocessor system, generally, each processor is connected by a bus. If there is a task that uses the bus to transfer data among the tasks, the bus access of each task is determined. It is necessary to perform mediation. Document IP-96-24 published by the Institute of Electrical Engineers of Japan in 1996, Sep. In 1996, a paper on such bus access arbitration “Optimization of Data Transfer Order in Asynchronous Near Fine Grain Parallel Processing” is published. In the task scheduling related to data transfer published in this paper, the level based on the longest path length to the end of the basic block is calculated for each transfer task, and when multiple data transfer tasks occur simultaneously, the highest level Scheduling is performed with priority given to the data transfer task, and other data transfer tasks are kept waiting until the bus is released.
[0006]
[Problems to be solved by the invention]
As described above, the conventional task scheduling system and method have the following problems.
(1) Even if a task has a high priority, if the task has a dependency relationship with a task specifying a processor, the task is executed until the task specifying the processor ends. I can't. Therefore, when there are many such tasks, the use efficiency of the processor is lowered.
(2) If multiple data transfer tasks occur at the same time, the data transfer task with the highest level is given priority, but due to the data transfer waiting time of the task, the processor usage efficiency may be reduced. is there.
[0007]
It is an object of the present invention to provide a task scheduling system and method that can improve the usage efficiency of a processor.
[0008]
In order to solve the above problems, a task scheduling system according to the present invention includes a plurality of processors. Multiprocessor system comprising Multitask with multiple tasks with In this case, the task scheduling of each task is performed before the execution of each task based on a task graph indicating the dependency of each task including a task for which an execution processor is specified. In the task scheduling system,
A forward list that is registered in order from the highest priority task,
A reverse list registered in order of low priority tasks,
Task registration means for registering tasks in the forward direction list and the backward direction list;
Task selection means for selecting the forward direction list and the backward direction list according to a predetermined condition, and determining an execution time of the task based on the selected list.
[0009]
In the task scheduling system of the present invention, by providing a trigger generator, the execution time of each task that designates the processor is determined only after the processor is included in the design object, and the forward list and the reverse direction are determined. By providing a list and task selection means, it is possible to select the schedule in the forward direction and the reverse direction so that the execution time interval of each task is not free, so that the use efficiency of each processor is improved. be able to.
[0010]
In another task scheduling system of the present invention, Ba A bus in which the execution time of a transfer task that performs data transfer via a network and the settable range of the execution time of the transfer task in which the execution time of another transfer task does not change even if the execution time is changed are registered Usage information and
When the execution times of a plurality of transfer tasks overlap with reference to the bus usage information, the system further comprises task rearrangement means for rearranging the execution times of the transfer tasks within the settable range.
[0011]
In the task scheduling system of the present invention, the settable range of the execution time of the transfer task is stored in the bus use information, and the transfer task is restarted at a time within the settable range so that the transfer waiting time does not occur in the transfer task. Since it is arranged, the data transfer waiting time can be shortened, so that the usage efficiency of each processor can be improved.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Next, a task scheduling system and method according to an embodiment of the present invention will be described in detail with reference to the drawings. In all the drawings, the same reference numerals denote the same components.
[0013]
(First embodiment)
First, a task scheduling system and method according to a first embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing a configuration of an environment in which the task scheduling system of this embodiment operates. As shown in FIG. 1, the task scheduling system 8 of this embodiment is a system for performing task scheduling of a multiprocessor system 100 including three processors PE1 to PE3. The multiprocessor system 100 has three processors and one bus, but the present invention does not limit these numbers. The PEs 1 to 3 are connected to each other via the bus 15. Data transfer between the processors and between the processor and other devices is performed via the bus 15. The task scheduling system 8 inputs a set of tasks to be scheduled from the task input unit 1 and outputs the execution time of each scheduled task to the execution time output unit 4.
[0014]
Moreover, in the task scheduling system 8, since it is necessary to transmit the result of task scheduling to PE1-PE3, data communication is possible between the task scheduling system 8 and PE1-PE3. The task scheduling system 8 and PE1 to PE3 may be connected by bus coupling or may be connected by a communication line such as a LAN. Therefore, this task scheduling system 8 can also be realized by a personal computer (hereinafter, PC). When the task scheduling system 8 is a PC, a disk reading device or the like that reads a disk storing a program file of each task serves as the task input means 1, and the display or printing device of the PC serves as the execution time output means 4. .
[0015]
FIG. 2 is a block diagram showing a configuration of the task scheduling system 8 of the present embodiment. As shown in FIG. 2, the task scheduling system 8 includes a data processing unit 2 and a data storage unit 3. The data processing unit 2 operates by program control. For example, when the task scheduling system 8 is a PC as described above, the CPU of the PC executes the program. In this case, the data storage unit 3 is a PC magnetic disk device or the like.
[0016]
The data processing unit 2 includes a task graph generation unit 21 and task placement means 22. The data storage unit 3 includes a task graph storage unit 31, a task arrangement list storage unit 32, and a bus usage information storage unit 33.
[0017]
The task graph generation unit 21 examines the block structure of each task input from the task input means 1 and the dependency relationships between tasks such as true data dependency, anti-dependency, and output dependency, and generates a task graph based on the dependency relationship. create. The task graph generated by the task graph generation unit 21 is stored in the task graph storage unit 31. An example of this task graph is shown in FIG. As shown in FIG. 3, the section of the graph shows each task AP. A task located at the end point of each side of the graph cannot be executed unless the design of all tasks located at the start point of that side is completed. The parentheses in each section indicate the execution processor of the task.
[0018]
The bus usage information is information indicating the usage status of the bus 15 of the multiprocessor system 1 shown in FIG. The processors PE1 to PE3 perform data transfer via the bus 15 when the task to be executed is a transfer task. Normally, in a multiprocessor system, a plurality of devices cannot use a single bus at the same time. Therefore, when scheduling a transfer task, it is necessary to grasp the usage status of the bus 15. The bus usage information is useful information when scheduling a transfer task.
[0019]
The task allocation list storage unit 32 stores task execution results such as the execution time of allocated tasks and execution processor information, that is, a task allocation list. The task placement unit 22 determines the execution time of each task based on the task graph recorded in the task graph storage unit 31 and the bus usage information stored in the bus usage information storage unit 33, and based on the execution time. The task allocation list is created and stored in the task allocation list storage unit 32, and the bus usage status updated by determining the execution time of each task is reflected in the bus usage information in the bus usage information storage unit 33. The task placement unit 22 includes a trigger generator 221, a task registration unit 222, a forward direction list 223, a reverse direction list 224, and a task selection unit 225. The trigger generator 221 determines a processor to be designed.
[0020]
The task registration unit 222 registers tasks in the forward direction list 223 and the backward direction list 224. The forward direction list 223 is a list in which each task is described in descending order of priority, and the reverse direction list 224 is a list in which each task is described in descending order of priority. The task selection means 225 selects either the forward direction list 223 or the reverse direction list 224, and determines the execution time of the task that is the schedule target in the order described in the selected list.
[0021]
Next, the operation of the task scheduling system of this embodiment will be described. FIG. 4 is a flowchart showing the operation of the task scheduling system of this embodiment. First, when a task set is supplied from the task input means 1, the task graph generation unit 21 generates a task graph and stores it in the task graph storage unit 31, as described above, and calculates the priority of each task. And it memorize | stores in the task graph memory | storage part 31 (step A1). As the priority of each task, both the forward priority and the backward priority are calculated. The priority of each task is calculated as follows.
[0022]
First, regarding the priority in the forward direction of each task, a high priority is given to a task having a long path length from each task to the terminal task. When tasks having the same path length exist, a task with a large number of direct subsequent tasks is given priority. Furthermore, as for the priority in the reverse direction of each task, a high priority is given to a task having a long path length from the terminal task to each task. If there are tasks with the same path length, a task with a smaller number of direct preceding tasks is given priority.
[0023]
After step A1, the trigger generator 221 operates in the task placement unit 22 first. The trigger generator 221 determines a processor to be included in the design target based on the task graph stored in the task graph storage unit 31 (step A2). In step A2, the trigger generator 221 first includes a processor that is not specified for any task among the processors to be used. When the undesigned task is only a task that designates a processor and the designated processor is not included in the design target, the trigger generator 221 has a forward priority among the undesigned tasks. The processor with the highest task is assigned to the design target. The trigger generator 221 is not a design target when data transfer occurs between a task specified as a design target processor and a task specified as a processor that is not a design target. Include the processor in the design object.
[0024]
After step A2, the task placement unit 22 determines whether or not a task with the highest priority in the forward direction has already been placed in the task for which the processor is designated as a target. (Step A3). In step A3, if a task having the highest priority in the forward direction is already placed in all the processors to be designed, the task registration unit 222 creates the forward direction list 223 (step A4), and the task A schedule in the forward direction is performed by the selection means 225, and the execution time of the task is registered in the task arrangement list 32 (step A5).
[0025]
In steps A4 and A5, the task registration unit 222 calculates the scheduling target, that is, the tasks that can be executed by the scheduling of the preceding task, and creates the forward direction list 223. However, a predecessor task from a task whose execution is specified by a processor that is not a design target may be undesigned. The task placement means 22 picks up the task having the highest forward priority in this list, places the task at the earliest executable time, and registers the result in the task placement list 32 by the task selection means 225. To do. In addition, when the task whose execution time is determined uses the bus 15, the task selection unit 225 checks the time when the bus 15 is used with reference to the bus usage information stored in the bus usage information storage unit 33. Keep it.
[0026]
In step A3, if a task having the highest priority in the forward direction is not already placed in all the processors to be designed, a reverse direction list 223 is created by the task registration unit 222 (step A6), and task selection is performed. Schedule in the reverse direction is performed by means 225, and the execution time of the task is registered in the task arrangement list 32 (step A7).
[0027]
In steps A6 and A7, that is, in the reverse direction task scheduling process, the reverse direction list 224 is created for tasks that have been arranged by the task registration unit 222 and have not yet been designed. However, a task subsequent to a task whose execution is specified for a processor that is not a design target may be undesigned. Further, it is assumed that a subsequent task from a task having a lower priority in the reverse direction than the task that has started the design in the processor may be undesigned.
[0028]
The task placement means 22 in FIG. 1 takes out the task with the lowest priority in the reverse direction in this list, schedules it as the task execution time at the latest time among the executable times, and schedules it by the task selection means 225. The result is registered in the task arrangement list 32. If the task whose execution time is determined at this time uses the bus 15, the time to use the bus 15 is checked with reference to the bus usage information stored in the bus usage information storage unit 33.
[0029]
When the processing of steps A4, A5, steps A6, A7, that is, the task scheduling operation is performed and the placement of a task is finished, the task placement means 22 checks whether the scheduling of all tasks is finished (step A8). ). If there is a task that has not yet been scheduled, the process returns to the trigger generation process (step A2) in order to check whether or not there is a new processor included in the design object in the previous task placement. If it is determined in step A8 that the scheduling of all tasks has been completed, the scheduling result is output to the execution time output means 4 and the process is terminated.
[0030]
In the task scheduling system of the present embodiment, a trigger generation process is provided, each task is arranged after the processor is included in the design target, and the forward and reverse schedules are appropriately performed according to the schedule situation. The use efficiency of each processor can be improved.
[0031]
Next, the operation of the task scheduling system of this embodiment when task scheduling is performed for each task set whose dependency is shown by the task graph of FIG. 3 will be described. In this task graph, the processors PE1 to PE3 are specified, and there is no processor that is not specified for any task. Therefore, as shown in the process of step A2 in FIG. PE1 assigned to the task A having the highest priority is included in the design target. Then, forward task scheduling from task A to task F is performed by the processing of steps A4 and A5.
[0032]
In forward task scheduling, the execution time of each of the tasks A to F is a time that is later than the placement time of the task A having the highest priority and is the earliest available time of the designated processor. When the task is a transfer task using the bus 15, the time when the transfer task uses the bus is reflected in the bus use information. If the task is a task for transferring data to a task that designates a processor that is not included in the design target, the processor that is not the design target is included in the design target. For example, since the task F is a task that performs data transfer to the task I that designates PE2, the task scheduling system of this embodiment includes PE2 in the design target processor. Thereafter, the task specifying PE2 is also included in the scheduling target.
[0033]
Next, the task scheduling system according to the present embodiment designs task I that triggered PE2 to be included in the design target, but task G having a high forward priority in which PE2 is specified has not been placed. Therefore, for the tasks having higher priority than task I, task scheduling is performed in the reverse direction in order from the lower priority tasks by the processes of steps A6 and A7.
[0034]
In this reverse task schedule, the priority in the reverse direction is the highest among the subsequent tasks for which the processor to be designed is specified and the tasks for which the subsequent tasks for which the processor is not specified have been designed. Choose a lower task. However, subsequent tasks having a CP (Critical Path) value lower than the task that caused the processor to be included in the design target (for example, Task I) are not included in the above-described subsequent tasks. The task placement time refers to the task placement list and the bus usage information, and the time before the task placement time that caused the processor to be included in the design target, that is, the latest time that can be placed And In the task graph of FIG. 3, assuming that the task having the lowest priority in the reverse direction after the task I is designed is the task J, the task selection unit 225 places the task J immediately before the task I.
[0035]
When the task G is designed, since the highest priority task in the forward direction of the processor (PE1, PE2) that is the design target is designed, the task scheduling system according to the present embodiment again performs the forward task. Perform a task schedule. After the task L is designed, PE3 is included in the design object by the trigger generator 221 and the task schedule in the reverse direction is started. When the task M is designed, the forward task schedule is performed again.
[0036]
The schedule result of the task scheduling system of this embodiment is shown in FIG. FIG. 5A shows the scheduling result of the task scheduling system of this embodiment, and FIG. 5B shows the scheduling result of the conventional task scheduling system. As shown in FIG. 5, in each processor, it can be seen that there is no time during which no task is executed between the time when the first task is executed and the time when the last task is executed.
[0037]
In the task scheduling system of the present embodiment, the task selection unit 225 refers to the bus usage information stored in the bus usage information storage unit 33 for the transfer task that transfers data using the bus 15, and Determine the execution time of. First, it is assumed that the task allocation list of each task specifying the processor PE1 is as shown in FIG. 6A, and the bus use information at that time is as shown in FIG. Consider the case where task 4 is scheduled. After deciding to arrange task 4 at time 4, task selecting means 225 determines whether or not the use of the bus collides with other tasks arranged earlier when task 4 is arranged at time 4. To check. As shown in FIG. 6B, at time 4, task B cannot use task 4 because it uses the bus. Therefore, in the task scheduling system of this embodiment, among the times after time 4, task 4 is arranged at time 6, which is the time when bus 15 is not used for other tasks.
[0038]
When the use efficiency of each processor is increased by using the task scheduling system of this embodiment, the processing cost of the task is reduced, and the periodic task can be processed at high speed. When performing periodic processing of each task shown in the task graph of FIG. 3, in the conventional task scheduling system, as shown in FIG. 5 (b), between the execution of the first task and the execution of the final task. In each processor, there is a time when no task is executed. Therefore, for example, processor PE3 requires 11 cycles to execute all tasks. On the other hand, in the task scheduling system of this embodiment, as shown in FIG. 5A, the execution time for each processor is 6 cycles. Assuming that the processor usage efficiency is the ratio of the time during which the processor is actually executing the task to the time from the start time of the first task to the end time of the last task in each processor, as shown in FIG. In the conventional task scheduling system, the processor usage efficiency is 62%, whereas in the task scheduling system of the present embodiment in FIG. 5A, the processor usage efficiency is 100%.
[0039]
(Second Embodiment)
Next, a task scheduling system according to a second embodiment of this invention will be described with reference to the drawings. FIG. 7 is a block diagram showing the configuration of the task scheduling system of this embodiment. As shown in FIG. 7, the task scheduling system 9 of this embodiment is different from the task scheduling system 8 of FIG. 2 in that a data processing unit 5 is provided instead of the data processing unit 2. The data processing unit 5 includes a task graph generation unit 21, a task placement unit 24, and a task rearrangement unit 23. The task placement unit 24 performs task scheduling by determining the execution time of each task based on the task graph stored in the task graph storage unit 31 as in the task placement unit 22 of FIG. The task allocation list is stored in the task allocation list storage unit 32, and the bus usage information in the bus usage information storage unit 34 is updated in accordance with the scheduling result. The task rearrangement unit 23 rearranges tasks on the task arrangement list stored in the task arrangement list storage unit 32.
[0040]
The data storage unit 6 includes a task graph storage unit 31, a task arrangement list storage unit 32, and a bus usage information storage unit 34. Similarly to the bus usage information storage unit 33 in FIG. 2, the bus usage information storage unit 34 stores a time when the transfer task can use the bus. When the task allocation unit 24 updates the bus use information by performing the above-described task scheduling, the task allocation unit 24 stores all the possible allocation times at which the task can use the bus 15. The placement possible time is the time when the preceding task with the closest placement time to the task is placed among the preceding tasks of the task, and the subsequent task with the placement time closest to the task among the subsequent tasks of the task. The time between the set time and the time within the settable range in which the critical path value is equal among the tasks specifying the processor specified by the task. Therefore, in order to set the task placement possible time, it is necessary to determine the placement times of all preceding tasks and subsequent tasks of the task.
[0041]
FIG. 8 is a diagram showing the arrangement possible time in the task scheduling system of this embodiment. If the task graph is as shown in FIG. 8A, the task B can be placed between the execution times of the task A and the task D. Therefore, as shown in FIG. 8 (b), task B can be arranged at times 2 and 3, and as shown in FIGS. 8 (c) and 8 (d), task B and task C have critical path values. Are the same, the execution times can be switched.
[0042]
When the task placement unit 24 places a transfer task by the task placement unit 24, the task rearrangement unit 23 checks the data transfer waiting time of the task. In the task scheduling system of the present embodiment, the bus 15 cannot be used at the time of scheduling in the forward direction, so that the transfer task cannot be arranged at an early time even though the processor is free, or the bus cannot be used at the time of scheduling in the reverse direction. If the transfer task cannot be arranged at a later time even though the processor is free, it is determined that the data transfer wait state occurs. When the data transfer waiting time occurs, the task relocation unit 24 tries the task relocation process.
[0043]
The task rearrangement means 24 temporarily arranges the transfer task at a time when no transfer waiting time occurs. Temporary placement time is the earliest time when no processor vacancy occurs in the forward schedule and the latest time when no processor vacancy occurs in the reverse schedule.
[0044]
Next, the task relocation unit 24 refers to the bus usage information to find a task that causes a bus collision with the task that has been temporarily allocated, and checks the range in which the transfer task can be moved. If the bus collision partner's transfer task can be moved within the range where the bus collision does not occur at the destination of the transfer, the execution time of the transfer task of the bus collision partner is replaced with the instruction that moved, and the transfer that was temporarily placed The task execution time is fixed at that time. If the transfer task of the bus collision partner cannot be moved to another time, the temporary placement time of the transfer task is shifted by one cycle. In the forward schedule, the shift time is set to a time that is one cycle later than the time at which temporary placement was initially performed, and the reverse schedule is set to a time that is one cycle earlier than the time at which temporary placement was initially performed.
[0045]
When the rearrangement of the transfer task is completed, the task rearrangement unit 23 calculates the execution time of the task that has been temporarily allocated, the rearrangement time of the transfer task that causes a bus collision with the task, the rearranged transfer task, and the execution time. The execution time of the replaced task is reflected in the task allocation list stored in the task allocation list storage unit 32, and the bus usage time of the transfer task after the rearrangement is reflected in the bus usage information stored in the bus usage information storage unit 32. Let
FIG. 9 is a flowchart showing the operation of the task rearrangement means 23 in the task scheduling system of this embodiment. As shown in FIG. 9, first, the task rearrangement unit 23 refers to the task arrangement list created by the task arrangement unit 24 and stored in the task arrangement list storage unit 32, and uses the bus 15 among the tasks. It is determined whether or not there is a transfer waiting time for the transfer task (step C1). If there is a transfer waiting time, the task rearrangement means 23 temporarily arranges the transfer task at a time when no transfer wait occurs (step C2). After step C2, the task relocation means 23 refers to the bus usage information stored in the bus usage information storage unit 34 and detects whether there is a task causing a bus collision with the task that has been temporarily allocated in step C2. If there is such a task, whether or not the task can be rearranged is detected by referring to the time when the task can be placed (step C3). In step C3, if the task causing the bus collision is not relocatable, the temporarily placed task is temporarily placed at another time (step C4), and the process returns to step C3.
[0046]
In step C3, if a task causing a bus collision can be rearranged, the task is rearranged, the temporary placement performed in step C2 is confirmed (step C5), and the process is terminated. In the task scheduling system of the present embodiment, after the rearrangement by the task rearrangement unit 23 is completed, if the allocation of all tasks is not completed, the task allocation unit 24 schedules the task again.
[0047]
FIG. 10 is a diagram illustrating an example of bus usage information stored in the bus usage information storage unit 34 in the task scheduling system of the present embodiment. The transfer task is currently arranged as shown in FIG. 10A, and the bus use information is as shown in FIG. 10B. In the task scheduling system of this embodiment, when a data transfer waiting state occurs in the transfer task arrangement, the task relocation means 23 tries to reallocate the task 4 at time 4 ( 4clk) shows a case of temporary arrangement. The task relocation means 23 refers to the bus usage information stored in the bus usage information storage unit 34, detects a task that caused a bus collision with the task that has been temporarily allocated, and moves the allocation time of the transfer task. The possible range, i.e., the possible arrangement time is examined. In FIG. 10, task B is a bus collision partner, and the time at which task B can be arranged is time 3 and time 4. Therefore, in the task scheduling system of the present embodiment, task B can be placed at time 3, so the placement time of task B is switched from time 4 to time 3. By this replacement, the task B uses the bus 15 at time 3, and the task 4 can use the bus 15 at time 4. However, if there is no task B placement possible time other than time 4, the task rearrangement unit 23 sets the temporary placement time of task 4 to time 5 and performs the above-described processing at time 5. The task relocation unit 23 repeats this operation until no bus collision occurs.
[0048]
The task rearrangement means 23 designs the transfer task when the task can be arranged, and executes the transfer task execution time, the rearranged task execution time, and the rearrangement that have been temporarily arranged. The execution time of the task whose execution order has been changed is reflected in the task arrangement list stored in the task arrangement list storage unit 32. Further, the task relocation unit 23 reflects the bus use time of the transfer task after the relocation in the bus use information stored in the bus use information storage unit 34. By exchanging tasks as described above, it is possible to place the task 4 arranged at the time 6 at the time 4 and shorten the data transfer waiting time.
[0049]
Further, even if there is no other time when the task of the bus collision partner can be arranged, it is possible to arrange the task at the time when it was initially arranged. Therefore, in the task scheduling system of this embodiment, the task data transfer waiting time can be made the same as or shorter than that of the task scheduling system of the first embodiment.
[0050]
As described above, in the task scheduling system of this embodiment, when a data transfer task is arranged, if a transfer waiting time occurs, the task is rearranged to reduce the transfer waiting time. be able to.
[0051]
As described above, the task scheduling systems 8 and 9 are configured by a computer memory and a CPU (central processing unit), and by loading a program for realizing the functions of the above-described units into the memory and executing the program. You may implement | achieve the function. This program may be recorded on a magnetic disk, semiconductor memory, CD-ROM, or other computer-readable recording medium.
[0052]
In the task scheduling system of this embodiment, the priority of each task is obtained based on the critical path value, the number of preceding tasks (when creating a forward direction list), and the number of subsequent tasks (when creating a backward direction list). However, the present invention is not limited to this, and the task priority may be obtained under exactly the same conditions when the forward list is created and when the backward list is created. The CP method, CP / The task priority may be obtained using other methods such as the MISF method and the CP / DT / MISF method.
[0053]
【The invention's effect】
As described above, the task scheduling system of the present invention has the following effects.
(1) A trigger generation process that determines the design start of each processor is provided, and the task designated by the processor is not allocated until the process is executed. Depending on the design status of the highest priority task of each processor, the forward direction and the reverse direction Since the task schedule is appropriately performed, it is possible to reduce the waiting state of the task for which the execution processor is designated, thereby improving the use efficiency of the processor.
(2) The transfer task allocation possible time is stored in the bus use information, and when a wait state occurs in the data transfer task, the task can be rearranged to shorten the data transfer wait state. , The use efficiency of the processor can be improved.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an environment in which a task scheduling system according to a first embodiment of this invention operates.
FIG. 2 is a block diagram illustrating a configuration of a task scheduling system according to the first embodiment of this invention.
FIG. 3 is a diagram illustrating an example of a task graph.
FIG. 4 is a flowchart illustrating an operation of the task scheduling system according to the first embodiment of this invention.
FIG. 5 is a diagram illustrating a schedule result of the task scheduling system according to the first embodiment of this invention.
FIG. 6 is a diagram showing a task allocation list and bus usage information in the task scheduling system according to the first embodiment of this invention.
FIG. 7 is a block diagram illustrating a configuration of a task scheduling system according to a second embodiment of this invention.
FIG. 8 is a diagram showing an arrangement possible time in the task scheduling system of the second exemplary embodiment of the present invention.
FIG. 9 is a flowchart showing the operation of task relocation means in the task scheduling system of the second exemplary embodiment of the present invention.
FIG. 10 is a diagram illustrating an example of bus usage information stored in a bus usage information storage unit in the task scheduling system according to the second embodiment of this invention.
FIG. 11 is a diagram showing a configuration of a conventional task scheduling system.
[Explanation of symbols]
1 Task input means
2, 5 Data processing section
3, 6 Data storage
4 Execution time output means
8,9 Task scheduling system
15 bus
21 Task graph generator
22, 24, 51 Task placement means
23 Task relocation means
31 Task graph storage
32 Task allocation list storage
33, 34 Bus usage information storage unit
61 Task graph
62 Task allocation list
63 Bus use information
100 multiprocessor system
221 Trigger generator
222 Task registration means
223 Forward list
224 reverse list
225 Task selection means
511 Task registration means
512 Executable task queue
513 Processor designated task queue
514 Task selection means
A1-A8, C1-C5 steps

Claims (33)

複数のプロセッサを備えるマルチプロセッサシステムで複数のタスクのマルチタスク処理を行う場合に、実行プロセッサが指定されているタスクを含む前記各タスクの依存関係を示すタスクグラフに基づいて、前記各タスクのタスクスケジューリングを前記各タスクの実行前に行う、静的なタスクスケジューリングシステムにおいて、
優先度の高いタスクから順に登録される順方向リストと、
優先度の低いタスクから順に登録される逆方向リストと、
前記順方向リストと前記逆方向リストとにタスクを登録するタスク登録手段と、
前記順方向リストと前記逆方向リストとを所定の条件に応じて選択し、前記選択されたリストに基づいて前記タスクの実行時刻を決定するタスク選択手段とを備えることを特徴とするタスクスケジューリングシステム。
When performing multitask processing of a plurality of tasks in a multiprocessor system including a plurality of processors , the task of each task is based on a task graph indicating a dependency relationship of each task including a task for which an execution processor is specified. In a static task scheduling system in which scheduling is performed before execution of each task ,
A forward list that is registered in order from the highest priority task,
A reverse list registered in order of low priority tasks,
Task registration means for registering tasks in the forward direction list and the backward direction list;
A task scheduling system comprising: task selection means for selecting the forward direction list and the backward direction list according to a predetermined condition, and determining an execution time of the task based on the selected list. .
バスを介してデータ転送を行う転送タスクの実行時刻と、該実行時刻を変化させても他の転送タスクの実行時刻が変化しない前記転送タスクの実行時刻の設定可能範囲とが登録されているバス使用情報と、
前記バス使用情報を参照して、複数の転送タスクの実行時刻が重複する場合には、前記設定可能範囲の中で前記転送タスクの実行時刻を再配置するタスク再配置手段と、をさらに備える請求項1記載のタスクスケジューリングシステム。
A bus in which the execution time of a transfer task that performs data transfer via the bus and the settable range of the execution time of the transfer task in which the execution time of another transfer task does not change even if the execution time is changed are registered Usage information and
And a task relocation unit configured to relocate the execution time of the transfer task within the settable range when the execution times of a plurality of transfer tasks overlap with reference to the bus usage information. Item 1. The task scheduling system according to Item 1.
前記転送タスクと実行時刻が最も近い直接先行タスクの実行時刻と、前記転送タスクと実行時刻が最も近い直接後続タスクの実行時刻との間で、クリティカルパス値が等しい範囲を前記設定可能範囲とする請求項2記載のタスクスケジューリングシステム。  A range in which the critical path value is equal between the execution time of the direct preceding task whose execution time is closest to the transfer task and the execution time of the direct subsequent task whose execution time is closest to the transfer task is set as the settable range. The task scheduling system according to claim 2. 設計対象となるプロセッサを決定するトリガ発生器を更に有し、前記タスクは前記設計対象と決定されたプロセッサを実行プロセッサとして配置されることを特徴とする請求項1からのいずれか1項記載のタスクスケジューリングシステム。The trigger generator which determines the processor used as a design object is further provided, and the said task is arrange | positioned by using the processor determined as the said design object as an execution processor, The any one of Claim 1 to 3 characterized by the above-mentioned. Task scheduling system. 前記所定の条件は、
前記設計対象と決定されたプロセッサにおいて順方向の優先度が最も高いタスクが配置済みであることを特徴とする請求項記載のタスクスケジューリングシステム。
The predetermined condition is:
5. The task scheduling system according to claim 4 , wherein a task having a highest priority in the forward direction has already been arranged in the processor determined as the design target.
前記トリガ発生器は、実行時刻が決定されていない全ての未決定タスクが、設計対象に含まれていないプロセッサでの実行を指定されている場合には、前記未決定タスクのうち、最も順方向の優先度の高いタスクによって指定されているプロセッサを設計対象に含め、
設計対象の第1のプロセッサを指定するタスクであって、当該プロセッサと設計対象に含まれていない第2のプロセッサとの間にデータ転送を行うタスクをスケジューリング対象とする場合には、前記第2のプロセッサを設計対象に含める請求項または記載のタスクスケジューリングシステム。
The trigger generator has the most forward direction among the undecided tasks when all the undecided tasks whose execution times have not been determined are designated to be executed by a processor not included in the design target. Include the processor specified by the high priority task in the design object,
When a task for designating a first processor to be designed and performing data transfer between the processor and a second processor not included in the design target is the scheduling target, task scheduling system according to claim 4 or 5, wherein inclusion of processors designed.
前記タスクの優先度は、順方向と逆方向とで等しく与えられ、前記タスクグラフにおける終端のタスクから前記タスクに至るパス長が長いほど高くなるように与えられる請求項1からのいずれか1項記載のタスクスケジューリングシステム。Priority of the task is given equal between the forward and reverse directions, the one from the end of the task in the task graph the path length reaching the task claims 1 given so as to be higher as long 6 1 The task scheduling system described in the section. 順方向の優先度としては、前記タスクグラフにおける終端のタスクからタスクに至るパス長が長いタスクに高い優先度が与えられ、パス長が同じタスク同士では直接の後続タスク数が多いタスクに高い優先度が与えられ、
逆方向の優先度としては、前記タスクグラフにおける終端のタスクからタスクに至るパス長が長いタスクに高い優先度が与えられ、パス長が同じタスク同士では直接の先行タスク数が少ないタスクに高い優先度が与えられる請求項1からのいずれか1項記載のタスクスケジューリングシステム。
As a priority in the forward direction, a high priority is given to a task having a long path length from the last task to the task in the task graph, and a task having the same number of subsequent tasks among tasks having the same path length has a high priority. A degree,
As the priority in the reverse direction, a high priority is given to a task having a long path length from the terminal task to the task in the task graph, and a task having the same path length has a high priority to a task having a small number of direct preceding tasks. task scheduling system according to any one of claims 1 degree is given 6.
前記タスク登録手段は、
前記順方向リストに前記タスクを登録する場合には、前記タスクの直接先行タスクの実行時刻が決定されているか、前記直接先行タスクの実行時刻が未決定であっても当該直接先行タスクが設計対象に含まれていないプロセッサでの実行が指定されているタスクを前記優先度に従って順方向の優先度の高い順に登録し、
前記逆方向リストに前記タスクを登録する場合には、プロセッサが設計対象となるきっかけとなったタスクより逆方向に優先度の低いタスクを除くタスクの直接後続タスクの実行時刻が決定されているか、当該直接後続タスクの実行時刻が未決定であっても当該直接後続タスクが設計対象に含まれていないプロセッサでの実行が指定されている場合には、前記タスクを前記優先度に従って逆方向の優先度の低い順に登録する請求項または記載のタスクスケジューリングシステム。
The task registration means includes:
When registering the task in the forward direction list, even if the execution time of the task directly preceding the task is determined or the execution time of the task directly preceding is not determined, Registering tasks specified to be executed by processors not included in the order of priority in the forward direction according to the priorities,
When registering the task in the reverse direction list, whether the execution time of the task directly following the task excluding the task whose priority is lower in the reverse direction than the task that caused the processor to be designed is determined, Even if the execution time of the direct successor task is undecided, if execution of the direct successor task is specified on a processor that is not included in the design target, the task is given priority in the reverse direction according to the priority. The task scheduling system according to claim 7 or 8 , wherein the task scheduling system is registered in ascending order.
前記タスク選択手段は、
設計対象になっているプロセッサで実行が指定されているタスクのうち、順方向で最も優先度の高いタスクの実行時刻が配置済みである場合には、前記順方向リストを選択し、
当該タスクの実行時刻が配置済みでない場合には、前記逆方向リストを選択する請求項からのいずれか1項記載のタスクスケジューリングシステム。
The task selection means includes
If the execution time of the task with the highest priority in the forward direction has already been placed among the tasks designated for execution by the processor that is the design target, select the forward direction list,
The task scheduling system according to any one of claims 4 to 9 , wherein when the execution time of the task is not already arranged, the backward list is selected.
前記タスク選択手段は、
前記順方向リストを選択した場合には、設計対象になっているプロセッサで実行が指定されているタスクのうち、順方向の優先度が最も高いタスクの実行時刻か、先行タスクの直後の実行時刻かのどちらかの遅い時刻のうち、実行可能な最も早い時刻にスケジュール対象のタスクの実行時刻を配置し、
前記逆方向リストを選択した場合には、プロセッサで設計を開始するきっかけとなったタスクの実行時刻か、後続タスクの直前の時刻かのどちらか早い方の時刻のうち、実行可能な最も遅い時刻にスケジュール対象のタスクの実行時刻を配置する請求項から10のいずれか1項記載のタスクスケジューリングシステム。
The task selection means includes
When the forward direction list is selected, the execution time of the task with the highest forward priority among the tasks specified to be executed by the processor that is the design target, or the execution time immediately after the preceding task The execution time of the scheduled task is placed at the earliest time that can be executed,
When the reverse direction list is selected, the latest execution time among the execution time of the task that triggered the design start by the processor or the time immediately before the subsequent task, whichever comes first task scheduling system according to any one of claims 4 to 10, placing the execution time-scheduled tasks.
複数のプロセッサを備えるマルチプロセッサシステムで複数のタスクのマルチタスク処理を行う場合に、実行プロセッサが指定されているタスクを含む前記各タスクの依存関係を示すタスクグラフに基づいて、前記各タスクのタスクスケジューリングを前記各タスクの実行前に行う、静的なタスクスケジューリング方法において、
優先度の高いタスクから順に順方向リストに登録する順方向登録ステップと、
優先度の低いタスクから順に逆方向リストに登録する逆方向登録ステップと、
前記順方向リストと前記逆方向リストとを所定の条件に応じて選択し、前記選択されたリストに基づいて前記タスクの実行時刻を決定する時刻決定ステップとを有することを特徴とするタスクスケジューリング方法。
When performing multitask processing of a plurality of tasks in a multiprocessor system including a plurality of processors , the task of each task is based on a task graph indicating a dependency relationship of each task including a task for which an execution processor is specified. In a static task scheduling method in which scheduling is performed before execution of each task ,
A forward registration step for registering in the forward list in order from the highest priority task;
A backward registration step of registering in the backward list in order from the task with the lowest priority;
A task scheduling method comprising: a time determination step of selecting the forward direction list and the backward direction list according to a predetermined condition, and determining an execution time of the task based on the selected list. .
バスを介してデータ転送を行う転送タスクの実行時刻と、該実行時刻を変化させても他の転送タスクの実行時刻が変化しない設定可能範囲とをバス使用情報に登録する使用情報登録ステップと、
前記バス使用情報を参照して、複数の転送タスクの実行時刻が重複する場合には、前記設定可能範囲の中で前記転送タスクの実行時刻を再配置する再配置ステップと、をさらに有する請求項12記載のタスクスケジューリング方法。
A usage information registration step of registering in the bus usage information the execution time of a transfer task that performs data transfer via the bus and the settable range in which the execution time of other transfer tasks does not change even if the execution time is changed;
And a rearrangement step of rearranging the execution times of the transfer tasks within the settable range when the execution times of a plurality of transfer tasks overlap with reference to the bus usage information. 13. The task scheduling method according to 12 .
前記転送タスクと実行時刻が最も近い直接先行タスクの実行時刻と、前記転送タスクと実行時刻が最も近い直接後続タスクの実行時刻との間で、クリティカルパス値が等しい範囲を前記設定可能範囲とする請求項13記載のタスクスケジューリング方法。A range in which the critical path value is equal between the execution time of the direct preceding task whose execution time is closest to the transfer task and the execution time of the direct subsequent task whose execution time is closest to the transfer task is set as the settable range. The task scheduling method according to claim 13 . 設計対象となるプロセッサを決定する対象決定ステップを更に有し、前記タスクは前記設計対象と決定されたプロセッサを実行プロセッサとして配置されることを特徴とする請求項12から14のいずれか1項記載のタスクスケジューリング方法。Further comprising a target determining step of determining a processor to be designed, the task is any one of claims 12 to 14, characterized in that it is arranged a processor determined with the designed as an execution processor Task scheduling method. 前記所定の条件は、
前記設計対象と決定されたプロセッサにおいて順方向の優先度が最も高いタスクが配置済みであることを特徴とする請求項15記載のタスクスケジューリング方法。
The predetermined condition is:
16. The task scheduling method according to claim 15 , wherein a task having a highest priority in the forward direction has already been arranged in the processor determined as the design target.
前記対象決定ステップでは、
実行時刻が決定されていない全ての未決定タスクが、設計対象に含まれていないプロセッサでの実行を指定されている場合には、前記未決定タスクのうち、順方向の優先度の最も高いタスクによって指定されているプロセッサを設計対象に含め、
設計対象の第1のプロセッサを指定するタスクのタスクスケジュールを行い、当該プロセッサと設計対象に含まれていない第2のプロセッサとの間にデータ転送を行うタスクをスケジューリングする場合には、前記第2のプロセッサを設計対象に含める請求項15または16記載のタスクスケジューリング方法。
In the object determining step,
If all undecided tasks whose execution times have not been determined are specified to be executed by a processor not included in the design target, the task with the highest priority in the forward direction among the undecided tasks Include the processor specified by
When scheduling a task for designating a first processor to be designed and scheduling a task for transferring data between the processor and a second processor not included in the design target, the second The task scheduling method according to claim 15 or 16 , wherein the processor is included in the design object.
前記タスクの優先度を、順方向と逆方向とで等しく与え、前記タスクグラフにおける終端のタスクから前記タスクに至るパス長が長いほど高くなるように与える請求項12から17のいずれか1項記載のタスクスケジューリング方法。The priority of the task, given equal between the forward and reverse directions, any one of claims of the path length from the end of the task through to the task in the task graph gives to be higher longer claims 12 to 17 Task scheduling method. 順方向の優先度として、前記タスクグラフにおける終端のタスクからタスクに至るパス長が長いタスクに高い優先度を与え、パス長が同じタスク同士では直接の後続タスク数が多いタスクに高い優先度を与え、
逆方向の優先度として、前記タスクグラフにおける終端のタスクからタスクに至るパス長が長いタスクに高い優先度を与え、パス長が同じタスク同士では直接の先行タスク数が少ないタスクに高い優先度を与える請求項12から17のいずれか1項記載のタスクスケジューリング方法。
As a priority in the forward direction, a high priority is given to a task having a long path length from the last task to the task in the task graph, and a task having a large number of direct subsequent tasks is assigned a high priority between tasks having the same path length. Give,
As a priority in the reverse direction, a high priority is given to a task having a long path length from the terminal task to the task in the task graph, and a task having a small number of direct preceding tasks is assigned a high priority between tasks having the same path length. task scheduling method of any one of claims 12 to 17 give.
前記順方向登録ステップでは、前記タスクの直接先行タスクの実行時刻が決定されているか、前記直接先行タスクの実行時刻が未決定であっても当該直接先行タスクが設計対象に含まれていないプロセッサでの実行が指定されている場合には、前記タスクを前記優先度に従って順方向の優先度の高い順に登録し、
前記逆方向登録ステップでは、プロセッサが設計対象となるきっかけとなったタスクより逆方向に優先度の低いタスクを除くタスクの直接後続タスクの実行時刻が決定されているか、当該直接後続タスクの実行時刻が未決定であっても当該直接後続タスクが設計対象に含まれていないプロセッサでの実行が指定されている場合には、前記優先度に従って逆方向の優先度の低い順に前記タスクを登録する請求項18または19記載のタスクスケジューリング方法。
In the forward registration step, the execution time of the directly preceding task of the task is determined, or even if the execution time of the directly preceding task is not determined, the direct preceding task is not included in the design target. If execution is specified, the tasks are registered in the order of high priority in the forward direction according to the priority,
In the backward registration step, the execution time of the task directly following the task excluding the task whose priority is lower in the reverse direction than the task that triggered the design target is determined, or the execution time of the task directly following In the case where execution on a processor that is not included in the design object is specified even if the direct successor task is not yet determined, the tasks are registered in descending order of priority in the reverse direction according to the priority. Item 20. A task scheduling method according to Item 18 or 19 .
前記時刻決定ステップでは、
設計対象になっているプロセッサで実行が指定されているタスクのうち、順方向の優先度の最も高いタスクの実行時刻が配置済みである場合には、前記順方向リストを選択し、
当該タスクの実行時刻が配置済みでない場合には、前記逆方向リストを選択する請求項15から20のいずれか1項記載のタスクスケジューリング方法。
In the time determination step,
If the execution time of the task with the highest priority in the forward direction has already been placed among the tasks specified to be executed by the processor that is the design target, select the forward list,
The task scheduling method according to any one of claims 15 to 20 , wherein when the execution time of the task is not already arranged, the backward list is selected.
前記時刻決定ステップでは、
前記順方向リストを選択した場合には、設計対象になっているプロセッサで実行が指定されているタスクのうち、順方向の優先度が最も高いタスクの実行時刻か、先行タスクの直後の実行時刻かのどちらかの遅い時刻のうち、実行可能な最も早い時刻に、スケジュール対象のタスクを配置し、
前記逆方向リストを選択した場合には、プロセッサで設計を開始するきっかけとなったタスクの実行時刻か、後続タスクの直前の時刻かのどちらか早い方の時刻のうち、実行可能な最も遅い時刻に、スケジュール対象のタスクを配置する請求項15から21のいずれか1項記載のタスクスケジューリング方法。
In the time determination step,
When the forward direction list is selected, the execution time of the task with the highest forward priority among the tasks specified to be executed by the processor that is the design target, or the execution time immediately after the preceding task Place the task to be scheduled at the earliest possible time of either of these later times,
When the reverse direction list is selected, the latest execution time among the execution time of the task that triggered the design start by the processor or the time immediately before the subsequent task, whichever comes first The task scheduling method according to any one of claims 15 to 21 , wherein a task to be scheduled is arranged on the task.
複数のプロセッサを備えるマルチプロセッサシステムで複数のタスクのマルチタスク処理を行う場合に、実行プロセッサが指定されているタスクを含む前記各タスクの依存関係を示すタスクグラフに基づいて、前記各タスクのタスクスケジューリングを前記各タスクの実行前に行う、静的なスケジューリングをコンピュータに実行させるプログラムであって、
優先度の高いタスクから順に順方向リストに登録し、
優先度の低いタスクから順に逆方向リストに登録し、
前記順方向リストと前記逆方向リストとを所定の条件に応じて選択し、前記選択されたリストに基づいて前記タスクの実行時刻を決定する処理をコンピュータに実行させるためのプログラム。
When performing multitask processing of a plurality of tasks in a multiprocessor system including a plurality of processors , the task of each task is based on a task graph indicating a dependency relationship of each task including a task for which an execution processor is specified. A program that performs scheduling before execution of each task, and that causes a computer to execute static scheduling,
Register to the forward list in order from the highest priority task,
Register to the reverse list in order from the lowest priority task,
A program for causing a computer to execute a process of selecting the forward direction list and the backward direction list according to a predetermined condition and determining an execution time of the task based on the selected list.
バスを介してデータ転送を行う転送タスクの実行時刻と、該実行時刻を変化させても他の転送タスクの実行時刻が変化しない設定可能範囲とをバス使用情報に登録し、
前記バス使用情報を参照して、複数の転送タスクの実行時刻が重複する場合には、前記設定可能範囲の中で前記転送タスクの実行時刻を再配置する処理をコンピュータにさらに実行させるための請求項23記載のプログラム。
Register the execution time of the transfer task that performs data transfer via the bus and the settable range in which the execution time of other transfer tasks does not change even if the execution time is changed, in the bus usage information,
A request for causing the computer to further execute a process of rearranging the execution times of the transfer tasks within the settable range when the execution times of a plurality of transfer tasks overlap with reference to the bus usage information. Item 24. The program according to Item 23 .
前記転送タスクと実行時刻が最も近い直接先行タスクの実行時刻と、前記転送タスクと実行時刻が最も近い直接後続タスクの実行時刻との間で、クリティカルパス値が等しい範囲を前記設定可能範囲とする請求項24記載のプログラム。A range in which the critical path value is equal between the execution time of the direct preceding task whose execution time is closest to the transfer task and the execution time of the direct subsequent task whose execution time is closest to the transfer task is set as the settable range. The program according to claim 24 . 設計対象となるプロセッサを決定し、前記タスクは前記設計対象と決定されたプロセッサを実行プロセッサとして配置される処理をコンピュータにさらに実行させるための請求項23から25のいずれか1項記載のプログラム。The program according to any one of claims 23 to 25 , wherein a processor to be designed is determined, and the task causes the computer to further execute a process in which the processor determined to be the design target is set as an execution processor. 前記所定の条件は、
前記設計対象と決定されたプロセッサにおいて順方向の優先度が最も高いタスクが配置済みであることを特徴とする請求項26記載のプログラム。
The predetermined condition is:
27. The program according to claim 26 , wherein a task having the highest priority in the forward direction has already been arranged in the processor determined as the design target.
実行時刻が決定されていない全ての未決定タスクが、設計対象に含まれていないプロセッサでの実行を指定されている場合には、前記未決定タスクのうち、順方向の優先度の最も高いタスクによって指定されているプロセッサを設計対象に含め、
設計対象の第1のプロセッサを指定するタスクのタスクスケジュールを行い、当該プロセッサと設計対象に含まれていない第2のプロセッサとの間にデータ転送を行うタスクをスケジューリングする場合には、前記第2のプロセッサを設計対象に含める請求項26または27記載のプログラム。
If all undecided tasks whose execution times have not been determined are specified to be executed by a processor not included in the design target, the task with the highest priority in the forward direction among the undecided tasks Include the processor specified by
When scheduling a task for designating a first processor to be designed and scheduling a task for transferring data between the processor and a second processor not included in the design target, the second 28. The program according to claim 26 or 27 , wherein the processor is included in a design object.
前記タスクの優先度を、順方向と逆方向とで等しく与え、前記タスクグラフにおける終端のタスクから前記タスクに至るパス長が長いほど高くなるように与える請求項23から28のいずれか1項記載のプログラム。The priority of the task, given equal between the forward and reverse directions, according to any one of claims 23 to 28, given as the path length from the end of the task through to the task, the higher longer in the task graph Program. 順方向の優先度として、前記タスクグラフにおける終端のタスクからタスクに至るパス長が長いタスクに高い優先度を与え、パス長が同じタスク同士では直接の後続タスク数が多いタスクに高い優先度を与え、
逆方向の優先度として、前記タスクグラフにおける終端のタスクからタスクに至るパス長が長いタスクに高い優先度を与え、パス長が同じタスク同士では直接の先行タスク数が少ないタスクに高い優先度を与える請求項23から28のいずれか1項記載のプログラム。
As a priority in the forward direction, a high priority is given to a task having a long path length from the last task to the task in the task graph, and a task having a large number of direct subsequent tasks is assigned a high priority between tasks having the same path length. Give,
As a priority in the reverse direction, a high priority is given to a task having a long path length from the terminal task to the task in the task graph, and a task having a small number of direct preceding tasks is assigned a high priority between tasks having the same path length. 29. A program according to any one of claims 23 to 28 .
前記タスクの直接先行タスクの実行時刻が決定されているか、前記直接先行タスクの実行時刻が未決定であっても当該直接先行タスクが設計対象に含まれていないプロセッサでの実行が指定されている場合には、前記タスクを前記優先度に従って順方向の優先度の高い順に前記順方向リストに登録し、
プロセッサが設計対象となるきっかけとなったタスクより逆方向に優先度の低いタスクを除くタスクの直接後続タスクの実行時刻が決定されているか、当該直接後続タスクの実行時刻が未決定であっても当該直接後続タスクが設計対象に含まれていないプロセッサでの実行が指定されている場合には、前記優先度に従って逆方向の優先度の低い順に前記タスクを前記逆方向リストに登録する請求項29または30記載のプログラム。
The execution time of the task that directly precedes the task is determined, or even if the execution time of the task that directly precedes the task is not yet determined, execution on a processor that is not included in the design target is specified. In this case, the task is registered in the forward direction list in descending order of the forward priority according to the priority,
Even if the execution time of the direct successor task of the task excluding the task whose priority is lower in the opposite direction than the task that caused the processor to be designed is determined, or even if the execution time of the direct successor task is undecided claim the direct successor task is when the execution is designated in a processor that is not included in the design target, registers the task in order low reverse priority according to the priority to the reverse list 29 Or 30 programs.
設計対象になっているプロセッサで実行が指定されているタスクのうち、順方向の優先度の最も高いタスクの実行時刻が配置済みである場合には、前記順方向リストを選択し、
当該タスクの実行時刻が配置済みでない場合には、前記逆方向リストを選択する請求項27から31のいずれか1項記載のプログラム。
If the execution time of the task with the highest priority in the forward direction has already been placed among the tasks specified to be executed by the processor that is the design target, select the forward list,
The program according to any one of claims 27 to 31 , wherein when the execution time of the task is not arranged, the backward list is selected.
前記順方向リストを選択した場合には、設計対象になっているプロセッサで実行が指定されているタスクのうち、順方向の優先度が最も高いタスクの実行時刻か、先行タスクの直後の実行時刻かのどちらかの遅い時刻のうち、実行可能な最も早い時刻に、スケジュール対象のタスクを配置し、
前記逆方向リストを選択した場合には、プロセッサで設計を開始するきっかけとなったタスクの実行時刻か、後続タスクの直前の時刻かのどちらか早い方の時刻のうち、実行可能な最も遅い時刻に、スケジュール対象のタスクを配置する請求項27から32のいずれか1項記載のプログラム。
When the forward direction list is selected, the execution time of the task with the highest forward priority among the tasks specified to be executed by the processor that is the design target, or the execution time immediately after the preceding task Place the task to be scheduled at the earliest possible time of either of these later times,
When the reverse direction list is selected, the latest execution time among the execution time of the task that triggered the design start by the processor or the time immediately before the subsequent task, whichever comes first The program according to any one of claims 27 to 32 , wherein a task to be scheduled is arranged on the computer.
JP2001213599A 2001-07-13 2001-07-13 Task scheduling system and method, program Expired - Fee Related JP4206653B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001213599A JP4206653B2 (en) 2001-07-13 2001-07-13 Task scheduling system and method, program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001213599A JP4206653B2 (en) 2001-07-13 2001-07-13 Task scheduling system and method, program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2008036509A Division JP4404228B2 (en) 2008-02-18 2008-02-18 Task scheduling system, method, and program

Publications (2)

Publication Number Publication Date
JP2003029988A JP2003029988A (en) 2003-01-31
JP4206653B2 true JP4206653B2 (en) 2009-01-14

Family

ID=19048546

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001213599A Expired - Fee Related JP4206653B2 (en) 2001-07-13 2001-07-13 Task scheduling system and method, program

Country Status (1)

Country Link
JP (1) JP4206653B2 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6895292B2 (en) * 2003-04-28 2005-05-17 Palo Alto Research Center Inc. Predictive and preemptive planning and scheduling for different job priorities system and method
US9323571B2 (en) * 2004-02-06 2016-04-26 Intel Corporation Methods for reducing energy consumption of buffered applications using simultaneous multi-threading processor
US20080120592A1 (en) * 2006-10-31 2008-05-22 Tanguay Donald O Middleware framework
JP2009070264A (en) * 2007-09-14 2009-04-02 Toshiba Corp Hierarchy scheduling device, hierarchy scheduling method and program
JP5111186B2 (en) * 2008-03-24 2012-12-26 株式会社野村総合研究所 Job processing system and job management method
JP2015038646A (en) * 2010-11-30 2015-02-26 株式会社東芝 Information processing apparatus and information processing method
JP5486034B2 (en) * 2012-03-23 2014-05-07 株式会社エヌ・ティ・ティ・データ Schedule creation method, system and program thereof
US20200042951A1 (en) * 2017-03-31 2020-02-06 Nec Corporation Calculation system, calculation method, and recording medium on which calculation program is recorded
WO2018180740A1 (en) * 2017-03-31 2018-10-04 日本電気株式会社 Calculation system, calculation method and recording medium on which calculation program is recorded
KR102212352B1 (en) * 2018-10-08 2021-02-04 국방과학연구소 Method and apparatus for controlling robots
CN109684060B (en) * 2018-12-21 2023-05-23 中国航空工业集团公司西安航空计算技术研究所 Mixed scheduling method for multiple types of time-critical tasks
CN111832917A (en) * 2020-06-30 2020-10-27 中国船舶重工集团公司第七一六研究所 Fixed point output-oriented distributed manufacturing scheduling method and device

Also Published As

Publication number Publication date
JP2003029988A (en) 2003-01-31

Similar Documents

Publication Publication Date Title
US8276156B2 (en) Task switching based on assigned time slot
JP4693326B2 (en) System and method for multi-threading instruction level using zero-time context switch in embedded processor
US8041707B2 (en) Database management system and method capable of dynamically generating new tasks that can be processed in parallel
JP4206653B2 (en) Task scheduling system and method, program
KR970016979A (en) Queuing system and method of tasks in a multiprocessing system
JP4963018B2 (en) Scheduling method and scheduling apparatus
US7590990B2 (en) Computer system
TW201227521A (en) Non-blocking wait-free data-parallel scheduler
JPH0760415B2 (en) Multitasking data processing system
JP2006155480A (en) Scheduling method, scheduling device and multiprocessor system
US8359588B2 (en) Reducing inter-task latency in a multiprocessor system
JP4241462B2 (en) Control unit and microcomputer
JP2008065713A (en) Multiprocessor system and interrupt control method
JP4404228B2 (en) Task scheduling system, method, and program
WO2007076190A2 (en) Efficient task scheduling by assigning fixed registers to scheduler
KR20010080208A (en) Processing system scheduling
US20050066093A1 (en) Real-time processor system and control method
JP7346649B2 (en) Synchronous control system and method
CN109426562B (en) priority weighted round robin scheduler
JP7204443B2 (en) VEHICLE CONTROL DEVICE AND PROGRAM EXECUTION METHOD
JP5003673B2 (en) Multiprocessing method and multiprocessor system
JP2019204387A (en) Program execution control method and program converter
JPH11249917A (en) Parallel computers, their batch processing method, and storage medium
Burgess et al. BED: a multithreaded kernel for embedded systems
JP2007026235A (en) Verification program execution method in multiprocessor system

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20041207

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20041207

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050221

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060125

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071206

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080702

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080827

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081007

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111031

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121031

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131031

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees