JP7006451B2 - Electronic control device and multi-core allocation method - Google Patents
Electronic control device and multi-core allocation method Download PDFInfo
- Publication number
- JP7006451B2 JP7006451B2 JP2018068260A JP2018068260A JP7006451B2 JP 7006451 B2 JP7006451 B2 JP 7006451B2 JP 2018068260 A JP2018068260 A JP 2018068260A JP 2018068260 A JP2018068260 A JP 2018068260A JP 7006451 B2 JP7006451 B2 JP 7006451B2
- Authority
- JP
- Japan
- Prior art keywords
- core
- program
- state
- electronic control
- control device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Stored Programmes (AREA)
Description
本開示は、複数のコアを有するマルチコアCPUを備える電子制御装置におけるコアの割当て方式に関する。 The present disclosure relates to a core allocation method in an electronic control device including a multi-core CPU having a plurality of cores.
特許文献1には、マルチコアCPUを搭載したマイコンに組込まれたオペレーティングシステム(以下、OS)が、故障診断時に複数のコアにタスクを割当てる方式を切換える技術が記載されている。具体的には、OSは、複数のコアをそれぞれ個別に、Symmetric Multi-Processing(以下、SMP)、及びAsymmetric Multi-Processing(以下、AMP)の処理モードの、一方から他方に切替えることができる。SMPは、各コアの処理負荷に応じてタスクを動的に割当てる割当て方式である。AMPは、コアに割当てるタスクが固定的に決められている割当て方式である。
例えば、車載用の電子制御装置の分野において、単独のコンピュータシステムにおいて、ハイパーバイザにより複数のOSの動作を統合させる技術の適用が進んでいる。しかしながら、上述の背景技術は、単独のOSが組込まれているシステムにおけるコアの割当て方式の制御に関するものである。ハイパーバイザ上で動作する複数のOSが組込まれたコンピュータシステムでは、単独のOSに対する割当て方式の制御のみでなく、複数のOS間の割当て方式の制御を考慮する必要がある。そのため、上述の背景技術は、ハイパーバイザ上で動作する複数のOSが組込まれたコンピュータシステムには、そのままでは適用できない。 For example, in the field of in-vehicle electronic control devices, the application of a technique for integrating the operations of a plurality of OSs by a hypervisor in a single computer system is advancing. However, the above-mentioned background technology relates to the control of the core allocation method in a system in which a single OS is embedded. In a computer system in which a plurality of OSs operating on a hypervisor are embedded, it is necessary to consider not only the control of the allocation method for a single OS but also the control of the allocation method among the plurality of OSs. Therefore, the above-mentioned background technology cannot be applied as it is to a computer system in which a plurality of OSs operating on a hypervisor are embedded.
例えば、1つのコアを複数のOSで共用している場合には、単独のOSについてのみコアの割当てを制御するだけでは不十分である。つまり、ハイパーバイザによる複数のOSに対するコアの割当て方式と、各OS上で動作するタスクに対するコアの割当て方式とを協調して実行する必要がある。 For example, when one core is shared by a plurality of OSs, it is not enough to control the core allocation only for a single OS. That is, it is necessary to coordinately execute the method of allocating the core to a plurality of OSs by the hypervisor and the method of allocating the core to the tasks running on each OS.
また、ハイパーバイザ上で動作するOSでAMPが必須となるタスクを扱う際には、当該が属するOSが使用するコアを静的に固定する必要がある。しかし、当該タスクには、稼働や停止の状態変化や処理負荷の増減が起こり得るため、コアを常時固定的に割当てる方式では、当該タスクが停止した場合や処理負荷が低下した場合に、コアの空いたリソースを有効に活用できない。 In addition, when handling a task that requires AMP in an OS running on a hypervisor, it is necessary to statically fix the core used by the OS to which the relevant OS belongs. However, since the task may change its operation or stop state and the processing load may increase or decrease, the method of allocating the core at all times is to use the core when the task is stopped or the processing load is reduced. Unable to make effective use of free resources.
また、故障診断時に限らず、電子制御システムが搭載される車両等のシステムの状態に応じて、各OSのタスクの処理負荷が増減することが考えられる。そのため、システムの状態の変化に応じて複数のOSによって複数のコアのリソースを有効に活用するための割当て方式を実現することが望まれる。 Further, it is conceivable that the processing load of the task of each OS increases or decreases depending on the state of the system such as the vehicle on which the electronic control system is mounted, not only at the time of failure diagnosis. Therefore, it is desired to realize an allocation method for effectively utilizing the resources of a plurality of cores by a plurality of OSs according to changes in the state of the system.
そこで、本開示の一局面は、マルチコアCPUを備え、マルチコアCPU上で複数のOSが動作する電子制御装置において、状況に応じて有効にコアの割当て方式を切換えるための技術を提供することが好ましい。 Therefore, one aspect of the present disclosure is preferably to provide a technique for effectively switching the core allocation method according to a situation in an electronic control device having a multi-core CPU and operating a plurality of OSs on the multi-core CPU. ..
本開示の一態様に係る電子制御装置(1)は、複数のコア(11)を有するマルチコアCPU(10)を備える。このマルチコアCPU上で、オペレーティングシステムと当該オペレーティングシステム上で動作するアプリケーションプログラムとを含む複数のプログラムシステム(13,14,15)が動作する。この電子制御装置は、状態取得部(30)と、記憶部(20)と、第1割当部(12)と、第2割当部(131,141,151)とを備える。 The electronic control device (1) according to one aspect of the present disclosure includes a multi-core CPU (10) having a plurality of cores (11). On this multi-core CPU, a plurality of program systems (13, 14, 15) including an operating system and an application program running on the operating system are operated. This electronic control device includes a state acquisition unit (30), a storage unit (20), a first allocation unit (12), and a second allocation unit (131, 141, 151).
なお、この欄及び特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本開示の技術的範囲を限定するものではない。 In addition, the reference numerals in parentheses described in this column and the scope of claims indicate the correspondence with the specific means described in the embodiment described later as one embodiment, and the technical scope of the present disclosure is defined. It is not limited.
状態取得部は、電子制御装置が搭載されるシステムの状態を取得するように構成されている。記憶部は、定義情報を記憶するように構成されている。この定義情報は、状態取得部において取得され得る特定の状態ごとに、各プログラムシステムがタスクを実行するために各プログラムシステムに割当てるべきコアの要件を表す情報である。 The state acquisition unit is configured to acquire the state of the system on which the electronic control device is mounted. The storage unit is configured to store definition information. This definition information is information representing the core requirements that each program system should assign to each program system in order to execute a task for each specific state that can be acquired by the state acquisition unit.
第1割当部は、複数のプログラムシステムのタスクを複数のコア上で並列に実行可能にするため、各プログラムシステムがタスクの実行に使用するコアを割当てるように構成されている。また、第1割当部は、状態取得部により取得されたシステムの状態の変化に応じて、記憶部に記憶されている定義情報で表される定義に従って、各プログラムシステムに割当てるコアを変更するように構成されている。第2割当部は、各プログラムシステムのオペレーティングシステムにおいて、第1割当部により割当てられる1又は複数のコアを当該プログラムシステムが実行する1又は複数のタスクそれぞれに割当てるように構成されている。 The first allocation unit is configured to allocate the cores used by each program system to execute the tasks in order to enable the tasks of the plurality of program systems to be executed in parallel on the plurality of cores. In addition, the first allocation unit changes the core assigned to each program system according to the definition represented by the definition information stored in the storage unit according to the change in the state of the system acquired by the status acquisition unit. It is configured in. The second allocation unit is configured in the operating system of each program system to allocate one or more cores allocated by the first allocation unit to each one or a plurality of tasks executed by the program system.
上述のような構成によれば、電子制御装置が搭載されるシステムの状態に応じて、複数のOS間で協調して各OSによるタスクを複数のコアに動的に割当てることができる。このようにすることで、システムの状態に応じて変化し得る処理負荷の増減に対して、各コアのリソースを有効に活用することが可能になる。 According to the configuration as described above, it is possible to dynamically assign tasks by each OS to a plurality of cores in cooperation among a plurality of OSs according to the state of the system in which the electronic control device is mounted. By doing so, it becomes possible to effectively utilize the resources of each core against the increase / decrease in the processing load that may change depending on the state of the system.
以下、本開示の例示的な実施形態を図面に基づいて説明する。なお、本開示は下記の実施形態に限定されるものではなく様々な態様にて実施することが可能である。
[電子制御装置の構成の説明]
実施形態の電子制御装置1の構成について、図1を参照しながら説明する。電子制御装置1は、自動車等の車両に搭載され、当該車両に搭載された機器の制御や、車外通信、自動運転等の走行制御に関する情報処理を行う。電子制御装置1は、マルチコアCPU10や、図示しないRAM、ROM、フラッシュメモリ等の半導体メモリ、入出力インタフェース等を中心に構成された情報処理装置である。また、電子制御装置1は、記憶部20と、車両状態検知部30とを備える。
Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings. The present disclosure is not limited to the following embodiments, and can be implemented in various embodiments.
[Explanation of the configuration of the electronic control device]
The configuration of the
電子制御装置1は、例えば、コンピュータシステムとしての機能が集約されたマイクロコントローラ等により具現化される。電子制御装置1は、マルチコアCPU10が、ROMや半導体メモリ等の実体的な記録媒体に格納されたプログラムを実行することにより実現される。
The
マルチコアCPU10は、1つのパッケージ内に複数のプロセッサ・コア(以下、コア)が搭載された演算装置である。図1に例示されるとおり、マルチコアCPU10は、符号11で示される4つのコア0~3を有する。以下、これら4つのコア0~3を区別しないで説明する場合は、コア11と表記する。また、4つのコア0~3をそれぞれ区別して説明する場合は、それぞれコア0、コア1、コア2、コア3と表記する。
The
マルチコアCPU10には、プログラムが実行されることによって実現される機能の構成要素として、ハイパーバイザ12と、第1システム13と、第2システム14と、第3システム15とが搭載されている。
The
ハイパーバイザ12は、マルチコアCPU10上で複数の仮想マシンを作成して並列に動作させ、作成された仮想マシン上でOSを動作させる制御プログラムである。このハイパーバイザ12は、複数のOSを複数のコア上で並列に実行可能にするため、各OSが使用するコアを動的に割当てるスケジューリングを実行する。ハイパーバイザ12が実行する処理の手順については、後述する。
The
符号13,14,15で示される第1~3システムは、ハイパーバイザ12により形成された仮想マシン上で動作するOSと、そのOS上で動作するアプリケーションプログラムにより実行される複数のタスクとを含むプログラムシステムである。これらの第1~3システムが、本開示における複数のプログラムシステムに相当する。以下の説明において第1~3システムを特に区別しない場合、単にプログラムシステムと表記する。
The first to third systems represented by
第1システム13には、符号131で示されるOS1と、符号132で示されるm個のタスク1_1、…タスク1_mとが含まれる。第2システム14には、符号141で示されるOS2と、符号142で示されるn個のタスク2_1、…タスク2_nとが含まれる。第3システム15には、符号151で示されるOS3と、符号142で示される4個のタスク3_1、タスク3_2、タスク3_3、及びタスク3_4とが含まれる。以下の説明においてOS1~3を特に区別しない場合、単にOSと表記する。OSは、複数のタスクを同時に実行する際に、互いに独立して動作できるようにハイパーバイザ12により割当てられたコア11のリソースを複数のタスクに割当てるスケジューリングを実行する。
The
各プログラムシステムがそれぞれ担当する機能の一例を図2に示す。図2に例示されるとおり、第1システム13の各タスク132は、車両の現在地から目的地までのナビゲーションに関する情報処理を実行する。また、第2システム14に関する各タスク142は、外部装置との間でデータをやり取りする無線通信に関する情報処理を実行する。また、第3システム15に関する各タスク152は、車両の走行に関する運転操作を自動的に行う機能である自動運転に関する情報処理を実行する。
FIG. 2 shows an example of the functions that each program system is in charge of. As illustrated in FIG. 2, each
本実施形態では、各プログラムシステムにおいて、車両の状態(例えば、駐車、停止、走行)ごとに、各タスクによる情報処理の実行量の最大値である最大処理量がそれぞれ異なると想定としている。各プログラムシステムの最大処理量の一例を図3に示す。なお、図3において、駐車とは、例えば、車両がエンジンの稼働を停止した状態で止まっている状態を指す。停止とは、車両がエンジンを稼働させた状態で止まっているおり、即座に走行を再開可能な状態を指す。走行とは、車両が走行中である状態を指す。 In the present embodiment, it is assumed that the maximum processing amount, which is the maximum value of the information processing execution amount by each task, is different for each vehicle state (for example, parking, stopping, running) in each program system. FIG. 3 shows an example of the maximum processing amount of each program system. In FIG. 3, parking refers to, for example, a state in which the vehicle is stopped with the engine stopped. Stopping refers to a state in which the vehicle is stopped with the engine running and can immediately resume running. Traveling refers to the state in which the vehicle is traveling.
図3に例示されるとおり、車両が駐車の状態のときには、第1システム13の最大処理量が200、第2システム14の最大処理量が100、第3システム15の最大処理量が100である。また、車両が停止の状態のときには、第1システム13の最大処理量が150、第2システム14の最大処理量が50、第3システム15の最大処理量が200である。また、車両が走行の状態のときには、第1システム13の最大処理量が50、第2システム14の最大処理量が50、第3システム15の最大処理量が300である。
As illustrated in FIG. 3, when the vehicle is parked, the maximum processing amount of the
なお、図3の事例において、1つのコア11が処理可能な最大処理量を100とする。つまり、1つのプログラムシステムにおいて最大処理量が100を超える場合、そのプログラムシステムのタスクの処理負荷を複数のコア11に割当てる必要がある。また、1又は複数のコア11の最大処理量を超えない範囲で、複数のプログラムシステムが当該1又は複数のコア11を共用することができる。
In the case of FIG. 3, the maximum processing amount that can be processed by one
つぎに、第1システム13、第2システム14及び第3システム15におけるタスクの動作要件について、図4~図6を参照しながら説明する。
(第1システムについて)図4に例示されるとおり、第1システム13のタスク1_1~タスク1_mは、駐車、停止、及び走行の各車両状態において全てSMPによる動作が可能であると規定されている。すなわち、第1システム13のOS1は、処理負荷に応じて各タスクにコア11を動的に割当てたり、他のOSとコア11を時分割により共用することが可能である。あるいは、複数のプログラムシステムによるコア11の共用は、各プログラムシステムに設定された優先度を基準に行ってもよい。
Next, the operation requirements of the tasks in the
(Regarding the first system) As illustrated in FIG. 4, it is stipulated that tasks 1-11 to task 1_m of the
また、車両状態が駐車のとき、第1システム13の最大処理量が200であるから、最大処理量を満たすのに必要なコア11の数は2つである。また、車両状態が停止のとき、第1システム13の最大処理量が150であるから、最大処理量を満たすのに必要なコア11の数は2つである。また、車両状態が走行のとき、第1システム13の最大処理量が50であるから、最大処理量を満たすのに必要なコア11の数は1つである。
Further, since the maximum processing amount of the
(第2システムについて)図5に例示されるとおり、第2システム14のタスク2_1~タスク2_nは、駐車、停止、及び走行の各車両状態において全てSMPによる動作が可能であると規定されている。すなわち、第2システム14のOS2は、各タスクの処理負荷に応じてそれらのタスクにコア11を動的に割当てたり、他のOSとコア11を時分割により共用することが可能である。あるいは、複数のプログラムシステムによるコア11の共用は、各プログラムシステムに設定された優先度を基準に行ってもよい。また、車両状態が駐車、停止、及び走行の何れの場合においても、第2システム14の最大処理量が100以下であるから、最大処理量を満たすのに必要なコア11の数は1つである。
(Regarding the second system) As illustrated in FIG. 5, it is stipulated that tasks 2-1 to task 2_n of the
(第3システムについて)図6に例示されるとおり、第3システム15のタスク3_3及びタスク3_4は、駐車、停止、及び走行の各車両状態において全てSMPによる動作が可能であると規定されている。すなわち、第3システム15のOS3は、タスク3_3及びタスク3_4の処理負荷に応じてそれらのタスクにコア11を動的に割当てることが可能である。
(Regarding the third system) As illustrated in FIG. 6, it is stipulated that tasks 3_3 and task 3_4 of the
一方、タスク3_1は、車両状態が駐車又は停止のときには動作せず、車両状態が走行のときにAMPによる動作が必須であると規定されている。したがって、第3システム15のOS3は、車両状態が走行の場合、タスク3_1に特定のコア11を固定的に割当てる。また、タスク3_2は、車両状態が駐車のときには動作せず、車両状態が停止又は走行のときにAMPによる動作が必須であると規定されている。したがって、第3システム15のOS3は、車両状態が停止又は走行の場合、タスク3_2に特定のコア11を固定的に割当てる。
On the other hand, task 3_1 does not operate when the vehicle state is parked or stopped, and it is stipulated that the operation by AMP is essential when the vehicle state is running. Therefore, the
また、車両状態が駐車のとき、第3システム15の最大処理量が100であるから、最大処理量を満たすのに必要なコア11の数は1つである。また、車両状態が停止のとき、第3システム15の最大処理量が200であるから、最大処理量を満たすのに必要なコア11の数は2つである。また、車両状態が走行のとき、第3システム15の最大処理量が300であるから、最大処理量を満たすのに必要なコア11の数は3つである。
Further, since the maximum processing amount of the
図1のブロック図の説明に戻る。記憶部20には、各プログラムシステムに対するコア11の割当て方式を定義する定義情報が予め記憶されている。この定義情報には、車両状態に応じてハイパーバイザ12が各プログラムシステムに割当てるべきコア11の要件を表す情報が含まれる。ハイパーバイザ12は、記憶部20に記憶されている定義情報に基づいて、各プログラムシステムに対してコア11を動的に割当てるスケジューリングを実行する。
Returning to the explanation of the block diagram of FIG. Definition information that defines the allocation method of the
定義情報は、図4~図6に例示される各プログラムシステムの動作要件を満たすように設計されている。具体的には、タスクにおけるSMPやAMPの可否に関する制約、及び最大処理量に基づく必要コア数の要件を、車両状態ごとに全てのプログラムシステムについて満たすように、各プログラムシステムに割当てるべきコア11の要件が規定されている。 The definition information is designed to meet the operating requirements of each program system exemplified in FIGS. 4 to 6. Specifically, the core 11 to be assigned to each program system so as to satisfy the restrictions on the availability of SMP and AMP in the task and the requirement for the required number of cores based on the maximum processing amount for all program systems for each vehicle state. Requirements are stipulated.
図4~図6に例示される動作要件を満たす定義情報の一例を、図7に示す。図7に例示される定義情報のテーブルには、駐車、停止、及び走行の車両状態ごとに、4つのコア0~3が、どのプログラムシステムに割当てられるかを示す情報が記述されている。図7の事例では、車両状態が駐車のとき、第1システム13がコア0及びコア1を占用し、第2システム14がコア2を占用し、第3システム15がコア3を占用するように、割り当て方式が定義されている。また、車両状態が停止のとき、第1システム13及び第2システム14が、コア0及びコア1を共用し、第3システム15が、コア2及びコア3を占用するように、割当て方式が定義されている。また、車両状態が走行のとき、第1システム13及び第2システム14が、コア0を共用し、第3システム15が、コア1、コア2及びコア3を占用するように、割当て方式が定義されている。
FIG. 7 shows an example of definition information satisfying the operation requirements exemplified in FIGS. 4 to 6. The definition information table exemplified in FIG. 7 describes information indicating which program system the four cores 0 to 3 are assigned to for each of the parked, stopped, and running vehicle states. In the example of FIG. 7, when the vehicle state is parked, the
図1のブロック図の説明に戻る。車両状態検知部30は、車両に搭載されたセンサや制御機器等から車両の稼働状況を表す情報を取得し、取得された情報に基づいて車両の現在の状態を検知する。具体的には、車両状態検知部30は、車両状態として、駐車、停止、走行等の状態を検知する。変形例として、車両状態検知部30は、起動時や定常時等の車両状態を検知するように構成されていてもよい。
Returning to the explanation of the block diagram of FIG. The vehicle
[ハイパーバイザ処理の説明]
ハイパーバイザ12が実行する処理の手順について、図8のフローチャートを参照しながら説明する。このハイパーバイザ処理は、各プログラムシステムに対するコア11の割当て方式に関する。
[Explanation of hypervisor processing]
The procedure of the process executed by the
S100では、ハイパーバイザ12は、車両状態が変化したか否かを判定する。S10
0において判定の対象となる車両状態は、駐車、停車、及び走行である。ハイパーバイザ12は、車両状態検知部30による検知結果に基づいて、車両状態が以前の検知結果と異なる場合、肯定判定をする。車両状態が変化していない場合(S100:NO)、ハイパーバイザ12はS100の処理を繰返す。一方、車両状態が変化した場合(S100:YES)、ハイパーバイザ12は処理をS102に移す。
In S100, the
The vehicle states to be determined at 0 are parking, stopping, and running. The
S102では、ハイパーバイザ12は、変化後の車両状態では使用できないコア11を現在使用中であるプログラムシステムに対して、当該コア11の使用を停止させる指示を、当該プログラムシステムに対して通知する。具体的には、ハイパーバイザ12は、記憶部20の定義情報を参照し、変化前の車両状態に対応する割当て方式と、変化後の車両状態に対応する割当て方式との相違から、変化後の車両状態では使用できないコア11を現在使用中であるプログラムシステムを特定する。
In S102, the
S104では、ハイパーバイザ12は、S102において通知がなされたOSから、スケジューリングの切換えが完了した旨の通知を受信したか否かを判定する。切換えの完了通知を受信していない場合(S104:NO)、ハイパーバイザ12はS104の処理を繰返す。一方、切換え完了の通知を受信した場合(S104:YES)、ハイパーバイザ12は処理をS106に移す。
In S104, the
S106では、ハイパーバイザ12は、記憶部20の定義情報を参照し、変化後の車両状態に対応する割当て方式に従って、各プログラムシステムのOSに対してコア11を割当てるスケジューリングを変更する。次のS108では、ハイパーバイザ12は、変化後の車両状態で新たに使用可能になるコア11があるプログラムシステムに対して、当該コア11の使用が可能である指示を、当該プログラムシステムに対して通知する。具体的には、ハイパーバイザ12は、記憶部20の定義情報を参照し、変化前の車両状態に対応する割当て方式と、変化後の車両状態に対応する割当て方式との相違から、変化後の車両状態で新たに使用可能になるコア11があるプログラムシステムを特定する。
In S106, the
S110では、ハイパーバイザ12は、S108において通知がなされたOSから、スケジューリングの切換えが完了した旨の通知を受信したか否かを判定する。切換え完了の通知を受信していない場合(S110:NO)、ハイパーバイザ12はS110の処理を繰返す。一方、切換え完了の通知を受信した場合(S110:YES)、ハイパーバイザ12は処理をS100に戻す。
In S110, the
[OS処理の説明]
各プログラムシステムのOSが実行する処理の手順について、図9のフローチャートを参照しながら説明する。このOS処理は、各プログラムシステムのタスクに対するコア11の割当て方式に関する。
[Explanation of OS processing]
The procedure of the process executed by the OS of each program system will be described with reference to the flowchart of FIG. This OS process relates to a core 11 allocation method for tasks of each program system.
S200では、OSは、ハイパーバイザ12から通知を受信したか否かを判定する。この通知は、上述のハイパーバイザ処理(図8参照)のS102又はS108において送信される通知である。ハイパーバイザ12から通知を受信していない場合(S200:NO)、OSはS200の処理を繰返す。一方、ハイパーバイザ12から通知を受信した場合(S200:YES)、OSは処理をS202に移す。
In S200, the OS determines whether or not the notification has been received from the
S202では、OSは、ハイパーバイザ12から受信した通知に従い、動作中のタスクに対してコア11を割当てるスケジューリングを変更する。具体的には、ハイパーバイザ12から特定のコア11の使用を停止する通知を受信した場合、OSは、当該特定のコア11に割当てられているタスクのプロセスを一時的に停止し、当該プロセスに関するデータを当該コア11から退避させる。停止したタスクについては、使用可能な他のコア11
を割当ててプロセスを再開する。また、ハイパーバイザ12から新たに使用可能になるコア11を指示する通知を受信した場合、OSは、動作中のタスクが新たに使用可能なコア11を利用できるように各タスクに対するスケジューリングを変更する。S204では、OSは、スケジューリングの切換えが完了した旨をハイパーバイザ12に通知する。S204の後、OSは処理をS200に戻す。
In S202, the OS changes the scheduling for allocating the core 11 to the running task according to the notification received from the
And restart the process. Further, when the
[割当て方式の具体例]
車両状態ごとのコア11の割当方式の具体例について、図10~図12を参照しながら説明する。
[Specific example of allocation method]
A specific example of the core 11 allocation method for each vehicle state will be described with reference to FIGS. 10 to 12.
(駐車時)車両状態が駐車であるときのコア11の割当方式の一例を、図10に示す。図10に例示されるとおり、駐車時において、ハイパーバイザ12は、コア0及びコア1を第1システム13に割当てる。第1システム13は、割当てられたコア0及びコア1を占用する。第1システム13のOS1は、動作中のタスク1_1~1_mに対してSMPの動作態様によりコア0及びコア1のリソースを割当てる。
(At the time of parking) FIG. 10 shows an example of the allocation method of the core 11 when the vehicle state is parked. As illustrated in FIG. 10, when parked, the
また、ハイパーバイザ12は、コア2を第2システム14に割当てる。第2システム14は、割当てられたコア2を占用する。第2システム14のOS2は、動作中のタスク2_1~2_nに対して、SMPの動作態様によりコア2のリソースを割当てる。
Further, the
また、ハイパーバイザ12は、コア3を第3システム15に割当てる。第3システム15は、割当てられたコア3を占用する。第3システム15のOS3は、動作中のタスク3_3及びタスク3_4に対して、SMPの動作態様によりコア3のリソースを割当てる。
Further, the
(停止時)車両状態が停止であるときのコア11の割当方式の一例を、図11に示す。図11に例示されるとおり、停止時において、ハイパーバイザ12は、コア0及びコア1を、第1システム13及び第2システム14に割当てる。第1システム13及び第2システム14は、割当てられたコア0及びコア1を時分割で共用する。第1システム13のOS1は、動作中のタスク1_1~1_mに対してSMPの動作態様によりコア0及びコア1のリソースを割当てる。同様に第2システム14のOS2は、動作中のタスク2_1~2_nに対して、SMPの動作態様によりコア0及びコア1のリソースを割当てる。
(At the time of stop) FIG. 11 shows an example of the allocation method of the core 11 when the vehicle state is stopped. As illustrated in FIG. 11, when stopped, the
また、ハイパーバイザ12は、コア2及びコア3を第3システム15に割当てる。第3システム15は、割当てられたコア2及びコア3を占用する。第3システム15のOS3は、動作中のタスク3_2に対して、AMPの動作態様によりコア2のリソースを割当てる。また、第3システム15のOS3は、動作中のタスク3_3及びタスク3_4に対して、SMPの動作態様によりコア3のリソースを割当てる。
Further, the
(走行時)車両状態が走行であるときのコア11の割当方式の一例を、図12に示す。図12に例示されるとおり、走行時において、ハイパーバイザ12は、コア0を第1システム13及び第2システム14に割当てる。第1システム13及び第2システム14は、割当てられたコア0を時分割で共用する。第1システム13のOS1は、動作中のタスク1_1~1_mに対してSMPの動作態様によりコア0のリソースを割当てる。同様に第2システム14のOS2は、動作中のタスク2_1~2_nに対して、SMPの動作態様によりコア0のリソースを割当てる。
(During running) FIG. 12 shows an example of the allocation method of the core 11 when the vehicle state is running. As illustrated in FIG. 12, the
また、ハイパーバイザ12は、コア1、コア2、及びコア3を第3システム15に割当てる。第3システム15は、割当てられたコア1、コア2、及びコア3を占用する。第3システム15のOS3は、動作中のタスク3_1に対して、AMPの動作態様によりコア1のリソースを割当てる。また、第3システム15のOS3は、動作中のタスク3_2に
対して、AMPの動作態様によりコア2のリソースを割当てる。また、第3システム15のOS3は、動作中のタスク3_3及びタスク3_4に対して、SMPの動作態様によりコア3のリソースを割当てる。
Further, the
[効果]
実施形態の電子制御装置1によれば、以下の効果を奏する。
電子制御装置1が搭載される車両の状態に応じて、OS1~3の間で協調して各OSによるタスクを各コア11に動的に割当てることができる。このようにすることで、車両の状態に応じて変化し得る処理負荷の増減に対して、コア11のリソースを有効に活用することが可能になる。
[effect]
According to the
Tasks by each OS can be dynamically assigned to each core 11 in cooperation between
例えば、AMPが必須となるタスクは、どのような状態でもAMPとしてコアを割当てることができる一方、処理負荷が低くなるシステムの状態のときは、他のOSにコアのリソースを渡すことが可能となる。また、SMPが可能なタスクについては、複数のOS間でコア11を共有することで、コア11のリソースを有効活用できる。
For example, for tasks that require AMP, cores can be assigned as AMPs in any state, while core resources can be passed to other OSs in a system state where the processing load is low. Become. Further, for tasks capable of SMP, the resources of the core 11 can be effectively utilized by sharing the
図8に例示されるハイパーバイザ処理において、ハイパーバイザ12は、S106においてスケジューリングを変更する事前に、S102において使用不可となるコア11を現在使用中のOSに対して、当該コア11の使用を停止させることができる。このようにすることで、通知を受けたOSが、スケジュールリングの変更により当該コア11が使用できなくなる前に、当該コア11で動作しているタスクのデータを当該コア11から安全に移すことができる。
In the hypervisor processing exemplified in FIG. 8, the
また、図8に例示されるハイパーバイザ処理において、ハイパーバイザ12は、S106においてスケジューリングを変更した後、S108において新たに使用可能なコア11があるOSに対して、当該コア11の使用許可を通知することができる。このようにすることで、このようにすることで、通知を受けたOSが、当該コア11での動作が可能となってから、当該コア11の使用を開始することができる。
Further, in the hypervisor processing exemplified in FIG. 8, after changing the scheduling in S106, the
[特許請求の範囲に記載の構成との対応]
実施形態の各構成と、特許請求の範囲に記載の構成との対応は次のとおりである。
車両状態検知部30が、状態取得部に相当する。ハイパーバイザ12が、第1割当部に相当する。OS1(131)、OS2(141)、及びOS3(151)が、第2割当部に相当する。
[Correspondence with the configuration described in the claims]
The correspondence between each configuration of the embodiment and the configuration described in the claims is as follows.
The vehicle
[変形例]
上述の実施形態では、駐車、停止、及び走行の車両状態に応じて、ハイパーバイザ12がコア11の割当てのスケジューリングを変更する事例について説明した。上述の実施形態に限らず、例えば、起動時や定常時等の車両状態について、ハイパーバイザ12がコア11の割当てのスケジューリングを変更する構成であってもよい。その場合、図7に例示される定義情報において、起動時や定常時の車両状態における割当て方式の項目が記述される。また、図8に例示されるハイパーバイザ処理のS100において、起動時や定常時の車両状態が判定の対象に含まれる。
[Modification example]
In the above-described embodiment, the case where the hypervisor 12 changes the scheduling of the allocation of the core 11 according to the vehicle state of parking, stopping, and running has been described. Not limited to the above-described embodiment, for example, the
また、上述の実施形態では、電子制御装置1が自動車等の車両に搭載された事例について説明した。上述の実施形態に限らず、例えば、航空機、鉄道、船舶等の乗り物や、携帯電話等の乗り物以外の電子機器等に、本開示にかかる電子制御装置を適用してもよい。
Further, in the above-described embodiment, the case where the
上記各実施形態における1つの構成要素が有する機能を複数の構成要素に分担させたり、複数の構成要素が有する機能を1つの構成要素に発揮させたりしてもよい。また、上記
各実施形態の構成の一部を省略してもよい。また、上記各実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加、置換等してもよい。なお、特許請求の範囲に記載の文言から特定される技術思想に含まれるあらゆる態様が、本開示の実施形態である。
The function of one component in each of the above embodiments may be shared by a plurality of components, or the function of the plurality of components may be exerted by one component. Further, a part of the configuration of each of the above embodiments may be omitted. Further, at least a part of the configuration of each of the above embodiments may be added or substituted with respect to the configuration of the other embodiments. In addition, all aspects included in the technical idea specified from the wording described in the claims are embodiments of the present disclosure.
上述した電子制御装置1を構成要件とするシステム、電子制御装置1としてコンピュータを機能させるためのプログラム、このプログラムを記録した実体的な記録媒体等の種々の形態で本開示を実現することもできる。
The present disclosure can also be realized in various forms such as a system having the above-mentioned
1…電子制御装置、10…マルチコアCPU、11…コア、12…ハイパーバイザ、13…第1システム、131…OS1、132…タスク、14…第2システム、141…OS2、143…タスク、15…第3システム、151…OS3、152…タスク、20…記憶部、30…車両状態検知部。 1 ... Electronic control device, 10 ... Multi-core CPU, 11 ... Core, 12 ... Hypervisor, 13 ... First system, 131 ... OS1, 132 ... Task, 14 ... Second system, 141 ... OS2, 143 ... Task, 15 ... Third system, 151 ... OS3, 152 ... Task, 20 ... Storage unit, 30 ... Vehicle state detection unit.
Claims (9)
前記電子制御装置が搭載されるシステムの状態を取得するように構成された状態取得部(30)と、
前記状態取得部において取得され得る特定の状態ごとに、各プログラムシステムがタスクを実行するために各プログラムシステムに割当てるべきコアの要件を表す情報である定義情報を記憶するように構成された記憶部(20)と、
前記複数のプログラムシステムのタスクを前記複数のコア上で並列に実行可能にするため、各プログラムシステムがタスクの実行に使用するコアを割当てるように構成された第1割当部(12)と、
各プログラムシステムのオペレーティングシステムにおいて、前記第1割当部により割当てられる1又は複数のコアを当該プログラムシステムが実行する1又は複数のタスクそれぞれに割当てるように構成された第2割当部(131,141,151)とを備え、
前記第1割当部は、前記状態取得部により取得されたシステムの状態の変化に応じて、前記記憶部に記憶されている定義情報で表される定義に従って、各プログラムシステムに割当てるコアを変更するように構成されている、
電子制御装置。 A multi-core CPU (10) having a plurality of cores (11) is provided, and a plurality of program systems (13, 14, 15) including an operating system and an application program operating on the operating system operate on the multi-core CPU. An electronic control device (1) configured to perform
A state acquisition unit (30) configured to acquire the state of the system on which the electronic control device is mounted, and a state acquisition unit (30).
A storage unit configured to store definition information, which is information representing the core requirements to be assigned to each program system in order for each program system to execute a task, for each specific state that can be acquired by the state acquisition unit. (20) and
In order to enable the tasks of the plurality of program systems to be executed in parallel on the plurality of cores, a first allocation unit (12) configured to allocate the cores used by each program system to execute the tasks, and
In the operating system of each program system, a second allocation unit (131, 141, 1) configured to allocate one or more cores allocated by the first allocation unit to each one or a plurality of tasks executed by the program system. With 151)
The first allocation unit changes the core assigned to each program system according to the definition represented by the definition information stored in the storage unit according to the change in the state of the system acquired by the status acquisition unit. Is configured to
Electronic control device.
まず先に、当該プログラムシステムのオペレーティングシステムにおいて、前記第2割当部が、当該変化後の状態において使用できなくなるコアに対するタスクの割り当てを停止し、
その後に、前記第1割当部が、各プログラムシステムにコアを割当てるように構成されている、
請求項1に記載の電子制御装置。 Based on the definition information, the core used by a certain program system in the state before the change is used by the program system in the state after the change in response to the change in the state of the system acquired by the state acquisition unit. If it becomes unavailable,
First, in the operating system of the program system, the second allocation unit stops the assignment of tasks to the cores that cannot be used in the changed state.
After that, the first allocation unit is configured to allocate cores to each program system.
The electronic control device according to claim 1.
まず先に、前記第1割当部が、各プログラムシステムにコアを割当て、
その後に、新たに使用できるコアがあるプログラムシステムのオペレーティングシステムにおいて、前記第2割当部が、当該コアをタスクに割り当てるように構成されている、
請求項1又は請求項2に記載の電子制御装置。 In response to a change in the state of the system acquired by the state acquisition unit, based on the definition information, the program system uses a core that is not used in the state before the change by the program system in the state after the change. If available,
First, the first allocation unit allocates a core to each program system.
Subsequently, in the operating system of the program system where there is a newly available core, the second allocation unit is configured to allocate the core to a task.
The electronic control device according to claim 1 or 2.
請求項1ないし請求項3の何れか1項に記載の電子制御装置。 The definition information is a core allocation method so as to tolerate the processing load that may occur in each specific state in each program system and to satisfy the restrictions on the usage mode of the core in each specific state in each program system. Is stipulated,
The electronic control device according to any one of claims 1 to 3.
請求項1ないし請求項4の何れか1項に記載の電子制御装置。 When the first allocation unit allocates a core to a single program system, the single program system is configured to occupy the core.
The electronic control device according to any one of claims 1 to 4.
プログラムシステムが、当該コアを共用するように構成されている、
請求項1ないし請求項5の何れか1項に記載の電子制御装置。 When the first allocation unit allocates a core to a plurality of program systems, the plurality of program systems are configured to share the core.
The electronic control device according to any one of claims 1 to 5.
前記状態取得部は、前記車両の作動状態を表す情報を取得するように構成されている、
請求項1ないし請求項6の何れか1項に記載の電子制御装置。 The system on which the electronic control device is mounted is a vehicle.
The state acquisition unit is configured to acquire information representing the operating state of the vehicle.
The electronic control device according to any one of claims 1 to 6.
請求項7に記載の電子制御装置。 The operating state of the vehicle acquired by the state acquisition unit includes at least one of a state at the time of starting, parking, stopping, and running.
The electronic control device according to claim 7.
前記電子制御装置が搭載されるシステムの状態を取得し、
前記複数のプログラムシステムのタスクを前記複数のコア上で並列に実行可能にするため、各プログラムシステムがタスクの実行に使用するコアを割当て、
取得され得る特定の状態ごとに各プログラムシステムがタスクを実行するために各プログラムシステムに割当てるべきコアの要件を表す情報である定義情報に従って、前記システムの状態の変化に応じて各プログラムシステムに割当てるコアを変更し、
各プログラムシステムのオペレーティングシステムにおいて、割当てられる1又は複数のコアを当該プログラムシステムが実行する1又は複数のタスクそれぞれに割当てる、
マルチコアの割当て方法。 A multi-core CPU having a plurality of cores is executed on the multi-core CPU in an electronic control device configured to operate a plurality of program systems including an operating system and an application program running on the operating system. It ’s a multi-core allocation method.
Acquires the state of the system in which the electronic control device is mounted, and obtains the status.
In order to enable the tasks of the plurality of program systems to be executed in parallel on the plurality of cores, the cores used by each program system to execute the tasks are assigned.
For each specific state that can be acquired, each program system is assigned to each program system according to changes in the state of the system according to definition information that represents the core requirements that should be assigned to each program system in order to execute a task. Change the core,
In the operating system of each program system, one or more cores to be assigned are assigned to each of one or more tasks performed by the program system.
Multi-core allocation method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018068260A JP7006451B2 (en) | 2018-03-30 | 2018-03-30 | Electronic control device and multi-core allocation method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018068260A JP7006451B2 (en) | 2018-03-30 | 2018-03-30 | Electronic control device and multi-core allocation method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019179397A JP2019179397A (en) | 2019-10-17 |
| JP7006451B2 true JP7006451B2 (en) | 2022-01-24 |
Family
ID=68278575
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018068260A Active JP7006451B2 (en) | 2018-03-30 | 2018-03-30 | Electronic control device and multi-core allocation method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7006451B2 (en) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2021124902A (en) * | 2020-02-04 | 2021-08-30 | トヨタ自動車株式会社 | Vehicle controller, vehicle control method, and vehicle control program |
| JP7463947B2 (en) * | 2020-11-13 | 2024-04-09 | 住友電装株式会社 | On-vehicle ECU, program, and information processing method |
| JP7613152B2 (en) | 2021-02-24 | 2025-01-15 | 株式会社オートネットワーク技術研究所 | In-vehicle device, information processing method, and computer program |
| JP2022144140A (en) * | 2021-03-18 | 2022-10-03 | 株式会社オートネットワーク技術研究所 | In-vehicle device, information processing method, and computer program |
| JP7740000B2 (en) | 2021-12-13 | 2025-09-17 | 株式会社オートネットワーク技術研究所 | On-vehicle control device, control method, and computer program |
| CN114840335B (en) * | 2022-04-22 | 2023-10-27 | 北京斯年智驾科技有限公司 | An intelligent gateway controller and its multi-core partitioning strategy in the field of autonomous driving |
| WO2024189796A1 (en) * | 2023-03-14 | 2024-09-19 | 日本電信電話株式会社 | Task scheduler device, task scheduling method, and program |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007125950A (en) | 2005-11-02 | 2007-05-24 | Toyota Motor Corp | Power management system for vehicle electronic control unit |
| WO2008062512A1 (en) | 2006-11-21 | 2008-05-29 | Fujitsu Limited | Multiprocessor system |
| JP2009265843A (en) | 2008-04-23 | 2009-11-12 | Toyota Motor Corp | Multi-core system, and gateway device for vehicle |
| WO2010038851A1 (en) | 2008-10-02 | 2010-04-08 | 日立オートモティブシステムズ株式会社 | Information processing device associated with vehicle traveling |
| JP2010262444A (en) | 2009-05-01 | 2010-11-18 | Denso Corp | In-vehicle device |
| JP2013003724A (en) | 2011-06-14 | 2013-01-07 | Denso Corp | In-vehicle electronic control unit |
| DE102012205301A1 (en) | 2012-03-30 | 2013-10-02 | Bayerische Motoren Werke Aktiengesellschaft | Computing architecture for control of processing of electronic data in vehicle, has virtualization layer that is adapted in infotainment and real-time automotive operating systems which are operated in parallel with head unit |
| WO2015103376A1 (en) | 2014-01-06 | 2015-07-09 | Johnson Controls Technology Company | Vehicle with multiple user interface operating domains |
-
2018
- 2018-03-30 JP JP2018068260A patent/JP7006451B2/en active Active
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007125950A (en) | 2005-11-02 | 2007-05-24 | Toyota Motor Corp | Power management system for vehicle electronic control unit |
| WO2008062512A1 (en) | 2006-11-21 | 2008-05-29 | Fujitsu Limited | Multiprocessor system |
| JP2009265843A (en) | 2008-04-23 | 2009-11-12 | Toyota Motor Corp | Multi-core system, and gateway device for vehicle |
| WO2010038851A1 (en) | 2008-10-02 | 2010-04-08 | 日立オートモティブシステムズ株式会社 | Information processing device associated with vehicle traveling |
| JP2010262444A (en) | 2009-05-01 | 2010-11-18 | Denso Corp | In-vehicle device |
| JP2013003724A (en) | 2011-06-14 | 2013-01-07 | Denso Corp | In-vehicle electronic control unit |
| DE102012205301A1 (en) | 2012-03-30 | 2013-10-02 | Bayerische Motoren Werke Aktiengesellschaft | Computing architecture for control of processing of electronic data in vehicle, has virtualization layer that is adapted in infotainment and real-time automotive operating systems which are operated in parallel with head unit |
| WO2015103376A1 (en) | 2014-01-06 | 2015-07-09 | Johnson Controls Technology Company | Vehicle with multiple user interface operating domains |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019179397A (en) | 2019-10-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7006451B2 (en) | Electronic control device and multi-core allocation method | |
| EP2128759B1 (en) | Operating system startup control method and information processing apparatus | |
| JP4985662B2 (en) | Program and control device | |
| US8407507B2 (en) | Power management circuit, power management method and power management program for controlling power supplied to functional blocks in integrated circuits | |
| CN115129459A (en) | Memory management method and device | |
| JP5533789B2 (en) | In-vehicle electronic control unit | |
| CN112817762A (en) | Dispatching system based on adaptive automobile open system architecture standard and dispatching method thereof | |
| CN113678101A (en) | Information processing apparatus, moving object, and information processing method | |
| JPH012145A (en) | Resource management method for virtual computer system | |
| CN113767367B (en) | Virtual machine monitor and control device | |
| JP2008152470A (en) | Data processing system and semiconductor integrated circuit | |
| JP2007257257A (en) | Task execution environment switching method in multitask system | |
| KR100791296B1 (en) | Apparatus and method for providing cooperative scheduling in multi-core systems | |
| CN110069287B (en) | Multi-system coexistence method and device and storage equipment | |
| JP3893136B2 (en) | Embedded computer control program, recording medium recording the program, and embedded system | |
| JP6358330B2 (en) | Information processing apparatus, information processing system, memory management method, and memory management program | |
| JP2007018268A (en) | Task scheduling method, task scheduling device, and task scheduling program | |
| JP5148236B2 (en) | Semiconductor integrated circuit and method for controlling semiconductor integrated circuit | |
| US12153947B2 (en) | Assignment control device, assignment control method, and assignment control program | |
| JP2009026117A (en) | Memory management system and method for virtual machine system, and program | |
| JP2025112863A (en) | Electronic control device, memory area allocation method, and memory area allocation program | |
| CN115328833A (en) | Multiplexing method and device of hardware resources, hardware platform and storage medium | |
| KR20190053993A (en) | Resource management method and system using application status and orchestration service on gpu enabled cloud environment | |
| JP2023032307A (en) | Virtualization control device and interrupt control method | |
| CN113934509B (en) | System and operation method supporting hybrid virtual machine manager |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210120 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211125 |
|
| 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: 20211207 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211220 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 7006451 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |