JP7454700B2 - Arithmetic device and inspection method - Google Patents
Arithmetic device and inspection method Download PDFInfo
- Publication number
- JP7454700B2 JP7454700B2 JP2022558922A JP2022558922A JP7454700B2 JP 7454700 B2 JP7454700 B2 JP 7454700B2 JP 2022558922 A JP2022558922 A JP 2022558922A JP 2022558922 A JP2022558922 A JP 2022558922A JP 7454700 B2 JP7454700 B2 JP 7454700B2
- Authority
- JP
- Japan
- Prior art keywords
- condition
- tasks
- task
- processor cores
- violation
- 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
- 238000000034 method Methods 0.000 title claims description 124
- 238000007689 inspection Methods 0.000 title claims description 80
- 238000010586 diagram Methods 0.000 description 29
- 238000012986 modification Methods 0.000 description 16
- 230000004048 modification Effects 0.000 description 16
- 238000012360 testing method Methods 0.000 description 15
- 230000001419 dependent effect Effects 0.000 description 7
- 230000000903 blocking effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000000295 complement effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
-
- 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/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Description
本開示は、演算装置及び検査方法に関する。 The present disclosure relates to an arithmetic device and an inspection method.
近年、電子機器の多機能化などにより、電子機器で実行される演算処理の演算量が年々増加しており、それに伴い、電子機器に搭載するCPU(Central Processing Unit)などのプロセッサの性能の向上が望まれている。 In recent years, due to the multi-functionality of electronic devices, the amount of arithmetic processing performed by electronic devices has been increasing year by year.As a result, the performance of processors such as CPUs (Central Processing Units) installed in electronic devices has been improved. is desired.
このため、電子機器に搭載するプロセッサの数を増やしたり、プロセッサに内蔵させるプロセッサコアの数を増やしたりすることで、電子機器にプロセッサコアを複数搭載するマルチコア化を図ることが多くなっている。 For this reason, it is becoming increasingly common for electronic devices to be multi-core, by increasing the number of processors installed in the device or increasing the number of processor cores built into the processor.
また、複数のプロセッサコアを利用するために、単一のプロセッサコア向けのプログラムから並列処理が可能な部分を抽出して、各プロセッサコアで実行される複数のプログラムを含む並列化プログラムを作成することがある。並列化プログラムでは、元のプログラムの各タスクが複数のプロセッサコアに適宜割り当てられている。 In addition, in order to utilize multiple processor cores, parts that can be processed in parallel are extracted from a program for a single processor core, and a parallelized program that includes multiple programs to be executed on each processor core is created. Sometimes. In a parallelized program, each task of the original program is appropriately assigned to a plurality of processor cores.
並列化プログラムによって元のプログラムと同じ実行結果を得るためには、各タスクの依存関係を考慮して、各プロセッサコアで実行されるプログラムを作成する必要がある。 In order to obtain the same execution results as the original program using a parallelized program, it is necessary to create a program that will be executed on each processor core, taking into account the dependencies of each task.
例えば、あるタスクの計算結果が別のタスクで使用される場合、それらのタスクの実行順序が元のプログラムでの実行順序と同じにように、各プロセッサコアで実行されるプログラムを作成する必要がある。 For example, if the computation results of one task are used by another task, you must write a program to run on each processor core such that the execution order of those tasks is the same as that of the original program. be.
このため、並列化プログラムの動作を検査する際に、依存関係を有するタスクの実行順序が元のプログラムでの実行順序と同一か否かを確認することがある。 Therefore, when inspecting the operation of a parallelized program, it may be checked whether the execution order of tasks having a dependency relationship is the same as the execution order of the original program.
これに対して、特許文献1には、各CPUコアに割り当てた複数のタスクのうち、互いに同時実行可能な2つのタスクに注目して、それらのタスクの実行順序を入れ替えて実行した時の結果と、同時実行される場合の不具合を、それを引き起こす所定の条件を確認する方法が開示されている。
On the other hand,
同時実行可能なタスクを取得し、それらのタスク間で、所定の条件を判定することができれば、並列化プログラムにおける所定の違反の有無を検知することができる。 If tasks that can be executed simultaneously can be obtained and predetermined conditions can be determined between these tasks, it is possible to detect whether or not a predetermined violation occurs in a parallelized program.
しかしながら、従来技術においては、同時実行可能なタスクを見出すことは非常に困難であり、特許文献1においても、同時実行可能なタスクを取得する方法は開示されていない。
However, in the prior art, it is very difficult to find tasks that can be executed simultaneously, and
自動で並列化された並列化プログラムは、どのタスクが同時に実行されるかが自明ではないため、並列化プログラムが複雑になればなるほど、同時実行可能なタスクの取得は困難となる。 In a parallelized program that is automatically parallelized, it is not obvious which tasks will be executed simultaneously, so the more complex the parallelized program becomes, the more difficult it becomes to obtain tasks that can be executed simultaneously.
本開示の目的は、並列化プログラムを構成する複数のタスク間の関係を効率的に自動取得するアルゴリズムを提供し、タスク間において所定の条件を判定することで、並列化プログラムの動作の検査に掛かる負荷を軽減することが可能な演算装置及び検査方法を提供することである。 An object of the present disclosure is to provide an algorithm that efficiently and automatically obtains the relationship between multiple tasks that constitute a parallelized program, and to determine a predetermined condition between the tasks, which can be used to inspect the operation of a parallelized program. An object of the present invention is to provide an arithmetic device and an inspection method that can reduce the load.
上記目的を達成するため、本開示は次のように構成される。 In order to achieve the above object, the present disclosure is configured as follows.
複数のプロセッサコアのそれぞれで実行される複数のタスクからなるプログラムを並列化した並列化プログラムの動作を検査する検査方法であって、前記複数のタスクで共有される資源へのアクセスに関するアクセス情報を取得し、少なくとも、前記複数のタスクに対して第一の条件を適用したときの前記複数のタスクの第一の処理順序と、前記複数のタスクに対して前記第一の条件とは異なる第二の条件を適用したときの前記複数のタスクの第二の処理順序と、を求め、前記第一の処理順序および前記第二の処理順序において、前記複数のタスクで共有される資源へアクセスする第一のタスクより前に行われるタスクからなる先行タスクグループと、前記第一のタスクより後に行われるタスクからなる後続タスクグループと、を比較し、比較結果に基づいて特定されたタスクに対して、前記アクセス情報を用いて、前記並列化プログラムにおける所定の違反の有無を検知する。
An inspection method for inspecting the operation of a parallelized program in which a program consisting of a plurality of tasks executed on each of a plurality of processor cores is parallelized, the inspection method comprising access information regarding access to resources shared by the plurality of tasks. and at least a first processing order of the plurality of tasks when the first condition is applied to the plurality of tasks, and a first processing order of the plurality of tasks that is different from the first condition. a second processing order of the plurality of tasks when applying the second condition, and accesses a resource shared by the plurality of tasks in the first processing order and the second processing order. A preceding task group consisting of tasks to be performed before the first task and a subsequent task group consisting of tasks to be performed after the first task are compared, and the task identified based on the comparison result is , detecting the presence or absence of a predetermined violation in the parallelized program using the access information.
複数のプロセッサコアのそれぞれで実行される複数のタスクからなるプログラムを並列化した並列化プログラムの動作を検査する検査方法であって、前記複数のタスクで共有される前記資源へのアクセスに関するアクセス情報を取得し、少なくとも、前記複数のタスクに対して第一の条件を適用したときの前記複数のタスクの第一の処理順序と、前記複数のタスクに対して前記第一の条件とは異なる第二の条件を適用したときの前記複数のタスクの第二の処理順序と、を求め、前記第一の処理順序および前記第二の処理順序において、前記複数のタスクで共有される資源へアクセスする第一のタスクより前に行われるタスクからなる先行タスクグループと、前記第一のタスクより後に行われるタスクからなる後続タスクグループと、を比較し、比較結果に基づいて特定されたタスクに対して、前記アクセス情報を用いて、前記並列化プログラムにおける所定の違反の有無を検知する。 An inspection method for inspecting the operation of a parallelized program in which a program consisting of a plurality of tasks executed by each of a plurality of processor cores is parallelized, the method comprising access information regarding access to the resource shared by the plurality of tasks. and obtain at least a first processing order of the plurality of tasks when the first condition is applied to the plurality of tasks, and a first processing order of the plurality of tasks that is different from the first condition. a second processing order of the plurality of tasks when applying the second condition, and accesses a resource shared by the plurality of tasks in the first processing order and the second processing order. A preceding task group consisting of tasks to be performed before the first task and a subsequent task group consisting of tasks to be performed after the first task are compared, and the task identified based on the comparison result is , detecting the presence or absence of a predetermined violation in the parallelized program using the access information.
本開示によれば、並列化プログラムを構成する複数のタスク間の関係を効率的に自動取得するアルゴリズムを提供し、タスク間において所定の条件を判定することで、並列化プログラムの動作の検査に掛かる負荷を軽減することが可能な演算装置及び検査方法を提供することができる。 According to the present disclosure, an algorithm is provided that efficiently automatically acquires the relationship between multiple tasks that constitute a parallelized program, and by determining a predetermined condition between tasks, it is possible to inspect the operation of a parallelized program. It is possible to provide an arithmetic device and an inspection method that can reduce the load.
以下、本開示の実施形態について図面を参照して説明する。本開示は、複数のプロセッサコアのそれぞれで実行される複数のタスクからなるプログラムを並列化した並列化プログラムの動作を検査する演算装置及び検査装置である。 Embodiments of the present disclosure will be described below with reference to the drawings. The present disclosure is an arithmetic device and a testing device that test the operation of a parallelized program that is a parallelized program made up of a plurality of tasks executed by each of a plurality of processor cores.
(実施例1)
まず、実施例1を図1から図18を用いて説明する。
(Example 1)
First, Example 1 will be described using FIGS. 1 to 18.
図1は、本開示の実施例1に係るテスト装置1000の概略構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of a
図1において、テスト装置1000は、複数のプロセッサコア向けのプログラムである並列化プログラムの動作を検査する検査処理を実行する演算装置である。並列化プログラムは、単一のプロセッサコア向けのプログラムである単一コア用プログラムから所定のツール等を用いて生成されたものでもよい。並列化プログラムは、複数のプロセッサコアのそれぞれで実行される複数の個別プログラムを含む。
In FIG. 1, a
テスト装置1000は、メモリ1100と、CPU1200とを有する。メモリ1100及びCPU1200は、内部バス又はアダプタなどを介して相互に接続される。
メモリ1100は、複数のタスクで共有される資源と、並列化プログラムを記憶する。つまり、メモリ1100は、CPU1200の動作を規定する種々のプログラムを含む種々の情報を記憶する記憶部である。そして、CPU1200は、並列化プログラムに基づいて動作する制御部である。CPU1200は、以下に説明するプログラムに従って、並列化プログラムにおける所定の違反の有無を検知する(検査する)。
The
本実施例1では、メモリ1100は、エミュレータ1101と、違反検査プログラム1102と、core0用プログラム1103と、core1用プログラム1104と、core2用プログラム1105と、を記憶する。メモリ1100は、さらに、違反情報1106と、変数アクセス情報1107と、タスクグループ情報1108と、実行順序情報1109と、選択コア情報1110と、同期フラグ1111と、を記憶する。変数アクセス情報1107には、例えば、グローバル変数等の変数も含まれ、これらの変数は、複数のタスクで共有される資源である。
In the first embodiment, the
エミュレータ1101は、並列化プログラムの各個別プログラムを実行する複数のプロセッサコアを仮想的に実現するためのプログラムである。本実施例1では、複数のプロセッサコアとして、3つのCPUコア(仮想CPUコア0、仮想CPUコア1および仮想CPUコア2)が仮想的に実現される。
The
違反検査プログラム1102は、エミュレータ1101にて、並列化プログラムに対し、そのプログラムが所定の条件を満たすか否かを検査するためのプログラムである。そのときに必要なタスク実行順序は、実現された仮想CPUコア0、仮想CPUコア1および仮想CPUコア2を、並列化プログラムを実行させるプロセッサコアとして用いて取得する。
The
以下では、便宜上、プログラム及びタスクを各処理の動作主体として説明することもあるが、各処理の実際の動作主体は制御部であるCPU1200である。
In the following, for convenience, programs and tasks may be described as the operating entities of each process, but the actual operating entity of each process is the
core0用プログラム1103、core1用プログラム1104およびcore2用プログラム1105は、検査処理の検査対象となる並列化プログラムを構成する。core0用プログラム1103、core1用プログラム1104およびcore2用プログラム1105は、それぞれ、仮想CPUコア0、仮想CPUコア1および仮想CPUコア2により個別に実現される。
The
違反情報1106は、並列化プログラムが所定の条件の成立可否などの情報を示す。
変数アクセス情報1107は、各core用プログラム1103~1105が、アクセスしている変数の情報を示す。
タスクグループ情報1108は、あるタスクあるいは処理に対し、それ以外のタスクあるいは処理が、とりうる状態毎にグループ分けしたリストを示す。
The
実行順序情報1109は、タスクあるいは処理が実行された順序を示す。
選択コア情報1110は、実行順序取得(スケジュール)処理において、プロセッサコアを管理するために使用される管理情報であり、本実施例1では、検査処理において選択中及び選択済みのプロセッサコアを示す。
The selected
同期フラグ1111は、並列化プログラムの各タスクの実行順序に関する制約を規定するための制約情報である。同期フラグ1111は、具体的には、並列化プログラムの各タスクのうち、他のタスクに依存している依存タスクの実行可否を示す。
The
依存タスクは、依存対象のタスクの演算結果を使用するなど、依存対象のタスクとの間に実行順序に関する制約を有するタスクである。なお、同期フラグ1111は、複数あってもよい。 A dependent task is a task that has execution order constraints with respect to the dependent task, such as using the calculation result of the dependent task. Note that there may be a plurality of synchronization flags 1111.
図2は、プログラムが実行されることで実現されるCPU1200の機能的な構成の一例を示す図である。
FIG. 2 is a diagram illustrating an example of the functional configuration of
図2に示すように、エミュレータ1101にて、仮想CPUコア0、仮想CPUコア1及び仮想CPUコア2が仮想的に実現される。core0用プログラム1103、core1用プログラム1104及びcore2用プログラム1105は、ここでは、タスクT1~T10を含む単一コア用プログラムから、3つのプロセッサコアで並列処理が可能なように作成されている。
As shown in FIG. 2,
core0用プログラム1103は、仮想CPUコア0にタスクT1、T2、T6及びT7を実行させる個別プログラムである。core1用プログラム1104のタスクT3、T4及びT5、core2用プログラム1105のタスクT8、T9及びT10も同様にそれぞれの仮想CPUで実行される。
The
フラグAは、タスクT1が終了するまでタスクT3(タスクT1に依存した依存タスク)を開始させないように制御するための同期フラグである。フラグAは、タスクT1によってセットされる。タスクT3はタスクT1によってフラグAがセットされるまで待機する。 Flag A is a synchronization flag for controlling so that task T3 (a dependent task dependent on task T1) is not started until task T1 is completed. Flag A is set by task T1. Task T3 waits until flag A is set by task T1.
なお、フラグを、実行可能を示す状態にすることを「フラグをセットする」と呼び、フラグが実行可能を示す状態になるまで待機することを「セット待ち」と呼ぶ。同様に、フラグBは、タスクT7とタスクT4の依存関係を制御し、フラグCは、タスクT4とタスクT8の依存関係を制御する。 Note that setting the flag to a state indicating executable is called "setting a flag," and waiting until the flag becomes a state indicating executable is called "waiting to set." Similarly, flag B controls the dependency relationship between task T7 and task T4, and flag C controls the dependency relationship between task T4 and task T8.
違反検査システムは、同期フラグ1111にて規定される各タスクT1~T10の実行順序に関する制約を満たしつつ、優先条件に従ってタスクT1~T10を順次実行させる検査処理を行うことで、core0用プログラム1103、core1用プログラム1104及びcore2用プログラム1105の各タスクの実行順序に関する制約、つまり各タスクの依存関係が元の単一コア用プログラムと等しいか否かを検査する。
The violation inspection system performs an inspection process that sequentially executes tasks T1 to T10 according to priority conditions while satisfying the constraints regarding the execution order of each task T1 to T10 defined by the
あるタスクに着目した時、そのタスクに対して、必ず順序が決まるタスクと同時実行可能なタスクが定まる。 When we focus on a certain task, we determine which tasks must be ordered in a certain order and which tasks can be executed simultaneously.
したがって、全てのコアに着目することで、全ての同時実行可能なタスクを抽出できる。 Therefore, by focusing on all cores, all tasks that can be executed simultaneously can be extracted.
例えば、タスクT4に着目すると、タスクT2、T6、T9、T10が同時実行可能なタスクである。それ以外のタスクは、必ず順序が決まるタスクである。 For example, focusing on task T4, tasks T2, T6, T9, and T10 are tasks that can be executed simultaneously. Other tasks are tasks whose order is always determined.
実施例1では、異なるコア上で実行される同時実行可能なタスクにおいて、変数アクセスが所定の条件(例えば、同一の変数(共有の資源)へのリード動作またはライト動作が行われているか(リード動作またはライト動作の競合が存在するか(ただし、少なくとも一つのライト動作の競合が存在することが必要である)))を満たすか否かを判定することで、並列プログラムの違反を検査する。 In the first embodiment, variable access is performed under predetermined conditions (for example, whether a read or write operation is being performed on the same variable (shared resource) in concurrently executable tasks executed on different cores. A parallel program is checked for violations by determining whether there is a conflict between operations or write operations (provided that there must be a conflict between at least one write operation).
図3に示す違反検査システム3101は、競合を検査する検査システムである。違反検査システム3101は、違反判定処理3102と、アクセス競合解析処理3103と、同時実行可能タスク取得処理3104と、先行/後続タスクグループ取得処理3105と、スケジューラ(実行順序取得処理)3106と、で構成される。
A
違反判定処理3102は、プログラム全体における違反の有無を判定する処理である。本実施例1では、競合を検査する。
The
アクセス競合解析処理3103は、ある変数に対して、複数のタスクから、同時にアクセスが発生しないことを判定し、その結果を違反判定処理3102に返す。ある変数は、違反判定処理3102から受け取った、タスク(以下、基準タスクと記述)内で、Write処理をしている変数すべてである。
The access
同時実行可能タスク取得処理3104は、アクセス競合解析処理3103から受け取った、基準タスクと、同時に実行されうるタスク(同時実行可能なタスク)を取得し、アクセス競合解析処理3103に返す。
The concurrently executable
先行/後続タスクグループ取得処理3105は、様々な実行順序において、基準タスクより先に動作したタスクグループのリストと、より後に動作したタスクグループのリストと、を取得し、同時実行可能タスク取得処理3104に返す。
The preceding/succeeding task
なお、様々な実行順序は、同時実行可能なタスク取得処理3104から受け取った、実行順序条件に基づく。
Note that the various execution orders are based on execution order conditions received from the concurrently executable
スケジューラ(実行順序取得処理)3106は、先行後続タスクグループ取得処理3105から受け取った実行順序条件に従い、実行順序を取得して、先行後続タスクグループ取得処理3105に返す処理である。
The scheduler (execution order acquisition process) 3106 is a process that acquires the execution order according to the execution order condition received from the preceding and succeeding task
図4は、図3の違反判定処理3102の内容の一例を示すフローチャートである。
FIG. 4 is a flowchart showing an example of the content of the
違反検査システム3101は、並列化プログラムを構成する全てのタスクについて、ループ4100で、順番に検査する。
The
違反検査システム3101は、ループ4100で、選択されているタスクにおいて、共有(グローバル)変数へのWrite処理の有無を判定する。共有(グローバル)変数へのWrite処理が有の場合(Yesの場合)は、フラグをセットする。
In a
なお、ポインタ変数はローカルで宣言されていても、その指し先がグローバル領域ならグローバル変数として扱う(ステップ4101)。 Note that even if a pointer variable is declared locally, if the pointer is in the global area, it is treated as a global variable (step 4101).
違反検査システム3101は、基準タスクに対する、アクセス競合を検査するサブフローである。ステップ4102の詳細は図5で説明する。
The
違反検査システム3101は、ステップ4102の結果がOKである場合、何もせずループ4100を続行し、NGであった場合、ステップ4104を実行する(ステップ4104)。
If the result of
違反検査システム3101は、違反ありを図1の違反情報1106に格納し、プログラムを終了させる。
The
図5は、変数のアクセス競合の有無を判定するためのフローチャートであり、図4のステップ4102のアクセス競合解析のサブフローである。なお、図5に示したフローチャートは、図3のアクセス競合解析処理3103の動作に相当する。
FIG. 5 is a flowchart for determining the presence or absence of variable access conflict, and is a subflow of access conflict analysis in
アクセス競合解析処理3103は、違反判定処理3102から受け取った、基準タスクに対して、それと同時に実行されうるタスクを、同時実行可能タスク処理3104から取得する(ステップ5101)。
The access
アクセス競合解析処理3103は、アクセス競合を検査する(ステップ5102)。つまり、ステップ5101で取得したタスク群に対し、当該タスクでWriteするコア間共有変数の少なくとも一つに対するR/W有りか無しかを判定する。
The access
基準タスクでWriteしている共有変数すべてに対し、基準タスクと同時実行可能なタスクで、当該共有変数へのReadあるいはWriteの有無を検索し、当該共有変数すべてのうち、少なくとも1つの共有変数に1つのReadあるいはWriteが検出された場合、ステップ5103を実行する。
For all the shared variables that are being written in the standard task, a task that can be executed concurrently with the standard task searches for the presence or absence of Read or Write to the shared variables, and writes the command to at least one shared variable among all the shared variables. If one Read or Write is detected,
一方、基準タスクと同時実行可能なタスクにおいて、すべての当該共有変数に対するReadとWriteが一つも見つからなかった場合、処理を終了し、図4のフローに戻る。 On the other hand, in a task that can be executed simultaneously with the reference task, if no Read or Write is found for all the relevant shared variables, the process is ended and the process returns to the flow of FIG. 4.
違反判定プログラム3101は、アクセス競合があった場合に実行されるフローであり、違反ありを図4のフローに返す(ステップ5103)。なお、違反箇所をメモリ1100の違反情報1106に格納するように変更する。違反箇所はディスプレイ等の適切な出力装置に出力することができる。これは、コードを修正する際に有用な情報である。
The
図6は、図3に示した同時実行可能タスク取得処理3104の内容の一例を示すフローチャートである。図6に示すフローチャートは、複数のプロセッサコア(仮想CPUコア0、仮想CPUコア1、仮想CPUコア2)のそれぞれに任意の実行優先順序を割り当てる第一の条件と、複数のプロセッサコア(仮想CPUコア0、仮想CPUコア1、仮想CPUコア2)のそれぞれに第一の条件と逆の優先順序を割り当てる第二の条件を用いる。
FIG. 6 is a flowchart showing an example of the contents of the concurrently executable
複数のタスクに対して第一の条件を適用したときの複数のタスクの処理順序を第一の処理順序とし、複数のタスクに対して第一の条件とは異なる第二の条件を適用したときの複数のタスクの処理順序を第二の処理順序とする(以下の説明においても、同様である)。 When the first condition is applied to multiple tasks, the processing order of multiple tasks is set as the first processing order, and the second condition, which is different from the first condition, is applied to multiple tasks. The processing order of the plurality of tasks will be referred to as the second processing order (the same applies in the following description).
図6に示したフローチャートは、正順・逆順の二通りの実行順序から、アクセス競合解析処理3103より受け取った、基準タスクと同時実行可能なタスクを取得する。
The flowchart shown in FIG. 6 acquires tasks that can be executed concurrently with the reference task received from the access
違反検査システム3101は、複数の実行順序において、基準タスクより先に実行されたタスクを格納する先行タスクグループおよび、基準タスクより後に実行されたタスクを格納する後続タスクグループを初期化(リストを空に)する(ステップ6101)。
The
違反検査システム3101は、実行順序を取得するにあたって、実行順序取得処理におけるポリシーを設定する(ステップ6102)。実施例1では、正順、逆順の2本のリストを設定するというポリシーを設定する。
When acquiring the execution order, the
正順は、すべてのタスクに対して、コアごとに実行優先度を設定する。たとえば、仮想CPUコア0を第一優先、仮想CPUコア1を第二優先、・・・というような具合である。
In normal order, execution priority is set for each core for all tasks. For example,
逆順は、正順で設定した実行優先度を逆転したものである。実行順序取得処理において、優先度が第一優先の仮想CPUコア0に属するタスクは、第二優先以下のコアに属するタスクより可能な限り先に実行するようにスケジュールされる。
The reverse order is the reversal of the execution priority set in the normal order. In the execution order acquisition process, tasks belonging to
違反検査システム3101は、ステップ6102で設定した全てのポリシーで、実行順序から情報をループ6103で取得する。本実施例1では、ループ回数は2である。
The
違反検査システム3101は、先行/後続タスクグループを取得する処理であり、実行順序から、先行タスクグループおよび後続タスクグループに各タスクを振り分ける(ステップ6104)。
The
違反検査システム3101は、先行タスクグループ、後続タスクグループの集合和を取り、同時実行可能なタスクとして、図5のフローに、そのリストを返す(ステップ6105)。つまり、先行タスクグループと後続タスクグループのANDを取り、図5のフローに返す。同時実行可能なタスクは、基準タスクに対し、順序が不定(入れ替え可能)であることから、先行タスクグループ、後続タスクグループの両方に含まれ、集合和を取ることで、同時実行可能なタスクを取得することができる。The
図7は、図3の先行/タスクグループ取得処理3105の内容の一例を示すフローチャートである。
FIG. 7 is a flowchart showing an example of the contents of the preceding/task
図7において、ステップ7101は、実行順序の取得に用いるスケジューラ(最早スケジューラ、最遅スケジューラ、正順/逆順スケジューラ)を選択する分枝処理である。
ステップ7102で、違反検査システム3101は、あるコアを最早で実行する最早スケジューリングを実施する最早スケジューラを選択する。
In FIG. 7,
In
ステップ7103で、違反検査システム3101は、あるコアを最遅で実行する最遅スケジューリングを実施する最遅スケジューラを選択する。
In
ステップ7104で、違反検査システム3101は、全てのコアに優先度を付与して実行する優先度付きスケジューリングを実施する全優先度付きスケジューラを選択する。
In
ステップ7105で、違反検査システム3101は、選択されたスケジューラで実行順序を取得する。
In
違反検査システム3101は、先行タスクグループに、ステップ7105において取得した実行順序において、基準タスクより先に実行されるタスクを追加する(ステップ7106)。
The
なお、ステップ7106が2回目以降に実行される場合は、先行タスクグループに既にあるタスクとORを取りながら追加する。
Note that when
違反検査システム3101は、後続タスクグループに、ステップ7105において取得した実行順序において、基準タスクより後に実行されるタスクを追加する(ステップ7107)。
The
なお、ステップ7107が2回目以降に実行される場合は、後続タスクグループに既にあるタスクとORを取りながら追加する。
Note that when
図8は、図7のステップ7104で設定した全優先度付きスケジューラを、ステップ7105で実行するときの実行順序取得処理の一例を説明するためのフローチャートである。図8に示したフローチャートは、図3では、スケジューラ3106の動作に相当する。
FIG. 8 is a flowchart for explaining an example of an execution order acquisition process when the all-priority scheduler set in
ステップ8101で、違反検査システム3101は、優先順位が最も高いプロセッサコアを対象プロセッサコアとして選択する。ステップ8102で、違反検査システム3101は、選択中の対象プロセッサコアが実行可能か否かを判断する。対象プロセッサコアが実行可能でない場合、ステップ8103の処理を実行する。対象プロセッサコアが実行可能である場合、ステップ8104を実行する。
In
ステップ8103で、違反検査システム3101は、優先順位が選択中の対象プロセッサコアの次に高いプロセッサコアを対象プロセッサコアとして選択し、ステップ8102の処理に戻る。
In
ステップ8104で、違反検査システム3101は、対象プロセッサコアに対してタスクの実行を指示し、実行したタスクを実行順序情報1109にある実行順序リストの末尾に追加する。
In
ステップ8105で、違反検査システム3101は、タスクを実行した、対象プロセッサコアがフラグをセットしたか否かを判断する。
In
対象プロセッサコアがフラグをセットした場合、ステップ8101の処理に戻る。一方、対象プロセッサコアがフラグをセットしていない場合、ステップ8106の処理を実行する。
If the target processor core sets the flag, the process returns to step 8101. On the other hand, if the target processor core does not set the flag, the process of
ステップ8106で、違反検査システムは、全てのプロセッサコアの全てのタスクが終了したか否かを判断する。全てのタスクが終了していない場合、ステップ8102の処理に戻り、全てのタスクが終了した場合、処理を終了する。
At
以上の動作により、図6のステップ6102で設定した優先順位に従って各プロセッサコアにタスクを実行し、その実行順序を取得することができる。また、プロセッサコアのいずれかがフラグをセットした場合(ステップ4101:Yes)、そのプロセッサコアよりも優先順位が高いプロセッサコアがタスクを実行可能である可能性があるため、ステップ8101の処理に戻している。
Through the above operations, it is possible to execute tasks on each processor core according to the priority set in
図9を用いて、実施例1の変形例1を説明する。図9は図6と異なり、全てのコアを1回ずつ最早に設定したコア数本の実行順序を用いて、基準タスクと同時実行可能なタスクを取得する。図6との相違点は、ステップ9102がステップ6102と異なり、ステップ9102がステップ6103と異なる点である。
図9に示したフローチャートの動作においては、第一の条件は、複数のプロセッサコア(仮想CPUコア0、仮想CPUコア1、仮想CPUコア2)の一つのプロセッサコアに対し、その他のプロセッサコアより優先して実行する最早条件であり、第二の条件は、上記一つのプロセッサコア以外のプロセッサコアを一度ずつ最早条件とする条件である。
In the operation of the flowchart shown in FIG. 9, the first condition is that one of the plurality of processor cores (
違反検査システム3101は、あるコアを最早(選択したコアで実行されるタスクが、その他のコアで実行されるタスクに対して、可能な限り先行する)で実行するという条件を、全てのコアに適応した、コア数本の実行条件を設定する(ステップ9102)。
The
違反検査システム3101は、ループ9103で、ステップ9102で設定した全てのポリシーで、実行順序から情報を取得する。本実施例1の変形例1では、ループ回数はコア数と同じである。
In a
図10を用いて、実施例1の変形例2を説明する。図10の例は図6の例と異なり、全てのコアを1回ずつ最遅に設定したコア数本の実行順序を用いて、基準タスクと同時実行可能なタスクを取得する。図6との相違点は、ステップ10102がステップ6102と異なり、ステップ10102がステップ6103と異なる点である。
違反検査システム3101は、あるコアを最遅(選択したコアで実行されるタスクに対し、その他のコアで実行されるタスクが、可能な限り先行する)で実行するという条件を、全てのコアに適応した、コア数本の実行条件を設定する(ステップ10102)。
The
違反検査システム3101は、ループ10103で、ステップ10102で設定した全てのポリシーで、実行順序から情報を取得する。本実施例1の変形例2では、ループ回数はコア数と同じである。
In a
図11を用いて、実施例1の変形例3を説明する。図11は図6と異なり、基準タスクが属するコアが最早、最遅に設定した2本の実行順序を用いて、基準タスクと同時実行可能なタスクを取得する。図6との相違点は、ステップ11102がステップ6102と異なる点である。
Modification 3 of Example 1 will be described using FIG. 11. In FIG. 11, unlike FIG. 6, tasks that can be executed simultaneously with the reference task are obtained using two execution orders set to the earliest and the latest to which the core to which the reference task belongs. The difference from FIG. 6 is that
図11に示したフローチャートにおいては、第一の条件は、複数のプロセッサコア(仮想CPUコア0、仮想CPUコア1、仮想CPUコア2)の一つのプロセッサコアに対し、その他のプロセッサコアより優先して実行する最早条件であり、第二の条件は、複数のプロセッサコア(仮想CPUコア0、仮想CPUコア1、仮想CPUコア2)の一つのプロセッサコアに対し、その他のプロセッサコアを優先して実行する最遅条件である。
In the flowchart shown in FIG. 11, the first condition is to give priority to one processor core of multiple processor cores (
違反検査システム3101は、基準タスクが属するコアを最早にする条件と、最遅にして実行するという条件の、2本の実行条件を設定する(ステップ10102)。
The
図12は、図7のステップ7103のタスク実行処理の一例を説明するための図である。図12におけるタスク実行処理は、優先条件を、対象プロセッサコアを他の全てのプロセッサコアよりも優先度を低くする最遅条件下で実行順序を取得する最遅スケジューラである。
FIG. 12 is a diagram for explaining an example of the task execution process in
最遅条件は、対象プロセッサコアによるタスクの実行をできるだけ後に行うことを意味する。最遅条件は、より具体的には、他のプロセッサコアがタスクを実行可能な場合、他のプロセッサコアにタスクを実行させ、他のプロセッサコアがタスクを実行可能でない場合、対象プロセッサコアにタスクを実行させる条件である。タスクを実行可能なプロセッサコアは、割り当てられたタスクに未だ実行していないタスクがあり、かつ、次に実行するタスクがセット待ちでないプロセッサコアである。 The latest condition means that the target processor core executes the task as late as possible. More specifically, the slowest condition means that if other processor cores can execute the task, the other processor cores execute the task, and if no other processor cores can execute the task, the target processor core executes the task. This is the condition for executing. A processor core that can execute a task is a processor core that has an assigned task that has not been executed yet, and that is not waiting to be set for the next task to be executed.
ステップS201において、タスク実行処理(最遅スケジューリング)では、先ず、違反検査システム3101は、タスクを実行可能な他のプロセッサコアが存在するか否かを判断する。このとき、違反検査システム3101は、対象プロセッサコアがタスクを実行可能でなくなるまで、タスクを実行させる。
In step S201, in the task execution process (latest scheduling), the
なお、他のプロセッサコアは、選択中の対象プロセッサコア以外のプロセッサコアである。 Note that the other processor cores are processor cores other than the currently selected target processor core.
ステップS202において、タスクを実行可能な他のプロセッサコアが存在する場合、違反検査システム3101は、そのタスクを実行可能な他のプロセッサコアに対してタスクの実行を指示して、タスクを実行させ、ステップS201の処理に戻る。
In step S202, if there is another processor core that can execute the task, the
ステップS203において、タスクを実行可能な他のプロセッサコアが存在しない場合、違反検査システム3101は、選択中の対象プロセッサコアに対してタスクの実行を指示して、タスクを実行させる。このとき、違反検査システム3101は、対象プロセッサコアがフラグをセットするか、セット待ちになるか、又は、全てのタスクを終了するまで、対象プロセッサコアにタスクを実行させる。
In step S203, if there is no other processor core that can execute the task, the
ステップS204において、違反検査システム3101は、全てのプロセッサコアの全てのタスクが終了したか否かを判断する。違反検査システム3101は、全てのタスクが終了していない場合、ステップS201の処理に戻り、全てのタスクが終了した場合、処理を終了する。
In step S204, the
図13は、図7のステップ7102のタスク実行処理の他の例を説明するための図である。図13におけるタスク実行処理は、優先条件を、対象プロセッサコアを他の全てのプロセッサコアよりも優先度を高くする最早条件下で実行順序を取得する最早スケジューラである。
FIG. 13 is a diagram for explaining another example of the task execution process in
最早条件は、対象プロセッサコアによるタスクの実行をできるだけ早く行うことを意味する。最早条件は、より具体的には、対象プロセッサコアがタスクを実行可能な場合、対象プロセッサコアにタスクを実行させ、対象プロセッサコアがタスクを実行可能でない場合、他のプロセッサコアにタスクを実行させる条件である。 The earliest condition means that the target processor core executes the task as soon as possible. The earliest condition is, more specifically, if the target processor core is capable of executing the task, cause the target processor core to execute the task, and if the target processor core is not capable of executing the task, cause other processor cores to execute the task. It is a condition.
タスク実行処理(最早スケジューリング)では、先ず、違反検査システム3101は、選択中の対象プロセッサコアがタスクを実行可能であるか否かを判断する(ステップS301)。
In the task execution process (early scheduling), the
対象プロセッサコアがタスクを実行可能である場合、違反検査システム3101は、対象プロセッサコアに対してタスクの実行を指示して、タスクを実行させ(ステップS302)、ステップS301の処理に戻る。このとき、違反検査システム3101は、対象プロセッサコアがタスクを実行可能でなくなるまで、タスクを実行させる。
If the target processor core is capable of executing the task, the
対象プロセッサコアがタスクを実行可能でない場合、違反検査システム3101は、対象プロセッサコアのセット待ちのフラグをセットするプロセッサコアを検索する(ステップS303)。
If the target processor core is not capable of executing the task, the
違反検査システム3101は、検索されたプロセッサコアがセット待ちか否かを判断する(ステップS304)。
The
検索されたプロセッサコアがセット待ちの場合、違反検査システム3101は、検索されたプロセッサコアのセット待ちのフラグをセットするプロセッサコアを検索し(ステップS305)、ステップS304の処理に戻る。
If the searched processor core is set waiting, the
なお、ステップS304では、最後に選択されたプロセッサコアがセット待ちか否かが判断される。 Note that in step S304, it is determined whether or not the last selected processor core is waiting to be set.
検索されたプロセッサコアがセット待ちでない場合、違反検査システム3101は、検索されたプロセッサコアに対してタスクの実行を指示して、タスクを1つ実行させる(ステップS306)。
If the searched processor core is not waiting to be set, the
違反検査システム3101は、全てのプロセッサコアの全てのタスクが終了したか否かを判断する(ステップS307)。違反検査システム3101は、全てのタスクが終了していない場合、ステップS301の処理に戻り、全てのタスクが終了した場合、処理を終了する。
The
なお、上記の動作において、ステップS302によって対象プロセッサコアが割り当てられたタスクを終了した場合、ステップS303では、違反検査システム3101は、対象プロセッサコアのセット待ちのフラグをセットするプロセッサコアを検索する代わりに、他のプロセッサコアのうち実行可能なプロセッサコアを検索する。
Note that in the above operation, if the target processor core finishes the assigned task in step S302, in step S303, the
本実施例1では、複数の条件を適用して得られた実行順序を比較することにより、同時実行可能なタスクが得られる。具体的には、複数の実行順序間で順序関係が、少なくとも1つの実行順序の組み合わせで入れ替わっている2つのタスク対として現れる。 In the first embodiment, tasks that can be executed simultaneously are obtained by comparing execution orders obtained by applying a plurality of conditions. Specifically, the order relationship among the plurality of execution orders appears as two task pairs in which the order relationship is switched in at least one combination of execution orders.
この原理に基づき取得した同時実行可能なタスクの全ての組み合わせで、任意の変数に対して、Read-Write、Write-Writeなるアクセスがないことを確認することで、その変数に対しては、プログラム全体を通して、競合が発生しえないことが示せる。すなわち、いかなる場合においてもデータ競合が発生しないことが示せる。 By confirming that there is no Read-Write or Write-Write access to any variable in all combinations of concurrently executable tasks obtained based on this principle, the program can It can be shown that no conflicts can occur throughout. In other words, it can be shown that data conflicts do not occur in any case.
以下では、変形例2について前記の原理と、前記のフローの動作を解説する。
Below, the above-mentioned principle and the operation of the above-mentioned flow will be explained regarding
図14Aは、タスクA~Hで構成されたある並列化プログラムのグラフモデルである。グラフモデルにおいてタスクはノードとして表現され、タスク間の依存関係はエッジとして表現される。エッジの始点に結合するタスクαとエッジの終点に結合するタスクβとの間には、必ずタスクαの実行終了をまってタスクβを実行しなければならない、という関係が成立する。 FIG. 14A is a graph model of a parallelized program composed of tasks A to H. In a graph model, tasks are represented as nodes, and dependencies between tasks are represented as edges. A relationship exists between a task α that is connected to the start point of an edge and a task β that is connected to the end point of an edge, such that the task β must be executed after the completion of the execution of the task α.
図14Aでは、タスクA、B、G、Hがcore0で実行され、タスクC、Eがcore1で実行され、タスクD、Fがcore2で実行される。 In FIG. 14A, tasks A, B, G, and H are executed on core0, tasks C and E are executed on core1, and tasks D and F are executed on core2.
並列プログラムで特に重要となるものは、コア間の依存関係である。タスクAからタスクC、Dに、タスクCからタスクFに、タスクEからタスクGに、タスクFからHにというコア間依存関係がある。 What is particularly important in parallel programs is the dependency relationship between cores. There are inter-core dependencies from task A to tasks C and D, from task C to task F, from task E to task G, and from task F to H.
したがって、これらのタスクには順序制約あり、一方が必ず先、もう一方が必ず後に実行される。 Therefore, these tasks have an ordering constraint: one is always executed first, and the other is always executed after.
一方、依存関係がないタスクは、同時実行可能なタスクである。それらのタスクには順序制約がなく、逆転した順序や同時に実行される。例えば、タスクEとFは互いに依存関係がなく、同時実行可能である。 On the other hand, tasks without dependencies are tasks that can be executed simultaneously. These tasks have no order constraints and may be performed in reverse order or simultaneously. For example, tasks E and F have no dependency on each other and can be executed simultaneously.
図14Bは、各コアを最遅とした実行順序を示す図である。 FIG. 14B is a diagram showing the execution order with each core being the slowest.
図14Bにおいて、タスクEとFに注目し、core1が最遅の場合と、core2が最遅の実行順序を比較する。core1が最遅の場合では、タスクFからE、core2が最遅の場合では、タスクEからFなる順序で実行されており、2つは同時実行可能なタスクであることが分かる。 In FIG. 14B, focusing on tasks E and F, the execution order in which core1 is the slowest and the execution order in which core2 is the slowest are compared. When core1 is the slowest, tasks F to E are executed, and when core2 is slowest, tasks E to F are executed, and it can be seen that the two tasks can be executed simultaneously.
最遅を課した最遅スケジューリングにおいて、最遅に指定したcoreに含まれるタスクに対して、その他のcoreに含まれるタスクが可能な限り先行して実行されるという制約がある。core1が最遅の場合では、タスクE(core1)よりタスクF(core2)が先に動作するように制御される。core2が最遅の場合では、タスクF(core2)よりタスクE(core1)が先に動作するように制御される。 In the latest scheduling that imposes the latest, there is a constraint that the tasks included in the other cores are executed as far in advance as possible of the tasks included in the core specified as the latest. When core1 is the slowest, task F (core2) is controlled to operate before task E (core1). When core2 is the slowest, task E (core1) is controlled to operate before task F (core2).
ここで重要なのは、最遅を課した最遅スケジューリングにおける制約より、プログラムの依存関係の方が強い制約であるという点にある。したがって、最遅スケジューリングは、プログラムの依存関係を無視した実行制御をしないということである。 What is important here is that program dependencies are a stronger constraint than the constraint in the latest scheduling that imposes the latest. Therefore, the latest scheduling does not perform execution control that ignores program dependencies.
これにより、必ず同時実行可能なタスクのみが、複数の実行順序で、その順序が入れ替わることが保証できる。 This makes it possible to guarantee that only tasks that can be executed simultaneously will be reordered in multiple execution orders.
図15は、先行タスクグループと後続タスクグループの例を示す図である。図15では、タスクFを基準とし、それより先に実行されたタスクを先行タスクグループに、タスクFより後に実行されたタスクを後続タスクグループに追加する。 FIG. 15 is a diagram showing an example of a preceding task group and a succeeding task group. In FIG. 15, tasks executed before task F are added to the preceding task group, and tasks executed after task F are added to the succeeding task group, using task F as a reference.
図16は、図15に示した先行タスクグループと後続タスクグループから、いかなる場合も基準タスクFよりも先に実行される常に先行するタスクA、D、Cと、同時実行可能なタスクB、E、Gと、いかなる場合も基準タスクFよりも後に実行される常に後続するタスクHに分類する様子を示した図である。 FIG. 16 shows tasks A, D, and C, which always precede reference task F, and tasks B, E, which can be executed simultaneously, from the preceding task group and succeeding task group shown in FIG. 15. , G, and a task H that always follows the reference task F, which is executed after the reference task F in any case.
常に先行するタスクA、D、Cは、先行タスクグループにおける後続タスクグループの補集合となる。同時実行可能なタスクB、E、Gは、先行タスクグループと後続タスクグループの積集合となる。常に後続するタスクHは、後続タスクグループにおける先行タスクグループの補集合である。 Tasks A, D, and C, which always precede each other, are the complement of the succeeding task group in the preceding task group. Tasks B, E, and G that can be executed simultaneously are the product set of the preceding task group and the succeeding task group. The always successor task H is the complement of the predecessor task group in the successor task group.
図17は、タスクFに対して定まる常に先行するタスクA、C、Dと、同時実行可能なタスクB、E、Gと、常に後続するタスクHを示す図である。 FIG. 17 is a diagram showing tasks A, C, and D that always precede task F, tasks B, E, and G that can be executed simultaneously, and task H that always follows task F.
本実施例1では、すべての共有変数にWriteしているタスクに対して、同時実行可能なタスクのみを抽出し、その中で共有変数へのRead-Write競合、Write-Write競合がないかをチェックすることで、共有変数の競合(データ競合、不可分操作違反)を検出でき、それらがないことが示せれば、共有変数へのアクセスの順序が一意に定まることが示せる。 In this first embodiment, only tasks that can be executed concurrently are extracted from tasks that write to all shared variables, and it is checked whether there is any Read-Write conflict or Write-Write conflict to the shared variables among them. By checking, shared variable conflicts (data conflicts, atomic operation violations) can be detected, and if it can be shown that there are no such conflicts, it can be shown that the order of access to the shared variables is uniquely determined.
したがって、実施例1の変形例2によれば、基準タスクに対して定まる同時実行可能なタスクをもれなく抽出することができる。変形例1と変形例3も変形例2と同様である。
Therefore, according to the second modification of the first embodiment, it is possible to extract all concurrently executable tasks that are determined with respect to the reference task.
一方、正順・降順は同時実行可能なタスクを見逃してしまうケースがある。図18は、図14Aに示した例を、正順(第一優先:core2、第二優先:core0、第三優先:core1)、逆順(第一優先:core1、第二優先:core0、第三優先:core2)でスケジュールした実行順序を示す図である。図18において、Fを基準タスク(同時実行可能なタスクはタスクB、E、G)としたとき、タスクE、Gは基準タスクFに対して、正順と逆順で順序が入れ替わっているが、タスクBは基準タスクFに対して順序が入れ替わっておらず、同時実行可能なタスクを全て取得できないことが分かる。 On the other hand, when using forward or descending order, tasks that can be executed simultaneously may be overlooked. FIG. 18 shows the example shown in FIG. 14A in forward order (first priority: core2, second priority: core0, third priority: core1), reverse order (first priority: core1, second priority: core0, third priority). It is a figure which shows the execution order scheduled with priority:core2). In FIG. 18, when F is a reference task (tasks that can be executed simultaneously are tasks B, E, and G), the order of tasks E and G is switched between normal and reverse order with respect to the reference task F. It can be seen that the order of task B has not been changed with respect to the reference task F, and that it is not possible to obtain all tasks that can be executed simultaneously.
このような現象が発生するケースとして、当該コア(基準タスクFがあるCPUコア)より優先度が低く設定されているコアに、基準タスクと同時実行可能なコアが存在し、当該コアにおいて基準タスク以前のタスクに対し、同期フラグを送信するタスクを含むコア(遮断するコア(遮断コア))の優先度が、同時実行可能なタスクを含むコアのより低い場合などが考えられる。 In a case where this phenomenon occurs, there is a core that is set to have a lower priority than the core (the CPU core where the reference task F is located) that can execute the reference task concurrently, and the core that can execute the reference task at the same time A case may be considered in which the priority of a core that includes a task that transmits a synchronization flag (a core that is to be shut down (blocking core)) is lower than that of a core that includes tasks that can be executed concurrently with respect to a previous task.
本来であれば、基準タスクは、同時実行可能なタスクに対し、先行して実行されなければならないところを、遮断コアが基準タスクにある基準コアの実行を妨げることによって、同時実行可能なタスクの方が先に実行される。 Normally, the reference task should be executed before the concurrently executable tasks, but the blocking core prevents the concurrently executable tasks from executing. will be executed first.
遮断コアが同期フラグを発行していないため、当該コアは実行待ちとなり、当該コアより優先度が低いタスクを実行する。基準タスクと同時実行可能なタスクが属するコアが、遮断コアより優先度が高い場合、遮断コアが同期フラグを発行する前に、同時実行可能なタスクが実行されてしまう。 Since the cutoff core has not issued a synchronization flag, the core is placed on standby and executes a task with a lower priority than the core. If a core to which a reference task and a task that can be executed concurrently belongs has a higher priority than a cutoff core, the concurrently executable task will be executed before the cutoff core issues a synchronization flag.
変形例1あるいは変形例2では、基準タスクを含むコアが最早あるいは最遅の順序では、基準タスクと同時実行可能なタスクは必ず、基準タスクより必ず後あるいは先に実行されることが保証される。
In
基準タスクを含むコア以外が最早あるいは最遅のとき、その最早あるいは最遅に設定されたコアに含まれる同時実行可能なタスクは基準タスクに対し、必ず先あるいは後に実行される。基準タスクを含むコア以外のコアを全て一度ずつ最早あるいは最遅に設定して、実行した場合、基準タスクに対し、同時実行可能なタスクはいずれかの順序で必ず先あるいは後に実行される。 When a core other than the core containing the reference task is the earliest or latest, the concurrently executable tasks included in the core set as the earliest or latest are always executed before or after the reference task. If all cores other than the core containing the standard task are set to the earliest or latest once and executed, tasks that can be executed simultaneously will always be executed before or after the standard task in some order.
したがって、各コアを一度ずつ最遅に設定した実行順序から、先行タスクグループと後続タスクグループを取得した時、同時実行可能なタスクは両者に含まれる。すなわち、両者の集合和には、全ての基準タスクに対して定まる同時実行可能なタスクが必ず含まれる。 Therefore, when the preceding task group and the succeeding task group are obtained from the execution order in which each core is set once to the latest, tasks that can be executed simultaneously are included in both groups. In other words, the set sum of both always includes tasks that can be executed simultaneously, which are determined for all the reference tasks.
変形例3も、同様に基準タスクに対して定まる同時実行可能なタスクをもれなく抽出できる。基準タスクを含むコア以外が最早あるいは最遅のとき、その最早あるいは最遅に設定されたコアに含まれる同時実行可能なタスクは基準タスクに対し、必ず先あるいは後に実行される。したがって、基準タスクを最早、最遅に設定した実行順序から、先行タスクグループと後続タスクグループを取得した場合でも、同時実行可能なタスクは両者に含まる。 Modification 3 can similarly extract all tasks that can be executed simultaneously and that are determined with respect to the reference task. When a core other than the core containing the reference task is the earliest or latest, the concurrently executable tasks included in the core set as the earliest or latest are always executed before or after the reference task. Therefore, even if the preceding task group and the succeeding task group are obtained from the execution order in which the reference task is set to be the earliest or the latest, tasks that can be executed simultaneously are included in both groups.
さらに、実行順序を各条件で一回だけ実行し、その結果をメモリ1100のタスクグループ情報1108に記録しておくことで、計算量を減らすことが可能である。図7においてスケジューラは、指定された条件と一致する実行順序が生成済みの場合、それを参照するように変更することで実施できる。この場合、変形例1、2における実行順を序生成する回数はコア数、変形例3では、コア数×2回となる。
Furthermore, by executing the execution order only once under each condition and recording the result in the
本開示の実施例1によれば、全ての同時実行可能なタスクを抽出することができるので、それらのタスク間で所定の条件により判定して、並列化プログラムの違反の有無を検知することができ、並列化プログラムの動作の検査に掛かる負荷を軽減することが可能な演算装置及び検査方法を提供することができる。 According to the first embodiment of the present disclosure, all tasks that can be executed simultaneously can be extracted, so it is possible to determine whether or not there is a violation in the parallel program by making a determination based on a predetermined condition among these tasks. Accordingly, it is possible to provide an arithmetic device and a testing method that can reduce the load placed on testing the operation of a parallelized program.
本開示においては、制御部であるCPU1200は、複数のタスクT1~T10で共有される資源へのアクセスに関するアクセス情報を取得し、少なくとも、複数のタスクT1~T10に対して第一の条件を適用したときの複数のタスクT1~T10の第一の処理順序と、複数のタスクT1~T10に対して第一の条件とは異なる第二の条件を適用したときの複数のタスクT1~T10の第二の処理順序とを求める。
In the present disclosure, the
そして、第一の処理順序および第二の処理順序において、複数のタスクT1~T10で共有される資源へアクセスする第一のタスクより前に行われるタスクからなる先行タスクグループと、第一のタスクより後に行われるタスクからなる後続タスクグループとを比較する。比較結果に基づいて特定されたタスクに対して、上記アクセス情報を用いて、並列化プログラムにおける所定の違反の有無を検知する。 In the first processing order and the second processing order, a preceding task group consisting of tasks performed before the first task that accesses resources shared by the plurality of tasks T1 to T10, and Compare with a subsequent task group consisting of tasks to be performed later. The presence or absence of a predetermined violation in the parallel program is detected using the access information for the task specified based on the comparison result.
(実施例2)
以下では、本開示の実施例2について図19から図25を使用して、説明する。
(Example 2)
Example 2 of the present disclosure will be described below using FIGS. 19 to 25.
実施例2では、ある変数に対する実行順序が規定を満たすかを、必ず順序が決まるタスクを参照して検査する。 In the second embodiment, it is checked whether the execution order for a certain variable satisfies regulations by referring to tasks whose order is always determined.
実施例2では、先行タスクグループと後続タスクグループのそれぞれに存在してはいけない、共有資源へのアクセス処理が存在する違反であり、先行タスクグループと後続タスクグループに、そのような共有資源へのアクセス処理が一つでも存在する場合に違反とする。 In Example 2, the violation is that there is an access process to a shared resource that should not exist in each of the preceding task group and the succeeding task group. It is considered a violation if even one access process exists.
より具体的に言えば、ある変数へのWrite処理を含むタスクに対して定まる、必ず順序が決まるタスク(先か後に実行)から、ある変数に対する処理の実行順序を得ることが可能であり、その順序が規定を満たすかを判定する。上記判定を、ある変数へのすべてのWrite処理に対して実施する。 More specifically, it is possible to obtain the execution order of processes for a certain variable from the tasks that are always ordered (executed first or after), which are determined for tasks that include Write processing to a certain variable. Determine whether the order satisfies the specifications. The above determination is performed for all Write processing to a certain variable.
図19は本開示の実施例2における違反検査システム19101の概略構成図である。
図19に示す違反検査システム19101は、実行順序違反を検査する検査システムである。図19に示した違反検査システム19101は、図3に示した違反検査システム3101とおおよそ同じ構成である。図3に示した構成と異なる部分は、アクセス順序解析処理19103と、先行/後続タスク取得処理19104である。
FIG. 19 is a schematic configuration diagram of a
A
アクセス順序解析処理19103は、ある変数におけるある処理に対して、他の同一変数への処理に対して、所定の順序制約が満たされることを確認し、その結果を違反判定処理19102に返す。ある変数は、違反判定処理19102から受け取った、タスク(基準タスク)内で、Write処理をしている変数すべてである。
The access order analysis process 19103 confirms that a predetermined order constraint is satisfied for a certain process on a certain variable with respect to another process on the same variable, and returns the result to the
先行/後続タスク取得処理19104は、アクセス順序解析処理19103から受け取った、基準タスクより、先行タスクグループと後続タスクグループを取得し、アクセス順序解析処理19102に返す。
The preceding/succeeding
図20は、図19の違反判定処理19102の内容の一例を示すフローチャートである。図20に示したフローチャートは、図4に示したフローチャートのステップ4102の内容が、ステップ20102の内容となり、その他のステップの内容は図4に示したフローチャートと同様である。ステップ20102において、違反検査システム19101は、あるタスク(基準タスク)に対する、実行順序を検査するサブフローである。詳細は図21で説明する。
FIG. 20 is a flowchart illustrating an example of the content of the
図21は、変数のアクセス順序の解析処理を行い、正当性を判定するためのフローチャートである。なお、図19のアクセス順序解析処理19103の動作に相当する。 FIG. 21 is a flowchart for analyzing the access order of variables and determining validity. Note that this corresponds to the operation of the access order analysis process 19103 in FIG.
違反検査システム19101においては、図20に示したフローチャートの処理により受け取った、基準タスクに対して、常に先行するタスクと常に後続するタスクを取得する(ステップ21101)。
The
違反検査システム19101においては、アクセス順序違反(所定の順序制約を破る)の有無を判断する処理を行う。当該タスクでWriteする共有変数と同一変数のその他の処理について、先にあるべき処理が、後続タスクグループに無いか、後にあるべき処理が、後続タスクグループに無いか、かつ、プログラム上に存在するかを判定する(ステップ21102)。
The
つまり、基準タスクでWriteしている共有変数すべてに対し、以下の2点を確認する(ステップ21102)。 That is, the following two points are checked for all shared variables written in the standard task (step 21102).
当該処理より先に実行されるべき処理が、いずれかのタスクに存在し、かつ後続タスクグループに存在しないこと(条件C221)を確認する。 It is confirmed that a process to be executed before the relevant process exists in any task and does not exist in the subsequent task group (condition C221).
当該処理より後に実行されるべき処理が、いずれかのタスクに存在し、かつ先行タスクグループに存在しないこと(条件C222)を確認する。 It is confirmed that a process to be executed after the relevant process exists in any task and does not exist in the preceding task group (condition C222).
上記条件C221及びC222が破られた場合、ステップ21103を実行する。それ以外の場合、処理を終了し、図20のフローに戻る。
If the above conditions C221 and C222 are violated,
条件C221が成立するならば、常に先行するタスクのみに、当該処理より先に実行されるべき処理が存在する。したがって、プログラム実行時に、それらの処理は当該処理より常に先に実行されることが保証される。 If condition C221 is satisfied, there is always a process that should be executed before the current process only in the preceding task. Therefore, when a program is executed, it is guaranteed that those processes are always executed before the current process.
条件C222が成立するならば、常に後続するタスクのみに、当該処理より後に実行されるべき処理が存在する。したがって、プログラム実行時に、それらの処理は当該処理より常に後に実行されることが保証される。 If condition C222 is satisfied, there is always a process to be executed after the process in question only in subsequent tasks. Therefore, when a program is executed, it is guaranteed that those processes are always executed after the current process.
上記条件が、ある変数のWrite処理に対して成立すれば、プログラムは、ある変数における実行順序の規定を満たす。さらに、全ての変数に対し、上記条件が成立するなら、いかなる場合でも、プログラムは全ての変数に対する実行順序の規定を満たす。 If the above conditions are satisfied for a write process of a certain variable, the program satisfies the execution order regulations for the certain variable. Furthermore, if the above conditions hold for all variables, the program satisfies the execution order requirements for all variables in any case.
ステップ21103において、違反判定プログラムは、アクセス順序違反があった場合に実行されるフローであり、違反ありを図20のフローに返す。
In
図22は、図19に示した先行/後続タスク取得処理19104の内容の一例を示すフローチャートである。図22に示したフローチャートは、正順・逆順の二通りの実行順序から、図21に示したフローチャートの処理により受け取った、基準タスクに対して定まる先行タスクグループ、後続タスクグループを取得する処理である。
FIG. 22 is a flowchart showing an example of the contents of the preceding/succeeding
図22のステップ22101から20104は、図6のステップ6101からステップ6104と同じである。
図22のステップ22105において、違反検査システム19101は、先行タスクグループ、後続タスクグループを図21のフローに返す。
In
図23を用いて、実施例2の変形例1を説明する。図23に示すフローチャートは、図22に示したフローチャートと異なり、全てのコアを1回ずつ最早に設定したコア数本の実行順序を用いて、図21のフローチャートの処理より受け取った、基準タスクに対して定まる先行タスクグループ、後続タスクグループを取得する。
ステップ23101から23104は、図9のステップ9101から9104と同じである。ステップ23105は、図22の22105と同じである。
図24を用いて、実施例2の変形例2を説明する。図24に示したフローチャートは、図22に示したフローチャートと異なり、全てのコアを1回ずつ最遅に設定したコア数本の実行順序を用いて、図21のフローチャートの処理により受け取った、基準タスクに対して定まる先行タスクグループ、後続タスクグループを取得する。 A second variant of the second embodiment will be described with reference to Figure 24. The flowchart shown in Figure 24 differs from the flowchart shown in Figure 22 in that it uses the execution order of several cores in which all cores have been set to the slowest once each to obtain the predecessor task group and the successor task group determined for the reference task received by the processing of the flowchart in Figure 21.
図24のステップ24101から24104は、図10のステップ10101から10104と同じである。
ステップ24105は、図22のステップ22105と同じである。
図25に示したフローチャートを用いて、実施例2の変形例3を説明する。図25に示したフローチャートは、図22に示したフローチャートと異なり、基準タスクが属するコアが最早、最遅に設定した2本の実行順序を用いて、図21のフローチャートの処理により受け取った、基準タスクに対して定まる先行タスクグループ、後続タスクグループを取得する。 Modification 3 of Example 2 will be described using the flowchart shown in FIG. 25. The flowchart shown in FIG. 25 differs from the flowchart shown in FIG. 22 in that the core to which the reference task belongs uses the two execution orders set as the earliest and the latest, and the reference task received through the processing of the flowchart in FIG. Obtain the preceding task group and successor task group determined for the task.
ステップ25101から25104は、図11のステップ11101から11104と同じである。ステップ25105は、図22のステップ22105と同じである。
本開示の実施例2によれば、ある変数に対する実行順序が規定を満たすかを、必ず順序が決まるタスクを参照して検査するように構成したので、並列化プログラムの違反の有無を検知することができ、並列化プログラムの動作の検査に掛かる負荷を軽減することが可能な演算装置及び検査方法を提供することができる。 According to the second embodiment of the present disclosure, since the configuration is configured to check whether the execution order for a certain variable satisfies the regulations by referring to the tasks whose order is always determined, it is possible to detect whether or not there is a violation in the parallelized program. It is possible to provide an arithmetic device and a testing method that can reduce the load placed on testing the operation of a parallelized program.
1000・・・テスト装置、1100・・・メモリ、1101・・・エミュレータ、1102・・・違反プログラム、1103・・・core0用プログラム、1104・・・core1用プログラム、1105・・・core2用プログラム、1106・・・違反情報、1107・・・変数アクセス情報、1108・・・タスクグループ情報、1109・・・実行順序情報、1110・・・選択コア情報、1111・・・同期フラグ、1200・・・CPU(制御部)、3101、19101・・・違反検出システム、T1~T10・・・タスク 1000...Test device, 1100...Memory, 1101...Emulator, 1102...Violating program, 1103...Program for core0, 1104...Program for core1, 1105...Program for core2, 1106... Violation information, 1107... Variable access information, 1108... Task group information, 1109... Execution order information, 1110... Selected core information, 1111... Synchronization flag, 1200... CPU (control unit), 3101, 19101... Violation detection system, T1 to T10... Task
Claims (14)
前記複数のタスクで共有される資源と、前記並列化プログラムを記憶するメモリと、
前記並列化プログラムに基づいて動作する制御部と、
を備え、
前記制御部は、前記複数のタスクで共有される前記資源へのアクセスに関するアクセス情報を取得し、少なくとも、前記複数のタスクに対して第一の条件を適用したときの前記複数のタスクの第一の処理順序と、前記複数のタスクに対して前記第一の条件とは異なる第二の条件を適用したときの前記複数のタスクの第二の処理順序と、を求め、前記第一の処理順序および前記第二の処理順序において、前記複数のタスクで共有される前記資源へアクセスする第一のタスクより前に行われるタスクからなる先行タスクグループと、前記第一のタスクより後に行われるタスクからなる後続タスクグループと、を比較し、比較結果に基づいて特定されたタスクに対して、前記アクセス情報を用いて、前記並列化プログラムにおける所定の違反の有無を検知することを特徴とする演算装置。 An arithmetic device that inspects the operation of a parallelized program that parallelizes a program consisting of a plurality of tasks executed on each of a plurality of processor cores,
resources shared by the plurality of tasks and a memory that stores the parallelization program;
a control unit that operates based on the parallelization program;
Equipped with
The control unit acquires access information regarding access to the resource shared by the plurality of tasks, and at least obtains access information regarding access to the resource shared by the plurality of tasks, and at least a first condition of the plurality of tasks when a first condition is applied to the plurality of tasks. and a second processing order of the plurality of tasks when a second condition different from the first condition is applied to the plurality of tasks, and and in the second processing order, a preceding task group consisting of tasks performed before the first task that accesses the resource shared by the plurality of tasks, and a preceding task group consisting of tasks performed after the first task. and a subsequent task group, and detects whether or not a predetermined violation occurs in the parallelized program using the access information for the task identified based on the comparison result. .
前記第一の条件は、前記複数のプロセッサコアのそれぞれに任意の実行優先順序を割り当てる条件であり、前記第二の条件は前記複数のプロセッサコアのそれぞれに前記第一の条件と逆の優先順序を割り当てる条件であることを特徴とする演算装置。 The arithmetic device according to claim 1,
The first condition is a condition for assigning an arbitrary execution priority order to each of the plurality of processor cores, and the second condition is a condition for assigning an arbitrary execution priority order to each of the plurality of processor cores, and the second condition is a condition for assigning an arbitrary execution priority order to each of the plurality of processor cores. An arithmetic device characterized by being a condition for allocating.
前記第一の条件は、前記複数のプロセッサコアの一つのプロセッサコアに対し、その他のプロセッサコアより優先して実行する最早条件であり、前記第二の条件は前記一つのプロセッサコア以外のプロセッサコアを一度ずつ前記最早条件とすることを特徴とする演算装置。 The arithmetic device according to claim 1,
The first condition is the earliest condition for executing one processor core of the plurality of processor cores with priority over other processor cores, and the second condition is the earliest condition for executing one processor core of the plurality of processor cores with priority over other processor cores. An arithmetic device characterized in that the earliest condition is set once at a time.
前記第一の条件は、前記複数のプロセッサコアの一つのプロセッサコアに対し、その他のプロセッサコアを優先して実行する最遅条件であり、前記第二の条件は前記一つのプロセッサコア以外のプロセッサコアを一度ずつ前記最遅条件とすることを特徴とする演算装置。 The arithmetic device according to claim 1,
The first condition is the slowest condition for executing one processor core of the plurality of processor cores with priority given to other processor cores, and the second condition is the slowest condition for executing one processor core of the plurality of processor cores with priority given to other processor cores, and the second condition is a An arithmetic device characterized in that each core is set to the slowest condition once.
前記第一の条件は、前記複数のプロセッサコアの一つのプロセッサコアに対し、その他のプロセッサコアより優先して実行する最早条件であり、前記第二の条件は、前記複数のプロセッサコアの前記一つのプロセッサコアに対し、その他のプロセッサコアを優先して実行する最遅条件であることを特徴とする演算装置。 The arithmetic device according to claim 1,
The first condition is an earliest condition for executing one processor core of the plurality of processor cores with priority over other processor cores, and the second condition is an earliest condition for executing one of the plurality of processor cores with priority over other processor cores. An arithmetic device characterized in that the slowest condition is that one processor core executes with priority over other processor cores.
前記所定の違反は、前記先行タスクグループと前記後続タスクグループの集合和で得られたタスクでアクセスしている前記共有される資源のうち、同一の資源に対するリード動作またはライト動作の競合が少なくとも1つ存在する場合に、違反とすることを特徴とする演算装置。 The arithmetic device according to claim 1,
The predetermined violation occurs when at least one of the shared resources accessed by a task obtained by the set sum of the preceding task group and the succeeding task group has conflicting read or write operations for the same resource. An arithmetic device characterized in that a violation occurs when one or more of the following occurs.
前記所定の違反は、前記先行タスクグループと前記後続タスクグループのそれぞれに存在してはいけない、前記共有される資源へのアクセス処理が存在する違反であり、前記先行タスクグループと前記後続タスクグループに、前記共有される資源への前記アクセス処理が一つでも存在する場合に、違反とすることを特徴とする演算装置。 The arithmetic device according to claim 1,
The predetermined violation is a violation in which an access process to the shared resource exists that must not exist in each of the preceding task group and the succeeding task group, and . The arithmetic device, wherein if there is even one of the access processes to the shared resource, it is considered a violation.
前記複数のタスクで共有される資源へのアクセスに関するアクセス情報を取得し、少なくとも、前記複数のタスクに対して第一の条件を適用したときの前記複数のタスクの第一の処理順序と、前記複数のタスクに対して前記第一の条件とは異なる第二の条件を適用したときの前記複数のタスクの第二の処理順序と、を求め、前記第一の処理順序および前記第二の処理順序において、前記複数のタスクで共有される資源へアクセスする第一のタスクより前に行われるタスクからなる先行タスクグループと、前記第一のタスクより後に行われるタスクからなる後続タスクグループと、を比較し、比較結果に基づいて特定されたタスクに対して、前記アクセス情報を用いて、前記並列化プログラムにおける所定の違反の有無を検知することを特徴とする検査方法。 An inspection method for inspecting the operation of a parallelized program in which a program consisting of a plurality of tasks executed on each of a plurality of processor cores is parallelized, the method comprising:
a first processing order of the plurality of tasks when acquiring access information regarding access to resources shared by the plurality of tasks and applying at least a first condition to the plurality of tasks; A second processing order of the plurality of tasks when a second condition different from the first condition is applied to the plurality of tasks, and a second processing order of the plurality of tasks is determined. In the processing order, a preceding task group consisting of tasks performed before a first task that accesses a resource shared by the plurality of tasks, and a subsequent task group consisting of tasks performed after the first task, 1. An inspection method characterized in that the access information is used to detect the presence or absence of a predetermined violation in the parallelized program for a task specified based on the comparison result.
前記第一の条件は、前記複数のプロセッサコアのそれぞれに任意の実行優先順序を割り当てる条件であり、前記第二の条件は前記複数のプロセッサコアのそれぞれに前記第一の条件と逆の優先順序を割り当てる条件であることを特徴とする検査方法。 In the inspection method according to claim 8,
The first condition is a condition for assigning an arbitrary execution priority order to each of the plurality of processor cores, and the second condition is a condition for assigning an arbitrary execution priority order to each of the plurality of processor cores, and the second condition is a condition for assigning an arbitrary execution priority order to each of the plurality of processor cores. An inspection method characterized by being a condition for assigning.
前記第一の条件は、前記複数のプロセッサコアの一つのプロセッサコアに対し、その他のプロセッサコアより優先して実行する最早条件であり、前記第二の条件は前記一つのプロセッサコア以外のプロセッサコアを一度ずつ前記最早条件とすることを特徴とする検査方法。 In the inspection method according to claim 8,
The first condition is the earliest condition for executing one processor core of the plurality of processor cores with priority over other processor cores, and the second condition is the earliest condition for executing one processor core of the plurality of processor cores with priority over other processor cores. An inspection method characterized in that the earliest condition is set once at a time.
前記第一の条件は、前記複数のプロセッサコアの一つのプロセッサコアに対し、その他のプロセッサコアを優先して実行する最遅条件であり、前記第二の条件は前記一つのプロセッサコア以外のプロセッサコアを一度ずつ前記最遅条件とすることを特徴とする検査方法。 In the inspection method according to claim 8,
The first condition is the slowest condition for executing one processor core of the plurality of processor cores with priority given to other processor cores, and the second condition is the slowest condition for executing one processor core of the plurality of processor cores with priority given to other processor cores, and the second condition is a An inspection method characterized by subjecting each core to the slowest condition once.
前記第一の条件は、前記複数のプロセッサコアの一つのプロセッサコアに対し、その他のプロセッサコアより優先して実行する最早条件であり、前記第二の条件は、前記複数のプロセッサコアの前記一つのプロセッサコアに対し、その他のプロセッサコアを優先して実行する最遅条件であることを特徴とする検査方法。 In the inspection method according to claim 8,
The first condition is an earliest condition for executing one processor core of the plurality of processor cores with priority over other processor cores, and the second condition is an earliest condition for executing one of the plurality of processor cores with priority over other processor cores. An inspection method characterized by being the slowest condition for executing one processor core with priority over other processor cores.
前記所定の違反は、前記先行タスクグループと前記後続タスクグループの集合和で得られたタスクでアクセスしている前記共有される資源のうち、同一の資源に対するリード動作またはライト動作の競合が少なくとも1つ存在する場合に、違反とすることを特徴とする検査方法。 In the inspection method according to claim 8,
The predetermined violation occurs when at least one of the shared resources accessed by a task obtained by the set sum of the preceding task group and the succeeding task group has conflicting read or write operations for the same resource. An inspection method characterized in that a violation is determined when one or more of the following conditions exist.
前記所定の違反は、前記先行タスクグループと前記後続タスクグループのそれぞれに存在してはいけない、前記共有される資源へのアクセス処理が存在する違反であり、前記先行タスクグループと前記後続タスクグループに、前記共有される資源への前記アクセス処理が一つでも存在する場合に、違反とすることを特徴とする検査方法。 In the inspection method according to claim 8,
The predetermined violation is a violation in which an access process to the shared resource exists that must not exist in each of the preceding task group and the succeeding task group, and . An inspection method characterized in that a violation is determined if even one of the access processes to the shared resource exists.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020180649 | 2020-10-28 | ||
JP2020180649 | 2020-10-28 | ||
PCT/JP2021/034804 WO2022091651A1 (en) | 2020-10-28 | 2021-09-22 | Calculation device and inspection method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2022091651A1 JPWO2022091651A1 (en) | 2022-05-05 |
JP7454700B2 true JP7454700B2 (en) | 2024-03-22 |
Family
ID=81382361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022558922A Active JP7454700B2 (en) | 2020-10-28 | 2021-09-22 | Arithmetic device and inspection method |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7454700B2 (en) |
WO (1) | WO2022091651A1 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007011690A (en) | 2005-06-30 | 2007-01-18 | Fujitsu Ltd | Verification program for program, verification device for program, and verification method for program |
JP2013528853A (en) | 2010-04-19 | 2013-07-11 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Method, system, and computer program for debugging multithreaded code |
JP2013254371A (en) | 2012-06-07 | 2013-12-19 | Toyota Motor Corp | Software development support device, software development support method and software development support program |
JP2016091138A (en) | 2014-10-31 | 2016-05-23 | 日立オートモティブシステムズ株式会社 | Source code verification system |
JP2017503233A (en) | 2013-12-12 | 2017-01-26 | インテル コーポレイション | Techniques for detecting race conditions |
-
2021
- 2021-09-22 WO PCT/JP2021/034804 patent/WO2022091651A1/en active Application Filing
- 2021-09-22 JP JP2022558922A patent/JP7454700B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007011690A (en) | 2005-06-30 | 2007-01-18 | Fujitsu Ltd | Verification program for program, verification device for program, and verification method for program |
JP2013528853A (en) | 2010-04-19 | 2013-07-11 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Method, system, and computer program for debugging multithreaded code |
JP2013254371A (en) | 2012-06-07 | 2013-12-19 | Toyota Motor Corp | Software development support device, software development support method and software development support program |
JP2017503233A (en) | 2013-12-12 | 2017-01-26 | インテル コーポレイション | Techniques for detecting race conditions |
JP2016091138A (en) | 2014-10-31 | 2016-05-23 | 日立オートモティブシステムズ株式会社 | Source code verification system |
Also Published As
Publication number | Publication date |
---|---|
JPWO2022091651A1 (en) | 2022-05-05 |
WO2022091651A1 (en) | 2022-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2439663C2 (en) | Order of programme transactions fixation and conflict management | |
Axer et al. | Response-time analysis of parallel fork-join workloads with real-time constraints | |
US10884822B2 (en) | Deterministic parallelization through atomic task computation | |
US9417935B2 (en) | Many-core process scheduling to maximize cache usage | |
US8996811B2 (en) | Scheduler, multi-core processor system, and scheduling method | |
CN101681272B (en) | Parallelizing sequential frameworks using transactions | |
US10943041B2 (en) | Electronic system level parallel simulation method with detection of conflicts of access to a shared memory | |
US9785468B2 (en) | Finding resource bottlenecks with low-frequency sampled data | |
Nasri et al. | Response-time analysis of limited-preemptive parallel DAG tasks under global scheduling | |
TWI451340B (en) | Method and computer-readable medium for parallelizing sequential frameworks using transactions | |
US20090006403A1 (en) | Efficiently boosting priority of read-copy update readers while resolving races with exiting and unlocking processes | |
JP2010134614A (en) | Paralleling processing method, system, and program | |
Maia et al. | Schedulability analysis for global fixed-priority scheduling of the 3-phase task model | |
Dinh et al. | Blocking analysis for spin locks in real-time parallel tasks | |
US20230342198A1 (en) | Method for reproducible parallel simulation at electronic system level implemented by means of a multi-core discrete-event simulation computer system | |
Stigge et al. | Combinatorial abstraction refinement for feasibility analysis of static priorities | |
US20220164507A1 (en) | Electronic system-level reproducible parallel simulation method implemented by way of a discrete event simulation multicore computing system | |
JP6427055B2 (en) | Parallelizing compilation method and parallelizing compiler | |
JP7454700B2 (en) | Arithmetic device and inspection method | |
Tran et al. | Domain-specific language facilitates scheduling in model checking | |
US10698802B1 (en) | Method and system for generating a validation test | |
CN110046809B (en) | Job scheduling method and device | |
JP4997144B2 (en) | Multitask processing apparatus and method | |
JP2018151803A (en) | Inspection device of computer program, and on-vehicle device for inspecting computer program for vehicle control | |
Nhat-Hoa et al. | Sspinja: Facilitating schedulers in model checking |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230203 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231219 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240206 |
|
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: 20240213 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240311 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7454700 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |