WO2018211865A1 - 車両制御装置 - Google Patents

車両制御装置 Download PDF

Info

Publication number
WO2018211865A1
WO2018211865A1 PCT/JP2018/015175 JP2018015175W WO2018211865A1 WO 2018211865 A1 WO2018211865 A1 WO 2018211865A1 JP 2018015175 W JP2018015175 W JP 2018015175W WO 2018211865 A1 WO2018211865 A1 WO 2018211865A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
execution
execution priority
state
priority
Prior art date
Application number
PCT/JP2018/015175
Other languages
English (en)
French (fr)
Inventor
裕弘 小田
成沢 文雄
敏史 大塚
勇気 田中
Original Assignee
日立オートモティブシステムズ株式会社
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 日立オートモティブシステムズ株式会社 filed Critical 日立オートモティブシステムズ株式会社
Priority to JP2019519118A priority Critical patent/JP6861275B2/ja
Publication of WO2018211865A1 publication Critical patent/WO2018211865A1/ja

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

Definitions

  • the present invention relates to a vehicle control apparatus in an in-vehicle electronic system, and in particular, is applied to a vehicle control apparatus that performs processing by an application in a time-sharing manner (hereinafter referred to as “time-sharing scheduling”) in order to ensure functional safety. Is preferred.
  • in-vehicle electronic system software must comply with the functional safety of international standard ISO26262.
  • FFI Freedom From Interference
  • One of the functions of FFI is time protection, which must prevent the execution timing of multiple applications from interfering.
  • time protection a method of performing scheduling by allocating an executable time to each application in advance has become the mainstream.
  • an application being executed must be suspended first and an application with a high safety level must be executed first due to a dependency relationship of a plurality of applications.
  • time allocated to each application is set as a time slot, and the application is scheduled within the time slot (see Patent Document 1).
  • the time slot is associated with each application. Even when an application is being executed at the time slot start timing, the application is temporarily suspended, and another application associated with the time slot is preferentially executed.
  • a method has been proposed in which the remaining time of the time slot is allocated to the execution time of the interrupted application.
  • the execution time of the application is improved by using the remaining time of the time slot, but this remaining time is equal to the execution time of the application associated with the time slot. Because of the dependence, the other application to be resumed cannot complete execution by the end of its time slot, i.e. it cannot guarantee the worst time of the other application. As a result, the processing of the other application may not be completed by the design timing, and the system behavior may be affected.
  • the present invention has been made in consideration of the above points, and intends to propose a vehicle control apparatus capable of stabilizing the behavior of the system.
  • 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, respectively.
  • An execution state control unit that controls states of the plurality of applications, and the execution priority control unit immediately executes a low execution after the execution of the application having a high execution priority among the plurality of applications is completed. If the execution of the priority application should not be started, an intermediate execution priority is set as an execution priority that is lower than the high execution priority and higher than the low execution priority for another application.
  • the execution state control unit sets the low execution priority after the execution of the high execution priority application is completed. Over until starting the execution of the execution priority application, characterized in that to execute the specific application in the middle of the execution priority.
  • the behavior of the system can be stabilized.
  • FIG. 1 shows a schematic configuration of a vehicle control device according to a first embodiment.
  • the vehicle control apparatus 101 includes an application 111, a time slot management table 123, an application control apparatus 121, and a hardware timer 131.
  • the hardware timer 131 has a function of notifying the application control apparatus 121 of a timer interrupt at a set timing.
  • 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 apparatus 121. At least one application is generated, and is executed by the application control device 121 by so-called time-sharing scheduling.
  • These applications 111A, 111B,..., 111Y, 111Z include an application whose execution time must be guaranteed according to the contents of processing and an application whose execution time may be somewhat delayed. .
  • tasks are ordered from QM (Quality Management), ASIL-A (Automotive Safety Integrity Level-A), ASIL-B (Automotive Safety Integrity Level-B), ASIL -C (Automotive SafetyAutoIntegrity) Level-C) and ASIL-D (Automotive Safety Integrity Level-D) classify safety levels.
  • the application 111A, 111B,..., 111Y, 111Z receives an activation instruction from the application control apparatus 121, the application 111A, 111B,.
  • execution priority Upon receiving an execution priority change instruction (corresponding to the priority change instruction shown) from the application control apparatus 121, the applications 111A, 111B,..., 111Y, 111Z receive the priority to be executed (hereinafter referred to as “execution priority”). ”) Is changed.
  • the time slot management table 123 manages information related to the activation order and activation timing for each application ID for identifying the applications 111A, 111B,..., 111Y, 111Z from each other.
  • the application control device 121 includes a start timing setting unit 124, a start timing receiving unit 125, a start application determining unit 126, an application start unit 122, and an execution priority control unit 127.
  • the activation timing setting unit 124 acquires the next activation timing of a certain application designated by the activation application determination unit 126 from the time slot management table 123 as described later, and sets the activation timing in the hardware timer 131. .
  • the activation timing reception unit 125 When the timer interrupt is notified from the hardware timer 131, the activation timing reception unit 125 notifies the activation application determination unit 126 to that effect.
  • the start application determination unit 126 issues a start instruction including the application ID of the application to be started next, which is designated in the time slot management table 123, to the application start unit 122.
  • the application activation unit 122 issues an activation instruction to the application corresponding to the application ID included in the activation instruction among the applications 111A to 111Z when the activation instruction is received from the activation application determination unit 126.
  • the execution priority control unit 127 controls the execution priority of the activated application among the applications 111A to 111Z, as will be described in detail later.
  • FIG. 2 shows a detailed configuration example of the time slot management table 123 shown in FIG.
  • the time slot management table 123 includes 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 represents determining whether or not an application is scheduled to be able to complete processing within a time slot (hereinafter also referred to as “time protection violation determination processing”).
  • the time slot ID is an identifier assigned to distinguish each time slot.
  • the timer notification time represents a time interval for performing notification that the time protection violation determination processing should be performed.
  • the application ID is an identifier for distinguishing the applications 111A to 111Z from each other.
  • the time protection violation determination represents whether or not the above-described time protection violation determination processing should be performed.
  • FIG. 3 is a diagram illustrating an example of application state transition.
  • the application state is classified into, for example, an execution state 301, an executable state 302, a waiting state 303, and a dormant state 304.
  • Each state is as follows.
  • the execution state 301 represents a state in which an application (not shown) has been assigned and the application is being executed.
  • the executable state 302 represents a state in which, for example, a condition for executing a specific application is in place, but an application with a higher execution priority is in an execution state, and therefore the specific application cannot be executed.
  • the wait state 303 represents a state in which execution of the application cannot be performed because the conditions for executing the application are not satisfied, and represents, for example, a state in which some condition is awaited.
  • the hibernation state 304 represents a state where the application has not been started yet or has been terminated.
  • the application control apparatus 121 When the application is newly activated, the application control apparatus 121 first transitions the application to the hibernation state 304. Next, the application control apparatus 121 makes a transition from the sleep state 304 to the executable state 302 by activating this application, and this application makes a transition from the executable state 302 to the execution state 301 by dispatching. When the processing of the application is completed, the application transitions to a wait state 303.
  • FIG. 4 shows an example of time division scheduling.
  • the horizontal axis represents time.
  • This time-sharing scheduling is a type of task scheduling in which applications are executed in a predetermined order at times that are determined at regular intervals for each of the time slots TS1 to TS3 as shown in the figure.
  • 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.
  • an application with a long execution time that does not complete processing within a time slot by design must be interrupted.
  • this application is changed to the wait state 303 (see FIG. 3)
  • the application 111 when the application 111A with high safety in the concept of functional safety and the application 111B with low safety exist, the application 111A with high safety has the application with low safety. It is necessary not to be affected by 111B.
  • a new application 111Z whose execution priority is appropriately changed is prepared, and the execution priority control unit 127 sets the execution priority of the application 111Z. Operate as shown below.
  • the range of execution priorities that can be set is defined for the applications 111A and 111B.
  • the execution priority control unit 127 sets a priority that is lower than the lowest execution priority that can be set for the applications 111A and 111B as the initial execution priority of the application 111Z.
  • FIG. 6 shows an example of how each application is executed in the time slot.
  • each application is executed in a time division manner in three time slots triggered by a timer interrupt.
  • the state 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 state of the application 111Z capable of changing the execution priority is illustrated.
  • the application control apparatus 121 assigns an executable time to these applications 111A, 111B, and 111Z, that is, any one of the time slots TS1, TS2, and TS3, and these applications 111A, 111B within each time slot. , 111Z are executed.
  • the application 111B is assigned to the time slot TS1
  • the application 111A is assigned to the time slot TS2
  • the application 111B is assigned to the time slot TS3.
  • the application control device 121 is activated in response to the timer interrupt described above, and first activates the application 111B assigned to the time slot TS1 at time T0.
  • the application control apparatus 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 execution within the time (T0 to TI2) of the time slot TS1.
  • the application 111B is changed to the executable state by preemption while the application 111B is changed to the execution state by.
  • the application control apparatus 121 may dispatch the application 111B at first glance due to the currently set execution priority. It seems that it is likely to operate in the time slot TS2, which is not originally assigned, by returning to the execution state.
  • the application activation unit 122 issues an activation instruction to the application 111A in response to a timer interruption at time TI2, and this application
  • the execution priority control unit 127 sets the execution priority of the application 111Z whose execution priority can be changed to a time slot TS2 that is lower than the execution priority of the application 111A and is not originally assigned. Is changed so as to be higher than the execution priority of the application 111B concerned (hereinafter also referred to as “task scheduling control”).
  • the execution priority control unit 127 By dispatching 111Z and transitioning to the execution state at times TA to TI3, the application 111B maintains the executable state at times TA to TI3.
  • the execution priority control unit 127 When the application 111B is resumed 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 no 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.
  • time-sharing scheduling that guarantees the worst time of an application while considering execution efficiency and prevents interference with an unassigned time slot.
  • the behavior of the entire system can be stabilized.
  • the vehicle controlled by the vehicle control device 101 can be operated safely.
  • the system can be made less likely to become unstable.
  • the application switching time can be increased by incorporating application item control according to the execution priority.
  • 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. Realize by changing.
  • 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 performs substantially the same operation. The difference between the two will be mainly described.
  • the execution priority control unit 127 assigns a function that does not require strict time management by time slots to the application 111Z, that is, a function that does not require time protection, The function is exhibited intermittently by 111Z.
  • An example of a function that does not require time protection as described above is a function that monitors the state in the background.
  • the application 111Z can be used not only for controlling the execution priority but also for exhibiting the function, so that 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 requires a very long time to complete all the processes to operate as a best effort without time restrictions until the completion of all the processes. It may be.
  • the application is not intended to be limited to a mode using three applications 111A, 111B, and 111Z, and the same control is performed using four or more applications. You may do it.
  • the vehicle control device has been described as an example. However, application to devices other than the vehicle control device is not hindered.
  • the present invention can be widely applied to a vehicle control apparatus that performs scheduling in a time division manner for a plurality of applications.

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)

Abstract

複数のアプリケーションを各々予め定められたタイミングで開始及び終了させてシステムの挙動を安定させることを課題とする。本発明は複数のアプリケーションの実行優先度を制御するために、別途、特定のアプリケーションを用意する。当該特定のアプリケーションの実行優先度を制御することにより、上述した複数のアプリケーションの実行順序を制御する。これにより、当該複数のアプリケーションを各々予め定められたタイミングで開始及び終了させてシステムの挙動を安定させる。

Description

車両制御装置
 本発明は、車載電子システムにおける車両制御装置に関し、特に、機能安全を確保するために、アプリケーションによる処理を時分割でスケジューリングを実施する(以下「時分割スケジューリング」という)車両制御装置に適用して好適なものである。
 車載電子システムのソフトウェアは高い安全性、信頼性を実現するために、国際標準規格ISO26262の機能安全に準拠することが重要になっている。機能安全に関するソフトウェアの要件については、Freedom From Interference(以下略してFFIともいう)が定められており、これは複数のアプリケーション間における従属故障を防ぐことを目的としている。
 FFIの機能の一つとして時間保護があり、複数のアプリケーションの実行タイミングを干渉させないようにしなければならない。この時間保護を実現するためには、それぞれのアプリケーションに対して実行可能な時間を予め割り当てることにより、スケジューリングを行う手法が主流となっている。一方、機能安全の安全度レベルの観点から、複数のアプリケーションの依存関係によって、実行中のアプリケーションを一時中断させ、安全度レベルが高いアプリケーションを先に実行しなければいけない場合が生ずる。
 従来、各アプリケーションに割り当てる時間をタイムスロットとし、そのタイムスロット内でアプリケーションをスケジューリングする方法が存在している(特許文献1参照)。タイムスロットと各アプリケーションとは対応付けられている。タイムスロットの開始のタイミングで、あるアプリケーションが実行中の場合でもこれを一時中断し、そのタイムスロットに対応づけられた他のアプリケーションを優先して実行する。一方、タイムスロットを全て消費することなくアプリケーションの処理が終了した場合は、タイムスロットの残り時間を中断したアプリケーションの実行時間に割り当てる手法が提案されている。
特開2010-170320号公報
 上述した従来技術による時分割スケジューリングでは、タイムスロットの余りの時間も利用することでアプリケーションの実行効率を高めているが、この余りの時間は、タイムスロットに対応付けられているアプリケーションの実行時間に依存するため、再開させる他のアプリケーションがそのタイムスロットの最後までに実行を完了させることができない、すなわち、当該他のアプリケーションの最悪時間を保証することができない。その結果、当該他のアプリケーションが設計タイミングまでに処理が終了せず、システムの挙動に影響が生じることがある。
 本発明は以上の点を考慮してなされたもので、システムの挙動を安定させることができる車両制御装置を提案しようとするものである。
 かかる課題を解決するため、本発明においては、実行優先度が互いに異なる複数のアプリケーションの実行優先度を制御する実行優先度制御部と、前記実行優先度制御部によって各々設定された実行優先度に従って前記複数のアプリケーションの状態を制御する実行状態制御部と、を備え、前記実行優先度制御部は、前記複数のアプリケーションのうち高い実行優先度のアプリケーションの実行が完了した後、即座に、低い実行優先度のアプリケーションの実行を開始すべきでない場合、さらに別のアプリケーションに対して、前記高い実行優先度よりも低く、かつ、前記低い実行優先度よりも高い実行優先度として中間の実行優先度を設定し、前記実行状態制御部は、前記高い実行優先度のアプリケーションの実行が完了した後、前記低い実行優先度のアプリケーションの実行を開始させるまでに亘って、前記中間の実行優先度で前記別のアプリケーションを実行させることを特徴とする。
 本発明によれば、システムの挙動を安定させることができる。
第1の実施の形態による車両制御装置の構成例を示す図である。 タイムスロット管理テーブルの一例を示す図である。 アプリケーションの状態遷移図である。 アプリケーションの時分割スケジューリングの一例を示す図である。 実行時間が長いアプリケーションが存在する場合の時分割スケジューリングの一例を示す図である。 アプリケーションの実行優先度を考慮した時分割スケジューリングの一例を示す図である。
 以下、図面について、本発明の一実施の形態について詳述する。
 (1)第1の実施の形態
 (1-1)車両制御装置の構成
 図1は、第1の実施の形態による車両制御装置の概略構成を示す。車両制御装置101は、アプリケーション111、タイムスロット管理テーブル123、アプリケーション制御装置121、及びハードウェアタイマー131を備えている。このハードウェアタイマー131は、設定されたタイミングでアプリケーション制御装置121に対してタイマー割り込みを通知する機能を有する。
 (1-2)アプリケーション
 アプリケーション111は、アプリケーション111A,111B,・・・,111Y,111Zを含んでいる。これらアプリケーション111A,111B,・・・,111Y,111Zはそれぞれ一つのタスクであり、アプリケーション制御装置121が管理対象とするプログラムの実行単位である。アプリケーションは少なくとも1つ生成され、アプリケーション制御装置121によって、いわゆる時分割スケジューリングで実行される。
 これらのアプリケーション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)というように安全度レベルを分類している。
 大きく分類すると、安全性担保という観点において実行時間を保証しなければならないアプリケーションはASILに該当する一方、安全保障に関係がなく実行時間が多少遅れてもよいアプリケーションはQMに該当する。
 アプリケーション111A,111B,・・・,111Y,111Zは、アプリケーション制御装置121から起動指示を受け取ると、リアルタイム性を保ちながら時分割スケジューリングによって実行される。
 アプリケーション111A,111B,・・・,111Y,111Zは、アプリケーション制御装置121から実行優先度の変更指示(図示の優先度変更指示に相当)を受け付けると、実行すべき優先度(以下「実行優先度」という)が変更される。
 タイムスロット管理テーブル123は、アプリケーション111A,111B,・・・,111Y,111Zを互いに識別するためのアプリケーションIDごとに、起動順序及び起動タイミングに関する情報を管理している。
 アプリケーション制御装置121は、起動タイミング設定部124、起動タイミング受信部125、起動アプリケーション判断部126、アプリケーション起動部122、及び実行優先度制御部127を備えている。
 起動タイミング設定部124は、タイムスロット管理テーブル123から、後述するように起動アプリケーション判断部126によって指定されたあるアプリケーションの次の起動タイミングを取得し、ハードウェアタイマー131に、その起動タイミングを設定する。
 起動タイミング受信部125は、ハードウェアタイマー131からタイマー割り込みが通知されると、起動アプリケーション判断部126に対してその旨通知する。
 起動アプリケーション判断部126は、タイムスロット管理テーブル123において指定された、次に起動すべきアプリケーションのアプリケーションIDを含む起動指示をアプリケーション起動部122に対して発行する。
 アプリケーション起動部122は、起動アプリケーション判断部126から起動指示を受け取ったことを契機として、アプリケーション111A~111Zのうち当該起動指示に含まれるアプリケーションIDに対応するアプリケーションに対して起動指示を発行する。
 一方、実行優先度制御部127は、詳細は後述するが、アプリケーション111A~111Zのうち起動されているアプリケーションの実行優先度を制御する。
 (1-3)タイムスロット管理テーブルの詳細構成
 図2は、図1に示すタイムスロット管理テーブル123の詳細な構成例を示す。タイムスロット管理テーブル123は、そのカラムとして、タイムスロットID、タイマー通知時間、アプリケーションID、及び時間保護違反判定を有する。この時間保護違反判定は、タイムスロット内でアプリケーションが処理を完了できる予定であるか否かを判定することを表している(以下「時間保護違反判定処理」ともいう)。
 タイムスロットIDは、各タイムスロット同士を区別するために付与される識別子である。タイマー通知時間は、時間保護違反判定処理を実施すべきとの通知を実施する時間間隔を表す。アプリケーションIDは、アプリケーション111A~111Zを互いに区別するための識別子である。時間保護違反判定は、上述した時間保護違反判定処理を実施すべきか否かを表す。
 (1-4)アプリケーションの状態遷移
 図3は、アプリケーションの状態遷移の一例を表す図である。アプリケーションの状態は、例えば、実行状態301、実行可能状態302、待ち状態303、及び休止状態304に分類される。各状態については以下のようになっている。
 実行状態301は、図示しないCPUが割り当て済でアプリケーションが実行している状態を表している。実行可能状態302は、例えば特定のアプリケーションを実行する条件は整っているが、実行優先度がより高いあるアプリケーションが実行状態であるため、当該特定のアプリケーションを実行できない状態を表している。
 待ち状態303は、アプリケーションを実行できる条件が整わないため実行できない状態を表し、例えば、何らかの条件成立を待っている状態を表している。休止状態304は、アプリケーションが未だに起動されていないまたは終了した状態を表している。
 アプリケーションが新たに起動される場合、アプリケーション制御装置121は、このアプリケーションを最初に休止状態304に遷移させる。次にアプリケーション制御装置121は、このアプリケーションを起動することによりこの休止状態304から実行可能状態302に遷移させ、このアプリケーションは、ディスパッチすることによりこの実行可能状態302から実行状態301に遷移する。アプリケーションの処理が実行完了した時、このアプリケーションは待ち状態303に遷移する。
 実行状態301のアプリケーションが存在する場合により実行優先度が高いアプリケーションが実行可能状態302に遷移したときには、当該実行優先度が高いアプリケーションはディスパッチして実行状態301に遷移し、実行状態301の他のアプリケーションはプリエンプションして実行可能状態302に遷移する。
 (1-5)時分割スケジューリング
 図4は、時分割スケジューリングの一例を示す。なお、横軸は時間を表している。
 この時分割スケジューリングは、図示のようにタイムスロットTS1~TS3ごとに例えば等間隔で定められている時間に、決められた順番にアプリケーションを実行するタスクスケジューリングの一種である。
 (1-6)時分割スケジューリング
 図5は、実行時間がタイムスロットTS1よりも長いアプリケーション111Bが存在する場合の時分割スケジューリングの一例を示す。
 図示のように設計上タイムスロット内で処理が完了しないような実行時間の長いアプリケーションは途中で中断する必要がある。このアプリケーションを待ち状態303(図3参照)に遷移させると、実行状態301に復帰してアプリケーションが再開するまで時間がかかりタイムスロット内で実際にアプリケーションが動作できる時間が短くなってしまう。そこで、例えば、上述のように中断する場合でも、実行可能状態302に遷移させるに留め、再開にかかる時間を短縮する。
 この時、アプリケーション111において、前記機能安全の考え方における安全度の高いアプリケーション111Aと、安全度の低いアプリケーション111Bとが存在している場合、当該安全度の高いアプリケーション111Aが、当該安全度の低いアプリケーション111Bに影響を受けないようにする必要がある。
 そのため、本実施の形態では、これらアプリケーション111A,111Bとは別途、例えば、実行優先度が適宜変更されるアプリケーション111Zを新たに用意し、実行優先度制御部127がこのアプリケーション111Zの実行優先度を以下に示すように操作する。
 アプリケーション111A,111Bには、設定可能な実行優先度の範囲が定められている。実行優先度制御部127は、アプリケーション111Zの初期の実行優先度として、アプリケーション111A,111Bに設定可能な最低実行優先度よりもさらに低い優先度を設定する。
 図6は、タイムスロット内で各アプリケーションが実行される様子の一例を示す。アプリケーション制御装置121は、例えば、タイマー割り込みを契機とした3つのタイムスロットにおいて各アプリケーションが時分割で実行されている。
 図示の例では、安全度が高く実行優先度が高いアプリケーション111A、安全度が低く実行優先度が低いアプリケーション111B、実行優先度の変更が可能なアプリケーション111Zの状態が遷移する様子が表されている。アプリケーション制御装置121は、これらのアプリケーション111A,111B,111Zに対して実行可能時間、すなわち、タイムスロットTS1,TS2,TS3のいずれかのタイムスロットを割り当て、各タイムスロット内でこれらのアプリケーション111A,111B,111Zを実行させる。
 本実施の形態では、タイムスロットTS1にはアプリケーション111Bが割り当てられており、タイムスロットTS2には原則としてアプリケーション111Aが割り当てられており、タイムスロットTS3にはアプリケーション111Bが割り当てられている。
 アプリケーション制御装置121は、既述のタイマー割込みを契機として起動され、最初に時間T0に、タイムスロットTS1に割り当てられているアプリケーション111Bを起動する。
 アプリケーション制御装置121は、アプリケーション111Bの処理がタイムスロットTS1の時間(T0~TI2)内に実行を完了しなかった場合、タイムスロットTS2に割り当てられているアプリケーション111Aを起動するため、アプリケーション111Aをディスパッチにより実行状態に遷移させる一方、アプリケーション111Bをプリエンプションにより実行可能状態に遷移させる。
 この時、アプリケーション制御装置121は、アプリケーション111Aによる処理がタイムスロットTS2の最終時間TI3よりも早い時間TAで完了した場合、一見すると、現行設定されている実行優先度の関係上、アプリケーション111Bをディスパッチにより実行状態に復帰させ、本来割り当てられていないタイムスロットTS2内で動作させてしまいそうにも見える。
 しかしながら本実施の形態では、このような事態を回避するために、アプリケーション制御装置121では、アプリケーション起動部122が、時間TI2においてタイマー割込みを契機としてアプリケーション111Aに対して起動指示を発行してこのアプリケーション111Aを起動すると同時に、実行優先度制御部127が、実行優先度の変更が可能なアプリケーション111Zの実行優先度を、アプリケーション111Aの実行優先度より低く、かつ、本来割り当てられていないタイムスロットTS2での動作が懸念されるアプリケーション111Bの実行優先度より高くなるように変更する(以下「タスクスケジューリング制御」ともいう)。
 このようなタスクスケジューリング制御により、アプリケーション111AがタイムスロットTS2に対応する時間(T1―TI3)以内に実行を完了した後は(図示の時間TA以後に相当)、実行優先度制御部127が、アプリケーション111Zをディスパッチして時間TA~TI3において実行状態に遷移させることにより、アプリケーション111Bは当該時間TA~TI3において実行可能状態を維持する。
 次のタイムスロットTS3の開始時間T2においてアプリケーション111Bを再開する際、実行優先度制御部127は、併せてアプリケーション111Zの実行優先度を元に戻すことにより、アプリケーション111Bは、本来自らに割り当てられていないタイムスロットTS2に干渉しないようにするとともに、タイムスロットTS3の開始時間T2において本来自らに割り当てられているこのタイムスロットTS3での再開タイミングが保証される。
 以上のようにすると、実行効率を考慮しながらもアプリケーションの最悪時間を保証し、本来割り当てられていないタイムスロットに干渉することを防止した時分割スケジューリングを実現することができる。
 本実施の形態によれば、複数のアプリケーション111A,111Bを各々タイムスロット内の予め定められたタイミングで開始及び終了させることができるため、システム全体の挙動を安定させることができる。これにより、車両制御装置101によって制御する車両を安全に運行することができる。また、車両制御装置101には、さらにその他にも様々な機能を搭載させてもシステムが不安定になりにくくすることができる。なお、その他にも、実行優先度にしたがったアプリケーションの事項制御も取り入れることにより,アプリケーションの切り替え時間の高速化を図ることができる。
 (1-7)時間保護違反検知時の制御
 アプリケーション制御装置121では、実行優先度制御部127が、ある特定のアプリケーションの処理が意図せず、割り当てタイムスロットの時間内で完了しなかった場合、他のアプリケーションへの時間干渉を防ぐため、既述の時間保護違反判定処理によって、そのような場合の事象を「時間保護違反」として検知し、該当特定のアプリケーションの実行について停止制御を実施するようにしても良い。
 実行優先度制御部127は、アプリケーションの停止制御として、時間保護違反として検知された上記特定のアプリケーションの実行優先度を、上記アプリケーション111Zに設定可能な最低実行優先度よりもさらに低い実行優先度に変更することで実現する。
 このような制御により、時間保護違反として検知された上記特定のアプリケーションは、実行可能状態に遷移する。時分割スケジューリングは、常にいずれかのアプリケーションが実行しているため、時間保護違反として検知された上記特定のアプリケーションは、これ以降復帰して動作が再開することが防止される。
 (2)第2の実施の形態
 第2の実施の形態による車両制御装置は、第1の実施の形態による車両制御装置101とほぼ同様の構成であるとともにほぼ同様の動作を実行するため、以下、両者において相違する点を中心として説明する。
 第2の実施の形態では、実行優先度制御部127が、アプリケーション111Zに対して、タイムスロットによる厳密な時間管理を必要としない機能、つまり、時間保護を必要としない機能を割り付けておき、アプリケーション111Zによって断続的に当該機能を発揮させている。
 上述した時間保護を必要としない機能の一例としては、バックグラウンドで状態を監視する機能を挙げることができる。このようにすると、アプリケーション111Zを実行優先度の制御のみならず、当該機能を発揮させることにも併せて利用できるため、リソースを無駄なく有効に活用することができる。
 上述した時間保護を必要としない機能は、全ての処理を完了するのに非常に長い時間を要するアプリケーションを、当該全ての処理の完了までに時間的な制約なく、すなわち、ベストエフォートとして動作させる機能であっても良い。
 なお、第1及び第2の実施の形態のいずれにおいても、アプリケーション111A,111B,111Zという3つのアプリケーションを利用した態様に限定する意図ではなく、4つ以上のアプリケーションを用いて同様の制御を実施しても良い。
 なお、上述した各実施の形態では、車両制御装置を例示して説明しているが、車両制御装置以外の装置への適用を妨げるものではない。
 (3)その他の実施形態
 上記実施形態は、本発明を説明するための例示であり、本発明をこれらの実施形態にのみ限定する趣旨ではない。本発明は、その趣旨を逸脱しない限り、様々な形態で実施することができる。例えば、上記実施形態では、各種プログラムの処理をシーケンシャルに説明したが、特にこれにこだわるものではない。従って、処理結果に矛盾が生じない限り、処理の順序を入れ替え又は並行動作するように構成しても良い。
 本発明は、複数のアプリケーションを時分割でスケジューリングを実施する車両制御装置に広く適用することができる。
 101……車両制御装置、111A~111Z……アプリケーション、121……アプリケーション制御装置、122……アプリケーション起動部、123……タイムスロット管理テーブル、124……起動タイミング設定部、125……起動タイミング受信部、126……起動アプリケーション判断部、127……実行優先度制御部、301……実行状態、302……実行可能状態、303……待ち状態、304……休止状態。

Claims (7)

  1.  実行優先度が互いに異なる複数のアプリケーションの実行優先度を制御する実行優先度制御部と、
     前記実行優先度制御部によって各々設定された実行優先度に従って前記複数のアプリケーションの状態を制御する実行状態制御部と、
     を備え、
     前記実行優先度制御部は、
     前記複数のアプリケーションのうち高い実行優先度のアプリケーションの実行が完了した後、即座に、低い実行優先度のアプリケーションの実行を開始すべきでない場合、さらに別のアプリケーションに対して、前記高い実行優先度よりも低く、かつ、前記低い実行優先度よりも高い実行優先度として中間の実行優先度を設定し、
     前記実行状態制御部は、
     前記高い実行優先度のアプリケーションの実行が完了した後、前記低い実行優先度のアプリケーションの実行を開始させるまでに亘って、前記中間の実行優先度で前記別のアプリケーションを実行させる
     ことを特徴とする車両制御装置。
  2.  前記実行優先度制御部は、
     前記別のアプリケーションの初期の実行優先度として、前記低い実行優先度よりもさらに低くした最低の実行優先度に設定しておき、その後、
     前記高い実行優先度のアプリケーションの実行が完了した第1のタイミングで、前記別のアプリケーションの実行優先度を前記中間の実行優先度に設定した後、前記低い実行優先度のアプリケーションの実行を開始すべき第2のタイミングで、前記別のアプリケーションの実行優先度を前記最低の実行優先度に戻す
     ことを特徴とする請求項1に記載の車両制御装置。
  3.  前記実行状態制御部は、
     前記複数のアプリケーションのうち実行優先度が相対的に高いアプリケーションの実行を開始する際には、前記複数のアプリケーションのうち実行優先度が相対的に低いアプリケーションを待ち状態または休止状態に遷移させず実行可能状態に遷移させる一方、
     前記実行可能状態に遷移させたアプリケーションの実行を再開する際には、前記実行可能状態に遷移させたアプリケーションを前記実行可能状態から実行状態に遷移させる
     ことを特徴とする請求項1に記載の車両制御装置。
  4.  前記実行状態制御部は、
     前記複数のアプリケーションのうち次に起動すべきアプリケーションの起動タイミングを設定する起動タイミング設定部と、
     前記起動タイミングに基づいて作成されるタイマー割込みを受信したことを契機として次に起動すべきアプリケーションを判断する起動アプリケーション判断部と、
     前記次に起動すべきアプリケーションに対して移動指示を発行するとともに、前記実行優先度制御部に対して実行優先度の変更指示を発行するアプリケーション起動部と、
     を備えることを特徴とする請求項1に記載の車両制御装置。
  5.  前記起動タイミング設定部は、
     前記次に起動すべきアプリケーションにタイムスロットを割り当てる
     ことを特徴とする請求項4に記載の車両制御装置。
  6.  前記実行状態制御部は、
     前記タイムスロットの時間内でアプリケーションの処理が完了しない事象としての時間保護違反が発生するか否かを判定する処理を実行し、
     前記別のアプリケーションについては前記処理の対象外に設定する
     ことを特徴とする請求項5に記載の車両制御装置。
  7.  前記実行状態制御部は、
     前記別のアプリケーションとして、前記タイムスロットを用いた時間管理を必要としない機能を備えるアプリケーションの状態を制御する
     ことを特徴とする請求項5に記載の車両制御装置。
PCT/JP2018/015175 2017-05-17 2018-04-11 車両制御装置 WO2018211865A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019519118A JP6861275B2 (ja) 2017-05-17 2018-04-11 車両制御装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017098332 2017-05-17
JP2017-098332 2017-05-17

Publications (1)

Publication Number Publication Date
WO2018211865A1 true WO2018211865A1 (ja) 2018-11-22

Family

ID=64273682

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/015175 WO2018211865A1 (ja) 2017-05-17 2018-04-11 車両制御装置

Country Status (2)

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112959926A (zh) * 2021-03-05 2021-06-15 广西双英集团股份有限公司 一种面向动态多任务汽车座舱平台的时分控制方法
WO2022162998A1 (ja) * 2021-01-26 2022-08-04 日立Astemo株式会社 電子制御装置のシミュレーション装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009294712A (ja) * 2008-06-02 2009-12-17 Panasonic Corp 優先度制御装置及び優先度制御方法
US20140359632A1 (en) * 2013-05-31 2014-12-04 Microsoft Corporation Efficient priority-aware thread scheduling

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009294712A (ja) * 2008-06-02 2009-12-17 Panasonic Corp 優先度制御装置及び優先度制御方法
US20140359632A1 (en) * 2013-05-31 2014-12-04 Microsoft Corporation Efficient priority-aware thread scheduling

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022162998A1 (ja) * 2021-01-26 2022-08-04 日立Astemo株式会社 電子制御装置のシミュレーション装置
CN112959926A (zh) * 2021-03-05 2021-06-15 广西双英集团股份有限公司 一种面向动态多任务汽车座舱平台的时分控制方法

