JP5983623B2 - Task placement apparatus and task placement method - Google Patents
Task placement apparatus and task placement method Download PDFInfo
- Publication number
- JP5983623B2 JP5983623B2 JP2013539721A JP2013539721A JP5983623B2 JP 5983623 B2 JP5983623 B2 JP 5983623B2 JP 2013539721 A JP2013539721 A JP 2013539721A JP 2013539721 A JP2013539721 A JP 2013539721A JP 5983623 B2 JP5983623 B2 JP 5983623B2
- Authority
- JP
- Japan
- Prior art keywords
- task
- order
- weight
- dependency
- tasks
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5021—Priority
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Description
本発明は、マルチコアに関し、特に、AMP(Asymmetric Multi Processing)方式のマルチコア向けのタスク配置装置及びタスク配置方法に関する。 The present invention relates to a multi-core, and more particularly to a task placement apparatus and a task placement method for an AMP (Asymmetric Multi Processing) type multi-core.
近年のデジタル機器の高性能化及び低消費電力化要求の高まりを受け、組み込みLSI(Large Scale Integration)に複数のプロセッサ・コア(以下、単にコアとも記載する)を搭載するマルチコア構成が注目を集めている。このLSIのマルチコア化は、システム制御を目的とするリアルタイムシステム等において、重要な技術となっている。マルチコアシステムは、主にSMP(Symmetric Multi Processing)方式とAMP方式とに大別される。
SMP方式は、コアの空き状況、現在実行中のタスクの優先度等に応じてタスクが切り替わり、各タスクが、いずれのコア上でも実行され得る構成となる。このため、SMP方式は、動的に負荷分散を可能とし、システム全体の性能を向上させる。しかし、動的な負荷分散は、リアルタイム性能の予測を困難とする。したがって、SMP方式は、リアルタイムシステムへの適用には適さない。
一方、AMP方式は、各タスクが、特定のコア上で実行される機能分散型の構成となる。このため、AMP方式は、システムの挙動の予測が重要なリアルタイムシステムや、特定のハードウェアが接続されているコアが限定されるシステム等に好適である。
このようなAMP方式のマルチコアシステムは、タスクをどのコアに配置するかに基づき、性能が異なる。このため、AMP方式のマルチコアシステムは、最適な実行状態となるように、様々なタスク配置を探索し、最適配置を決定する必要がある。
特許文献1には、このようなマルチコア向けのタスク配置を支援する装置が記載されている。特許文献1に記載の装置は、始めに、各コアに割り当てられた粒度に関する情報(粒度情報)を取得する。ここで、粒度とは、例えば、プロセッサの処理の単位であり、タスク、関数、関数を構成する処理の総称である。次に、この装置は、取得した粒度情報に基づいて、タスク毎あるいはタスクが有する関数毎に出現回数を算出し、算出した出現回数に関する情報(構造情報)を生成する。また、この装置は、取得された粒度情報に基づいて、タスク毎あるいはタスクが有する関数毎の、他タスクあるいは関数への依存に関する情報(依存情報)を生成する。そして、この装置は、粒度情報、構造情報、および、依存情報に基づいて、異なるコア間に存在する依存関係を表す情報を表示する。この構成に基づき、この特許文献1に記載の装置は、マルチコアシステムにおいて異なるコア間に存在する依存関係をより少なくするタスク配置を支援できる。
In the SMP method, tasks are switched according to the availability of the core, the priority of the task currently being executed, and the like, and each task can be executed on any core. For this reason, the SMP method enables load distribution dynamically and improves the performance of the entire system. However, dynamic load balancing makes it difficult to predict real-time performance. Therefore, the SMP method is not suitable for application to a real-time system.
On the other hand, the AMP method has a function-distributed configuration in which each task is executed on a specific core. For this reason, the AMP method is suitable for a real-time system in which prediction of system behavior is important, a system in which a core to which specific hardware is connected is limited, and the like.
Such an AMP multi-core system has different performance based on which core the task is arranged. For this reason, the AMP multi-core system needs to search various task placements and determine the optimum placement so as to be in an optimal execution state.
しかしながら、特許文献1に記載された装置に基づくタスク配置は、コア間依存に基づく無駄時間を充分に削減できない場合があるという問題を生じ得る。
ここで、コア間依存とは、異なるコアに配置されたタスク同士が有する依存関係をいう。このようなコア間依存の存在は、あるコアがタスクを実行可能な空き状態であるにもかかわらず、そのコアに配置されたタスクが別のコア上のタスクの終了を待つ必要があるために実行できないという無駄時間の発生要因となる。このため、特許文献1に記載された装置は、コア間依存の数の最小化を基に、依存待ちに基づく無駄時間の削減にある程度の効果を奏する。
しかしながら、コア間依存の最小化では、無駄時間の削減が充分でない場合が、存在する。このような場合について以下に説明する。
例えば、タスク群(以下、タスクセットともいう)全体の実行が終了に近づくほど、タスク間の依存関係がクリティカルな問題となる場合がある。この理由について説明する。
タスクセットの実行開始直後では、多数のタスクが、実行可能状態になっている。このため、タスクセットの実行開始直後では、ある程度のコア間依存があっても、依存待ち時間が、あまり生じない。ところが、タスクセットの実行が進んだ状況では、多くのタスクの実行は、既に終了している。このため、依存待ちをしているタスク以外の実行可能なタスクが、少なくなる。つまり、タスクセット全体の実行の流れにおいて各タスクが実行され得る位置(以下、序列ともいう)が後方である(終了に近い)ほど、コア間依存に基づく依存待ちは、発生しやすい。
また、タスクセット全体の実行終了に近くない場合であっても、実行可能タスクが少ない状況が、発生し得る。例えば、タスクセット全体の実行の流れにおいて序列が近いタスク間のコア間依存が問題となる場合がある。その理由について説明する。
序列が近く、かつ、依存関係を有するタスク同士が異なるコアに配置された場合、依存元のタスクの実行終了が何らかの要因を基に遅れると、依存先のタスクが待たされる状況が発生する。つまり、序列が近いタスク同士のコア間依存は、各コアでの実行状況を基に、容易に依存待ちを発生し得る。
このように、コア間依存に基づくタスクセット全体の実行性能への影響は、その依存関係に関連する各タスクの序列に基づき一様ではない。
しかしながら、特許文献1に記載された装置は、コア間依存の実行性能への影響が関連タスクの序列に基づいて一様でないことを考慮しないため、コア間依存に基づく無駄時間を充分に削減できない。
本発明の目的は、上述の課題を解決し、AMP方式のマルチコアシステム向けに、序列に基づいて一様でないコア間依存の影響をより低減して、より性能の良いタスク配置を実現できるタスク配置装置を提供することにある。However, the task arrangement based on the device described in
Here, inter-core dependency refers to a dependency relationship between tasks arranged in different cores. The existence of such inter-core dependency is because a task placed on a core needs to wait for a task on another core to finish even though one core is free to execute the task. This is a cause of wasted time that it cannot be executed. For this reason, the apparatus described in
However, there is a case where dead time is not sufficiently reduced by minimizing inter-core dependence. Such a case will be described below.
For example, as the execution of the entire task group (hereinafter also referred to as a task set) approaches the end, the dependency between tasks may become a critical problem. The reason for this will be described.
Immediately after starting the execution of the task set, many tasks are ready to be executed. For this reason, immediately after the start of execution of the task set, even if there is some inter-core dependence, there is not much dependence waiting time. However, in a situation where the execution of the task set has advanced, the execution of many tasks has already been completed. This reduces the number of tasks that can be executed other than the task waiting for dependency. That is, the dependency waiting based on inter-core dependency is more likely to occur as the position where each task can be executed (hereinafter also referred to as an order) in the flow of execution of the entire task set is backward (closer to the end).
Moreover, even if it is not near the end of execution of the entire task set, a situation in which there are few executable tasks may occur. For example, there may be a problem of inter-core dependency between tasks having similar ranks in the flow of execution of the entire task set. The reason will be described.
When tasks having dependency relationships are arranged in different cores, if the end of execution of the dependency source task is delayed based on some factor, a situation in which the dependency destination task waits occurs. That is, inter-core dependencies between tasks with similar ranks can easily cause a dependency wait based on the execution status of each core.
Thus, the influence on the execution performance of the entire task set based on inter-core dependence is not uniform based on the rank of each task related to the dependence relation.
However, since the apparatus described in
An object of the present invention is to solve the above-mentioned problems, and to reduce the influence of non-uniform inter-core dependence based on the order for AMP-based multi-core systems, and achieve task performance with higher performance. To provide an apparatus.
本発明のタスク配置装置は、配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持手段と、前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与手段と、前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置手段と、を含む。
また、本発明のタスク配置方法は、配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持し、前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与し、前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する。
また、本発明のプログラムは、配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持処理と、前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与処理と、前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置処理と、をコンピュータに実行させる。The task placement device of the present invention, for a task set that is a set of tasks to be placed, a task set parameter holding means for holding a task set parameter including information representing a dependency relationship between the tasks, the task set parameter, Based on the order in which each task can be executed in the execution flow of the entire task set, an ordering weight that is a coefficient representing a weight based on the order is assigned to each dependency relationship between the tasks. When the task belonging to the task set is placed in one or more cores according to the dependency relationship, the rank weight assigned to the dependency relationship between the two tasks placed in different cores. And an arrangement means for calculating an evaluation value by using and arranging a task based on the calculated evaluation value.
Further, the task placement method of the present invention holds a task set parameter including information representing a dependency relationship between the tasks for a task set that is a set of tasks to be placed, and the task set parameter and the entire task set And assigning rank weights, which are coefficients representing weights based on the ranks, to the dependency relationships between the tasks, based on ranks that are positions where each task can be executed in the flow of execution of When assigning a task belonging to 1 to one or more cores according to the dependency, an evaluation value is calculated using the rank weight assigned to the dependency between two tasks arranged in different cores. The task is arranged based on the evaluated value.
Further, the program of the present invention is a task set parameter holding process for holding a task set parameter including information representing a dependency relationship between tasks for a task set which is a set of tasks to be arranged, the task set parameter, Based on the order in which each task can be executed in the execution flow of the entire task set, an ordering weight that is a coefficient representing a weight based on the order is assigned to each dependency relationship between the tasks. In the order weight assignment process, and when a task belonging to the task set is placed in one or more cores according to the dependency relation, the order weight given to the dependency relation between two tasks placed in different cores And calculating an evaluation value using the computer, and causing the computer to execute a placement process for arranging a task based on the calculated evaluation value.
本発明によれば、序列に基づいて一様でないコア間依存の影響をより低減して、より性能の良いタスク配置を提供できる。 According to the present invention, it is possible to provide a task arrangement with better performance by further reducing the influence of non-uniform core dependency based on the order.
以下、本発明の実施の形態について、図面を参照して詳細に説明する。以下に述べる本発明の各実施の形態としてのタスク配置装置は、各タスクが特定のコアで実行される機能分散型のAMP方式のマルチコアシステムを設計・実装する際に、タスクセットを構成する各タスクをいずれのコアに配置するかを決定する装置である。前述のように、AMP方式のマルチコアシステムは、タスクがどのコアに配置されるかに基づいて性能が異なる。以下では、本発明の各実施の形態のタスク配置装置に基づき、マルチコアシステムの性能をより高めるタスク配置が可能となることについて説明する。なお、以降、本発明の各実施の形態において対象とするAMP方式のマルチコアシステムを、単にマルチコアシステムと記載する。
(第1の実施の形態)
本発明における第1の実施の形態としてのタスク配置装置1のハードウェア構成の一例を図1に示す。図1において、タスク配置装置1は、CPU(Central Processing Unit)1001と、RAM(Random Access Memory)1002と、ROM(Read Only Memory)1003と、ハードディスク等の記憶装置1004とを含み、コンピュータを構成している。
ROM1003および記憶装置1004は、コンピュータを本実施の形態のタスク配置装置1として機能させるためのプログラムおよび各種データを記憶している。
CPU1001は、ROM1003および記憶装置1004に記憶されたプログラムおよび各種データを、RAM1002に読み込んで、実行する。
次に、タスク配置装置1の機能ブロックの構成の一例を図2に示す。図2において、タスク配置装置1は、タスクセットパラメータ保持部11と、序列重み付与部12と、配置部13と、を含む。
ここで、タスクセットパラメータ保持部11は、例えば、記憶装置1004を用いて構成される。また、序列重み付与部12および配置部13は、例えば、ROM1003および記憶装置1004に記憶されたコンピュータ・プログラムおよび各種データをRAM1002に読み込んで実行するCPU1001を用いて構成される。なお、タスク配置装置1の各機能ブロックを構成するハードウェア構成は、上述の構成に限定されない。
タスクセットパラメータ保持部11は、外部から入力されるタスクセットパラメータを保持する。ここで、タスクセットパラメータとは、タスクセット(配置対象の1つ以上のタスクの集合)を構成する個々のタスクの特性を表す情報である。タスクセットパラメータは、タスク間の依存関係を表す情報を含む。また、タスクセットパラメータは、その他、タスクの起動周期、実行時間、必要メモリサイズなどをそれぞれ表す情報を含んでもよい。
また、外部から入力されるタスクセットパラメータが、ファイル等のように他の機能ブロックからも参照可能に保持された形式で入力された場合、タスクセットパラメータ保持部11は、タスクセットパラメータをコピーして保持する必要はない。この場合、タスクセットパラメータ保持部11は、そのファイル等を示す情報を保持すればよい。
また、外部から入力されるタスクセットパラメータに後述の序列を表す情報が含まれる場合、タスクセットパラメータ保持部11は、各タスクの序列を表す情報をさらに保持してもよい。
序列重み付与部12は、タスクセットパラメータ保持部11に保持されたタスクセットパラメータを参照し、各タスクの序列に基づいて各依存関係に対して序列重みを付与する。ここで、各タスクの序列とは、依存関係に基づくタスクセット全体の実行の流れにおいて、各タスクが実行され得る位置をいう。また、序列重みとは、序列に基づく重みを表す係数である。具体的には、序列重みは、その依存関係に基づく実行待ち時間の発生しやすさの程度を表す係数といえる。このような実行待ち時間の発生しやすさは、その依存関係に関連する関連タスクの序列に基づいて変化する。そのため、序列重みは、序列に基づく情報となる。
詳細には、序列重み付与部12は、図3に示すように、序列符号生成部121と、重み付け部122とを含む。
序列符号生成部121は、対象のタスクセットにおける各タスクの序列を表す序列符号を生成する。具体的には、序列符号生成部121は、各タスクの序列符号を、タスクセットパラメータ保持部11に保持されたタスクセットパラメータに基づいて算出してもよい。
あるいは、タスクセットパラメータ保持部11に、既に各タスクの序列を表す情報が保持されている場合、序列符号生成部121は、序列符号を算出する処理を省略し、タスクセットパラメータ保持部11から各タスクの序列符号を取得すればよい。この場合、タスクセットパラメータ保持部11は、序列符号を保持してもよいし、各タスクに関する情報を序列符号に相当する順序で保持してもよい。
重み付け部122は、序列符号生成部121を用いて生成された(または取得された)序列符号に基づいて、タスク間の各依存関係に対して序列重みを付与する。
例えば、重み付け部122は、依存関係を有する各タスクの序列がタスクセット全体の実行の流れにおいて終了に近いほど、序列重みを重くしてもよい。また、例えば、重み付け部122は、依存関係を有する2つのタスクの序列が近いほど、序列重みを重くしてもよい。ここで、序列重みが重いとは、その依存関係に基づく依存待ち時間が、より発生しやすいことをいう。序列重みの値は、重いほど大きくても良いし、重いほど小さくてもよい。
配置部13は、タスクセットに属するタスクを依存関係にしたがって、1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された序列重みを用いて算出される評価値に基づいて、タスクを配置する。なお、以降、異なるコアに配置される2つのタスク間の依存関係を、単にコア間依存とも記載する。
詳細には、配置部13は、図4に示すように、評価値算出部131と、最適配置探索部132と、を含む。
評価値算出部131は、後述のタスク配置候補について、その配置の良さを表す評価値を算出する。具体的には、評価値算出部131は、コア間依存に付与された序列重みを用いて評価値を算出する。
最適配置探索部132は、タスクセットを依存関係にしたがって1つ以上のコアにタスクを配置し、タスク配置候補を生成する。そして、最適配置探索部132は、評価値算出部131を用いて算出された評価値が良好なタスク配置の候補を、探索する。
ここで、最適配置探索部132に適用可能な最も単純な探索手法としては、全探索が挙げられる。全探索を用いる場合、最適配置探索部132は、全てのタスク配置候補を生成し、その中で最も評価値が良好な配置を探索結果として出力する。
ただし、最適配置探索部132には、全探索よりも効率的な探索手法として、分枝限定法、グリーディー法、遺伝的アルゴリズム等の一般に知られる高速な探索手法の適用が、より望ましい。
以上のように構成されるタスク配置装置1の動作について、図5を参照して説明する。
初めに、タスクセットパラメータ保持部11は、外部から入力されたタスクセットパラメータを保持する(ステップS101)。
次に、最適配置探索部132は、タスク配置候補(どのタスクをどのコアに配置するかの候補データ)を生成する(S102)。
次に、序列符号生成部121は、タスクセットパラメータ保持部11に保持されたタスクセットパラメータを参照して、各タスクの序列符号を求める。前述のように、序列符号生成部121は、各タスクの序列符号を算出してもよいし、既に各タスクに割り当てられている序列符号を取得してもよい。そして、重み付け部122は、各タスクの序列符号に基づいて序列重みを生成する(ステップS103)。
このとき、重み付け部122は、タスクセットに存在する全ての依存関係について序列重みを付与してもよい。
ただし、重み付け部122は、評価値算出部131で必要となる依存関係について序列重みを付与してもよい。
この動作に基づき、タスク配置装置1は、付与処理の効率化を図れる。例えば、評価値算出部131が、コア間依存に付与された序列重みを用いて評価値を算出する場合、重み付け部122は、ステップS102で生成したタスク配置候補におけるコア間依存に対して、序列重みを付与すればよい。
なお、全ての依存関係について序列重みを付与する場合、上述のステップS102およびS103は、順不同の処理である。例えば、タスク配置装置1は、ステップS103、ステップS102の順での実行や、ステップS102およびステップS103の同時実行も可能である。
次に、評価値算出部131は、ステップS102で生成されたタスク配置候補について、ステップS103でコア間依存に付与された序列重みを用いて、タスク配置の良さを示す評価値を算出する(ステップS104)。
次に、最適配置探索部132は、生成されたタスク配置候補およびその評価値が、タスク配置の探索終了条件を満たすか否かを判断する(ステップS105)。
ここで、タスク配置の探索終了条件を満たさない場合、タスク配置装置1は、再度、ステップS102からの処理を繰り返す。
一方、タスク配置の探索終了条件を満たす場合、最適配置探索部132は、これまでに生成したタスク配置候補の中で、最も評価値のよいタスク配置候補を最適化結果として出力する(ステップS106)。そして、タスク配置装置1は、動作を終了する。
ここで、タスク配置の探索終了条件は、最適配置探索部132に採用される最適化アルゴリズムに従い異なる。例えば、最適化アルゴリズムとして単純な全探索が用いられる場合、タスク配置の探索終了条件は、生成し得る全てのタスク配置候補の生成終了となる。この場合、最適配置探索部132は、全てのタスク配置候補のうち、最適な評価値を持つタスク配置候補を、最適化結果として出力する。
また、例えば、最適化アルゴリズムとして他の一般的な最適化アルゴリズムが採用される場合、タスク配置の探索終了条件は、その最適化アルゴリズムにおいて評価値がこれ以上良くならないとの判断でもよい。あるいは、タスク配置の探索終了条件は、タスク配置候補の生成を所定回数繰り返しても評価値が改善しないとの判断でもよい。
以上で、タスク配置装置1の動作の説明を終了する。
次に、本発明の第1の実施の形態としてのタスク配置装置1の詳細な構成および動作について具体例を用いて説明する。
まず、ステップS101において、タスクセットパラメータ保持部11に保持されるタスクセットパラメータの具体例について、図6及び図7A〜図7Cを参照して説明する。
図6は、タスク1〜タスク6で構成されるタスクセットに存在する依存関係をグラフ表現した図である。以降、このようなグラフを、タスクグラフとも記載する。このようなタスクグラフにおいて、タスク間を結ぶ矢印は、両端のタスク間の依存関係を表す。また、依存関係を表す矢印は、終点側のタスクの開始に、始点側のタスクの終了が必要であることを表す。このようなタスクグラフは、タスクセット全体の依存関係に基づく実行の流れを表しているともいえる。
このようなタスクグラフで表されるタスクセットのタスクセットパラメータについて、そのデータ構造の一例を図7Aから図7Cに示す。
例えば、図7Aに示すように、タスクセットパラメータ保持部11は、タスクセットを構成する各タスクについて、依存先タスクを対応付けて保持してもよい。例えば、図7Aでは、タスク1について、その依存先タスクとして、タスク2、4および5が保持されている。また、タスクセットパラメータ保持部11は、各タスクについて、さらにその他のパラメータを保持してもよい。その他のパラメータは、例えば、前述のように、タスクの起動周期、実行時間、必要メモリサイズでもよい。
あるいは、図7Bに示すように、タスクセットパラメータ保持部11は、タスクセットを構成する各タスクについて、依存元タスクを対応付けて保持してもよい。例えば、図7Bでは、タスク6について、その依存元タスクとして、タスク3、4および5が保持されている。また、この場合も、タスクセットパラメータ保持部11は、各タスクについて、さらに、上述のようなその他のパラメータを保持してもよい。
あるいは、図7Cに示すように、タスクセットパラメータ保持部11は、各依存関係について、依存元タスクおよび依存先タスクの組合せを表す情報を保持してもよい。なお、図7Cにおいて、依存番号は、依存関係を識別する情報である。一例として、依存番号1は、タスク1(依存元タスク)からタスク2(依存先タスク)への依存関係を表している。また、このような場合に、さらに上述のようなその他のパラメータを保持するためには、タスクセットパラメータ保持部11は、依存関係を保持するテーブルとは異なるテーブルとして、各タスクについてその他のパラメータを保持すればよい。
次に、ステップS103において、序列符号生成部121が、各タスクの序列符号を算出する処理の具体例について述べる。
例えば、序列符号生成部121は、タスクグラフにおいて序列が前方である(開始タスクに近い)、すなわち早い順序・時間帯に実行される可能性が高いタスクほど、より小さい数値の序列符号を割り当ててもよい。言い換えると、序列符号生成部121は、序列が後方である(開始タスクから遠い)、すなわち遅い順序・時間帯に実行される可能性が高いタスクほど、大きい数値の序列符号を付与してもよい。
なお、各タスクに割り当てられる序列符号は、実際の実行順序と異なっても構わない。これは、実際にタスクセットが実行される際のタスク実行順序は、一意には決定されないからである。一般的に、同時に実行可能状態になるタスクが複数ある場合には、いずれのタスクが先に実行されるかは、他の様々な要因を基に実行時に定まる。
このように、早い順序ほど小さい値の序列符号を割り当てる場合の序列符号の算出手法の具体例について説明する。ここでは、タスクセット全体の依存関係に基づく実行の流れを表す上述の図6のタスクグラフを用いて、序列符号を算出する3つの具体的手法例について説明する。
一つ目の序列符号の算出手法の具体例として、トポロジカルソートを用いる手法について説明する。
図8に、トポロジカルソートを用いて各タスクに割り当てられた序列符号の一例を示す。図8において、丸で囲まれた数値は、各タスクに割り当てられた序列符号を示す。ここで、トポロジカルソートとは、無閉路有向グラフを対象に、どのノード(本発明におけるタスク)も、その出力辺(本発明に基づく依存)の先のノードより前になるように、各ノードを順序付けして並べる手法である。この手法は、ノードの並びを結果として出力する。その結果、トポロジカルソートを用いて算出された序列符号は、各タスクに唯一の値となる。
なお、トポロジカルソートを実現するアルゴリズムとして、一般的には、公知文献「Kahn,A.B.(1962),“Topological sorting of large networks”,Communications of the ACM 5(11):558−562」に記載のKahnに基づくアルゴリズムや、深さ優先探索を用いるアルゴリズム等の公知技術が適用可能である。
二つ目の序列符号の算出手法の具体例として、幅優先探索を用いる手法について説明する。
この手法に基づくと、序列符号生成部121は、開始タスクから依存を介して連なる流れにおいて各タスクが何個目であるかを基に、タスクの序列符号を割り当てる。また、この手法を用いる場合、序列符号生成部121は、開始タスクから複数の流れを経るタスクについて、タスク数が最も多い流れに基づいて序列符号を割り当てる。
図9に、幅優先探索を用いて各タスクに割り当てられた序列符号の一例を示す。
図6のタスクグラフでは、タスク1が、開始タスクである。そこで、図9に示すように、序列符号生成部121は、タスク1に序列符号0を割り当てる。また、タスク2、タスク4、および、タスク5は、それぞれ開始タスクから依存を介して連なる流れにおいて1つ目のタスクである。そこで、序列符号生成部121は、これらのタスクに序列符号1を割り当てる。また、タスク3は、開始タスクから依存を介して連なる流れにおいてタスク2に続く2つ目のタスクである。そこで、序列符号生成部121は、タスク3に序列符号2を割り当てる。また、タスク6は、タスク3に続く流れでは、開始タスクから3つ目のタスクであり、タスク4およびタスク5に続く流れでは、開始タスクから2つ目のタスクである。このとき、タスク数が最も多い流れを基に序列符号を割り当てると、序列符号生成部121は、タスク6に序列符号3を割り当てる。
なお、ここでは、開始タスクであるタスク1の序列符号として0を割り当てる例について説明したが、開始タスクに割り当てる序列符号は、その他の値でもよい。例えば、序列符号生成部121は、開始タスクの序列符号に1を割り当ててもよいし、その他の値を割り当ててもよい。
三つ目の序列符号の算出手法の具体例として、実行時間情報を用いる手法について説明する。
この手法を用いる場合、タスクセットパラメータ保持部11は、各タスクの実行時間を保持する。この例では、序列符号生成部121は、幅優先探索の手法を基本に、さらに各タスクの実行時間を考慮して各タスクに序列符号を割り当てる。具体的には、序列符号生成部121は、開始タスクから依存を介して連なる流れにおいて各タスクの実行時間の合計を基に、タスクの序列符号を割り当てる。
また、この手法を用いる場合、序列符号生成部121は、開始タスクから複数の流れを経るタスクについて、最も長い合計実行時間に基づいて序列符号を割り当てる。このように算出される序列符号は、実行時間が長いタスクおよび短いタスクの影響の違いを反映した序列符号となる。
図10に、実行時間情報を用いて各タスクに割り当てられた序列符号の一例を示す。
図10に示すように、序列符号生成部121は、開始タスクであるタスク1に対して、その実行時間である2を序列符号として割り当てる。また、序列符号生成部121は、タスク2に対して、タスク1の序列符号(実行時間)2に、タスク2の実行時間4を加算した6を序列符号として割り当てる。同様に、序列符号生成部121は、タスク4に対して、序列符号5を割り当て、タスク5に対して序列符号7を割り当てる。また、序列符号生成部121は、タスク6に対して、タスク6の依存元のタスクのうち序列符号が最も大きい(つまり合計実行時間が最も長い)タスク3の序列符号8に、タスク6の実行時間3を加えた11を序列符号として割り当てる。
なお、ステップS103において、序列符号生成部121は、序列重みの付与に用いる各タスクの序列符号を上述のように算出する代わりに、外部から入力される各タスクの序列符号を用いてもよい。
この場合、ステップS101において、各タスクの序列符号に相当する情報が外部から入力され、タスクセットパラメータ保持部11が保持する。そして、序列符号生成部121は、タスクセットパラメータ保持部11を参照して、各タスクの序列符号を取得してもよい。例えば、タスクセットパラメータ保持部11は、各タスクに関連する情報を、トポロジカルソートされたことに相当する順序で保持してもよい。この場合、序列符号生成部121は、タスクセットパラメータ保持部11に保持されている各タスクに関する情報の保持順序を、序列符号として取得すればよい。あるいは、タスクセットパラメータ保持部11は、各タスクに関するその他のパラメータとして、序列符号を表す数値を含む情報を保持してもよい。
次に、ステップS103において、重み付け部122が、各依存関係に序列重みを付与する処理の3つの具体例について説明する。
なお、ここでは、序列重みが重いほど、序列重みの数値を大きくする。また、配置部13は、序列重みの数値が大きい依存関係ほど、なるべく離れない配置(なるべく同じコアへの配置)を探索するとして説明する。
一つ目の序列重み付与の具体例として、タスクグラフにおいて序列が後方に近い(開始タスクから遠い)タスク間の依存関係ほど、序列重みを重くする手法について説明する。
前述のように、タスクグラフにおいて序列が後方に近いほど、異なるコア間に配置されたときのタスクセット全体の実行性能への影響が、大きいと考えられる。したがって、重み付け部122は、序列が後方になる(開始タスクから遠くなる)に従って、序列重みの数値を大きくすればよい。
序列が後方に近いほど序列重みを重くする単純な例として、図8に示した各タスクに唯一の序列符号がトポロジカルソートを基に割り当てられた場合を考える。この場合、重み付け部122は、序列符号が小さいほうから順に全タスク数の1/n(nは正の整数を表し、“/”は除算を表す)個のタスクを依存元とする依存関係に対して、序列重み1を割り当ててもよい。同様に、重み付け部122は、全体の1/n〜2/nのタスクを依存元とする依存関係に対して序列重み2を割り当てていき、以降同様に繰り返してもよい。
序列が後方に近いほど序列重みを重くする他の例として、図9に示した幅優先探索を基に各タスクに序列符号が割り当てられた場合を考える。このような場合、重み付け部122は、各依存関係の依存元タスク(先に実行されるタスク)に割り当てられた序列符号に基づいて、序列重みを付与してもよい。例えば、重み付け部122は、各依存関係の依存元のタスクに割り当てられた序列符号の数値をそのまま序列重みとして、依存関係に付与してもよい。
このように割り当てられた序列重みを、図11に示す。図11において、丸で囲まれた数値は序列符合を表し、二重丸で囲まれた数値は序列重みを表している。図11では、序列符号0のタスク1からタスク2、4および5への各依存関係に、序列重み0が、付与されている。また、序列符号1のタスク2からタスク3、ならびに、序列符号1のタスク4および5からタスク6への各依存関係に、序列重み1が、付与されている。また、序列符号2のタスク3からタスク6への依存関係に、序列重み2が、付与されている。
序列が後方に近いほど序列重みを重くするさらに他の例として、図10に示した幅優先探索に各タスクの実行時間情報を組み合わせて序列符号が割り当てられた場合を考える。この場合も、重み付け部122は、各依存関係の依存元タスク(先に実行されるタスク)に割り当てられた序列符号を基に、序列重みを付与してもよい。
このように割り当てられた序列重みを、図12に示す。
図12において、丸で囲まれた数値は序列符合を表し、二重丸で囲まれた数値は序列重みを表している。図12では、序列符号2のタスク1からタスク2、4および5への各依存関係に、序列重み2が、付与されている。また、序列符号6のタスク2からタスク3、序列符号5のタスク4からタスク6、および、序列符号7のタスク5からタスク6への各依存関係に、序列重みとして、それぞれ6、5および7が、付与されている。また、序列符号8のタスク3からタスク6への依存関係に、序列重み8が、付与されている。
このように、重み付け部122は、タスクグラフ上で序列が後方に近いタスク間の依存関係ほど、序列重みを重くする。
二つ目の序列重み付与の具体例として、依存関係を有する2つのタスクの序列が近いほど、序列重みを重くする手法について説明する。
ここでも、序列重みが重いほど、序列重みの数値を大きくする。単純な例として、重み付け部122は、タスクセット全体における序列符号の最大値から、依存関係を有する2つのタスクの序列符号の差の絶対値を減算した値を、依存関係の序列重みとしてもよい。あるいは、重み付け部122は、依存関係を有する2つのタスクの序列符号の差の絶対値の最大値から、該当する依存関係を有する2つのタスクの序列符号の差の絶対値を減算した値を、依存関係の序列重みとしてもよい。
例えば、図9に示した幅優先探索に基づいて各タスクに序列符号が割り当てた場合を考える。
この場合、重み付け部122は、図13に示すように、各依存関係に序列重みを付与する。図13において、丸で囲まれた数値は序列符合を表し、破線の三角形で囲まれた数値は序列符号の差の絶対値を表し、二重丸で囲まれた数値は序列重みを表している。図13において、タスク4から6、および、タスク5から6への依存関係の両端の序列符号の差の絶対値は、2である。また、それ以外の依存関係の両端の序列符号の差の絶対値は、1である。また、序列符号の最大値は、3である。したがって、タスク4から6、および、タスク5から6への各依存関係の序列重みは、最大値3から、両端の序列符号の差の絶対値2を減算した1となる。その他の依存関係の序列重みは、最大値3から、両端の序列符号の差の絶対値1を減算した2となる。
このように、重み付け部122は、タスクグラフ上での序列が近いタスク間の依存関係ほど、序列重みを重くする。
三つ目の序列重み付与の具体例として、上述した2つの手法を組み合わせる手法も可能である。
単純な例として、重み付け部122は、一つ目の例の全体の1/nずつ序列重みを大きくする手法で生成した序列重みの値に対して、二つ目の例の序列符号の最大値から、各依存関係の両端の序列符号の差の絶対値を減算して得た序列重みの値を乗算した値を、序列重みとしてもよい。
このように、重み付け部122は、タスクグラフ上で序列が後方に近いタスク間の依存関係ほど重く、さらに、タスクグラフ上での序列が近いタスク間の依存関係ほど重い序列重みを生成できる。
また、上述の手法の他にも、重み付け部122は、各依存関係に対して、依存関係を有する2つのタスクの序列に応じて、依存待ち時間の発生しやすさの程度を反映した序列重みを生成してもよい。また、重み付け部122は、それらの各種手法を組み合わせて序列重みを生成してもよい。
なお、一般的に、タスクセットに存在するタスク間の各依存関係として、その依存関係に関連する通信方法や転送データ量等が異なる依存関係が混在する。このため、本実施の形態としてのタスク配置装置1が対象とするタスクセットは、各タスク間の依存関係に関するこれらの他の要因に基づく重みをあらかじめパラメータとして有している場合がある。この場合、重み付け部122は、各依存関係について、あらかじめ付与された他の要因に基づく重みの値と、上述のように算出した序列重みの値とを組み合わせた値(例えば、乗算値)を、各依存関係に対して付与してもよい。
次に、ステップS104において、評価値算出部131が、評価値を算出する処理の具体例について説明する。
評価値算出部131は、コア間依存に付与された序列重みを用いて、タスク配置の良さを示す評価値を算出する。
単純な例として、評価値算出部131は、コア間依存に付与された序列重みを全て加算又は乗算した値を評価値として算出してもよい。
例えば、加算値を用いる場合、評価関数Fwは、次式(1)で表される。式(1)において、対象のタスク配置候補におけるコア間依存は、n個とする。また、wiは、各コア間依存i(i=0〜n−1)に付与された序列重みを表す。
このように算出される評価値は、値が小さいほど、タスクセット全体の実行性能に対するコア間依存の影響が相対的に小さいことを表し、すなわち、タスク配置が良いことを表す。
評価値算出部131が式(1)に基づいて算出する評価値の一例について、図14を用いて説明する。
図14は、あるタスク配置候補を表している。このタスク配置候補は、コア0に、タスク2、3および6を配置し、コア1にタスク1、4および5を配置している。また、このタスク配置候補におけるコア間依存は、タスク1から2への依存、タスク4から6への依存、および、タスク5から6への依存である。このように、このタスク配置候補におけるコア間依存数は、3本である。また、これらのコア間依存に付与された序列重みは、タスク1から2への依存関係に対して0、タスク4から6への依存関係およびタスク5から6への依存関係に対してそれぞれ1が付与されている。したがって、評価値算出部131は、このタスク配置候補について式(1)に基づく評価値として、2を算出する。
なお、図14では、コア数が2個の場合の評価値の算出例について説明しているが、コア数が3以上の場合においても、評価値算出部131は、同様に評価値を算出可能である。
また、ステップS104において、評価値算出部131は、式(1)以外のその他の評価関数に基づいて評価値を算出してもよい。
例えば、評価値算出部131は、所定値から、コア間依存に付与された序列重みを全て減算した値を評価値として算出してもよい。この場合、このように算出される評価値は、値が大きいほど、タスクセット全体の実行性能に対するコア間依存の影響が相対的に小さいことを表し、すなわち、タスク配置が良いことを表す。
また、ステップS104において、評価値算出部131は、コア間依存に付与された序列重みに加えて、各タスクの起動周期、実行時間、または、必要メモリサイズ等を用いて評価値を算出してもよい。この場合、これらの起動周期、実行時間、または、必要メモリサイズ等の情報は、タスクセットパラメータ保持部11に保持される。
例えば、各コアに割り当てられたタスクの実行時間の合計が各コアで均等であることが適切とされるシステムを想定する。この場合、評価値算出部131は、コア間依存に付与された序列重みに基づく評価値に加えて、さらに各コアに割り当てられたタスクの実行時間合計の差に基づく評価値を追加で算出し、これらを統合した評価値を算出してもよい。
また、一定周期ごとに起動するタスクにおいて、各タスクのコアの利用率は、「タスクの実行時間÷タスクの起動周期」として計算できる。ここで、コアの利用率が各コアで均等であることが適切であるシステムを想定する。この場合、評価値算出部131は、コア間依存に付与された序列重みに基づく評価値に加えて、さらに各コアのコア利用率の差に基づく評価値を追加で算出し、これらを統合した評価値を算出してもよい。
また、必要メモリサイズが各コアで均等であることが適切であるシステムを想定する。この場合、評価値算出部131は、コア間依存に付与された序列重みに基づく評価値に加えて、さらに各コアの必要メモリサイズの差に基づく評価値を追加で算出し、これらを統合した評価値を算出してもよい。
このように、タスクセットパラメータ保持部11に、タスク間の依存関係に加えてその他のタスクセットパラメータが保持されている場合、評価値算出部131は、これらのその他のタスクセットパラメータを付随的に用いて評価値を算出できる。そして、その場合、配置部13は、これらのコア間依存以外の要素も考慮したタスク配置が可能となる。
このように、コア間依存に付与された序列重みを用いた評価値の算出手法には、様々な手法を適用可能である。
次に、ステップS105において、最適配置探索部132が用いる探索終了条件の具体例について説明する。
前述のように、最適配置探索部132は、タスク配置候補を生成し、生成したタスク配置候補について算出される評価値を用いて、生成されたタスク配置候補およびその評価値が、探索終了条件を満たすか否かを判定する。
ここで、評価値が小さいほどタスク配置が良いとすると、最適配置探索部132は、評価値を最小化するタスク配置候補を探索する。
このとき、タスク配置の探索終了条件は、最適配置探索部132が採用する最適化アルゴリズムに基づき異なる。例えば、最適化アルゴリズムとして単純な全探索が採用されている場合、探索終了条件は、生成可能な全てのタスク配置候補の生成が終了する。この場合、最適配置探索部132は、全てのタスク配置候補のうち、最小の評価値が算出されたタスク配置候補を最適化結果として出力する。
また、例えば、他の一般的な最適化アルゴリズムが採用されている場合、探索終了条件は、そのアルゴリズムに基づく評価値がこれ以上小さくならないとの判定や、タスク配置候補の生成を所定回数繰り返しても評価値が小さくならないとの判定でもよい。
以上詳細に説明したように、タスクセットパラメータ保持部11、序列重み付与部12、評価値算出部131及び最適配置探索部132は、それぞれ様々なデータ構造や様々な手法を採用できる。本実施の形態において、これらの各機能ブロックに採用されるデータ構造や手法は、様々に組み合わせて採用可能である。また、本実施の形態は、各機能ブロックにおいて、複数の手法の組み合わせも採用できる。
次に、本発明の第1の実施の形態の効果について述べる。
本発明の第1の実施の形態としてのタスク配置装置は、序列に基づく一様でないコア間依存の影響をより低減して、より性能のよいタスク配置ができる。
その理由は、序列重み付与部が、タスクセット全体の実行の流れのうち各タスクが実行され得る位置である序列に基づいて、タスク間に存在する各依存関係に対して序列重みを付与するからである。そして、配置部は、依存関係にしたがって1つ以上のコアにタスクを配置する際に、異なるコア間に配置されたタスク間の依存関係に付与された序列重みに基づいて算出される評価値がより良くなるように、タスク配置するからである。これに基づき、本実施の形態としてのタスク配置装置は、特許文献1に記載された装置に基づくコア間依存の数を最小化してもコア間依存待ち時間が生じるようなタスクセットに対して、より依存待ち時間を低減するタスク配置を生成可能となる。その結果、本発明の第1の実施の形態としてのタスク配置装置は、マルチコア性能をより充分に発揮可能なタスク配置を出力できる。すなわち、本実施の形態としてのタスク配置装置は、マルチコアシステムにおいて、序列に応じたコア間依存の実行性能への影響の大小を反映したタスク配置を実現できる。
また、本発明の第1の実施の形態としてのタスク配置装置は、タスクセットの実行が終了に近い位置での依存待ち時間をより削減して、より性能のよいタスク配置ができる。
その理由は、序列重み付与部が、タスクグラフにおける序列が後方に近いタスク間の依存関係ほど序列重みを重くするからである。この動作に基づき、配置部は、序列が後方に近いタスク間のコア間依存が多いほど配置が悪いことを表す評価値を算出する。そして、配置部が、その評価値をより良くするタスク配置を探索する。したがって、このように探索されるタスク配置では、タスクセット全体の実行終了に近い位置で依存関係を有するタスクほど、異なるコアに配置されにくくなる。したがって、本発明の第1の実施の形態としてのタスク配置装置は、タスクグラフ上で序列の後方に現れるクリティカルな依存の問題へ対処できる。
また、本発明の第1の実施の形態としてのタスク配置装置は、タスクセットにおける実行順序が近いタスク間の依存待ち時間をより削減して、より性能のよいタスク配置ができる。
その理由は、序列重み付与部が、タスクグラフにおける序列符号の差が小さいタスク間の依存関係ほど序列重みを重くするからである。この動作に基づき、配置部は、序列が近いタスク間のコア間依存が多いほど配置が悪いことを表す評価値を算出する。そして、配置部が、その評価値をより良くするタスク配置を探索する。したがって、このように探索されるタスク配置では、タスクセットにおける実行順序が近く依存関係を有するタスクほど、異なるコアに配置されにくくなる。したがって、本発明の第1の実施の形態としてのタスク配置装置は、タスクグラフ上での序列が近いタスク同士の依存の問題へ対処できる。
(第2の実施の形態)
次に、本発明の第2の実施の形態について図面を参照して詳細に説明する。なお、本実施の形態の説明で参照する各図面において、本発明の第1の実施の形態と同一の構成および同様に動作するステップには同一の符号を付して、本実施の形態における詳細な説明を省略する。
まず、本発明の第2の実施の形態としてのタスク配置装置2の機能の一例のブロックを、図15に示す。図15において、タスク配置装置2は、本発明の第1の実施の形態としてのタスク配置装置1と同一の構成に加えて、序列符号保持部24および序列重み保持部25をさらに含む。
ここで、タスク配置装置2は、本発明の第1の実施の形態としてのタスク配置装置1と同様に、図1に示した構成を含むコンピュータ装置を用いて構成しても良い。その場合、序列符号保持部24および序列重み保持部25は、記憶装置1004を用いて構成される。なお、これらの各機能ブロックを構成するハードウェア構成は、上述の構成に限定されない。
序列符号保持部24は、序列重み付与部12が算出した序列符号を保持する。序列符号保持部24が保持する情報の一例を図16A及び図16Bに示す。例えば、序列符号保持部24は、図16Aに示すように、タスクごとに序列符号を保持してもよい。あるいは、序列符号保持部24は、図16Bに示すように、序列符号の値ごとに、その序列符号が割り当てられたタスクを識別する情報を保持してもよい。例えば、図16Bは、序列符号1が、タスク2、4および5に割り当てられていることを表している。
なお、序列符号保持部24は、タスクセットパラメータ保持部11に含まれてもよい。
例えば、序列符号生成部121を用いてトポロジカルソートに基づく序列符号が生成された場合のように各タスクに唯一の序列符号が割り当てられた場合、序列符号保持部24は、タスクセットパラメータ保持部11に保持されている各タスクに関する情報を序列符合の順序に並べ替えた表現を用いて、序列符号を保持してもよい。この動作に基づき、序列符号保持部24は、序列符合を保持するための記憶装置の領域を用いず、算出された序列符号を保持できる。
序列重み保持部25は、序列重み生成部12を用いて各依存関係に付与された序列重みを保持する。
以上のように構成されたタスク配置装置2の動作について、図17を参照して説明する。
初めに、タスクセットパラメータ保持部11は、外部から入力されたタスクセットパラメータを保持する(ステップS101)。
次に、序列符号生成部121は、タスクセットパラメータ保持部11に保持されたタスクセットパラメータを参照し、各タスクの序列符号を算出する(ステップS201)。例えば、序列符号生成部121は、序列符号の算出手法として、本発明の第1の実施の形態で詳細に説明した手法を適用可能である。
次に、序列符号保持部24は、算出された序列符号を保持する(ステップS202)。
次に、重み付け部122は、序列符号保持部24に保持された序列符号に基づいて、各依存関係に対して序列重みを付与する(ステップS203)。例えば、重み付け部122は、重み付けの付与手法として、本発明の第1の実施の形態で詳細に説明した手法を適用可能である。
次に、序列重み保持部25は、重み付け部122を用いて生成された序列重みを保持する(ステップS204)。
次に、最適配置探索部132は、タスク配置候補を生成する(ステップS102)。
次に、評価値算出部131は、生成されたタスク配置候補について、タスク配置の良さを示す評価値である評価値を、序列重み保持部25に保持された序列重みを用いて算出する(ステップS104)。例えば、評価値算出部131は、評価値の算出手法として、本発明の第1の実施の形態で詳細に説明した手法を適用可能である。
次に、最適配置探索部132は、タスク配置候補および評価値が、タスク配置の探索終了条件を満たすか否かを判定する(ステップS105)。例えば、探索終了条件としては、本発明の第1の実施の形態で詳細に説明した条件が、適用可能である。
ここで、タスク配置の探索終了条件を満たさない場合、タスク配置装置2は、再度ステップS102からの処理を繰り返す。
一方、タスク配置の探索終了条件を満たす場合、最適配置探索部132は、タスク配置の最適化結果を出力する(ステップS106)。そして、タスク配置装置2は、動作を終了する。
なお、ステップS203において、重み付け部122は、タスク配置候補におけるコア間依存に対して、序列重みを付与してもよい。この場合、タスク配置装置2は、ステップS102においてタスク配置候補を生成後、ステップS203〜S204を実行してもよい。
以上で、本発明の第2の実施の形態の動作の説明を終了する。
次に、本発明の第2の実施の形態の効果について述べる。
本発明の第2の実施の形態としてのタスク配置装置は、マルチコアシステム向けにタスク配置する際に、コア間依存の依存待ち時間の発生しやすさを反映した序列重みを算出する処理を、より効率化できる。
その理由は、序列符号保持部が、序列重みの算出に用いる各タスクの序列符号を保持するからである。ここで、あるタスクが複数の依存関係を有する場合、序列重み付与部は、序列重みの算出のために、そのタスクの序列符号を複数回参照する。このような場合、一旦計算された序列符号の序列符号保持部の保持を基に、本発明の第2の実施の形態としてのタスク配置装置は、序列重み付与部の処理時間を、より短縮できるからである。
また、本発明の第2の実施の形態としてのタスク配置装置は、序列に基づき一様でないコア間依存の影響をより低減してより性能のよいタスク配置を探索する処理を、より効率化できる。
その理由は、序列重み保持部が、序列重み生成部を用いて生成された序列重みを保持するからである。ここで、序列重みは、一度計算すれば値が不変で、再計算が不要なことが多い。したがって、序列重みは、異なるタスク配置候補について評価値を算出するたびに再計算される必要がない。したがって、序列重み保持部の序列重みの保持を基に、本発明の第2の実施の形態としてのタスク配置装置は、タスク配置の探索時間を短縮できる。
なお、上述した本発明の各実施の形態において、序列符号は、タスクグラフ上で開始タスクに近いほど小さい値を持つとして主に説明したが、本発明における序列符号は、例えば、タスクグラフ上で開始タスクに近いほど大きい値を持ってもよい。
また、上述した本発明の各実施の形態において、序列重みは、依存待ち時間を発生しやすいほど大きい値を持つとして主に説明したが、本発明における序列重みは、例えば、依存待ち時間を発生しやすいほど小さい値を持ってもよい。
また、上述した本発明の各実施の形態において、評価値は、タスク配置が良いほど小さい値を持つとして主に説明したが、本発明における評価値は、タスク配置が良いほど大きい値を持ってもよい。その場合、配置部は、評価値をより大きくするタスク配置候補を探索すればよい。
また、上述した本発明の各実施の形態において、各フローチャートを参照して説明したタスク配置装置の動作を、本発明のプログラムとしてコンピュータの記憶装置(記憶媒体)に格納しておき、係るプログラムをCPUが読み出して実行してもよい。そして、このような場合において、本発明は、係るプログラムのコード或いは記憶媒体を用いて構成される。
また、上述した各実施の形態は、適宜組み合わせて実施されることが可能である。
また、本発明は、上述した各実施の形態に限定されず、様々な態様で実施されることが可能である。
また、上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)
配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持手段と、
前記タスクセットパラメータの参照を用いて、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列に基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与手段と、
前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置手段と、
を含むタスク配置装置。
(付記2)
前記序列重み付与手段は、
前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
ことを特徴とする付記1に記載のタスク配置装置。
(付記3)
前記序列重み付与手段は、
前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
ことを特徴とする付記1または付記2に記載のタスク配置装置。
(付記4)
前記序列重み付与手段は、
前記タスクセットパラメータ保持手段に保持された前記タスクセットパラメータに基づいて、前記序列重みの付与に用いるための前記序列を表す序列符号を算出する
ことを特徴とする付記1乃至付記3のいずれか1つに記載のタスク配置装置。
(付記5)
前記序列重み付与手段を用いて算出される序列符号を保持する序列符号保持手段をさらに含み、
前記序列重み付与手段は、
前記序列符号保持手段に保持された序列符号の参照を用いて、前記各依存関係に前記序列重みを付与する
ことを特徴とする付記4に記載のタスク配置装置。
(付記6)
前記序列重み付与手段を用いて付与された前記序列重みを保持する序列重み保持手段をさらに含み、
前記配置手段は、
前記序列重み付与手段に保持された序列重みを用いて前記評価値を算出する
ことを特徴とする付記1乃至付記5のいずれか1つに記載のタスク配置装置。
(付記7)
配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持し、
前記タスクセットパラメータの参照を用いて、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列に基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与し、
前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する、
タスク配置方法。
(付記8)
前記各依存関係に前記序列重みを付与する際に、前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
ことを特徴とする付記7に記載のタスク配置方法。
(付記9)
前記各依存関係に前記序列重みを付与する際に、前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
ことを特徴とする付記7または付記8に記載のタスク配置方法。
(付記10)
配置対象のタスクの集合であるタスクセットについて、前記タスク間の依存関係を表す情報を含むタスクセットパラメータを保持するタスクセットパラメータ保持処理と、
前記タスクセットパラメータの参照を用いて、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列に基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与処理と、
前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置処理と、
をコンピュータに実行させるプログラム。
(付記11)
前記序列重み付与処理において、前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
ことを特徴とする付記10に記載のプログラム。
(付記12)
前記序列重み付与処理において、前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
ことを特徴とする付記10または付記11に記載のコンピュータ・プログラム。
以上、実施形態を参照して本願発明を説明したが、本願発明は上記実施形態に限定されものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。
この出願は、2011年10月21日に出願された日本出願特願2011−231283を基礎とする優先権を主張し、その開示の全てをここに取り込む。Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The task placement apparatus according to each embodiment of the present invention described below is configured to configure each task set when designing and implementing a function-distributed AMP multicore system in which each task is executed by a specific core. This is a device that determines in which core a task is to be placed. As described above, the performance of an AMP multi-core system differs depending on which core the task is placed on. In the following, it will be described that task placement that enhances the performance of a multi-core system is possible based on the task placement device of each embodiment of the present invention. Hereinafter, an AMP multicore system targeted in each embodiment of the present invention is simply referred to as a multicore system.
(First embodiment)
FIG. 1 shows an example of the hardware configuration of the
The
The
Next, an example of the functional block configuration of the
Here, the task set
The task set
In addition, when a task set parameter input from the outside is input in a format that can be referred to from other functional blocks such as a file, the task set
In addition, when the task set parameter input from the outside includes information indicating an order to be described later, the task set
The rank
Specifically, the order
The order
Alternatively, when the task set
The
For example, the
When the
Specifically, the
The evaluation
The optimum
Here, as the simplest search method applicable to the optimum
However, it is more preferable that the optimum
The operation of the
First, the task set
Next, the optimal
Next, the order
At this time, the
However, the
Based on this operation, the
Note that when ordering weights are assigned to all the dependency relationships, the above-described steps S102 and S103 are in no particular order. For example, the
Next, the evaluation
Next, the optimum
If the task placement search termination condition is not satisfied, the
On the other hand, when the task placement search termination condition is satisfied, the optimum
Here, the task placement search termination condition differs according to the optimization algorithm employed by the optimum
Further, for example, when another general optimization algorithm is adopted as the optimization algorithm, the task placement search termination condition may be a determination that the evaluation value does not become better in the optimization algorithm. Alternatively, the task placement search termination condition may be a determination that the evaluation value does not improve even if the task placement candidate generation is repeated a predetermined number of times.
Above, description of operation | movement of the
Next, a detailed configuration and operation of the
First, a specific example of task set parameters held in the task set
FIG. 6 is a graph representing the dependency relationships existing in the task set composed of
An example of the data structure of the task set parameters of the task set represented by such a task graph is shown in FIGS. 7A to 7C.
For example, as shown in FIG. 7A, the task set
Alternatively, as illustrated in FIG. 7B, the task set
Alternatively, as illustrated in FIG. 7C, the task set
Next, a specific example of processing in which the order
For example, the order
Note that the order code assigned to each task may be different from the actual execution order. This is because the task execution order when the task set is actually executed is not uniquely determined. Generally, when there are a plurality of tasks that can be executed simultaneously, which task is executed first is determined at the time of execution based on various other factors.
A specific example of a method for calculating an ordinal code in the case of assigning an ascending code having a smaller value in the earlier order will be described. Here, three specific method examples for calculating an order code will be described using the above-described task graph of FIG. 6 representing the flow of execution based on the dependency of the entire task set.
A method using topological sort will be described as a specific example of the first order code calculation method.
FIG. 8 shows an example of a sequence code assigned to each task using the topological sort. In FIG. 8, the numerical value surrounded by a circle indicates an ordinal code assigned to each task. Here, the topological sort means that each node (task in the present invention) is ordered in an acyclic directed graph so that any node (task in the present invention) comes before the node ahead of its output edge (dependency based on the present invention). It is a technique to arrange them. This method outputs a sequence of nodes as a result. As a result, the rank code calculated using the topological sort is a unique value for each task.
As an algorithm for realizing the topological sort, generally, the publicly known document “Kahn, AB (1962),“ Topological sorting of large networks ”, Communications of the ACM 5 (11): 558-562”. Known techniques such as an algorithm based on the described Kahn and an algorithm using a depth-first search can be applied.
As a specific example of the second order code calculation method, a method using breadth-first search will be described.
Based on this method, the order
FIG. 9 shows an example of a sequence code assigned to each task using the breadth-first search.
In the task graph of FIG. 6,
Here, an example has been described in which 0 is assigned as the order code of
As a specific example of the third order code calculation method, a method using execution time information will be described.
When this method is used, the task set
Further, when this method is used, the order
FIG. 10 shows an example of a sequence code assigned to each task using the execution time information.
As shown in FIG. 10, the order
In step S103, the order
In this case, in step S101, information corresponding to the order code of each task is input from the outside, and the task set
Next, three specific examples of processing in which the
Here, the higher the order weight, the larger the order weight value. The description will be made assuming that the
As a first specific example of assigning rank weights, a method will be described in which the rank order weights are made heavier as the dependency relationship between tasks in the task graph is closer to the rear (distant from the start task).
As described above, the closer to the rear in the task graph, the greater the influence on the execution performance of the entire task set when arranged between different cores. Therefore, the
As a simple example of increasing the order weight as the order is closer to the rear, consider the case where a unique order code is assigned to each task shown in FIG. 8 based on topological sort. In this case, the
As another example of increasing the order weight as the order is closer to the rear, consider the case where an order code is assigned to each task based on the breadth-first search shown in FIG. In such a case, the
The rank weights assigned in this way are shown in FIG. In FIG. 11, a numerical value surrounded by a circle represents an ordering code, and a numerical value surrounded by a double circle represents an ordering weight. In FIG. 11, an
As yet another example in which the rank weight is increased as the rank is closer to the rear, a case where a rank code is assigned by combining the execution time information of each task with the breadth-first search shown in FIG. Also in this case, the
FIG. 12 shows the sequence weights assigned in this way.
In FIG. 12, a numerical value surrounded by a circle represents an ordering code, and a numerical value surrounded by a double circle represents an ordering weight. In FIG. 12, an
As described above, the
As a second specific example of assigning rank weights, a method for increasing the rank weight as the rank order of two tasks having a dependency relationship is closer will be described.
Again, the higher the order weight, the larger the order weight value. As a simple example, the
For example, consider a case where an ordinal code is assigned to each task based on the breadth-first search shown in FIG.
In this case, as shown in FIG. 13, the
In this way, the
As a specific example of the third order weighting, a method combining the above two methods is also possible.
As a simple example, the
In this way, the
In addition to the above-described method, the
In general, as each dependency relationship between tasks existing in a task set, there are mixed dependency relationships that differ in communication method, transfer data amount, and the like related to the dependency relationship. For this reason, the task set targeted by the
Next, a specific example of a process in which the evaluation
The evaluation
As a simple example, the evaluation
For example, when the addition value is used, the evaluation function F w Is represented by the following equation (1). In Expression (1), the inter-core dependence in the target task placement candidate is n. W i Represents the rank weight assigned to each inter-core dependency i (i = 0 to n−1).
The evaluation value calculated in this way indicates that the smaller the value is, the smaller the influence of inter-core dependence on the execution performance of the entire task set is, that is, the better the task placement.
An example of the evaluation value calculated by the evaluation
FIG. 14 shows a task placement candidate. In this task arrangement candidate,
Note that FIG. 14 illustrates an example of calculating the evaluation value when the number of cores is 2. However, the evaluation
In step S104, the evaluation
For example, the evaluation
In step S104, the evaluation
For example, a system is assumed in which it is appropriate that the total execution time of tasks assigned to each core is equal in each core. In this case, the evaluation
In addition, in a task activated at regular intervals, the core utilization rate of each task can be calculated as “task execution time ÷ task activation cycle”. Here, a system is assumed in which it is appropriate that the utilization rate of the cores is equal in each core. In this case, the evaluation
A system is assumed in which the required memory size is appropriate for each core. In this case, in addition to the evaluation value based on the rank weight assigned to the inter-core dependency, the evaluation
As described above, when the task set
As described above, various methods can be applied to the evaluation value calculation method using the rank weight assigned to the inter-core dependency.
Next, a specific example of the search end condition used by the optimum
As described above, the optimal
If the task placement is better as the evaluation value is smaller, the optimum
At this time, the task placement search termination condition differs based on the optimization algorithm employed by the optimum
Further, for example, when another general optimization algorithm is adopted, the search end condition is determined that the evaluation value based on the algorithm is not further reduced, and generation of task placement candidates is repeated a predetermined number of times. It may be determined that the evaluation value does not become small.
As described above in detail, the task set
Next, effects of the first exemplary embodiment of the present invention will be described.
The task placement apparatus according to the first exemplary embodiment of the present invention can perform task placement with higher performance by further reducing the influence of non-uniform inter-core dependence based on the rank.
The reason is that the ordering weight assigning unit assigns ordering weights to each dependency existing between tasks based on the order in which each task can be executed in the execution flow of the entire task set. It is. When the placement unit places the task in one or more cores according to the dependency relationship, the evaluation value calculated based on the rank weight assigned to the dependency relationship between the tasks placed between different cores is This is because tasks are arranged so as to improve. Based on this, the task placement device as the present embodiment is for a task set in which an inter-core dependency waiting time occurs even if the number of inter-core dependencies based on the device described in
In addition, the task placement device as the first exemplary embodiment of the present invention can perform task placement with higher performance by further reducing the dependency waiting time at a position near the end of execution of the task set.
The reason is that the order weight assigning unit increases the order weights as the dependency relationship between the tasks whose order in the task graph is closer to the rear. Based on this operation, the placement unit calculates an evaluation value indicating that the placement is worse as the inter-core dependency between the tasks whose ranks are closer to the rear is larger. Then, the placement unit searches for a task placement that improves the evaluation value. Therefore, in the task placement searched in this way, a task having a dependency relationship near the end of execution of the entire task set is less likely to be placed on a different core. Therefore, the task placement device as the first exemplary embodiment of the present invention can cope with the critical dependency problem that appears behind the rank on the task graph.
In addition, the task placement device as the first exemplary embodiment of the present invention can reduce task dependency waiting time between tasks having similar execution orders in a task set, and perform task placement with higher performance.
The reason for this is that the ordering weight assigning unit increases the ordering weight as the dependency between tasks having a small difference in the ordering code in the task graph. Based on this operation, the placement unit calculates an evaluation value indicating that the placement is worse as the inter-core dependency between tasks having similar ranks increases. Then, the placement unit searches for a task placement that improves the evaluation value. Therefore, in the task placement searched in this way, the tasks having the dependency in the task set that are close to each other are less likely to be placed in different cores. Therefore, the task placement device as the first exemplary embodiment of the present invention can cope with the problem of dependency between tasks having similar ranks on the task graph.
(Second Embodiment)
Next, a second embodiment of the present invention will be described in detail with reference to the drawings. In each drawing referred to in the description of the present embodiment, the same reference numerals are given to the same configuration and steps that operate in the same manner as in the first embodiment of the present invention, and the details in the present embodiment will be described. The detailed explanation is omitted.
First, FIG. 15 shows a block of an example of the function of the
Here, the
The rank
Note that the ordinal
For example, when a unique order code is assigned to each task as in the case where an order code based on topological sort is generated using the order
The order
The operation of the
First, the task set
Next, the order
Next, the rank
Next, the
Next, the rank
Next, the optimum
Next, the evaluation
Next, the optimum
If the task placement search termination condition is not satisfied, the
On the other hand, when the task placement search termination condition is satisfied, the optimum
Note that in step S203, the
Above, description of operation | movement of the 2nd Embodiment of this invention is complete | finished.
Next, the effect of the second exemplary embodiment of the present invention will be described.
The task placement apparatus as the second exemplary embodiment of the present invention, when placing a task for a multi-core system, performs a process of calculating an ordering weight reflecting the ease of occurrence of dependency waiting time depending on the core. Increase efficiency.
The reason is that the rank code holding unit holds the rank code of each task used for calculating the rank weight. Here, when a certain task has a plurality of dependency relationships, the order weight assigning unit refers to the order code of the task a plurality of times in order to calculate the order weight. In such a case, the task placement device as the second exemplary embodiment of the present invention can further reduce the processing time of the rank weight assigning unit based on the hold of the rank code holding unit of the rank code once calculated. Because.
In addition, the task placement apparatus as the second exemplary embodiment of the present invention can further improve the efficiency of the process of searching for a better performance task placement by reducing the influence of non-uniform inter-core dependence based on the order. .
The reason is that the rank weight holding unit holds the rank weight generated by using the rank weight generation unit. Here, the rank weights are invariable once calculated and often need not be recalculated. Therefore, the order weight need not be recalculated every time the evaluation value is calculated for different task placement candidates. Therefore, the task placement device according to the second exemplary embodiment of the present invention can shorten the task placement search time based on holding the rank weights of the rank weight holding unit.
In each of the embodiments of the present invention described above, the order code is mainly described as having a smaller value as it is closer to the start task on the task graph. However, the order code in the present invention is, for example, on the task graph. The closer to the start task, the larger the value may be.
Further, in each of the embodiments of the present invention described above, the order weight is mainly described as having a value that is large enough to generate the dependency waiting time. However, the order weight in the present invention generates, for example, the dependency waiting time. You may have a small value that is easy to do.
In each of the embodiments of the present invention described above, the evaluation value is mainly described as having a smaller value as the task arrangement is better. However, the evaluation value in the present invention has a larger value as the task arrangement is better. Also good. In this case, the placement unit may search for a task placement candidate that increases the evaluation value.
In each of the embodiments of the present invention described above, the operation of the task placement device described with reference to each flowchart is stored in a storage device (storage medium) of a computer as a program of the present invention. The CPU may read and execute. In such a case, the present invention is configured using the code or storage medium of the program.
Moreover, each embodiment mentioned above can be implemented in combination as appropriate.
The present invention is not limited to the above-described embodiments, and can be implemented in various modes.
Moreover, although a part or all of said embodiment can be described also as the following additional remarks, it is not restricted to the following.
(Appendix 1)
A task set parameter holding means for holding a task set parameter including information representing a dependency relationship between the tasks for a task set which is a set of tasks to be arranged;
Using the reference to the task set parameter, a weight based on the order is assigned to each dependency between the tasks based on an order that is a position where each task can be executed in the execution flow of the entire task set. An order weight assigning means for assigning an order weight that is a coefficient representing;
When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement means for placing tasks based on the calculated evaluation value;
Including a task placement device.
(Appendix 2)
The rank weight assigning means includes
The closer the order of each task having the dependency is to the end in the flow of execution of the entire task set, the heavier the order weight given to the dependency is.
The task placement device according to
(Appendix 3)
The rank weight assigning means includes
The closer the order of the two tasks having the dependency relationship is, the heavier the order weight given to the dependency relationship is.
The task placement device according to
(Appendix 4)
The rank weight assigning means includes
Based on the task set parameter held in the task set parameter holding means, an order code representing the order to be used for giving the order weight is calculated.
The task placement device according to any one of
(Appendix 5)
Further comprising an order code holding means for holding an order code calculated using the order weight assigning means;
The rank weight assigning means includes
Using the reference of the order code held in the order code holding means, the order weight is given to each dependency.
The task placement device according to
(Appendix 6)
And further comprising an order weight holding means for holding the order weight given using the order weight giving means,
The arrangement means includes
The evaluation value is calculated using the order weight held in the order weight giving means.
The task placement device according to any one of
(Appendix 7)
For a task set that is a set of tasks to be arranged, a task set parameter including information indicating dependency between the tasks is retained,
Using the reference to the task set parameter, a weight based on the order is assigned to each dependency between the tasks based on an order that is a position where each task can be executed in the execution flow of the entire task set. Giving rank weights that are coefficients to represent,
When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And task placement based on the calculated evaluation value,
Task placement method.
(Appendix 8)
When assigning the order weights to the dependency relationships, the order weights of the tasks having the dependency relationships are closer to the end in the execution flow of the entire task set, and the order weights to be assigned to the dependency relationships are heavier. Do
The task placement method according to
(Appendix 9)
When assigning the order weights to each dependency relationship, the closer the order of the two tasks having the dependency relationship is, the heavier the order weight given to the dependency relationship is.
9. The task placement method according to
(Appendix 10)
A task set parameter holding process for holding a task set parameter including information representing a dependency relationship between the tasks for a task set which is a set of tasks to be arranged;
Using the reference to the task set parameter, a weight based on the order is assigned to each dependency between the tasks based on an order that is a position where each task can be executed in the execution flow of the entire task set. An order weighting process for assigning an order weight that is a coefficient to be represented;
When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement processing for task placement based on the calculated evaluation value;
A program that causes a computer to execute.
(Appendix 11)
In the order weight assigning process, the order weight assigned to the dependency is increased as the order of each task having the dependency is closer to the end in the flow of execution of the entire task set.
The program according to
(Appendix 12)
In the order weighting process, the closer the order of the two tasks having the dependency relation is, the heavier the order weight given to the dependency relation is.
The computer program according to
Although the present invention has been described with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.
This application claims the priority on the basis of Japanese application Japanese Patent Application No. 2011-231283 for which it applied on October 21, 2011, and takes in those the indications of all here.
1、2 タスク配置装置
11 タスクセットパラメータ保持部
12 序列重み付与部
13 配置部
24 序列符号保持部
25 序列重み保持部
121 序列符号生成部
122 重み付け部
131 評価値算出部
132 最適配置探索部
1001 CPU
1002 RAM
1003 ROM
1004 記憶装置DESCRIPTION OF
1002 RAM
1003 ROM
1004 Storage device
Claims (10)
前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与手段と、
前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置手段と、
を含むタスク配置装置。 A task set parameter holding means for holding a task set parameter including information representing a dependency relationship between the tasks for a task set which is a set of tasks to be arranged;
Based on the task set parameters and an order that is a position where each task can be executed in the execution flow of the entire task set, a coefficient representing a weight based on the order for each dependency relationship between the tasks An order weighting means for assigning a certain order weight;
When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement means for placing tasks based on the calculated evaluation value;
Including a task placement device.
前記依存関係を有する各タスクの序列が、前記タスクセット全体の実行の流れにおいて終了に近いほど、該依存関係に付与する前記序列重みを重くする
ことを特徴とする請求項1に記載のタスク配置装置。 The rank weight assigning means includes
2. The task arrangement according to claim 1, wherein as the order of each task having the dependency relationship is closer to the end in the flow of execution of the entire task set, the order weight given to the dependency relationship is increased. apparatus.
前記依存関係を有する2つのタスクの序列が近いほど、該依存関係に付与する前記序列重みを重くする
ことを特徴とする請求項1または請求項2に記載のタスク配置装置。 The rank weight assigning means includes
The task placement device according to claim 1, wherein the rank weight assigned to the dependency relation is increased as the rank order of the two tasks having the dependency relation is closer.
前記タスクセットパラメータ保持手段に保持された前記タスクセットパラメータに基づいて、前記序列重みの付与に用いるための前記序列を表す序列符号を算出する
ことを特徴とする請求項1乃至請求項3のいずれか1項に記載のタスク配置装置。 The rank weight assigning means includes
4. The rank code representing the rank to be used for assigning the rank weight is calculated based on the task set parameter held in the task set parameter holding means. The task placement device according to claim 1.
前記序列重み付与手段は、
前記序列符号保持手段に保持された序列符号を基に、前記各依存関係に前記序列重みを付与する
ことを特徴とする請求項4に記載のタスク配置装置。 Further comprising an order code holding means for holding an order code calculated using the order weight assigning means;
The rank weight assigning means includes
The task placement apparatus according to claim 4, wherein the order weight is assigned to each dependency relationship based on the order code held in the order code holding unit.
前記配置手段は、
前記序列重み付与手段に保持された序列重みを用いて前記評価値を算出する
ことを特徴とする請求項1乃至請求項5のいずれか1項に記載のタスク配置装置。 And further comprising an order weight holding means for holding the order weight given using the order weight giving means,
The arrangement means includes
The task placement apparatus according to any one of claims 1 to 5, wherein the evaluation value is calculated using a rank weight held in the rank weight assigning unit.
前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与し、
前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する、
タスク配置方法。 For a task set that is a set of tasks to be arranged, a task set parameter including information indicating dependency between the tasks is retained,
Based on the task set parameters and an order that is a position where each task can be executed in the execution flow of the entire task set, a coefficient representing a weight based on the order for each dependency relationship between the tasks A certain ordering weight,
When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And task placement based on the calculated evaluation value,
Task placement method.
ことを特徴とする請求項7に記載のタスク配置方法。 When assigning the order weights to the dependency relationships, the order weights of the tasks having the dependency relationships are closer to the end in the execution flow of the entire task set, and the order weights to be assigned to the dependency relationships are heavier. The task placement method according to claim 7, wherein:
ことを特徴とする請求項7または請求項8に記載のタスク配置方法。 8. When assigning the order weight to each dependency, the order weight given to the dependency is increased as the order of two tasks having the dependency is closer. Item 9. The task placement method according to Item 8.
前記タスクセットパラメータと、前記タスクセット全体の実行の流れにおいて各タスクが実行され得る位置である序列とに基づいて、前記タスク間の各依存関係に対して、前記序列に基づく重みを表す係数である序列重みを付与する序列重み付与処理と、
前記タスクセットに属するタスクを前記依存関係にしたがって1つ以上のコアに配置する際に、異なるコアに配置される2つのタスク間の依存関係に付与された前記序列重みを用いて評価値を算出し、算出した評価値に基づいてタスク配置する配置処理と、
をコンピュータに実行させるプログラム。 A task set parameter holding process for holding a task set parameter including information representing a dependency relationship between the tasks for a task set which is a set of tasks to be arranged;
Based on the task set parameters and an order that is a position where each task can be executed in the execution flow of the entire task set, a coefficient representing a weight based on the order for each dependency relationship between the tasks An order weighting process for assigning a certain order weight;
When a task belonging to the task set is arranged in one or more cores according to the dependency relationship, an evaluation value is calculated using the order weights given to the dependency relationship between two tasks arranged in different cores And placement processing for task placement based on the calculated evaluation value;
A program that causes a computer to execute.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011231283 | 2011-10-21 | ||
JP2011231283 | 2011-10-21 | ||
PCT/JP2012/077175 WO2013058396A1 (en) | 2011-10-21 | 2012-10-16 | Task allocation device and task allocation method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2013058396A1 JPWO2013058396A1 (en) | 2015-04-02 |
JP5983623B2 true JP5983623B2 (en) | 2016-09-06 |
Family
ID=48141039
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013539721A Active JP5983623B2 (en) | 2011-10-21 | 2012-10-16 | Task placement apparatus and task placement method |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP5983623B2 (en) |
WO (1) | WO2013058396A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190057558A (en) * | 2017-11-20 | 2019-05-29 | 삼성전자주식회사 | Multi core control system |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107491931A (en) * | 2017-07-12 | 2017-12-19 | 浙江大学 | A kind of design objective data resolving method that meter is founded based on crowd |
CN113534750B (en) * | 2020-04-15 | 2022-12-02 | 北京旷视机器人技术有限公司 | Job scheduling method, device, system, equipment and medium under intensive storage |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5040136B2 (en) * | 2006-03-27 | 2012-10-03 | 富士通セミコンダクター株式会社 | Tuning support device, tuning support program, computer-readable recording medium recording tuning support program, and tuning support method |
US8881158B2 (en) * | 2008-11-14 | 2014-11-04 | Nec Corporation | Schedule decision device, parallel execution device, schedule decision method, and program |
-
2012
- 2012-10-16 WO PCT/JP2012/077175 patent/WO2013058396A1/en active Application Filing
- 2012-10-16 JP JP2013539721A patent/JP5983623B2/en active Active
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190057558A (en) * | 2017-11-20 | 2019-05-29 | 삼성전자주식회사 | Multi core control system |
KR102452205B1 (en) * | 2017-11-20 | 2022-10-06 | 삼성전자주식회사 | Multi core control system |
Also Published As
Publication number | Publication date |
---|---|
WO2013058396A1 (en) | 2013-04-25 |
JPWO2013058396A1 (en) | 2015-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5971334B2 (en) | Task allocation device, task allocation method, and computer program | |
Viswanathan et al. | {CLARINET}:{WAN-Aware} Optimization for Analytics Queries | |
Chowdhury et al. | Implementation and performance analysis of various VM placement strategies in CloudSim | |
Tang et al. | A self-adaptive scheduling algorithm for reduce start time | |
Ge et al. | GA-based task scheduler for the cloud computing systems | |
Bicer et al. | Time and cost sensitive data-intensive computing on hybrid clouds | |
JP5929196B2 (en) | Distributed processing management server, distributed system, distributed processing management program, and distributed processing management method | |
Bittencourt et al. | A performance‐oriented adaptive scheduler for dependent tasks on grids | |
Singh et al. | A hybrid strategy for mapping multiple throughput-constrained applications on MPSoCs | |
Choudhury et al. | Online scheduling of dynamic task graphs with communication and contention for multiprocessors | |
US8997071B2 (en) | Optimized division of work among processors in a heterogeneous processing system | |
JPWO2012056609A1 (en) | Task allocation optimization system, task allocation optimization method, and task allocation optimization program | |
Wu et al. | Optimizing the performance of big data workflows in multi-cloud environments under budget constraint | |
EP3908920B1 (en) | Optimizing hardware fifo instructions | |
WO2011102219A1 (en) | Real time system task configuration optimization system for multi-core processors, and method and program | |
CN104199739A (en) | Speculation type Hadoop scheduling method based on load balancing | |
Li et al. | An effective scheduling strategy based on hypergraph partition in geographically distributed datacenters | |
JP6171938B2 (en) | Task allocation optimization system, task allocation optimization method, and task allocation optimization program | |
Karnagel et al. | Heterogeneity-aware operator placement in column-store DBMS | |
Ruiz-Alvarez et al. | Toward optimal resource provisioning for cloud mapreduce and hybrid cloud applications | |
JP5983623B2 (en) | Task placement apparatus and task placement method | |
Lawrance et al. | Efficient Qos based resource scheduling using PAPRIKA method for cloud computing | |
Khan et al. | An optimized hybrid algorithm in term of energy and performance for mapping real time workloads on 2d based on-chip networks | |
CN105740249B (en) | Processing method and system in parallel scheduling process of big data job | |
Saule et al. | Optimizing the stretch of independent tasks on a cluster: From sequential tasks to moldable tasks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150918 |
|
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: 20160705 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160718 |
|
R150 | Certificate of patent (=grant) or registration of utility model |
Ref document number: 5983623 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |