JP2021039666A - Core allocation device and core allocation method - Google Patents

Core allocation device and core allocation method Download PDF

Info

Publication number
JP2021039666A
JP2021039666A JP2019162073A JP2019162073A JP2021039666A JP 2021039666 A JP2021039666 A JP 2021039666A JP 2019162073 A JP2019162073 A JP 2019162073A JP 2019162073 A JP2019162073 A JP 2019162073A JP 2021039666 A JP2021039666 A JP 2021039666A
Authority
JP
Japan
Prior art keywords
task
core
allocation
unit
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2019162073A
Other languages
Japanese (ja)
Inventor
勇気 田中
Yuki Tanaka
勇気 田中
辰也 堀口
Tatsuya HORIGUCHI
辰也 堀口
祐 石郷岡
Hiroshi Ishigooka
祐 石郷岡
裕弘 小田
Yasuhiro Oda
裕弘 小田
健志 瀬田
Kenji Seta
健志 瀬田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2019162073A priority Critical patent/JP2021039666A/en
Priority to PCT/JP2020/030551 priority patent/WO2021044810A1/en
Publication of JP2021039666A publication Critical patent/JP2021039666A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Abstract

To provide a core allocation device and a core allocation method that enable easy appropriate allocation of tasks.SOLUTION: A feature acquisition unit 201 acquires feature information indicating features of a task from design information 211 that defines the task. An allocation unit 210 allocates the task to the core, based on the feature information and a configuration of a core in a processor.SELECTED DRAWING: Figure 3

Description

本開示は、コア割当装置及びコア割当方法に関する。 The present disclosure relates to a core allocation device and a core allocation method.

近年、電子制御装置(Electronic Control Unit:ECU)を備える組み込みシステムでは、制御性能の向上、厳格化する環境規制などへの対応、及び、装置の自律化に伴う新たな演算処理の追加などが要求されており、それに伴い、高負荷化が進んでいる。このため、電子制御装置においても、性能向上などを目的として、ヘテロジニアスなマルチコアを備えたプロセッサ(複数種別のコアを備えたプロセッサ)が使用されている。 In recent years, embedded systems equipped with electronic control units (ECUs) have been required to improve control performance, respond to stricter environmental regulations, and add new arithmetic processing due to device autonomy. Along with this, the load is increasing. For this reason, even in electronic control devices, a processor having a heterogeneous multi-core (a processor having a plurality of types of cores) is used for the purpose of improving performance and the like.

また、組み込みシステムにおいては、電子制御装置による演算結果をアクチュエータに対して規定のタイミングで伝達するリアルタイム性が求められる。これに対応するため、ヘテロジニアスなマルチコアを備えた電子制御装置では、タスク全体がより短い時間で完了するように、各コアに対して、そのコアが実行するタスクを適切に割り当てる必要が生じている。 Further, in an embedded system, real-time performance is required in which the calculation result by the electronic control device is transmitted to the actuator at a predetermined timing. To accommodate this, electronic controllers with heterogeneous multi-cores need to properly assign each core the task it performs so that the entire task can be completed in a shorter amount of time. There is.

特許文献1には、性能にばらつきのある複数のコアを備えるプロセッサにおいて、アプリケーションに含まれるタスク群をコアにの割り当てるタスク群割当装置が開示されている。このタスク群割当装置は、コアの配置とコアの性能を抽出し、その抽出したコアの配置及び性能と、アプリケーションが実行可能であるか否かとを対応付ける制約条件を生成し、その制約条件を参照して、予め複数のコアに割り当てられていたタスク群のコアへの割り当てを再度行う。 Patent Document 1 discloses a task group assigning device that assigns a task group included in an application to a core in a processor having a plurality of cores having variations in performance. This task group allocation device extracts the core arrangement and core performance, generates a constraint condition that associates the extracted core arrangement and performance with whether or not the application can be executed, and refers to the constraint condition. Then, the task group previously assigned to the plurality of cores is assigned to the cores again.

特許5158447号公報Japanese Patent No. 5158447

特許文献1に記載の技術では、タスク群のコアへの割り当てを繰り返すことで、タスク群の適切な割り当てを行うものである。また、タスク群をコアに割り当てる際には、アプリケーションが実行可能であるか否かを、タスクを実際に実行した実行ログから取得する。このため、タスク群のコアへの割り当てを適切に行うためには、アプリケーションの実行と、アプリケーションが実行可能であるか否かの計測とを繰り返し行う必要があり、適切な割り当てを決定するまでに多大な時間を要するという問題がある。 In the technique described in Patent Document 1, the task group is appropriately assigned by repeating the assignment of the task group to the core. In addition, when assigning a task group to a core, whether or not the application can be executed is acquired from the execution log in which the task is actually executed. Therefore, in order to properly allocate the task group to the core, it is necessary to repeatedly execute the application and measure whether or not the application can be executed, and it is necessary to determine the appropriate allocation. There is a problem that it takes a lot of time.

本発明は、上記課題を鑑みて為されたものであり、適切なタスクの割り当てを容易に行うことが可能なコア割当装置及びコア割当方法を提供することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a core allocation device and a core allocation method capable of easily assigning appropriate tasks.

本開示の一態様に従うコア割当装置は、プロセッサが備える複数種別のコアに対して、当該コアに実行させるタスクを割り当てるコア割当装置であって、前記タスクを定義する設計情報から、前記タスクの特徴を示す特徴情報を取得する特徴取得部と、前記特徴情報と、前記プロセッサにおける前記コアの構成とに基づいて、前記タスクを前記コアに割り当てる割当部と、を有する。 The core allocating device according to one aspect of the present disclosure is a core allocating device that assigns a task to be executed by the core to a plurality of types of cores provided in the processor, and is characterized by the task from the design information that defines the task. It has a feature acquisition unit for acquiring the feature information indicating the above, and an allocation unit for allocating the task to the core based on the feature information and the configuration of the core in the processor.

本発明によれば、適切なタスクの割り当てを容易に行うことが可能になる。 According to the present invention, it becomes possible to easily assign an appropriate task.

本開示の実施例1に係るコンピュータシステムを示す図である。It is a figure which shows the computer system which concerns on Example 1 of this disclosure. コア割当装置のハードウェア構成を示す図である。It is a figure which shows the hardware configuration of the core allocation device. コア割当装置の機能的な構成の一例を示す図である。It is a figure which shows an example of the functional configuration of a core allocation device. タスク分類部の動作の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of operation of a task classification part. タスクの分類内容の一例を示す図である。It is a figure which shows an example of the classification contents of a task. コア種別決定部の機能的な構成を示す図である。It is a figure which shows the functional structure of the core type determination part. タスク分類結果の一例を示す図である。It is a figure which shows an example of a task classification result. コア割当ポリシの一例を示す図である。It is a figure which shows an example of the core allocation policy. 割当情報の一例を示す図である。It is a figure which shows an example of the allocation information. コア割当装置の機能的な構成の別の例を示す図である。It is a figure which shows another example of the functional configuration of a core allocation device.

以下、本開示の実施例について図面を参照して説明する。 Hereinafter, examples of the present disclosure will be described with reference to the drawings.

図1は、本開示の実施例1に係るコンピュータシステムを示す図である。図1に示すコンピュータシステム100は、コア割当装置101と、電子制御装置(ECU)102とを有する。コア割当装置101は、プロセッサが備える複数のコア(プロセッサ・コア)に対して、そのコアに実行させるタスクを割り当てる。電子制御装置102は、コア割当装置101からタスクの割り当てが行われるプロセッサを有する装置である。電子制御装置102は、本実施例では、車両を制御する車両システム(図示せず)の一部として車両に搭載されているものとするが、他の機器に搭載されてもよいし、単体で用いられてもよい。なお、車両システムによる車両の制御としては、例えば、車両の自動運転の制御などが挙げられる。 FIG. 1 is a diagram showing a computer system according to a first embodiment of the present disclosure. The computer system 100 shown in FIG. 1 includes a core allocation device 101 and an electronic control device (ECU) 102. The core allocation device 101 assigns a task to be executed by a plurality of cores (processor cores) included in the processor to the cores. The electronic control device 102 is a device having a processor in which tasks are assigned from the core allocation device 101. In this embodiment, the electronic control device 102 is mounted on the vehicle as a part of a vehicle system (not shown) that controls the vehicle, but may be mounted on another device or as a single unit. It may be used. Examples of vehicle control by the vehicle system include control of automatic driving of the vehicle.

電子制御装置102は、プロセッサ103と、メモリ104と、スケジューリング部105と、周辺装置106とを有する。 The electronic control device 102 includes a processor 103, a memory 104, a scheduling unit 105, and a peripheral device 106.

プロセッサ103は、複数のコア107を有する。コア107は、タスクの実行命令に応じてタスクを実行し、その実行結果を出力する。コア107は、図の例では、N個ある。N個のコア107を区別する必要がある場合、各コア107をコア107_1〜107_Nと呼ぶ。また、コア107には、性能が異なる複数の種別がある。コアの種別としては、例えば、処理速度の速い第1の種別であるコア種別1と、コア種別1よりも処理速度が遅い第2の種別であるコア種別2などがある。 The processor 103 has a plurality of cores 107. The core 107 executes a task in response to a task execution instruction, and outputs the execution result. In the example shown in the figure, there are N cores 107. When it is necessary to distinguish N cores 107, each core 107 is referred to as cores 107_1 to 107_N. Further, the core 107 has a plurality of types having different performances. Examples of the core type include a core type 1 which is a first type having a high processing speed and a core type 2 which is a second type having a slower processing speed than the core type 1.

メモリ104は、コア107に対する実行命令及びコア107から出力される実行結果などの種々の情報を記憶する。スケジューリング部105は、各コア107と各コア107で実行するタスクとの対応関係を示す割当情報に基づいて、各コア107で実行するタスクを切り替えながら、各コア107に必要なタスクを実行させる。周辺装置106は、外部装置との通信などを行う。 The memory 104 stores various information such as an execution instruction for the core 107 and an execution result output from the core 107. The scheduling unit 105 causes each core 107 to execute a necessary task while switching the task to be executed in each core 107 based on the allocation information indicating the correspondence between each core 107 and the task to be executed in each core 107. The peripheral device 106 communicates with an external device and the like.

図2は、コア割当装置101のハードウェア構成を示す図である。図2に示すようにコア割当装置101は、CPU(Central Processing Unit)111と、メモリ112と、補助記憶部113と、入力部114と、通信部115とを有する。 FIG. 2 is a diagram showing a hardware configuration of the core allocation device 101. As shown in FIG. 2, the core allocation device 101 includes a CPU (Central Processing Unit) 111, a memory 112, an auxiliary storage unit 113, an input unit 114, and a communication unit 115.

CPU111は、メモリ112に記録されているプログラムを読み取り、その読み取ったプログラムを実行することで種々の機能を実現する。メモリ112は、CPU11の動作を規定するプログラムと、CPU111にて使用される種々のデータを記録する。補助記憶部113は、プログラム及びデータを記憶する。補助記憶部113に記憶されたプログラム及びデータは、必要に応じてメモリ12にロードされる。入力部114は、コア割当装置101のユーザから種々の情報を受け付ける。通信部115は、電子制御装置102と通信可能に接続する。 The CPU 111 realizes various functions by reading a program recorded in the memory 112 and executing the read program. The memory 112 records a program that defines the operation of the CPU 11 and various data used by the CPU 111. The auxiliary storage unit 113 stores programs and data. The programs and data stored in the auxiliary storage unit 113 are loaded into the memory 12 as needed. The input unit 114 receives various information from the user of the core allocation device 101. The communication unit 115 is communicably connected to the electronic control device 102.

図3は、コア割当装置101の機能的な構成を示す図である。図3に示すようにコア割当装置101は、特徴取得部201と、タスク分類部202と、コア種別決定部203と、コア割当決定部204とを有する。 FIG. 3 is a diagram showing a functional configuration of the core allocation device 101. As shown in FIG. 3, the core allocation device 101 includes a feature acquisition unit 201, a task classification unit 202, a core type determination unit 203, and a core allocation determination unit 204.

特徴取得部201は、電子制御装置102の各コア107に実行させるアプリケーションプログラムのタスク群に含まれる各タスクを定義する設計情報211から、タスクの特徴(性質)を示す特徴情報をタスクごとに取得する。設計情報211は、例えば、タスク又はアプリケーションプログラムのソースコードなどである。特徴情報は、複数の特徴を示してもよい。 The feature acquisition unit 201 acquires feature information indicating the feature (property) of the task for each task from the design information 211 that defines each task included in the task group of the application program to be executed by each core 107 of the electronic control device 102. To do. The design information 211 is, for example, the source code of a task or an application program. The feature information may indicate a plurality of features.

タスク分類部202、コア種別決定部203及びコア割当決定部204は、特徴取得部201が取得した特徴情報と、電子制御装置102のプロセッサ103におけるコア107の構成とに基づいて、タスク群内の各タスクをコア107に割り当てる割当部210を構成する。コア107の構成は、例えば、コアの種別ごとのコアの数である。 The task classification unit 202, the core type determination unit 203, and the core allocation determination unit 204 are included in the task group based on the feature information acquired by the feature acquisition unit 201 and the configuration of the core 107 in the processor 103 of the electronic control device 102. The allocation unit 210 that allocates each task to the core 107 is configured. The configuration of the core 107 is, for example, the number of cores for each type of core.

タスク分類部202は、特徴取得部201にて取得された特徴情報と、タスク群に含まれる各タスクを示すタスクリスト212とに基づいて、各タスクを複数の区分のいずれかに分類し、その分類結果をタスク分類結果として生成する。例えば、タスクの特徴が複数ある場合、タスク分類部202は、特徴ごとに、タスクを複数のサブ区分のいずれかに分類し、各サブ区分の組み合わせに応じて、タスクを複数の区分のいずれかに分類する。 The task classification unit 202 classifies each task into one of a plurality of categories based on the feature information acquired by the feature acquisition unit 201 and the task list 212 indicating each task included in the task group. Generate the classification result as the task classification result. For example, when there are a plurality of task features, the task classification unit 202 classifies the task into one of a plurality of sub-divisions for each feature, and classifies the task into one of the plurality of sub-divisions according to the combination of each sub-division. Classify into.

コア種別決定部203は、タスク分類部202にて生成されたタスク分類結果に基づいて、タスクリスト212が示すタスクごとに、そのタスクを実行するコアの種別であるコア種別と、そのタスクを実行するコアの数の上限値であるコア数とを決定し、各タスクと各タスクのコア種別及びコア数との対応関係を示す種別割当情報を生成する。 Based on the task classification result generated by the task classification unit 202, the core type determination unit 203 executes the core type, which is the type of the core that executes the task, and the task for each task shown in the task list 212. The number of cores, which is the upper limit of the number of cores to be executed, is determined, and type allocation information indicating the correspondence between each task and the core type and the number of cores of each task is generated.

コア割当決定部204は、コア種別決定部203にて生成された種別割当情報に基づいて、電子制御装置102に備わった複数のコア107のそれぞれに対して、そのコア107にて実行するタスクを割り当て、その割当結果として、各タスクとそれらを割り当てるコア107との対応関係を示す割当情報を生成する。 Based on the type allocation information generated by the core type determination unit 203, the core allocation determination unit 204 performs a task to be executed by the core 107 for each of the plurality of cores 107 provided in the electronic control device 102. Allocation, and as the allocation result, allocation information indicating the correspondence between each task and the core 107 to which they are allocated is generated.

コア割当決定部204は、生成した割当情報を電子制御装置102に出力して、電子制御装置102のスケジューリング部105に設定することで、割当情報に応じて電子制御装置102の各コア107にタスクを実行させてもよい。 The core allocation determination unit 204 outputs the generated allocation information to the electronic control device 102 and sets it in the scheduling unit 105 of the electronic control device 102, so that the task is assigned to each core 107 of the electronic control device 102 according to the allocation information. May be executed.

なお、図3に示したコア割当装置101の機能的な構成は、図2に示したコア割当装置101のハードウェア構成にて実現することができる。また、設計情報211及びタスクリスト212は、コア割当装置101のメモリ112又は補助記憶部113などに記憶されてもよい。 The functional configuration of the core allocation device 101 shown in FIG. 3 can be realized by the hardware configuration of the core allocation device 101 shown in FIG. Further, the design information 211 and the task list 212 may be stored in the memory 112 of the core allocation device 101, the auxiliary storage unit 113, or the like.

次に、特徴取得部201にて取得される特徴情報について説明する。特徴情報は、本実施例では、タスクの特徴として、時間制約条件、安全性レベル、駆動形態、実行間隔、処理負荷及び並列性を示す。なお、これらの特徴は、単なる一例であり、他の特徴が追加されてもよいし、一部の特徴が除外されてもよい。例えば、特徴情報は、タスクの特徴として、時間制約条件、安全性レベル、駆動形態、実行間隔、処理負荷及び並列性の少なくとも1つを含むものでもよい。 Next, the feature information acquired by the feature acquisition unit 201 will be described. In this embodiment, the feature information shows the time constraint condition, the safety level, the drive mode, the execution interval, the processing load, and the parallelism as the features of the task in this embodiment. It should be noted that these features are merely examples, and other features may be added or some features may be excluded. For example, the feature information may include at least one of a time constraint condition, a safety level, a drive mode, an execution interval, a processing load, and parallelism as a task feature.

時間制約条件は、タスクに時間制約(タスクが開始されてから終了するまでの時間制限)があるか否かを示す。時間制約のないタスクは、明示的な時間制約がないが、できるだけ早く終了させるベストエフォート(Best Effort)型のタスクである。 The time constraint condition indicates whether or not the task has a time constraint (time limit from the start to the end of the task). A task without time constraints is a best effort type task that has no explicit time constraints but is completed as soon as possible.

安全性レベルは、タスクに割り当てられた安全性の程度を示す。本実施例では、安全性レベルとして、ASIL(Automotive Safety Integrity Level:安全性要求レベル)を用いる。ASILでは、安全性は、5段階で評価され、安全性の程度が高い方から順に、ASIL−D、ASIL−C、ASIL−B、ASIL−A、QM(Quality Management)と呼ばれる。 The safety level indicates the degree of safety assigned to the task. In this embodiment, ASIL (Automotive Safety Integrity Level) is used as the safety level. In ASIL, safety is evaluated on a five-point scale, and is called ASIL-D, ASIL-C, ASIL-B, ASIL-A, and QM (Quality Management) in order from the highest degree of safety.

駆動形態は、タスクが駆動する形態の種類を示す。本実施例では、駆動形態は、タスクが周期的に駆動する周期駆動か、又は、所定のイベントの発生に応じて駆動する割込み駆動かを示す。 The drive mode indicates the type of mode in which the task is driven. In the present embodiment, the drive mode indicates whether the task is a periodic drive that is driven periodically or an interrupt drive that is driven in response to the occurrence of a predetermined event.

実行間隔は、タスクが実行される時間間隔を示す。実行間隔は、タスクが時間駆動の場合、タスクが駆動される周期であり、タスクが割込み駆動の場合、イベントが発生する時間間隔(タスクが実行される時間間隔)の統計値である。統計値は、例えば、平均値、最大値及び最小値などである。なお、タスクが割込み駆動の場合、タスクが実行される実行間隔は後述するプロファイラ205にて取得されてもよい。 The execution interval indicates the time interval in which the task is executed. The execution interval is a cycle in which the task is driven when the task is time-driven, and is a statistical value of the time interval in which the event occurs (time interval in which the task is executed) when the task is interrupt-driven. The statistical values are, for example, an average value, a maximum value, a minimum value, and the like. When the task is interrupt-driven, the execution interval at which the task is executed may be acquired by the profiler 205 described later.

処理負荷は、タスクによるコア107への負荷の程度を示す。本実施例では、処理負荷は、所定の種別のコアにおいてタスクを実行してから終了するまでにかかる実行時間の最大値である最悪実行時間を示す。 The processing load indicates the degree of load on the core 107 due to the task. In this embodiment, the processing load indicates the worst execution time, which is the maximum value of the execution time from the execution of the task to the end in the core of a predetermined type.

並列性は、タスクの並列化(タスクを複数のコア107にて並列に実行させること)による処理負荷の軽減度合いを示す。 The parallelism indicates the degree of reduction of the processing load by parallelizing the tasks (execution of the tasks in parallel by a plurality of cores 107).

図4は、タスク分類部202の動作の一例を説明するためのフローチャートである。タスク分類部202は、図4に示されるステップS301〜S306の処理をタスクリスト212が示す複数のタスクのそれぞれに対して行う。 FIG. 4 is a flowchart for explaining an example of the operation of the task classification unit 202. The task classification unit 202 performs the processes of steps S301 to S306 shown in FIG. 4 for each of the plurality of tasks shown in the task list 212.

先ず、タスク分類部202は、特徴情報に基づいて、タスクに対して時間制約条件に関する分類を行う(ステップS301)。本実施例では、タスク分類部202は、タスクを時間制約がある「時間制約型」と、時間制約がない「ベストエフォート型」とのいずれかに分類する。 First, the task classification unit 202 classifies the tasks with respect to the time constraint condition based on the feature information (step S301). In this embodiment, the task classification unit 202 classifies the task into either a "time-constrained type" having a time constraint and a "best effort type" having no time constraint.

続いて、タスク分類部202は、特徴情報に基づいて、タスクに対してASILに関する分類を行う(ステップS302)。本実施例では、タスク分類部202は、タスクを、割り当てられた安全性レベルがASIL−D〜ASIL−Aのいずれかである「ASIL」と、割り当てられた安全性レベルがQMである「QM」とのいずれかに分類する。なお、ASILに関する分類では、タスク分類部202は、タスクを、割り当てられた安全性レベルごとに、ASIL−D、ASIL−C、ASIL−B、ASIL−A及びQMのいずれかに分類してもよい。また、ASILに関する分類を行うことで、安全性を担保するために必要なタスクのオーバヘッドを低減することができる。 Subsequently, the task classification unit 202 classifies the tasks regarding ASIL based on the feature information (step S302). In this embodiment, the task classification unit 202 assigns the task to "ASIL" whose assigned safety level is any of ASIL-D to ASIL-A and "QM" whose assigned safety level is QM. It is classified into one of the above. In the classification related to ASIL, the task classification unit 202 may classify the tasks into any of ASIL-D, ASIL-C, ASIL-B, ASIL-A, and QM according to the assigned safety level. Good. In addition, by classifying ASIL, it is possible to reduce the overhead of tasks required to ensure safety.

さらに、タスク分類部202は、特徴情報に基づいて、タスクに対して駆動形態に関する分類を行う(ステップS303)。本実施例では、タスク分類部202は、タスクを、周期的に駆動する「周期駆動」と、所定のイベントの発生に応じて駆動する「割込み駆動」とのいずれかに分類する。 Further, the task classification unit 202 classifies the tasks with respect to the driving mode based on the feature information (step S303). In this embodiment, the task classification unit 202 classifies the task into either "periodic drive" that drives the task periodically and "interrupt drive" that drives the task in response to the occurrence of a predetermined event.

また、タスク分類部202は、特徴情報に基づいて、タスクに対して実行間隔に関する分類を行う(ステップS304)。本実施例では、タスク分類部202は、タスクを、長い時間間隔で実行される「長周期」と、短い時間間隔で実行される「短周期」とのいずれかに分類する。例えば、実行間隔が100msのタスクと、実行間隔が10msのタスクとがある場合、タスク分類部202は、実行間隔が長い方のタスク(実行間隔が100msのタスク)を「長周期」に分類し、実行間隔が短い方のタスク(実行間隔が10msのタスク)を「短周期」に分類する。また、タスクの実行間隔が3種類以上ある場合には、タスク分類部202は、タスクを、それらの種類のいずれかに分類してもよい。また、タスク分類部202は、タスクの実行間隔が閾値以上であるものを「長周期」、タスクの実行間隔が閾値未満である「短周期」としてもよい。 Further, the task classification unit 202 classifies the tasks regarding the execution interval based on the feature information (step S304). In this embodiment, the task classification unit 202 classifies the task into either a "long cycle" executed at a long time interval and a "short cycle" executed at a short time interval. For example, when there is a task with an execution interval of 100 ms and a task with an execution interval of 10 ms, the task classification unit 202 classifies the task with the longer execution interval (the task with the execution interval of 100 ms) into a "long cycle". , The task with the shorter execution interval (task with the execution interval of 10 ms) is classified into "short cycle". Further, when there are three or more types of task execution intervals, the task classification unit 202 may classify the tasks into any of these types. Further, the task classification unit 202 may set a task execution interval of more than or equal to a threshold value as a "long cycle" and a task execution interval of less than a threshold value as a "short cycle".

さらに、タスク分類部202は、特徴情報に基づいて、タスクに対して処理負荷に関する分類を行う(ステップS305)。本実施例では、タスク分類部202は、タスクを、処理負荷である最悪実行時間が閾値以上である「高負荷」と、最悪実行時間が閾値未満である「低負荷」とのいずれかに分類する。閾値は、本実施例では、実行間隔の50%であるとするが、他の値でもよい。なお、処理負荷に関する分類を行うことで、キャッシュの利用効率を高くすることが可能になる。 Further, the task classification unit 202 classifies the tasks regarding the processing load based on the feature information (step S305). In this embodiment, the task classification unit 202 classifies the task into either a "high load" in which the worst execution time is equal to or greater than the threshold value and a "low load" in which the worst execution time is less than the threshold value. To do. In this embodiment, the threshold value is 50% of the execution interval, but other values may be used. By classifying the processing load, it is possible to improve the cache utilization efficiency.

そして、タスク分類部202は、特徴情報に基づいて、タスクに対して並列性に関する分類を行う(ステップS306)。本実施例では、タスク分類部202は、タスクを、並列化によって処理負荷の軽減度合いが閾値以上軽減する「並列」と、並列化しても処理負荷の軽減度合いが閾値未満である「単一」とのいずれかに分類する。なお、タスク分類部202は、処理負荷の軽減度合いに応じて、タスクを3つ以上に分類してもよい。例えば、タスク分類部202は、軽減度合いが30%未満、30%以上かつ50%未満、50%以上の3つのサブ区分のいずかに分類してもよい。 Then, the task classification unit 202 classifies the tasks in terms of parallelism based on the feature information (step S306). In this embodiment, the task classification unit 202 uses "parallel" in which the degree of reduction of the processing load is reduced by parallelization to a threshold value or more, and "single" in which the degree of reduction of the processing load is less than the threshold value even if the tasks are parallelized. Classify into one of. The task classification unit 202 may classify the tasks into three or more according to the degree of reduction of the processing load. For example, the task classification unit 202 may classify into one of three sub-divisions having a degree of mitigation of less than 30%, 30% or more and less than 50%, and 50% or more.

図5は、上記動作によるタスクの分類内容を示す図である。図5に示されるように、上記の動作の例では、タスクは、時間制約条件によって「時間制約型」又は「ベストエフォード型」に分類され、安全性レベルによって「QM」又は「ASIL」に分類され、駆動形態によって「周期駆動」又は「割込み駆動」に分類され、実行間隔によって「長周期」又は「短周期」に分類され、処理負荷によって「高負荷」又は「低負荷」に分類され、並列性によって「並列」又は「単一」に分類される。このため、タスクは、64通りに分類される。 FIG. 5 is a diagram showing the classification contents of tasks according to the above operation. As shown in FIG. 5, in the above example of operation, the task is classified into "time constraint type" or "best efford type" according to the time constraint condition, and is classified into "QM" or "ASIL" according to the safety level. It is classified into "periodic drive" or "interrupt drive" according to the drive mode, "long cycle" or "short cycle" according to the execution interval, and "high load" or "low load" depending on the processing load. It is classified as "parallel" or "single" depending on the parallelism. Therefore, the tasks are classified into 64 ways.

図6は、コア種別決定部203の機能的な構成を示す図である。図6に示すコア種別決定部203は、タスク分類部202にて生成されたタスク分類結果であるタスク分類結果601と、タスクをコア107に割り当てる際の方針を示すコア割当ポリシ602とを保持する。また、コア種別決定部203は、コア種別管理部603を有する。 FIG. 6 is a diagram showing a functional configuration of the core type determination unit 203. The core type determination unit 203 shown in FIG. 6 holds a task classification result 601 that is a task classification result generated by the task classification unit 202 and a core allocation policy 602 that indicates a policy for allocating a task to the core 107. .. Further, the core type determination unit 203 has a core type management unit 603.

図7は、タスク分類結果601の一例を示す図である。図7に示すタスク分類結果502は、タスクを識別するタスクIDを格納するフィールド701と、タスクの区分を示す区分情報であるタスク分類を格納するフィールド702とを含む。タスク分類は、例えば、上記の64通りの分類のそれぞれを示す。 FIG. 7 is a diagram showing an example of the task classification result 601. The task classification result 502 shown in FIG. 7 includes a field 701 that stores a task ID that identifies a task, and a field 702 that stores a task classification that is classification information indicating the task classification. The task classification shows, for example, each of the above 64 classifications.

コア割当ポリシ602は、電子制御装置102のプロセッサ103におけるコア107の構成に応じて予め用意される。コア割当ポリシ602は、具体的には、タスク分類ごとに、そのタスク分類のタスクを割り当てるコアの種別であるコア種別と、コアの個数の上限値であるコア数とを示す。タスクに割り当てるコア種別は、1種類に限らず、2種類以上でもよい。 The core allocation policy 602 is prepared in advance according to the configuration of the core 107 in the processor 103 of the electronic control device 102. Specifically, the core allocation policy 602 indicates the core type, which is the type of core to which the task of the task classification is assigned, and the number of cores, which is the upper limit of the number of cores, for each task classification. The core type assigned to the task is not limited to one type, and may be two or more types.

図8は、コア割当ポリシ602の一例を示す図である。図8に示すコア割当ポリシ602は、タスク分類を格納するフィールド801と、コア種別を格納するフィールド802と、コア数を格納するフィールド803とを含む。 FIG. 8 is a diagram showing an example of the core allocation policy 602. The core allocation policy 602 shown in FIG. 8 includes a field 801 for storing a task classification, a field 802 for storing a core type, and a field 803 for storing the number of cores.

コア種別管理部603は、タスク分類結果601及びコア割当ポリシ602を用いて各タスクに割り当てるコア種別及びコア数を決定し、その決定したコア種別及びコア数を示す種別割当情報を生成する。タスク分類結果601及びコア割当ポリシ602が図7及び図8で示される場合、タスクIDが「タスク2」のタスクを例に挙げると、図7のタスク分類結果601によってタスクID「タスク2」にタスク分類として「分類2」が対応付けられており、「分類2」には、コア割当ポリシ602によって、コア種別として「コア種別1」、コア数として「4」が対応付けられている。このため、コア種別管理部603は、タスクIDが「タスク2」のタスクに割り当てるコア種別を「コア種別1」、コア数を「4」と決定する。コア種別管理部603は、このような処理をタスクIDごとに行うことで、各タスクに割り当てるコア種別及びコア数を決定する。 The core type management unit 603 determines the core type and the number of cores to be assigned to each task using the task classification result 601 and the core allocation policy 602, and generates type allocation information indicating the determined core type and the number of cores. When the task classification result 601 and the core allocation policy 602 are shown in FIGS. 7 and 8, taking the task whose task ID is "task 2" as an example, the task classification result 601 in FIG. 7 gives the task ID "task 2". "Category 2" is associated with the task classification, and "Category 2" is associated with "core type 1" as the core type and "4" as the number of cores according to the core allocation policy 602. Therefore, the core type management unit 603 determines that the core type assigned to the task whose task ID is "task 2" is "core type 1" and the number of cores is "4". The core type management unit 603 determines the core type and the number of cores to be assigned to each task by performing such processing for each task ID.

コア割当決定部204は、種別割当情報に基づいて、タスクのコア107への割り当てを行い、その割当結果である割当情報を出力する。 The core allocation determination unit 204 allocates the task to the core 107 based on the type allocation information, and outputs the allocation information which is the allocation result.

図9は、コア割当決定部204にて生成された割当情報の一例を示す図である。図9の例では、コア107_1〜107_8までの8個のコア107がある。コア107_1〜107_4は、処理速度が速いコア種別1のコアであり、コア107_5〜107_8は、処理速度の遅いコア種別2のコアである。 FIG. 9 is a diagram showing an example of allocation information generated by the core allocation determination unit 204. In the example of FIG. 9, there are eight cores 107 from cores 107_1 to 107_8. Cores 107_1 to 107_4 are cores of core type 1 having a high processing speed, and cores 107_1 to 107_8 are cores of core type 2 having a slow processing speed.

「ベストエフォート型のタスク」については、適切に時分割して実行されれば、コア種別に関わらず、いずれのコア107で実行されても問題がない。このため、「ベストエフォート型のタスク」は、他の特徴によらず、コア107_1〜107_8に割り当てられている。 As for the "best effort type task", if it is executed in an appropriate time division manner, there is no problem even if it is executed in any core 107 regardless of the core type. Therefore, the "best effort type task" is assigned to the cores 107_1 to 107_8 regardless of other features.

また、「時間制約型のタスク」については、図の例では、安全性レベルが「QM」の場合、大量に実行される、つまり、実行間隔が「短周期」であるとしている。このため、安全性レベルが「QM」のタスクは、処理速度の速いコア種別1のコア107_1〜107_4に割り当てられている。このとき、並列性が「並列」のタスクである「QM並列実行タスク」は、複数(図の例では4個)のコア107_1〜107_4に割り当てられ、並列性が「単一」のタスクである「QMタスク」は、コア107_1〜107_3にそれぞれ1つずつ割り当てられる。 Further, regarding the "time-constrained task", in the example of the figure, when the safety level is "QM", it is executed in large quantities, that is, the execution interval is "short cycle". Therefore, the task having the safety level "QM" is assigned to the cores 107_1 to 107_4 of the core type 1 having a high processing speed. At this time, the "QM parallel execution task", which is a task whose concurrency is "parallel", is assigned to a plurality of (4 in the example of the figure) cores 107_1 to 107_4, and is a task whose concurrency is "single". One "QM task" is assigned to each of the cores 107_1 to 107_3.

また、安全性レベルが「ASIL」のタスクである「ASILタスク」は、処理負荷が「高負荷」の場合、高速のコア種別1のコア107_1〜107_4のいずれかに割り当てられ、処理負荷が「低負荷」の場合、低速のコア種別2のコア107_5〜107_8のいずれかに割り当てられる。 Further, the "ASIL task", which is a task having a safety level of "ASIL", is assigned to one of the cores 107_1 to 107_4 of the high-speed core type 1 when the processing load is "high load", and the processing load is "". In the case of "low load", it is assigned to any of the cores 107_5 to 107_8 of the low-speed core type 2.

なお、コア割当装置101は、アプリケーションプログラムのタスクの他に、OS(Operating System)に関する処理及びBSWに関する処理などをコア107に割り当ててもよい。図9の例では、コア割当決定部204は、ASILが割り当てられているOSの処理である「ASIL OS」と、ASILが割り当てられているBSWの処理である「ASIL BSW」とをそれぞれコア種別2のコアに割り当てている。 In addition to the tasks of the application program, the core allocation device 101 may allocate processing related to the OS (Operating System), processing related to BSW, and the like to the core 107. In the example of FIG. 9, the core allocation determination unit 204 classifies "ASIL OS", which is a process of the OS to which ASIL is assigned, and "ASIL BSW", which is a process of BSW to which ASIL is assigned, into core types. It is assigned to 2 cores.

以上説明した本実施例によれば、タスクの設計情報211から取得したタスクの特徴情報に基づいてタスクがコア107に割り当てられる。したがって、タスクの実行を繰り返さずにタスクの適切な割り当てが可能となるため、適切なタスクの割り当てを容易に行うことが可能になる。 According to the present embodiment described above, the task is assigned to the core 107 based on the feature information of the task acquired from the design information 211 of the task. Therefore, it is possible to appropriately assign a task without repeating the execution of the task, and it is possible to easily assign an appropriate task.

また、本実施例では、タスクの特徴情報に基づいて、タスクを複数の区分のいずれかに分類され、その区分に基づいて、タスクを割り当てるコア107の種別とコア数とが決定される。このため、タスクとそのタスクを実行するコア107との対応関係の組み合わせの数を減らすことが可能になり、適切なタスクの割り当てをより容易に行うことが可能になる。このため、タスクの割り当ての決定を短時間で行うことが可能になる。 Further, in this embodiment, the task is classified into one of a plurality of categories based on the feature information of the task, and the type and the number of cores 107 to which the task is assigned are determined based on the category. Therefore, it becomes possible to reduce the number of combinations of correspondences between the task and the core 107 that executes the task, and it becomes possible to more easily assign an appropriate task. Therefore, it is possible to determine the task assignment in a short time.

また、本実施例では、特徴情報は、複数の特徴を示すため、タスクの特徴を適切に考慮してタスクの割り当てが可能となる。また、特徴は、タスクの時間制約条件、タスクに要求される安全性、タスクが実行される駆動形態、タスクが実行される実行間隔、タスクの実行による処理負荷、及び、タスクの並列性の少なくとも1つを含む。このため、適切にタスクの割り当てが可能となる。 Further, in the present embodiment, since the feature information indicates a plurality of features, the task can be assigned by appropriately considering the task features. In addition, the features are at least the time constraint condition of the task, the safety required for the task, the driving mode in which the task is executed, the execution interval in which the task is executed, the processing load due to the execution of the task, and the concurrency of the task. Including one. Therefore, tasks can be assigned appropriately.

本実施例では、特徴取得部201がコアの割り当てに使用するタスクの特徴を指定する指定情報を受け付ける点で実施例1とは異なる。 This embodiment is different from the first embodiment in that the feature acquisition unit 201 receives designated information that specifies the features of the task used for core allocation.

特徴取得部201は、指定情報を受け付けると、その指定情報に基づいて、設計情報211から特徴情報を取得する。具体的には、特徴取得部201は、指定情報にて指定された特徴を示す特徴情報を設計情報211から取得する。 When the feature acquisition unit 201 receives the designated information, the feature acquisition unit 201 acquires the feature information from the design information 211 based on the designated information. Specifically, the feature acquisition unit 201 acquires the feature information indicating the feature specified in the designated information from the design information 211.

指定情報は、入力部114を用いてユーザから受け付けることができる。例えば、電子制御装置102に搭載されているコア107がコア種別ごとに1つずつしかない場合、ユーザは、実施例1で説明した特徴(時間制約条件、安全性レベル、駆動形態、実行間隔、処理負荷及び並列性)から並列性を除外したものを指定してもよい。また、電子制御装置102が車両の自動運転の制御のようなタスクが終了するデッドラインが重要な用途に使用される場合、時間制約条件が重要となるが、タスクが終了するデッドラインが重要ではない用途に使用される場合、時間制約条件が重要とならないことがある。この場合、ユーザは、実施例1で説明した特徴から時間制約条件を除外したものを指定することができる。 The designated information can be received from the user using the input unit 114. For example, when there is only one core 107 mounted on the electronic control device 102 for each core type, the user can use the features (time constraint condition, safety level, drive mode, execution interval, etc.) described in the first embodiment. Processing load and parallelism) may be specified by excluding parallelism. Also, when the electronic control device 102 is used for important purposes such as controlling the automatic driving of a vehicle, the time constraint is important, but the deadline at which the task ends is not important. Time constraints may not be important when used for non-existent applications. In this case, the user can specify a feature described in the first embodiment excluding the time constraint condition.

以上説明した本実施例によれば、電子制御装置102の種類や用途などに応じて使用する特徴を選択することが可能になるため、不要な分類の低減、及び、不要な割当制約による処理能力の低下を抑制することが可能になる。 According to the present embodiment described above, since the features to be used can be selected according to the type and application of the electronic control device 102, unnecessary classification can be reduced and processing capacity due to unnecessary allocation constraints can be selected. It becomes possible to suppress the decrease of.

本実施例では、特徴取得部201が処理負荷に係る特徴情報を取得する方法の第1の具体例について説明する。 In this embodiment, the first specific example of the method in which the feature acquisition unit 201 acquires the feature information related to the processing load will be described.

本実施例の方法では、電子制御装置102を用いて各タスクを実行することで、各タスクの処理負荷として最悪実行時間を計測し、その計測した最悪実行時間を設計情報211に予め組み込んでおく。この場合、特徴取得部201は、設計情報211から最悪実行時間を抽出することで、「処理負荷」に係る特徴情報を取得する。なお、同様な方法で、タスクが割込み駆動の場合の実行間隔に係る特徴情報を取得することもできる。 In the method of this embodiment, by executing each task using the electronic control device 102, the worst execution time is measured as the processing load of each task, and the measured worst execution time is incorporated in the design information 211 in advance. .. In this case, the feature acquisition unit 201 acquires the feature information related to the "processing load" by extracting the worst execution time from the design information 211. In addition, it is also possible to acquire the feature information related to the execution interval when the task is interrupt-driven by the same method.

以上説明した本実施例によれば、ソースコードなどの情報からタスクの処理負荷を予測することが困難な場合においても、処理負荷に係る特徴情報を取得することが可能となる。 According to the present embodiment described above, even when it is difficult to predict the processing load of a task from information such as source code, it is possible to acquire feature information related to the processing load.

本実施例では、特徴取得部201が処理負荷に係る特徴情報を取得する方法の第2の具体例について説明する。 In this embodiment, a second specific example of the method in which the feature acquisition unit 201 acquires the feature information related to the processing load will be described.

本実施例の方法では、特徴取得部201は、設計情報211に含まれるタスクのソースコードを参照し、そのソースコードの規模であるソースコード量に基づいて、処理負荷を予測する。具体的には、特徴取得部201は、ソースコードに含まれる所定の関数を実行するのに要する関数実行時間と、ソースコード量とに基づいて、処理負荷である最悪実行時間を予測する。例えば、特徴取得部201は、ソースコード量としてソースコードの行数を求め、その行数に関数実行時間に応じた時間を乗算することで、最悪実行時間を予測する。関数実行時間は、例えば、特徴取得部201にて保持されていてもよいし、設計情報211に予め組み込まれていてもよい。 In the method of this embodiment, the feature acquisition unit 201 refers to the source code of the task included in the design information 211, and predicts the processing load based on the source code amount which is the scale of the source code. Specifically, the feature acquisition unit 201 predicts the worst execution time, which is a processing load, based on the function execution time required to execute a predetermined function included in the source code and the amount of the source code. For example, the feature acquisition unit 201 predicts the worst execution time by obtaining the number of lines of the source code as the amount of source code and multiplying the number of lines by the time corresponding to the function execution time. The function execution time may be held by the feature acquisition unit 201, for example, or may be incorporated in the design information 211 in advance.

タスクの設計情報211に繰り返し文及び分岐文などの制御文が含まれる場合、特徴取得部201は、その制御文を考慮して処理負荷を予測してもよい。例えば、設計情報211に繰り返し文が含まれる場合、特徴取得部201は、繰り返し文の行数に、その繰り返し文に対応する処理を繰り返す回数を乗算することでソースコード量を補正し、その補正したソースコード量に基づいて、処理負荷を予測する。また、設計情報211に分岐文が含まれる場合、特徴取得部201は、分岐文の行数を、その分岐文で分岐される処理の数で除算することで、ソースコード量を補正し、その補正したソースコード量に基づいて、処理負荷を予測する。 When the task design information 211 includes control statements such as repetitive statements and branch statements, the feature acquisition unit 201 may predict the processing load in consideration of the control statements. For example, when the design information 211 includes a repetitive statement, the feature acquisition unit 201 corrects the source code amount by multiplying the number of lines of the repetitive statement by the number of times the process corresponding to the repetitive statement is repeated, and corrects the amount. Predict the processing load based on the amount of source code. When the design information 211 includes a branch statement, the feature acquisition unit 201 corrects the source code amount by dividing the number of lines of the branch statement by the number of processes branched by the branch statement. Predict the processing load based on the corrected amount of source code.

以上説明した本実施例によれば、タスクの処理負荷を測定する環境がない場合でも、処理負荷に係る特徴情報を取得することができる。 According to the present embodiment described above, feature information related to the processing load can be acquired even when there is no environment for measuring the processing load of the task.

本実施例では、特徴取得部201が処理負荷に係る特徴情報を取得する方法の第3の具体例について説明する。 In this embodiment, a third specific example of the method in which the feature acquisition unit 201 acquires the feature information related to the processing load will be described.

本実施例の方法では、特徴取得部201は、設計情報211に含まれるタスクのアセンブラコードを参照し、タスクが実行を要求する命令数に基づいて、処理負荷を予測する。具体的には、特徴取得部201は、コア107のクロック周波数、パイプライン段数及びメモリのアクセスに要するサイクル数などから一命令当たりの実行時間である命令実行時間を算出し、その命令実行時間と命令数とに基づいて、「処理負荷」である最悪実行時間を予測する。例えば、特徴取得部201は、命令実行時間に応じた時間と命令数とを乗算することで、最悪実行時間を予測する。 In the method of this embodiment, the feature acquisition unit 201 refers to the assembler code of the task included in the design information 211, and predicts the processing load based on the number of instructions requested to be executed by the task. Specifically, the feature acquisition unit 201 calculates the instruction execution time, which is the execution time per instruction, from the clock frequency of the core 107, the number of pipeline stages, the number of cycles required for memory access, and the like, and the instruction execution time and the instruction execution time are calculated. The worst execution time, which is the "processing load", is predicted based on the number of instructions. For example, the feature acquisition unit 201 predicts the worst execution time by multiplying the time corresponding to the instruction execution time by the number of instructions.

タスクの設計情報211に繰り返し文及び分岐文などの制御文が含まれる場合、特徴取得部201は、その制御文を考慮して処理負荷を予測してもよい。例えば、設計情報211に繰り返し文が含まれる場合、特徴取得部201は、繰り返し文に含まれる命令数に、その繰り返し文に対応する処理を繰り返す回数を乗算することで命令数を補正し、その補正した命令数に基づいて、処理負荷を予測する。また、設計情報211に分岐文が含まれる場合、特徴取得部201は、分岐文に含まれる命令数を、その分岐文で分岐される処理の数で除算することで、命令数を補正し、その補正した命令数に基づいて、処理負荷を予測する。 When the task design information 211 includes control statements such as repetitive statements and branch statements, the feature acquisition unit 201 may predict the processing load in consideration of the control statements. For example, when the design information 211 includes a repetitive statement, the feature acquisition unit 201 corrects the number of instructions by multiplying the number of instructions included in the repetitive statement by the number of times the process corresponding to the repetitive statement is repeated. Predict the processing load based on the corrected number of instructions. When the design information 211 includes a branch statement, the feature acquisition unit 201 corrects the number of instructions by dividing the number of instructions included in the branch statement by the number of processes branched by the branch statement. The processing load is predicted based on the corrected number of instructions.

以上説明した本実施例によれば、タスクの処理負荷を測定する環境がない場合でも、処理負荷に係る特徴情報を取得することができる。 According to the present embodiment described above, feature information related to the processing load can be acquired even when there is no environment for measuring the processing load of the task.

本実施例では、特徴取得部201が処理負荷に係る特徴情報を取得する方法の第4の具体例について説明する。 In this embodiment, a fourth specific example of the method in which the feature acquisition unit 201 acquires the feature information related to the processing load will be described.

本実施例の方法では、特徴取得部201は、設計情報211に含まれるタスクのソースコードを参照し、そのソースコードに含まれる所定の関数の数に基づいて、処理負荷を予測する。所定の関数は、例えば、負荷が大きい関数である。 In the method of this embodiment, the feature acquisition unit 201 refers to the source code of the task included in the design information 211, and predicts the processing load based on the number of predetermined functions included in the source code. The predetermined function is, for example, a function having a large load.

特徴取得部201は、具体的には、ソースコードに含まれる所定の関数を実行するのに要する関数実行時間と所定の関数の数とに基づいて処理負荷である最悪実行時間を予測する。例えば、特徴取得部201は、所定の関数の数と関数実行時間に応じた時間とを乗算することで、最悪実行時間を予測する。関数実行時間は、例えば、特徴取得部201にて保持されていてもよいし、設計情報に予め組み込まれていてもよい。 Specifically, the feature acquisition unit 201 predicts the worst execution time, which is a processing load, based on the function execution time required to execute a predetermined function included in the source code and the number of predetermined functions. For example, the feature acquisition unit 201 predicts the worst execution time by multiplying the number of predetermined functions by the time corresponding to the function execution time. The function execution time may be held by the feature acquisition unit 201, for example, or may be incorporated in the design information in advance.

タスクの設計情報211に繰り返し文及び分岐文などの制御文が含まれる場合、特徴取得部201は、その制御文を考慮して処理負荷を予測してもよい。例えば、設計情報211に繰り返し文が含まれる場合、特徴取得部201は、繰り返し文に含まれる所定の関数の数に、その繰り返し文に対応する処理を繰り返す回数を乗算することで所定の関数の数を補正し、その補正した所定の関数の数に基づいて、処理負荷を予測する。また、設計情報211に分岐文が含まれる場合、特徴取得部201は、分岐文に含まれる所定の関数の数を、その分岐文で分岐される処理の数で除算することで、所定の関数の数量を補正し、その補正した所定の関数の数に基づいて、処理負荷を予測する。 When the task design information 211 includes control statements such as repetitive statements and branch statements, the feature acquisition unit 201 may predict the processing load in consideration of the control statements. For example, when the design information 211 includes a repetitive statement, the feature acquisition unit 201 multiplies the number of predetermined functions included in the repetitive statement by the number of times the process corresponding to the repetitive statement is repeated to obtain the predetermined function. The number is corrected, and the processing load is predicted based on the corrected number of predetermined functions. When the design information 211 includes a branch statement, the feature acquisition unit 201 divides the number of predetermined functions included in the branch statement by the number of processes branched by the branch statement to obtain a predetermined function. The quantity of is corrected, and the processing load is predicted based on the corrected number of predetermined functions.

以上説明した本実施例によれば、タスクの処理負荷を測定する環境がない場合でも、処理負荷に係る特徴情報を取得することができる。 According to the present embodiment described above, feature information related to the processing load can be acquired even when there is no environment for measuring the processing load of the task.

本実施例では、特徴取得部201が並列性に係る特徴情報を取得する方法の具体例について説明する。 In this embodiment, a specific example of a method in which the feature acquisition unit 201 acquires feature information related to parallelism will be described.

本実施例の方法では、特徴取得部201は、設計情報に含まれるタスクのソースコードを解析して、そのソースコードにおける複数のコアにて並列に実行することができる箇所である並列箇所を特定し、その並列箇所に基づいて、並列性に関する特徴情報を取得する。例えば、特徴取得部201は、ソースコードにおける並列箇所の行数が所定値以上の場合、処理負荷の軽減度合いが閾値以上であると判断し、並列箇所の行数が所定値未満の場合、処理負荷の軽減度合いが閾値未満と判断する。所定値は、例えば、ソースコード全体の行数の2割である。 In the method of this embodiment, the feature acquisition unit 201 analyzes the source code of the task included in the design information and identifies a parallel portion that can be executed in parallel by a plurality of cores in the source code. Then, based on the parallel part, the feature information about the concurrency is acquired. For example, the feature acquisition unit 201 determines that the degree of reduction of the processing load is equal to or more than the threshold value when the number of lines in the parallel portion in the source code is equal to or more than a predetermined value, and processes when the number of rows in the parallel portion is less than the predetermined value. It is judged that the load reduction degree is less than the threshold value. The predetermined value is, for example, 20% of the total number of lines in the source code.

以上説明したように本実施例によれば、タスクの並列性が設計情報211で定義されていない場合でも、タスクの並列性に係る特徴情報を取得することが可能になる。 As described above, according to the present embodiment, it is possible to acquire the feature information related to the parallelism of the tasks even when the parallelism of the tasks is not defined in the design information 211.

本実施例では、タスクのコア107への割り当てを一度決定した後に変更する点で実施例1とは異なる。 This embodiment is different from the first embodiment in that the assignment of the task to the core 107 is determined once and then changed.

図10は、本実施例に係るコア割当装置101の機能的な構成を示す図である。図10に示すコア割当装置101は、図3に示した実施例1に係るコア割当装置101の構成に加えて、プロファイラ205をさらに備える。 FIG. 10 is a diagram showing a functional configuration of the core allocation device 101 according to the present embodiment. The core allocating device 101 shown in FIG. 10 further includes a profiler 205 in addition to the configuration of the core allocating device 101 according to the first embodiment shown in FIG.

プロファイラ205は、コア割当決定部204で生成された割当情報に応じて電子制御装置102がタスクを実行した履歴である実行ログ213から、各タスクの実行に要した実行時間の実測値を実行実測値として抽出する解析部である。なお、タスクが複数回実行された場合、プロファイラ205は、各実行時間の実測値の統計値(例えば、平均値又は最大値)を実行実測値として抽出してもよい。 The profiler 205 executes and actually measures the execution time required for executing each task from the execution log 213, which is the history of the electronic control device 102 executing the task according to the allocation information generated by the core allocation determination unit 204. It is an analysis unit that extracts as a value. When the task is executed a plurality of times, the profiler 205 may extract the statistical value (for example, the average value or the maximum value) of the measured value of each execution time as the executed measured value.

割当部210は、実行ログ213がまだ生成されていない場合、つまり、割当情報をまだ生成していない場合、実施例1と同様にして割当情報を生成して電子制御装置102に出力する。 When the execution log 213 has not been generated yet, that is, when the allocation information has not been generated yet, the allocation unit 210 generates the allocation information and outputs it to the electronic control device 102 in the same manner as in the first embodiment.

その後、電子制御装置102がタスクを実行して実行ログ213を生成すると、割当部210は、特徴取得部201が取得した特徴情報と、プロファイラ205が実行ログ213から取得した各タスクの実行実測値に基づいて、各タスクをコア107に割り当て、その割当結果である割当情報を出力する。 After that, when the electronic control device 102 executes the task and generates the execution log 213, the allocation unit 210 uses the feature information acquired by the feature acquisition unit 201 and the actual execution value of each task acquired by the profiler 205 from the execution log 213. Based on, each task is assigned to the core 107, and the allocation information which is the allocation result is output.

具体的には、タスク分類部202は、特徴取得部201が取得した特徴情報と、プロファイラ205が取得した各タスクの実行実測値に基づいて、各タスクの分類を再度行う。例えば、タスク分類部202は、特徴情報が示す各特徴による分類に加えて、実行実測値に関する分類を行う。実行実測値に関する分類では、例えば、タスク分類部202は、実行実測値を処理負荷である最悪実行時間と比較し、実行実測値が最悪実行時間以上である「想定以上」と、実行実測値が最悪実行時間未満である「想定未満」とのいずれかに分類する。 Specifically, the task classification unit 202 classifies each task again based on the feature information acquired by the feature acquisition unit 201 and the actual execution measurement value of each task acquired by the profiler 205. For example, the task classification unit 202 classifies the execution actual measurement value in addition to the classification according to each feature indicated by the feature information. In the classification related to the actual execution measurement value, for example, the task classification unit 202 compares the actual execution measurement value with the worst execution time, which is the processing load, and determines that the actual execution measurement value is "more than expected", which is equal to or longer than the worst execution time. Classify as one of "less than expected", which is less than the worst execution time.

コア種別決定部203は、実行実測値に関する分類をさらに用いて、種別割当情報を再度生成する。例えば、コア種別決定部203は、コア割当ポリシ602として、実行実測値に関する分類を含まない第1のコア割当ポリシと、実行実測値に関する分類を含む第2のコア割当ポリシとを予め保持する。コア種別決定部203は、実行実測値に関する分類を行っていない場合、第1のコア割当ポリシを用いて、種別割当情報を生成し、実行実測値に関する分類を行った場合、第2のコア割当ポリシを用いて、種別割当情報を生成する。 The core type determination unit 203 regenerates the type allocation information by further using the classification related to the actual measurement value. For example, the core type determination unit 203 holds, as the core allocation policy 602, a first core allocation policy that does not include the classification related to the actual measurement value and a second core allocation policy that includes the classification related to the actual measurement value. The core type determination unit 203 generates type allocation information using the first core allocation policy when the execution measurement value is not classified, and when the execution measurement value is classified, the second core allocation is performed. Generate type assignment information using the policy.

なお、タスク分類部202は、特徴取得部201が取得した特徴情報に含まれる処理負荷である最悪実行時間を実行実測値に更新し、その更新した最悪実行時間を示す特徴情報に基づいて、実施例1と同様に特徴情報が示す各特徴による分類を行ってもよい。この場合、コア種別決定部203及びコア割当決定部204の動作は、実施例1と同様となる。 The task classification unit 202 updates the worst execution time, which is the processing load included in the feature information acquired by the feature acquisition unit 201, to the actual execution time value, and executes the task classification unit 202 based on the updated feature information indicating the worst execution time. Similar to Example 1, classification may be performed according to each feature indicated by the feature information. In this case, the operations of the core type determination unit 203 and the core allocation determination unit 204 are the same as those in the first embodiment.

以上説明した本実施例によれば、タスクの処理負荷の実測値に基づいてタスクのコア107への割り当てが可能となる。これにより、コア107とタスクとの相性を考慮してタスクの割り当てが可能となる。 According to the present embodiment described above, the task can be assigned to the core 107 based on the measured value of the processing load of the task. As a result, the task can be assigned in consideration of the compatibility between the core 107 and the task.

本実施例では、実施例8と比較して、実行ログ213がリアルタイムで更新される点で異なる。実行ログ213の更新は、例えば、電子制御装置102のスケジューリング部105にてタスクが実行されるたびに行われる。本実施例の場合、コア割当装置101は電子制御装置102と共に、車両システムに配置されてもよい。 The present embodiment differs from the eighth embodiment in that the execution log 213 is updated in real time. The execution log 213 is updated every time a task is executed by the scheduling unit 105 of the electronic control device 102, for example. In the case of this embodiment, the core allocation device 101 may be arranged in the vehicle system together with the electronic control device 102.

プロファイラ205は、実行ログ213が更新されるたびに、又は、一定期間ごとに、実行ログ213から実行実測値を抽出する。 The profiler 205 extracts the actual execution value from the execution log 213 every time the execution log 213 is updated or at regular intervals.

割当部210は、プロファイラ205が実行実測値を抽出すると、その実行実測値と、特徴取得部201が取得した特徴情報とに基づいて、各タスクをコア107に割り当て、割当情報を再度生成する。割当部210は、その生成した割当情報を電子制御装置102に出力して、その割当情報に応じて電子制御装置102の各コア107にタスクを実行させることで、実行ログ213を更新する。 When the profiler 205 extracts the execution measurement value, the allocation unit 210 allocates each task to the core 107 based on the execution measurement value and the feature information acquired by the feature acquisition unit 201, and regenerates the allocation information. The allocation unit 210 updates the execution log 213 by outputting the generated allocation information to the electronic control device 102 and causing each core 107 of the electronic control device 102 to execute a task according to the allocation information.

なお、電子制御装置102のスケジューリング部105は、駆動中に、タスクのスケジューリングに用いる割当情報を、割当部210からの割当情報に更新することが望ましい。この場合、スケジューリング部105は、処理が完了したタスクから順に、更新した割当情報に基づいてスケジューリングを行う。また、タスクを実行中のコア107は、タスクの終了後に、更新した割当情報に基づくタスクの実行を行う。 It is desirable that the scheduling unit 105 of the electronic control device 102 updates the allocation information used for task scheduling to the allocation information from the allocation unit 210 during driving. In this case, the scheduling unit 105 performs scheduling based on the updated allocation information in order from the task for which the processing is completed. Further, the core 107 executing the task executes the task based on the updated allocation information after the task is completed.

以上説明した本実施例によれば、タスクの処理負荷の実測値に基づいてタスクのコア107への割り当てが可能となる。さらに、タスクのコア107への割り当てを動的に更新することが可能になるため、環境の変化などに対応してタスクの割り当てが可能となる。 According to the present embodiment described above, the task can be assigned to the core 107 based on the measured value of the processing load of the task. Further, since the assignment of the task to the core 107 can be dynamically updated, the task can be assigned in response to changes in the environment or the like.

上述した本開示の実施形態は、本開示の説明のための例示であり、本開示の範囲をそれらの実施形態にのみ限定する趣旨ではない。当業者は、本発明の範囲を逸脱することなしに、他の様々な態様で本発明を実施することができる。 The embodiments of the present disclosure described above are examples for the purpose of explaining the present disclosure, and the scope of the present disclosure is not intended to be limited only to those embodiments. One of ordinary skill in the art can practice the present invention in various other aspects without departing from the scope of the present invention.

100:コンピュータシステム、101:コア割当装置、102:電子制御装置、103:プロセッサ、104:メモリ、105:スケジューリング部、106:周辺装置、107:コア、201:特徴取得部、202:タスク分類部、203:コア種別決定部、204:コア割当決定部、205:プロファイラ、210:割当部

100: Computer system, 101: Core allocation device, 102: Electronic control device, 103: Processor, 104: Memory, 105: Scheduling unit, 106: Peripheral device, 107: Core, 201: Feature acquisition unit, 202: Task classification unit , 203: Core type determination unit, 204: Core allocation determination unit, 205: Profiler, 210: Assignment unit

Claims (8)

プロセッサが備える複数種別のコアに対して、当該コアに実行させるタスクを割り当てるコア割当装置であって、
前記タスクを定義する設計情報から、前記タスクの特徴を示す特徴情報を取得する特徴取得部と、
前記特徴情報と、前記プロセッサにおける前記コアの構成とに基づいて、前記タスクを前記コアに割り当てる割当部と、を有するコア割当装置。
A core allocation device that assigns tasks to be executed by multiple types of cores provided by a processor.
A feature acquisition unit that acquires feature information indicating the features of the task from the design information that defines the task, and
A core allocation device having an allocation unit that allocates the task to the core based on the feature information and the configuration of the core in the processor.
前記割当部は、
前記特徴情報に基づいて、前記タスクを複数の区分のいずれかに分類する分類部と、
前記タスクの区分と前記コアの構成とに基づいて、前記タスクを実行するコアの種別及び数を決定する種別決定部と、
前記種別決定部の決定結果に基づいて、前記タスクを前記コアに割り当てる割当決定部と、を有する、請求項1に記載のコア割当装置。
The allocation unit
A classification unit that classifies the task into any of a plurality of categories based on the feature information,
A type determination unit that determines the type and number of cores that execute the task based on the task classification and the core configuration.
The core allocation device according to claim 1, further comprising an allocation determination unit that allocates the task to the core based on the determination result of the type determination unit.
前記特徴情報は、複数の前記特徴を示す、請求項1に記載のコア割当装置。 The core allocation device according to claim 1, wherein the feature information indicates a plurality of the features. 前記特徴取得部は、前記特徴を指定する指定情報を受け付け、当該指定情報に基づいて、前記特徴情報を取得する、請求項1に記載のコア割当装置。 The core allocation device according to claim 1, wherein the feature acquisition unit receives designated information for designating the feature and acquires the feature information based on the designated information. 前記特徴は、前記タスクの時間制約条件、前記タスクに要求される安全性、前記タスクが実行される駆動形態、前記タスクが実行される実行間隔、前記タスクの実行による処理負荷、及び、前記タスクの並列性の少なくとも1つを含む、請求項1に記載のコア割当装置。 The features are the time constraint condition of the task, the safety required for the task, the driving mode in which the task is executed, the execution interval in which the task is executed, the processing load due to the execution of the task, and the task. The core allocation device according to claim 1, which comprises at least one of the parallelisms of the above. 前記プロセッサが前記割当部による前記タスクの割当結果に応じて前記タスクを実行した実行ログから、前記タスクの実行に要した実行時間を抽出する解析部をさらに有し、
前記割当部は、前記特徴情報及び前記実行時間に基づいて、前記タスクを前記コアに割り当てる、請求項1に記載のコア割当装置。
The processor further has an analysis unit that extracts the execution time required for the execution of the task from the execution log of executing the task according to the allocation result of the task by the allocation unit.
The core allocation device according to claim 1, wherein the allocation unit allocates the task to the core based on the feature information and the execution time.
前記割当部は、前記割当結果に応じて前記プロセッサに前記タスクを実行させることで、前記実行ログを更新し、
前記解析部は、前記割当部によって更新された実行ログに基づいて、前記実行時間を抽出する、請求項6に記載のコア割当装置。
The allocation unit updates the execution log by causing the processor to execute the task according to the allocation result.
The core allocation device according to claim 6, wherein the analysis unit extracts the execution time based on the execution log updated by the allocation unit.
プロセッサが備える複数種別のコアに対して、当該コアに実行させるタスクを割り当てるコア割当装置によるコア割当方法であって、
前記タスクを定義する設計情報から、前記タスクの特徴を示す特徴情報を取得し、
前記特徴情報と、前記プロセッサにおける前記コアの構成とに基づいて、前記タスクを前記コアに割り当てる、コア割当方法。

This is a core allocation method using a core allocation device that allocates tasks to be executed by the cores of multiple types provided by the processor.
From the design information that defines the task, the feature information indicating the feature of the task is acquired, and the feature information is obtained.
A core allocation method for allocating the task to the core based on the feature information and the configuration of the core in the processor.

JP2019162073A 2019-09-05 2019-09-05 Core allocation device and core allocation method Pending JP2021039666A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2019162073A JP2021039666A (en) 2019-09-05 2019-09-05 Core allocation device and core allocation method
PCT/JP2020/030551 WO2021044810A1 (en) 2019-09-05 2020-08-11 Core allocation device and core allocation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019162073A JP2021039666A (en) 2019-09-05 2019-09-05 Core allocation device and core allocation method

Publications (1)

Publication Number Publication Date
JP2021039666A true JP2021039666A (en) 2021-03-11

Family

ID=74847269

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019162073A Pending JP2021039666A (en) 2019-09-05 2019-09-05 Core allocation device and core allocation method

Country Status (2)

Country Link
JP (1) JP2021039666A (en)
WO (1) WO2021044810A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657759A (en) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 Task processing method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003271405A (en) * 2002-03-13 2003-09-26 Hitachi Ltd Job execution computer determining method for job scheduler
JP2014206979A (en) * 2013-04-11 2014-10-30 三星電子株式会社Samsung Electronics Co.,Ltd. Apparatus and method of parallel processing execution

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003271405A (en) * 2002-03-13 2003-09-26 Hitachi Ltd Job execution computer determining method for job scheduler
JP2014206979A (en) * 2013-04-11 2014-10-30 三星電子株式会社Samsung Electronics Co.,Ltd. Apparatus and method of parallel processing execution

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657759A (en) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 Task processing method, device, equipment and storage medium
CN113657759B (en) * 2021-08-17 2023-10-31 北京百度网讯科技有限公司 Task processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
WO2021044810A1 (en) 2021-03-11

Similar Documents

Publication Publication Date Title
EP2176751B1 (en) Scheduling by growing and shrinking resource allocation
US9632822B2 (en) Multi-core device and multi-thread scheduling method thereof
US8970607B2 (en) Run-time allocation of functions to a hardware accelerator
US8875146B2 (en) Systems and methods for bounding processing times on multiple processing units
US20130346985A1 (en) Managing use of a field programmable gate array by multiple processes in an operating system
JP2012511204A (en) How to reorganize tasks to optimize resources
KR101640848B1 (en) Job Allocation Method on Multi-core System and Apparatus thereof
US10255114B2 (en) Abnormality detection apparatus, control method, and program
WO2013165451A1 (en) Many-core process scheduling to maximize cache usage
CN111897647B (en) Multithreading scheduling method, device and equipment in multi-core system
JP7385989B2 (en) Arithmetic control unit
JP6214469B2 (en) Vehicle control device
CN109992366B (en) Task scheduling method and task scheduling device
CN114217966A (en) Deep learning model dynamic batch processing scheduling method and system based on resource adjustment
WO2021044810A1 (en) Core allocation device and core allocation method
CN108139929B (en) Task scheduling apparatus and method for scheduling a plurality of tasks
CN112925616A (en) Task allocation method and device, storage medium and electronic equipment
EP2418582A2 (en) Apparatus and method for thread progress tracking using deterministic progress index
JP6156379B2 (en) Scheduling apparatus and scheduling method
JP2009048358A (en) Information processor and scheduling method
WO2008148624A1 (en) Method and device for providing a schedule for a predictable operation of an algorithm on a multi-core processor
CN116126937A (en) Job scheduling method, job scheduling device, electronic equipment and storage medium
KR102022972B1 (en) Runtime management apparatus for heterogeneous multi-processing system and method thereof
KR101378058B1 (en) Dynamic memory managing methof in embedded system
JP7107275B2 (en) PARALLELIZATION METHOD, SEMICONDUCTOR CONTROL DEVICE, AND VEHICLE CONTROL DEVICE

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220413

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230313

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230704

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230901

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20231031