Also Published As

Publication number Publication date
JPWO2018211865A1 (ja) 2020-01-23
JP6861275B2 (ja) 2021-04-21

Similar Documents

Publication Publication Date Title
US7958508B2 (en) Method of power-aware job management and computer system
US9104499B2 (en) System for minimizing resource latency between processor application states in a portable computing device by scheduling resource state set transitions
US8943252B2 (en) Latency sensitive software interrupt and thread scheduling
US8141079B2 (en) Dynamic application scheduler in a polling system
KR20070083460A (ko) 다중 커널을 동시에 실행하는 방법 및 시스템
WO2009147802A1 (ja) 優先度制御装置及び優先度制御方法
JP2004362100A (ja) 情報処理装置、プロセス制御方法、並びにコンピュータ・プログラム
US20080295104A1 (en) Realtime Processing Software Control Device and Method
WO2018211865A1 (ja) 車両制御装置
EP2664989A1 (en) Task scheduling
JP4523910B2 (ja) 並列処理装置及び並列処理方法及び並列処理プログラム
US20050160425A1 (en) Limitation of the response time of a software process
US8423681B2 (en) Control apparatus for process input-output device
US20170262392A1 (en) Image processing apparatus, notification monitoring program, and notification monitoring method
CA2767782C (en) Suspendable interrupts for processor idle management
JP2001117786A (ja) プロセススケジューリング装置およびプロセススケジューリング方法
JP2006146758A (ja) コンピュータシステム
JP2005149312A (ja) タスク管理システム
JP2001236236A (ja) タスク制御装置およびそのタスクスケジューリング方法
JP2019079336A (ja) 数値制御装置
JP4325466B2 (ja) タスク実行システム
Belagali et al. Implementation and validation of dynamic scheduler based on LST on FreeRTOS
JP2010102567A (ja) 周期駆動タスク実行装置、周期駆動タスク実行方法及びプログラム
JP3043748B1 (ja) タスクスケジュ―リング方法及び装置
JPH11203149A (ja) タスクスケジュール装置およびその方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18802283

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019519118

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18802283

Country of ref document: EP

Kind code of ref document: A1