JP6861275B2 - Vehicle control unit - Google Patents

Vehicle control unit Download PDF

Info

Publication number
JP6861275B2
JP6861275B2 JP2019519118A JP2019519118A JP6861275B2 JP 6861275 B2 JP6861275 B2 JP 6861275B2 JP 2019519118 A JP2019519118 A JP 2019519118A JP 2019519118 A JP2019519118 A JP 2019519118A JP 6861275 B2 JP6861275 B2 JP 6861275B2
Authority
JP
Japan
Prior art keywords
application
execution
execution priority
state
time
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
Application number
JP2019519118A
Other languages
Japanese (ja)
Other versions
JPWO2018211865A1 (en
Inventor
裕弘 小田
裕弘 小田
成沢 文雄
文雄 成沢
敏史 大塚
敏史 大塚
勇気 田中
勇気 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Astemo 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 Astemo Ltd filed Critical Hitachi Astemo Ltd
Publication of JPWO2018211865A1 publication Critical patent/JPWO2018211865A1/en
Application granted granted Critical
Publication of JP6861275B2 publication Critical patent/JP6861275B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/48Program initiating; Program switching, e.g. by interrupt

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Description

本発明は、車載電子システムにおける車両制御装置に関し、特に、機能安全を確保するために、アプリケーションによる処理を時分割でスケジューリングを実施する(以下「時分割スケジューリング」という)車両制御装置に適用して好適なものである。 The present invention relates to a vehicle control device in an in-vehicle electronic system, and is particularly applied to a vehicle control device that schedules processing by an application in a time-division manner (hereinafter referred to as "time-division scheduling") in order to ensure functional safety. It is suitable.

車載電子システムのソフトウェアは高い安全性、信頼性を実現するために、国際標準規格ISO26262の機能安全に準拠することが重要になっている。機能安全に関するソフトウェアの要件については、Freedom From Interference(以下略してFFIともいう)が定められており、これは複数のアプリケーション間における従属故障を防ぐことを目的としている。 In order to achieve high safety and reliability of software for in-vehicle electronic systems, it is important to comply with the functional safety of the international standard ISO26262. Regarding software requirements related to functional safety, Freedom From Interference (hereinafter also referred to as FFI for short) is defined, which aims to prevent dependent failures between multiple applications.

FFIの機能の一つとして時間保護があり、複数のアプリケーションの実行タイミングを干渉させないようにしなければならない。この時間保護を実現するためには、それぞれのアプリケーションに対して実行可能な時間を予め割り当てることにより、スケジューリングを行う手法が主流となっている。一方、機能安全の安全度レベルの観点から、複数のアプリケーションの依存関係によって、実行中のアプリケーションを一時中断させ、安全度レベルが高いアプリケーションを先に実行しなければいけない場合が生ずる。 One of the functions of FFI is time protection, which must not interfere with the execution timing of multiple applications. In order to realize this time protection, a method of scheduling by allocating executable time to each application in advance has become the mainstream. On the other hand, from the viewpoint of the safety level of functional safety, there may be a case where the running application must be suspended and the application having a high safety level must be executed first due to the dependency of a plurality of applications.

従来、各アプリケーションに割り当てる時間をタイムスロットとし、そのタイムスロット内でアプリケーションをスケジューリングする方法が存在している(特許文献1参照)。タイムスロットと各アプリケーションとは対応付けられている。タイムスロットの開始のタイミングで、あるアプリケーションが実行中の場合でもこれを一時中断し、そのタイムスロットに対応づけられた他のアプリケーションを優先して実行する。一方、タイムスロットを全て消費することなくアプリケーションの処理が終了した場合は、タイムスロットの残り時間を中断したアプリケーションの実行時間に割り当てる手法が提案されている。 Conventionally, there is a method in which the time allocated to each application is set as a time slot and the application is scheduled in the time slot (see Patent Document 1). The time slot is associated with each application. At the start timing of a time slot, even if one application is running, it is suspended and other applications associated with that time slot are given priority for execution. On the other hand, when the processing of the application is completed without consuming all the time slots, a method of allocating the remaining time of the time slots to the execution time of the interrupted application has been proposed.

特開2010−170320号公報Japanese Unexamined Patent Publication No. 2010-170320

上述した従来技術による時分割スケジューリングでは、タイムスロットの余りの時間も利用することでアプリケーションの実行効率を高めているが、この余りの時間は、タイムスロットに対応付けられているアプリケーションの実行時間に依存するため、再開させる他のアプリケーションがそのタイムスロットの最後までに実行を完了させることができない、すなわち、当該他のアプリケーションの最悪時間を保証することができない。その結果、当該他のアプリケーションが設計タイミングまでに処理が終了せず、システムの挙動に影響が生じることがある。 In the time-division scheduling according to the above-mentioned conventional technique, the execution efficiency of the application is improved by using the extra time of the time slot, but this extra time is used as the execution time of the application associated with the time slot. Because of the dependency, the other application to be restarted cannot complete execution by the end of that time slot, i.e., the worst time of the other application cannot be guaranteed. As a result, the processing of the other application may not be completed by the design timing, which may affect the behavior of the system.

本発明は以上の点を考慮してなされたもので、システムの挙動を安定させることができる車両制御装置を提案しようとするものである。 The present invention has been made in consideration of the above points, and an object of the present invention is to propose a vehicle control device capable of stabilizing the behavior of a system.

かかる課題を解決するため、本発明においては、実行優先度が互いに異なる複数のアプリケーションの実行優先度を制御する実行優先度制御部と、前記実行優先度制御部によって各々設定された実行優先度に従って前記複数のアプリケーションの状態を制御する実行状態制御部と、を備え、前記複数のアプリケーションは、第1の実行優先度が設定された第1のアプリケーションと、前記第1の実行優先度よりも低い第2の実行優先度が設定された第2のアプリケーションと、実行優先度を変更可能な第3のアプリケーションと、を含み、前記実行優先度制御部は、前記複数のアプリケーションのうち前記第2のアプリケーションが実行可能状態であり、かつ、前記第1のアプリケーションの実行が所定の実行時間内に完了した場合、前記第3のアプリケーションに対して、前記第1の実行優先度よりも低く、かつ、前記第2の実行優先度よりも高い第3の実行優先度を設定し、前記実行状態制御部は、前記第1のアプリケーションの実行が完了した後、前記第2のアプリケーションの実行を開始させるまでに亘って、前記第3の実行優先度で前記第3のアプリケーションを実行させることを特徴とする。 In order to solve such a problem, in the present invention, according to the execution priority control unit that controls the execution priority of a plurality of applications having different execution priorities and the execution priority set by the execution priority control unit. The execution state control unit for controlling the states of the plurality of applications is provided, and the plurality of applications are lower than the first application in which the first execution priority is set and the first execution priority. The execution priority control unit includes the second application in which the second execution priority is set and the third application in which the execution priority can be changed, and the execution priority control unit is the second application among the plurality of applications. When the application is in an executable state and the execution of the first application is completed within a predetermined execution time, the execution priority of the first application is lower than that of the third application and the execution priority is lower than that of the first execution priority. A third execution priority higher than the second execution priority is set, and the execution state control unit starts execution of the second application after the execution of the first application is completed. over, characterized in that to execute the third application in the third execution priority.

本発明によれば、システムの挙動を安定させることができる。 According to the present invention, the behavior of the system can be stabilized.

第1の実施の形態による車両制御装置の構成例を示す図である。It is a figure which shows the configuration example of the vehicle control device by 1st Embodiment. タイムスロット管理テーブルの一例を示す図である。It is a figure which shows an example of the time slot management table. アプリケーションの状態遷移図である。It is a state transition diagram of an application. アプリケーションの時分割スケジューリングの一例を示す図である。It is a figure which shows an example of the time division scheduling of an application. 実行時間が長いアプリケーションが存在する場合の時分割スケジューリングの一例を示す図である。It is a figure which shows an example of the time division scheduling when there is an application with a long execution time. アプリケーションの実行優先度を考慮した時分割スケジューリングの一例を示す図である。It is a figure which shows an example of the time division scheduling which considered the execution priority of an application.

以下、図面について、本発明の一実施の形態について詳述する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

(1)第1の実施の形態
(1−1)車両制御装置の構成
図1は、第1の実施の形態による車両制御装置の概略構成を示す。車両制御装置101は、アプリケーション111、タイムスロット管理テーブル123、アプリケーション制御装置121、及びハードウェアタイマー131を備えている。このハードウェアタイマー131は、設定されたタイミングでアプリケーション制御装置121に対してタイマー割り込みを通知する機能を有する。
(1) First Embodiment (1-1) Configuration of Vehicle Control Device FIG. 1 shows a schematic configuration of a vehicle control device according to the first embodiment. The vehicle control device 101 includes an application 111, a time slot management table 123, an application control device 121, and a hardware timer 131. The hardware timer 131 has a function of notifying the application control device 121 of a timer interrupt at a set timing.

(1−2)アプリケーション
アプリケーション111は、アプリケーション111A,111B,・・・,111Y,111Zを含んでいる。これらアプリケーション111A,111B,・・・,111Y,111Zはそれぞれ一つのタスクであり、アプリケーション制御装置121が管理対象とするプログラムの実行単位である。アプリケーションは少なくとも1つ生成され、アプリケーション制御装置121によって、いわゆる時分割スケジューリングで実行される。
(1-2) Application The application 111 includes applications 111A, 111B, ..., 111Y, 111Z. Each of these applications 111A, 111B, ..., 111Y, 111Z is a task, and is an execution unit of a program managed by the application control device 121. At least one application is generated and executed by the application controller 121 in a so-called time-division scheduling.

これらのアプリケーション111A,111B,・・・,111Y,111Zには、処理の内容に応じて実行時間を保証しなければならないアプリケーションと、実行時間が多少遅れてもよいアプリケーションと、が存在している。ISO26262では、機能安全の視点からタスクを低い危険事象から高い危険事象へ順にQM(Quality Management)、ASIL-A(Automotive Safety Integrity Level-A)、ASIL-B(Automotive Safety Integrity Level-B)、ASIL-C(Automotive Safety Integrity Level-C)、ASIL-D(Automotive Safety Integrity Level-D)というように安全度レベルを分類している。 In these applications 111A, 111B, ..., 111Y, 111Z, there are an application whose execution time must be guaranteed according to the content of processing and an application whose execution time may be slightly delayed. .. In ISO26262, from the viewpoint of functional safety, tasks are assigned from low risk events to high risk events in order from QM (Quality Management), ASIL-A (Automotive Safety Integrity Level-A), ASIL-B (Automotive Safety Integrity Level-B), ASIL. The safety level is classified as -C (Automotive Safety Integrity Level-C) and ASIL-D (Automotive Safety Integrity Level-D).

大きく分類すると、安全性担保という観点において実行時間を保証しなければならないアプリケーションはASILに該当する一方、安全保障に関係がなく実行時間が多少遅れてもよいアプリケーションはQMに該当する。 Broadly speaking, applications that must guarantee execution time from the perspective of ensuring security fall under ASIL, while applications that are not related to security and whose execution time may be slightly delayed fall under QM.

アプリケーション111A,111B,・・・,111Y,111Zは、アプリケーション制御装置121から起動指示を受け取ると、リアルタイム性を保ちながら時分割スケジューリングによって実行される。 When the applications 111A, 111B, ..., 111Y, 111Z receive the start instruction from the application control device 121, the applications 111A, 111B, ..., 111Y, 111Z are executed by time-division scheduling while maintaining real-time performance.

アプリケーション111A,111B,・・・,111Y,111Zは、アプリケーション制御装置121から実行優先度の変更指示(図示の優先度変更指示に相当)を受け付けると、実行すべき優先度(以下「実行優先度」という)が変更される。 When the applications 111A, 111B, ..., 111Y, 111Z receive an execution priority change instruction (corresponding to the priority change instruction shown in the figure) from the application control device 121, the application 111A, 111B, ..., 111Y, 111Z has a priority to be executed (hereinafter, "execution priority"). ") Is changed.

タイムスロット管理テーブル123は、アプリケーション111A,111B,・・・,111Y,111Zを互いに識別するためのアプリケーションIDごとに、起動順序及び起動タイミングに関する情報を管理している。 The time slot management table 123 manages information on the start-up order and start-up timing for each application ID for identifying the applications 111A, 111B, ..., 111Y, 111Z from each other.

アプリケーション制御装置121は、起動タイミング設定部124、起動タイミング受信部125、起動アプリケーション判断部126、アプリケーション起動部122、及び実行優先度制御部127を備えている。 The application control device 121 includes a start timing setting unit 124, a start timing receiving unit 125, a start application determination unit 126, an application start unit 122, and an execution priority control unit 127.

起動タイミング設定部124は、タイムスロット管理テーブル123から、後述するように起動アプリケーション判断部126によって指定されたあるアプリケーションの次の起動タイミングを取得し、ハードウェアタイマー131に、その起動タイミングを設定する。 The startup timing setting unit 124 acquires the next startup timing of a certain application specified by the startup application determination unit 126 from the time slot management table 123 as described later, and sets the startup timing in the hardware timer 131. ..

起動タイミング受信部125は、ハードウェアタイマー131からタイマー割り込みが通知されると、起動アプリケーション判断部126に対してその旨通知する。 When the hardware timer 131 notifies the timer interrupt, the start timing receiving unit 125 notifies the start application determination unit 126 to that effect.

起動アプリケーション判断部126は、タイムスロット管理テーブル123において指定された、次に起動すべきアプリケーションのアプリケーションIDを含む起動指示をアプリケーション起動部122に対して発行する。 The start application determination unit 126 issues a start instruction including the application ID of the application to be started next specified in the time slot management table 123 to the application start unit 122.

アプリケーション起動部122は、起動アプリケーション判断部126から起動指示を受け取ったことを契機として、アプリケーション111A〜111Zのうち当該起動指示に含まれるアプリケーションIDに対応するアプリケーションに対して起動指示を発行する。 Upon receiving the start instruction from the start application determination unit 126, the application start unit 122 issues a start instruction to the application corresponding to the application ID included in the start instruction among the applications 111A to 111Z.

一方、実行優先度制御部127は、詳細は後述するが、アプリケーション111A〜111Zのうち起動されているアプリケーションの実行優先度を制御する。 On the other hand, the execution priority control unit 127 controls the execution priority of the started application among the applications 111A to 111Z, although the details will be described later.

(1−3)タイムスロット管理テーブルの詳細構成
図2は、図1に示すタイムスロット管理テーブル123の詳細な構成例を示す。タイムスロット管理テーブル123は、そのカラムとして、タイムスロットID、タイマー通知時間、アプリケーションID、及び時間保護違反判定を有する。この時間保護違反判定は、タイムスロット内でアプリケーションが処理を完了できる予定であるか否かを判定することを表している(以下「時間保護違反判定処理」ともいう)。
(1-3) Detailed Configuration of Time Slot Management Table FIG. 2 shows a detailed configuration example of the time slot management table 123 shown in FIG. The time slot management table 123 has a time slot ID, a timer notification time, an application ID, and a time protection violation determination as its columns. This time protection violation determination indicates whether or not the application is scheduled to complete the process within the time slot (hereinafter, also referred to as "time protection violation determination process").

タイムスロットIDは、各タイムスロット同士を区別するために付与される識別子である。タイマー通知時間は、時間保護違反判定処理を実施すべきとの通知を実施する時間間隔を表す。アプリケーションIDは、アプリケーション111A〜111Zを互いに区別するための識別子である。時間保護違反判定は、上述した時間保護違反判定処理を実施すべきか否かを表す。 The time slot ID is an identifier given to distinguish each time slot from each other. The timer notification time represents a time interval for executing the notification that the time protection violation determination process should be executed. The application ID is an identifier for distinguishing the applications 111A to 111Z from each other. The time protection violation determination indicates whether or not the above-mentioned time protection violation determination process should be performed.

(1−4)アプリケーションの状態遷移
図3は、アプリケーションの状態遷移の一例を表す図である。アプリケーションの状態は、例えば、実行状態301、実行可能状態302、待ち状態303、及び休止状態304に分類される。各状態については以下のようになっている。
(1-4) Application state transition FIG. 3 is a diagram showing an example of application state transition. The application states are classified into, for example, an execution state 301, an executable state 302, a wait state 303, and a hibernate state 304. Each state is as follows.

実行状態301は、図示しないCPUが割り当て済でアプリケーションが実行している状態を表している。実行可能状態302は、例えば特定のアプリケーションを実行する条件は整っているが、実行優先度がより高いあるアプリケーションが実行状態であるため、当該特定のアプリケーションを実行できない状態を表している。 The execution state 301 represents a state in which a CPU (not shown) is already assigned and the application is executing. The executable state 302 represents, for example, a state in which a condition for executing a specific application is satisfied, but the specific application cannot be executed because a certain application having a higher execution priority is in the execution state.

待ち状態303は、アプリケーションを実行できる条件が整わないため実行できない状態を表し、例えば、何らかの条件成立を待っている状態を表している。休止状態304は、アプリケーションが未だに起動されていないまたは終了した状態を表している。 The wait state 303 represents a state in which the application cannot be executed because the conditions under which the application can be executed are not satisfied. For example, the wait state 303 represents a state in which some condition is waiting to be satisfied. The hibernate state 304 represents a state in which the application has not yet been started or terminated.

アプリケーションが新たに起動される場合、アプリケーション制御装置121は、このアプリケーションを最初に休止状態304に遷移させる。次にアプリケーション制御装置121は、このアプリケーションを起動することによりこの休止状態304から実行可能状態302に遷移させ、このアプリケーションは、ディスパッチすることによりこの実行可能状態302から実行状態301に遷移する。アプリケーションの処理が実行完了した時、このアプリケーションは待ち状態303に遷移する。 When the application is newly launched, the application controller 121 first transitions the application to hibernation 304. Next, the application control device 121 transitions from the hibernation state 304 to the executable state 302 by invoking this application, and the application transitions from the executable state 302 to the execution state 301 by dispatching. When the processing of the application is completed, this application transitions to the waiting state 303.

実行状態301のアプリケーションが存在する場合により実行優先度が高いアプリケーションが実行可能状態302に遷移したときには、当該実行優先度が高いアプリケーションはディスパッチして実行状態301に遷移し、実行状態301の他のアプリケーションはプリエンプションして実行可能状態302に遷移する。 If an application in execution state 301 exists and an application with high execution priority transitions to executable state 302, the application with high execution priority dispatches and transitions to execution state 301, and other applications in execution state 301 The application preempts and transitions to the executable state 302.

(1−5)時分割スケジューリング
図4は、時分割スケジューリングの一例を示す。なお、横軸は時間を表している。
(1-5) Time-Division Scheduling FIG. 4 shows an example of time-division scheduling. The horizontal axis represents time.

この時分割スケジューリングは、図示のようにタイムスロットTS1〜TS3ごとに例えば等間隔で定められている時間に、決められた順番にアプリケーションを実行するタスクスケジューリングの一種である。 This time-division scheduling is a kind of task scheduling in which applications are executed in a predetermined order at predetermined times, for example, at equal intervals for each of the time slots TS1 to TS3 as shown in the figure.

(1−6)時分割スケジューリング
図5は、実行時間がタイムスロットTS1よりも長いアプリケーション111Bが存在する場合の時分割スケジューリングの一例を示す。
(1-6) Time-Division Scheduling FIG. 5 shows an example of time-division scheduling when there is an application 111B whose execution time is longer than the time slot TS1.

図示のように設計上タイムスロット内で処理が完了しないような実行時間の長いアプリケーションは途中で中断する必要がある。このアプリケーションを待ち状態303(図3参照)に遷移させると、実行状態301に復帰してアプリケーションが再開するまで時間がかかりタイムスロット内で実際にアプリケーションが動作できる時間が短くなってしまう。そこで、例えば、上述のように中断する場合でも、実行可能状態302に遷移させるに留め、再開にかかる時間を短縮する。 As shown in the figure, an application with a long execution time that does not complete processing within the time slot by design needs to be interrupted in the middle. When this application is transitioned to the waiting state 303 (see FIG. 3), it takes time to return to the execution state 301 and the application is restarted, and the time during which the application can actually operate in the time slot is shortened. Therefore, for example, even in the case of interruption as described above, only the transition to the executable state 302 is performed, and the time required for resumption is shortened.

この時、アプリケーション111において、前記機能安全の考え方における安全度の高いアプリケーション111Aと、安全度の低いアプリケーション111Bとが存在している場合、当該安全度の高いアプリケーション111Aが、当該安全度の低いアプリケーション111Bに影響を受けないようにする必要がある。 At this time, when the application 111A having a high degree of safety and the application 111B having a low degree of safety exist in the application 111, the application 111A having a high degree of safety is the application having a low degree of safety. It is necessary not to be affected by 111B.

そのため、本実施の形態では、これらアプリケーション111A,111Bとは別途、例えば、実行優先度が適宜変更されるアプリケーション111Zを新たに用意し、実行優先度制御部127がこのアプリケーション111Zの実行優先度を以下に示すように操作する。 Therefore, in the present embodiment, separately from these applications 111A and 111B, for example, an application 111Z whose execution priority is appropriately changed is newly prepared, and the execution priority control unit 127 sets the execution priority of the application 111Z. Operate as shown below.

アプリケーション111A,111Bには、設定可能な実行優先度の範囲が定められている。実行優先度制御部127は、アプリケーション111Zの初期の実行優先度として、アプリケーション111A,111Bに設定可能な最低実行優先度よりもさらに低い優先度を設定する。 Applications 111A and 111B define a range of execution priorities that can be set. The execution priority control unit 127 sets a priority lower than the minimum execution priority that can be set in the applications 111A and 111B as the initial execution priority of the application 111Z.

図6は、タイムスロット内で各アプリケーションが実行される様子の一例を示す。アプリケーション制御装置121は、例えば、タイマー割り込みを契機とした3つのタイムスロットにおいて各アプリケーションが時分割で実行されている。 FIG. 6 shows an example of how each application is executed in the time slot. In the application control device 121, for example, each application is executed in a time division manner in three time slots triggered by a timer interrupt.

図示の例では、安全度が高く実行優先度が高いアプリケーション111A、安全度が低く実行優先度が低いアプリケーション111B、実行優先度の変更が可能なアプリケーション111Zの状態が遷移する様子が表されている。アプリケーション制御装置121は、これらのアプリケーション111A,111B,111Zに対して実行可能時間、すなわち、タイムスロットTS1,TS2,TS3のいずれかのタイムスロットを割り当て、各タイムスロット内でこれらのアプリケーション111A,111B,111Zを実行させる。 In the illustrated example, the states of the application 111A having a high safety level and a high execution priority, the application 111B having a low safety level and a low execution priority, and the application 111Z whose execution priority can be changed are shown. .. The application control device 121 allocates an executable time, that is, one of the time slots TS1, TS2, and TS3 to these applications 111A, 111B, 111Z, and these applications 111A, 111B within each time slot. , 111Z is executed.

本実施の形態では、タイムスロットTS1にはアプリケーション111Bが割り当てられており、タイムスロットTS2には原則としてアプリケーション111Aが割り当てられており、タイムスロットTS3にはアプリケーション111Bが割り当てられている。 In the present embodiment, the application 111B is assigned to the time slot TS1, the application 111A is assigned to the time slot TS2 in principle, and the application 111B is assigned to the time slot TS3.

アプリケーション制御装置121は、既述のタイマー割込みを契機として起動され、最初に時間T0に、タイムスロットTS1に割り当てられているアプリケーション111Bを起動する。 The application control device 121 is activated triggered by the timer interrupt described above, and first activates the application 111B assigned to the time slot TS1 at time T0.

アプリケーション制御装置121は、アプリケーション111Bの処理がタイムスロットTS1の時間(T0〜TI2)内に実行を完了しなかった場合、タイムスロットTS2に割り当てられているアプリケーション111Aを起動するため、アプリケーション111Aをディスパッチにより実行状態に遷移させる一方、アプリケーション111Bをプリエンプションにより実行可能状態に遷移させる。 The application control device 121 dispatches the application 111A to start the application 111A assigned to the time slot TS2 when the processing of the application 111B does not complete the execution within the time (T0 to TI2) of the time slot TS1. While transitioning to the execution state by, the application 111B is transitioned to the executable state by preemption.

この時、アプリケーション制御装置121は、アプリケーション111Aによる処理がタイムスロットTS2の最終時間TI3よりも早い時間TAで完了した場合、一見すると、現行設定されている実行優先度の関係上、アプリケーション111Bをディスパッチにより実行状態に復帰させ、本来割り当てられていないタイムスロットTS2内で動作させてしまいそうにも見える。 At this time, when the processing by the application 111A is completed at a time TA earlier than the final time TI3 of the time slot TS2, the application control device 121 dispatches the application 111B at first glance due to the currently set execution priority. It seems that it will be returned to the execution state by, and it will be operated in the time slot TS2 which is not originally assigned.

しかしながら本実施の形態では、このような事態を回避するために、アプリケーション制御装置121では、アプリケーション起動部122が、時間TI2においてタイマー割込みを契機としてアプリケーション111Aに対して起動指示を発行してこのアプリケーション111Aを起動すると同時に、実行優先度制御部127が、実行優先度の変更が可能なアプリケーション111Zの実行優先度を、アプリケーション111Aの実行優先度より低く、かつ、本来割り当てられていないタイムスロットTS2での動作が懸念されるアプリケーション111Bの実行優先度より高くなるように変更する(以下「タスクスケジューリング制御」ともいう)。 However, in the present embodiment, in order to avoid such a situation, in the application control device 121, the application activation unit 122 issues an activation instruction to the application 111A in the wake of a timer interrupt at the time TI2, and this application. At the same time as starting 111A, the execution priority control unit 127 sets the execution priority of the application 111Z whose execution priority can be changed to the time slot TS2 which is lower than the execution priority of the application 111A and which is not originally assigned. It is changed so that the operation of the application 111B is higher than the execution priority of the application 111B (hereinafter, also referred to as "task scheduling control").

このようなタスクスケジューリング制御により、アプリケーション111AがタイムスロットTS2に対応する時間(T1―TI3)以内に実行を完了した後は(図示の時間TA以後に相当)、実行優先度制御部127が、アプリケーション111Zをディスパッチして時間TA〜TI3において実行状態に遷移させることにより、アプリケーション111Bは当該時間TA〜TI3において実行可能状態を維持する。 After the application 111A completes execution within the time (T1-TI3) corresponding to the time slot TS2 by such task scheduling control (corresponding to the time TA shown in the figure), the execution priority control unit 127 uses the application. By dispatching 111Z to transition to the execution state at times TA to TI3, the application 111B maintains the executable state at the time TA to TI3.

次のタイムスロットTS3の開始時間T2においてアプリケーション111Bを再開する際、実行優先度制御部127は、併せてアプリケーション111Zの実行優先度を元に戻すことにより、アプリケーション111Bは、本来自らに割り当てられていないタイムスロットTS2に干渉しないようにするとともに、タイムスロットTS3の開始時間T2において本来自らに割り当てられているこのタイムスロットTS3での再開タイミングが保証される。 When the application 111B is restarted at the start time T2 of the next time slot TS3, the execution priority control unit 127 also restores the execution priority of the application 111Z, so that the application 111B is originally assigned to itself. In addition to preventing interference with the non-existent time slot TS2, the restart timing in the time slot TS3 originally assigned to itself at the start time T2 of the time slot TS3 is guaranteed.

以上のようにすると、実行効率を考慮しながらもアプリケーションの最悪時間を保証し、本来割り当てられていないタイムスロットに干渉することを防止した時分割スケジューリングを実現することができる。 By doing so, it is possible to realize time-division scheduling that guarantees the worst time of the application while considering the execution efficiency and prevents interference with the time slot that is not originally assigned.

本実施の形態によれば、複数のアプリケーション111A,111Bを各々タイムスロット内の予め定められたタイミングで開始及び終了させることができるため、システム全体の挙動を安定させることができる。これにより、車両制御装置101によって制御する車両を安全に運行することができる。また、車両制御装置101には、さらにその他にも様々な機能を搭載させてもシステムが不安定になりにくくすることができる。なお、その他にも、実行優先度にしたがったアプリケーションの事項制御も取り入れることにより,アプリケーションの切り替え時間の高速化を図ることができる。 According to the present embodiment, since the plurality of applications 111A and 111B can be started and ended at predetermined timings in the time slot, the behavior of the entire system can be stabilized. As a result, the vehicle controlled by the vehicle control device 101 can be safely operated. Further, even if the vehicle control device 101 is further equipped with various other functions, the system can be prevented from becoming unstable. In addition, it is possible to speed up the application switching time by incorporating application item control according to the execution priority.

(1−7)時間保護違反検知時の制御
アプリケーション制御装置121では、実行優先度制御部127が、ある特定のアプリケーションの処理が意図せず、割り当てタイムスロットの時間内で完了しなかった場合、他のアプリケーションへの時間干渉を防ぐため、既述の時間保護違反判定処理によって、そのような場合の事象を「時間保護違反」として検知し、該当特定のアプリケーションの実行について停止制御を実施するようにしても良い。
(1-7) Control at the time of detecting a time protection violation In the application control device 121, when the execution priority control unit 127 does not intend to process a specific application and does not complete it within the time of the allocated time slot, In order to prevent time interference with other applications, the above-mentioned time protection violation judgment process should detect such an event as a "time protection violation" and implement stop control for the execution of the specific application. You can do it.

実行優先度制御部127は、アプリケーションの停止制御として、時間保護違反として検知された上記特定のアプリケーションの実行優先度を、上記アプリケーション111Zに設定可能な最低実行優先度よりもさらに低い実行優先度に変更することで実現する。 As an application stop control, the execution priority control unit 127 sets the execution priority of the specific application detected as a time protection violation to a lower execution priority than the minimum execution priority that can be set in the application 111Z. It will be realized by changing it.

このような制御により、時間保護違反として検知された上記特定のアプリケーションは、実行可能状態に遷移する。時分割スケジューリングは、常にいずれかのアプリケーションが実行しているため、時間保護違反として検知された上記特定のアプリケーションは、これ以降復帰して動作が再開することが防止される。 By such control, the specific application detected as a time protection violation transitions to the executable state. Since the time division scheduling is always executed by one of the applications, the specific application detected as a time protection violation is prevented from returning and resuming the operation thereafter.

(2)第2の実施の形態
第2の実施の形態による車両制御装置は、第1の実施の形態による車両制御装置101とほぼ同様の構成であるとともにほぼ同様の動作を実行するため、以下、両者において相違する点を中心として説明する。
(2) Second Embodiment The vehicle control device according to the second embodiment has substantially the same configuration as the vehicle control device 101 according to the first embodiment and executes substantially the same operation. , The differences between the two will be mainly explained.

第2の実施の形態では、実行優先度制御部127が、アプリケーション111Zに対して、タイムスロットによる厳密な時間管理を必要としない機能、つまり、時間保護を必要としない機能を割り付けておき、アプリケーション111Zによって断続的に当該機能を発揮させている。 In the second embodiment, the execution priority control unit 127 assigns a function that does not require strict time management by a time slot, that is, a function that does not require time protection, to the application 111Z, and the application The function is intermittently exerted by the 111Z.

上述した時間保護を必要としない機能の一例としては、バックグラウンドで状態を監視する機能を挙げることができる。このようにすると、アプリケーション111Zを実行優先度の制御のみならず、当該機能を発揮させることにも併せて利用できるため、リソースを無駄なく有効に活用することができる。 As an example of the above-mentioned function that does not require time protection, there is a function of monitoring the state in the background. In this way, the application 111Z can be used not only for controlling the execution priority but also for exerting the function, so that the resources can be effectively utilized without waste.

上述した時間保護を必要としない機能は、全ての処理を完了するのに非常に長い時間を要するアプリケーションを、当該全ての処理の完了までに時間的な制約なく、すなわち、ベストエフォートとして動作させる機能であっても良い。 The above-mentioned function that does not require time protection is a function that allows an application that takes a very long time to complete all processes to operate as a best effort without any time constraint until all the processes are completed. It may be.

なお、第1及び第2の実施の形態のいずれにおいても、アプリケーション111A,111B,111Zという3つのアプリケーションを利用した態様に限定する意図ではなく、4つ以上のアプリケーションを用いて同様の制御を実施しても良い。 In any of the first and second embodiments, the same control is performed using four or more applications, not limited to the mode in which the three applications 111A, 111B, and 111Z are used. You may.

なお、上述した各実施の形態では、車両制御装置を例示して説明しているが、車両制御装置以外の装置への適用を妨げるものではない。 In each of the above-described embodiments, the vehicle control device is illustrated and described, but the application to a device other than the vehicle control device is not hindered.

(3)その他の実施形態
上記実施形態は、本発明を説明するための例示であり、本発明をこれらの実施形態にのみ限定する趣旨ではない。本発明は、その趣旨を逸脱しない限り、様々な形態で実施することができる。例えば、上記実施形態では、各種プログラムの処理をシーケンシャルに説明したが、特にこれにこだわるものではない。従って、処理結果に矛盾が生じない限り、処理の順序を入れ替え又は並行動作するように構成しても良い。
(3) Other Embodiments The above embodiments are examples for explaining the present invention, and the present invention is not intended to be limited only to these embodiments. The present invention can be implemented in various forms as long as it does not deviate from the gist thereof. For example, in the above embodiment, the processing of various programs has been described sequentially, but the present invention is not particularly particular. Therefore, as long as there is no contradiction in the processing results, the processing order may be changed or the processing may be configured to operate in parallel.

本発明は、複数のアプリケーションを時分割でスケジューリングを実施する車両制御装置に広く適用することができる。 The present invention can be widely applied to a vehicle control device that performs time-division scheduling of a plurality of applications.

101……車両制御装置、111A〜111Z……アプリケーション、121……アプリケーション制御装置、122……アプリケーション起動部、123……タイムスロット管理テーブル、124……起動タイミング設定部、125……起動タイミング受信部、126……起動アプリケーション判断部、127……実行優先度制御部、301……実行状態、302……実行可能状態、303……待ち状態、304……休止状態。 101 …… Vehicle control device, 111A to 111Z …… Application, 121 …… Application control device, 122 …… Application startup unit, 123 …… Time slot management table, 124 …… Start timing setting unit, 125 …… Start timing reception Unit, 126 ... Start application judgment unit, 127 ... Execution priority control unit, 301 ... Execution state, 302 ... Executable state, 303 ... Wait state, 304 ... Hibernate state.

Claims (7)

実行優先度が互いに異なる複数のアプリケーションの実行優先度を制御する実行優先度制御部と、
前記実行優先度制御部によって各々設定された実行優先度に従って前記複数のアプリケーションの状態を制御する実行状態制御部と、
を備え、
前記複数のアプリケーションは、第1の実行優先度が設定された第1のアプリケーションと、前記第1の実行優先度よりも低い第2の実行優先度が設定された第2のアプリケーションと、実行優先度を変更可能な第3のアプリケーションと、を含み、
前記実行優先度制御部は、
前記複数のアプリケーションのうち、前記第2のアプリケーションが実行可能状態であり、かつ、前記第1のアプリケーションの実行が所定の実行時間内に完了した場合、前記第3のアプリケーションに対して、前記第1の実行優先度よりも低く、かつ、前記第2の実行優先度よりも高い第3の実行優先度を設定し、
前記実行状態制御部は、
前記第1のアプリケーションの実行が完了した後、前記第2のアプリケーションの実行を開始させるまでに亘って、前記第3の実行優先度で前記第3のアプリケーションを実行させる
ことを特徴とする車両制御装置。
An execution priority control unit that controls the execution priority of multiple applications with different execution priorities,
An execution state control unit that controls the states of the plurality of applications according to the execution priority set by the execution priority control unit, and an execution state control unit.
With
The plurality of applications include a first application in which a first execution priority is set, a second application in which a second execution priority lower than the first execution priority is set, and an execution priority. Including a third application that can change the degree
The execution priority control unit
When the second application is in an executable state among the plurality of applications and the execution of the first application is completed within a predetermined execution time, the third application is referred to the third application. A third execution priority that is lower than the execution priority of 1 and higher than the second execution priority is set.
The execution state control unit
After execution of the first application has been completed, the second over before starting the execution of the application, a vehicle control, characterized in that to execute the third application in the third execution priority apparatus.
前記実行優先度制御部は、
前記第3のアプリケーションの初期の実行優先度として、前記第2の実行優先度よりもさらに低くした第4の実行優先度に設定しておき、その後、
前記第1のアプリケーションの実行が完了した第1のタイミングで、前記第3のアプリケーションの実行優先度を前記第3の実行優先度に設定した後、前記第2のアプリケーションの実行を開始すべき第2のタイミングで、前記第3のアプリケーションの実行優先度を前記第4の実行優先度に戻す
ことを特徴とする請求項1に記載の車両制御装置。
The execution priority control unit
As the initial execution priority of the third application, a fourth execution priority lower than the second execution priority is set, and then the execution priority is set to a fourth execution priority.
At a first timing the execution of the first application has been completed, after the execution priority of the third application is set to the third execution priority, the should begin execution of the second application The vehicle control device according to claim 1, wherein the execution priority of the third application is returned to the fourth execution priority at the timing of 2.
前記実行状態制御部は、
前記複数のアプリケーションのうち前記第1のアプリケーションの実行を開始する際には、前記複数のアプリケーションのうち前記第2のアプリケーションを待ち状態または休止状態に遷移させず実行可能状態に遷移させ、
前記実行可能状態に遷移させた前記第2のアプリケーションの実行を再開する際には、前記実行可能状態に遷移させた前記第2のアプリケーションを前記実行可能状態から実行状態に遷移させる
ことを特徴とする請求項1に記載の車両制御装置。
The execution state control unit
When starting the execution of the first application among the plurality of applications, the second application among the plurality of applications is transitioned to an executable state without transitioning to a waiting state or a hibernation state.
When resuming execution of the executable state and the second was the transition to an application, and characterized in that shifting the second application makes a state transition to the executable state from the READY state to RUNNING state The vehicle control device according to claim 1.
前記実行状態制御部は、
前記複数のアプリケーションのうち次に起動すべきアプリケーションの起動タイミングを設定する起動タイミング設定部と、
前記起動タイミングに基づいて作成されるタイマー割込みを受信したことを契機として次に起動すべきアプリケーションを判断する起動アプリケーション判断部と、
前記次に起動すべきアプリケーションに対して移動指示を発行するとともに、前記実行優先度制御部に対して実行優先度の変更指示を発行するアプリケーション起動部と、
を備えることを特徴とする請求項1に記載の車両制御装置。
The execution state control unit
A startup timing setting unit that sets the startup timing of the application to be started next among the plurality of applications,
A start application judgment unit that determines the application to be started next when a timer interrupt created based on the start timing is received, and a start application judgment unit.
An application startup unit that issues a move instruction to the application to be started next and also issues an execution priority change instruction to the execution priority control unit.
The vehicle control device according to claim 1, further comprising.
前記起動タイミング設定部は、
前記次に起動すべきアプリケーションにタイムスロットを割り当てる
ことを特徴とする請求項4に記載の車両制御装置。
The start timing setting unit
The vehicle control device according to claim 4, wherein a time slot is assigned to the application to be started next.
前記実行状態制御部は、
前記タイムスロットの時間内でアプリケーションの処理が完了しない事象としての時間保護違反が発生するか否かを判定する処理を実行し、
前記第3のアプリケーションについては前記処理の対象外に設定する
ことを特徴とする請求項5に記載の車両制御装置。
The execution state control unit
A process for determining whether or not a time protection violation occurs as an event in which the application process is not completed within the time of the time slot is executed.
The vehicle control device according to claim 5, wherein the third application is set to be excluded from the processing.
前記実行状態制御部は、
前記第3のアプリケーションとして、前記タイムスロットを用いた時間管理を必要としない機能を備えるアプリケーションの状態を制御する
ことを特徴とする請求項5に記載の車両制御装置。
The execution state control unit
The vehicle control device according to claim 5, wherein as the third application, the state of an application having a function that does not require time management using the time slot is controlled.
JP2019519118A 2017-05-17 2018-04-11 Vehicle control unit Active JP6861275B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2017098332 2017-05-17
JP2017098332 2017-05-17
PCT/JP2018/015175 WO2018211865A1 (en) 2017-05-17 2018-04-11 Vehicle control device

Publications (2)

Publication Number Publication Date
JPWO2018211865A1 JPWO2018211865A1 (en) 2020-01-23
JP6861275B2 true JP6861275B2 (en) 2021-04-21

Family

ID=64273682

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019519118A Active JP6861275B2 (en) 2017-05-17 2018-04-11 Vehicle control unit

Country Status (2)

Country Link
JP (1) JP6861275B2 (en)
WO (1) WO2018211865A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022114138A (en) * 2021-01-26 2022-08-05 日立Astemo株式会社 Simulation device of electric control device
CN112959926B (en) * 2021-03-05 2022-11-29 广西双英集团股份有限公司 Time division control method for dynamic multi-task car cabin platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009294712A (en) * 2008-06-02 2009-12-17 Panasonic Corp Priority controller and priority control method
US9569260B2 (en) * 2013-05-31 2017-02-14 Microsoft Technology Licensing, Llc Efficient priority-aware thread scheduling

Also Published As

Publication number Publication date
JPWO2018211865A1 (en) 2020-01-23
WO2018211865A1 (en) 2018-11-22

Similar Documents

Publication Publication Date Title
US8612982B2 (en) Multi-tasking method according to simple priority inheritance scheme and embedded system therefor
US20110302587A1 (en) Information processing device and information processing method
US9792137B2 (en) Real-time performance apparatus and method for controlling virtual machine scheduling in real-time
WO2009147802A1 (en) Priority controller and priority control method
KR20070083460A (en) Method and system for concurrent execution of multiple kernels
JP6861275B2 (en) Vehicle control unit
JP2004362100A (en) Information processor, method for controlling process, and computer program
EP2664989A1 (en) Task scheduling
JP4523910B2 (en) Parallel processing device, parallel processing method, and parallel processing program
US20050160425A1 (en) Limitation of the response time of a software process
US8423681B2 (en) Control apparatus for process input-output device
JP2019079336A (en) Numerical control device
JP2005149312A (en) Task management system
CN110825501A (en) Processor core optimization method and device and storage medium
JP6861591B2 (en) Vehicle control unit
WO2019044226A1 (en) Access control device
JP2005293070A (en) Task execution system
WO2012088766A1 (en) Method and device for dynamically scheduling batch processing tasks
WO2024004414A1 (en) Information processing device
JP3169316B2 (en) Task scheduling method
JPH10143378A (en) Computer device, and preemption method of urgent process in the computer device
CN115185664A (en) Vehicle-mounted system fault detection method, device, equipment and readable storage medium
CN117522360A (en) Timing task running state control method and system
CN117251265A (en) Process scheduling method and device, electronic equipment and storage medium
JP2013161363A (en) Electronic control device and method for executing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190918

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201110

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201218

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210329

R150 Certificate of patent or registration of utility model

Ref document number: 6861275

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250