JP6861591B2 - Vehicle control unit - Google Patents
Vehicle control unit Download PDFInfo
- Publication number
- JP6861591B2 JP6861591B2 JP2017136710A JP2017136710A JP6861591B2 JP 6861591 B2 JP6861591 B2 JP 6861591B2 JP 2017136710 A JP2017136710 A JP 2017136710A JP 2017136710 A JP2017136710 A JP 2017136710A JP 6861591 B2 JP6861591 B2 JP 6861591B2
- Authority
- JP
- Japan
- Prior art keywords
- task
- access
- state
- time
- execution
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Description
本発明は、車両制御装置及び制御システムの時間駆動スケジューリングに関する。 The present invention relates to time-driven scheduling of vehicle control devices and control systems.
本技術分野の背景技術として、特開2003−131892号公報(特許文献1)がある。この公報には、「排他制御による影響を受けず決められたタイミングで実行されるようにするタスク実行制御装置を提供する」ことを課題とし、解決手段として、「セマフォ管理部は、タスクCの共有資源獲得時に、タスクCの資源解放予想時刻を、タスクAの次の起動予定時刻と比較して、前者が後者より早ければタスクCに資源占有を許す。また、タスクCが資源占有中に第3のタスクBによる割り込み処理が生じた場合、優先度管理部は、タスクBの「割込処理時間」の累計が許容限度に達した時点でタスクCの優先度をタスクAと同じ優先度に上げるようスケジューリング部を制御する。」と記載されている。 As a background technique in this technical field, there is Japanese Patent Application Laid-Open No. 2003-131892 (Patent Document 1). The subject of this publication is "to provide a task execution control device that enables execution at a predetermined timing without being affected by exclusive control", and as a solution, "the semaphore management unit is a task C. When the shared resource is acquired, the estimated resource release time of task C is compared with the next scheduled start time of task A, and if the former is earlier than the latter, task C is allowed to occupy the resource. Also, while task C is occupying the resource. When interrupt processing by the third task B occurs, the priority management unit sets the priority of task C to the same priority as task A when the cumulative total of "interrupt processing time" of task B reaches the permissible limit. Control the scheduling unit so that it can be raised to. ".
上記背景技術ではタスクを優先度スケジューリングにより動作させる場合に、排他制御による高優先度タスクへの影響を防止する方法について記載されている。 The above-mentioned background technology describes a method for preventing the influence of exclusive control on a high-priority task when the task is operated by priority scheduling.
しかしながら、各タスクがどの共有資源にアクセスするか公開されていない場合において、排他制御による影響を防止して各タスクを統合することは困難である。タスク統合を容易化する技術に時間駆動スケジューリングがある。時間駆動スケジューリングではタスクの起動タイミングとCPU資源を保証することが課題である。 However, when it is not disclosed which shared resource each task accesses, it is difficult to prevent the influence of exclusive control and integrate each task. Time-driven scheduling is a technology that facilitates task integration. In time-driven scheduling, it is an issue to guarantee task start timing and CPU resources.
本発明は上記課題を鑑みて為されたものであり、車両制御装置のタスクの統合を容易化させる手段を提供する。 The present invention has been made in view of the above problems, and provides a means for facilitating the integration of tasks of a vehicle control device.
上記課題を解決するために、本発明の一実施の態様は、例えば特許請求の範囲に記載されている技術的思想を用いればよい。具体的には、安全要求レベルの低いタスクに割り当てられた実行スロットの最終部に共有データへのアクセス開始を保留するアクセス監視時間を設けることにより解決可能である。 In order to solve the above problems, one embodiment of the present invention may use, for example, the technical idea described in the claims. Specifically, this can be solved by providing an access monitoring time for suspending the start of access to the shared data at the final part of the execution slot assigned to the task with the low safety requirement level.
本発明によれば、車両制御装置において、時間駆動スケジューリングを実現する際に、他タスクと共有するデータアクセスへの考慮を不要にするなど、タスクの統合を容易化させつつかつ制御システムのタスクの動作時間に影響を与えないことが可能になる。これにより、時間駆動スケジューリングで動作する高信頼なシステムでタスクを統合することが容易となる。 According to the present invention, when the time-driven scheduling is realized in the vehicle control device, it is not necessary to consider the data access shared with other tasks, and the tasks of the control system can be easily integrated while facilitating the integration of the tasks. It is possible to not affect the operating time. This facilitates task integration in a highly reliable system that operates with time-driven scheduling.
以下、本発明に好適な実施形態の例(実施例)を説明する。本実施例は、主には車両システムにおける車両制御システム、および車両制御装置について説明しており、車両システムにおける実施に好適であるが、車両システム以外への適用を妨げるものではない。 Hereinafter, examples (examples) of embodiments suitable for the present invention will be described. This embodiment mainly describes a vehicle control system and a vehicle control device in a vehicle system, and is suitable for implementation in a vehicle system, but does not prevent application to other than the vehicle system.
<車両システムの構成>
図20は本実施例の車両制御装置を有する車両システムの概要である。2001は自動車など内部に車両制御装置を有する車両システム、2002は車両を制御するための車両制御装置、2003は地図などの情報を取得する無線通信部、2004は車両制御装置2002の制御に従って車両運動を制御する、たとえばエンジン、ホイール、ブレーキ、操舵装置等の駆動を行う駆動装置、2005は外界から入力される情報を取得し、外界認識情報を生成するための情報を出力するカメラやセンサーなどの認識装置、2006は車両の速度や警告など必要情報を表示する出力装置、2007はペダル、ハンドルなど車両操作の指示を入力するための入力装置、2008は車両システム2001が外界に対して、車両の状態等を通知するための、ランプ、LED、スピーカ等の通知装置、を示している。
<Vehicle system configuration>
FIG. 20 is an outline of a vehicle system having a vehicle control device of this embodiment. 2001 is a vehicle system having a vehicle control device inside such as an automobile, 2002 is a vehicle control device for controlling a vehicle, 2003 is a wireless communication unit for acquiring information such as a map, and 2004 is a vehicle movement according to the control of the
<車両制御装置の構成>
様々な自動車の自動運転技術が実現されつつある。多くの自動運転技術はコンピュータによる制御装置により実現されている。図2は車両制御装置2002のブロック図である。アプリケーション214としてセンサーデバイス等の周辺装置から外部情報を処理するセンサーフュージョン201、自動運転のための地図情報を処理するマップフュージョン202、他の車両などに追突しそうになる直前に自動ブレーキを作動させて停止させたり前を走る車両と一定の間隔を保ったまま追従したり車線からはみ出さないようにステアリングを制御するといった機能を実現するADAS(Advanced Driving Assistant System)203、自動駐車を実現するオートパーキング204などがある。またアプリケーションで利用されるデータは共有データ群205により処理・管理が一元化されている。これにより各アプリケーションでのデータ管理機能を省くことができ自動運転での自動車の制御に求められる高速な応答を実現している。これらのアプリケーションはタスク実行制御部206によりリアルタイム性を保ちながら時間駆動スケジューリングによって実行される。タスク実行制御部206はスケジューリング部108の指定したタイミングに基づきタスク状態管理部107により後述する各タスク101、102に対して、後述する状態遷移に基づき管理を行う。
<Configuration of vehicle control device>
Various automobile autonomous driving technologies are being realized. Many autonomous driving technologies are realized by computer-controlled devices. FIG. 2 is a block diagram of the
オペレーティングシステムは組み込みOS207が使用されている。ハードウェア215はCPU208、メモリ209、リアルタイム制御のタイミングをとるためのタイマ210、ネットワークにアクセスするためのネットワークアダプタ211、そしてセンサーなどの外部状況を監視するものや自動ブレーキ装置などの周辺装置212から構成される。また、各タスクの動作を記録するため、動作ログ管理部213がある。
The embedded OS 207 is used as the operating system. Hardware 215 is from
<タスク>
OSが管理対象とするプログラムの並行実行の単位、すなわち一つのタスク中のプログラムは逐次的に実行されるのに対して、異なるタスクのプログラムは並行して実行が行われる。ただし、並行して実行が行われるというのは、アプリケーションからみた概念的な動作であり、実装上はOSの制御のもとで、それぞれのタスクが時間駆動で実行される。タスクは1アプリケーションにつき最低1個生成される。
<Task>
A unit of parallel execution of programs managed by the OS, that is, programs in one task are executed sequentially, whereas programs of different tasks are executed in parallel. However, the fact that they are executed in parallel is a conceptual operation from the perspective of the application, and in terms of implementation, each task is executed in a time-driven manner under the control of the OS. At least one task is generated per application.
タスクには処理の内容に応じて実行時間を保証しなければならないものと、実行時間が多少遅れてもよいものがある。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となる。 Some tasks have to guarantee the execution time according to the content of the process, and some tasks may have a slight delay in execution time. In ISO26262, from the viewpoint of functional safety, tasks are assigned from the lowest to the highest dangerous event in order from 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). Broadly speaking, tasks that must guarantee execution time in terms of security are ASIL, and tasks that are not related to security and whose execution time may be slightly delayed are QM.
<タスクの状態遷移>
図3はタスクの状態遷移図である。タスクの状態は、以下のように分類される。
1.実行状態(RUNNING)301: CPUが割り当てられタスクが実行している状態。
2.実行可能状態(READY)302: タスクを実行する条件は整っているが、当該タスクよりも優先順位が高いタスクが実行状態であるため、実行できない状態。
3.待機状態(WAITING)303: 何らかの条件が整うまで、実行を中断した状態。
4.休止状態(DORMANT)304: タスクがいまだ起動されていないか、終了した状態。
<Task state transition>
FIG. 3 is a state transition diagram of the task. The task states are classified as follows.
1. 1. RUNNING 301: The state in which the CPU is allocated and the task is running.
2. Executable state (READY) 302: A state in which the conditions for executing a task are met, but the task cannot be executed because the task with a higher priority than the task is in the executing state.
3. 3. WAITING 303: Execution suspended until some condition is met.
4. DORMANT 304: The task has not yet been started or has ended.
まず、新規に生成したタスクは最初に休止状態304に移行し、タスク起動によって実行可能状態302へと遷移する。時間駆動スケジューリングにおいては、タスクに割り当てられた時間(スロット)の開始タイミングにてディスパッチされ、実行状態301へと遷移、タスク処理を実行する。タスクの実行が完了、もしくは割り当てられたスロットの時間が終了した場合、タスク状態を実行可能状態302へ遷移する。
First, the newly generated task first shifts to the
タスクがリソース要求を行い、排他制御によりリソースの取得ができない場合には、タスク状態を待機状態303へと遷移させる。その後リソースが解放され、該タスクがリソースを取得可能となった場合には、タスク状態を待機状態304から実行可能状態302へと遷移させる。タスクが強制終了命令を受けた、もしくはタスク自身が終了処理を行った場合、タスク状態は休止状態304へと遷移される。
When the task makes a resource request and the resource cannot be acquired by exclusive control, the task state is changed to the
<時間駆動スケジューリング>
時間駆動スケジューリングとは決められた実行順により、決められた時刻に決められた時間だけタスクを実行するOSのタスク実行スケジューリングである。時間駆動スケジューリングにて制御した場合のタスク実行の例を図4に示す。図4は横軸が時間経過を表しており、スロットID(ここではSL1からSL9)が割り振られることで分割されている。タスクは割り当てられたスロットの時間内で処理実行(ここではt_1, t_2, t_3)が可能である。最後のスロットへ到達した場合、最初のスロット(SL1)に戻りスケジューリングを継続する。
<Time-driven scheduling>
Time-driven scheduling is task execution scheduling of an OS that executes tasks at a fixed time and for a fixed time according to a fixed execution order. FIG. 4 shows an example of task execution when controlled by time-driven scheduling. In FIG. 4, the horizontal axis represents the passage of time, and the slot IDs (here, SL1 to SL9) are assigned to the slots. Tasks can be processed (here, t_1, t_2, t_3) within the time of the allocated slot. When the last slot is reached, it returns to the first slot (SL1) and continues scheduling.
時間駆動スケジューリングには図5に示すスケジューリングテーブル501を使用する。スケジューリングテーブルの構成はスロットID、スロットの開始時刻、スロットの終了時刻、タスクID、時間エラー判定フラグ、タスクが自ら待機状態へ遷移するための排他IDから構成される。スケジューリングテーブル501は各タスクの実行周期、最悪実行時間、安全要求レベル等の情報に基づいて作成される。スケジューリングテーブル501の1サイクルの長さは全タスクの実行周期を満たす長さにて作成される。サイクルの終端へ到達した場合、スロット1に戻りスケジューリングを継続する。 The scheduling table 501 shown in FIG. 5 is used for time-driven scheduling. The configuration of the scheduling table consists of a slot ID, a slot start time, a slot end time, a task ID, a time error determination flag, and an exclusive ID for the task to transition to the standby state by itself. The scheduling table 501 is created based on information such as the execution cycle of each task, the worst execution time, and the safety requirement level. The length of one cycle of the scheduling table 501 is created so as to satisfy the execution cycle of all tasks. When the end of the cycle is reached, it returns to slot 1 and continues scheduling.
時間駆動スケジューリングを行う際のスケジューリング部208の動作フローを図6に示す。各スロットの開始時刻になるとタイマ210によりスケジューリング部208が動作開始し、前のスロットのタスクが実行完了しているか判定を行う(S101)。前のスロットのタスクが実行完了している場合(S101のyes)、スケジューリングテーブル501の終了時刻にスケジューリング部208が動作開始するようタイマ210をセットし(S102)、現在のスロットに割り当てられたタスクを実行状態へ遷移させる(S103)。スロットにタスクが割り当てられていない場合には、そのスロットではタスクを動作させない。このようにして決められた時間でのタスク実行処理を行うことで、各タスクの実行時間を確保する。
FIG. 6 shows an operation flow of the
タスクの動作フローを図12に示す。タスクの処理(S301)が実行完了する際に実行完了フラグを立ち上げ(S302)、自タスクに割り当てられた排他を取得し(S303)、待機状態303に遷移することで実行完了したことを示す。スケジューリング部108は前スロットのタスクの実行完了フラグを参照することで動作完了しているかの判定を行う。また、該タスクに割り当てられた排他を解除することで、該タスクを実行可能状態302へと遷移、スケジューリング部108が待機状態303へ遷移することで該タスクは実行状態301へと遷移する。実行完了フラグはスケジューリング部108により立ち下げる、もしくは該タスクの次スロットにて再開時に該タスクが立ち下げる。
The operation flow of the task is shown in FIG. When the task processing (S301) completes execution, the execution completion flag is raised (S302), the exclusion assigned to the own task is acquired (S303), and the execution is completed by transitioning to the
<時間エラー判定>
タスクの動作が割り当てられたスロットの時間内で完了しない場合の処理を説明する。前のスロットのタスクが実行完了していない場合(S101のno)、時間エラー判定フラグを参照し、“する”の場合には前スロットのタスクを待機状態303へ遷移させる(S105)。この処理を行うタスクを跨りタスクと呼ぶ。跨りタスクは1つのスロット内で処理が完了しない長い時間を要するタスクであり、複数のスロットにわたって動作を行う。
<Time error judgment>
The processing when the operation of the task is not completed within the time of the allocated slot will be described. When the task in the previous slot has not been executed (no in S101), the time error determination flag is referred to, and in the case of "Yes", the task in the previous slot is transitioned to the standby state 303 (S105). The task that performs this process is called a straddle task. The straddling task is a task that takes a long time and the processing is not completed in one slot, and operates over a plurality of slots.
時間エラー判定フラグが“しない”の場合(S104のyes)、前のスロットのエラーフラグを立て(S106)、前のスロットのタスクを休止状態304へ遷移させる(S107)。強制終了には時間を要するため、S107にてタスクを一時的に待機状態303へ遷移させ、空いているスロットで休止状態304へ遷移させても良い。
When the time error determination flag is “not” (yes in S104), the error flag in the previous slot is set (S106), and the task in the previous slot is transitioned to the hibernation state 304 (S107). Since it takes time for the forced termination, the task may be temporarily transitioned to the
<車両制御装置の構成>
タスクの実行を管理する制御装置の構成例について図1を用いて説明する。図1は図2の車両制御装置内部の1構成例である。安全要求レベルの低い第1タスク101と安全要求レベルの高い第2タスク102が存在する。安全要求レベルの低いアプリケーションの処理は第1タスク101となり、安全要求レベルの高いアプリケーションの処理は第2タスクとなる。
<Configuration of vehicle control device>
A configuration example of a control device that manages task execution will be described with reference to FIG. FIG. 1 is an example of one configuration inside the vehicle control device of FIG. There is a
タスク実行制御部206はタスクからの共有データ群205へのアクセス要求を制御するデータアクセス制御部105及びシステム状態を管理するシステム状態管理部106、タスク状態を管理するタスク状態管理部107及びこれらと協調してタスクスケジューリングを行うスケジューリング部108から構成される。
The task
<タスクのデータアクセスにおける問題>
共有データ群205へのアクセスにおける問題について図15を用いて説明する。タスクには実行時間を保証しなければならないASILに分類されるタスクと、実行時間が多少遅れてもよいQMに分類されるものがある。複数のタスクが実行されるときにタスク間で共通のアクセスを行う共有データ群205がある場合は、同時アクセスが発生しないように排他制御(S601、S603)を行わなければならない。しかしながらQMタスクが実行され共有データ群を占有アクセスしている間に、実行時間を保証しなければならないASILタスクの実行時刻となり、ASILタスクの実行が開始されたとしてもQMタスクと同一の共有データ群205をアクセスする場合、ASILタスクは共有データ群205へのアクセスが排他制御によりASILタスクは待機状態とされてしまう。時間駆動スケジューリングではこのようなASILタスクの実行遅延を回避しなければならない。
<Problems with task data access>
The problem in accessing the shared
<タスクのデータアクセス監視時間>
タスクのデータアクセス監視時間について図7及び図13を用いて説明する。安全要求レベルの低い第1タスクと安全要求レベルの高い第2タスクが存在する場合、第1タスクは割り当てられたスロット時間T1aからT1dの間で動作する。安全要求レベルの低いタスクに割り当てられたスロットでは、スロットの最後(T1bからT1d)にデータアクセス監視用のアクセス監視時間を設ける。アクセス監視時間は想定されるデータアクセス時間(T1bからT1c)より長い時間を設ける。アクセス監視時間の開始時(T1b)にシステム状態管理部106がシステム状態をアクセス非監視状態からアクセス監視状態へ遷移させ(S402)、アクセス監視時間の終了時(T1d)にシステム状態をアクセス監視状態からアクセス非監視状態へ遷移させる(S403)。
<Task data access monitoring time>
The data access monitoring time of the task will be described with reference to FIGS. 7 and 13. If there is a first task with a low safety requirement level and a second task with a high safety requirement level, the first task operates between the allocated slot times T1a and T1d. For slots assigned to tasks with a low safety requirement level, an access monitoring time for data access monitoring is provided at the end of the slot (T1b to T1d). The access monitoring time should be longer than the expected data access time (T1b to T1c). At the start of the access monitoring time (T1b), the system
<アクセス監視状態>
アクセス監視状態によるタスクのデータアクセス制御を図14及び図21を用いて説明する。第1タスクが共有データ群205へアクセスを試みる際に、システム状態がアクセス監視状態である場合には第1タスクによる共有データ群205へのアクセスをデータアクセス制御部105が禁止し、タスク状態管理部107により第1タスクのタスク状態を休止状態304へと遷移させる(S504)。システム状態がアクセス監視状態である場合に、第1タスクのタスク状態を休止状態304へと遷移せず、待機状態303へ遷移もしくは無限ループを実行させ、時間エラー判定させてもよい。第1タスクが共有データ群205へアクセスを試みる際に、システム状態がアクセス非監視状態である場合には第1タスクによる共有データ群205へのアクセスを実施する。
<Access monitoring status>
Data access control of the task according to the access monitoring state will be described with reference to FIGS. 14 and 21. When the first task attempts to access the shared
<跨りタスクのデータアクセス制御>
跨りタスクのデータアクセス制御について図8を用いて説明する。複数のスロットにまたがって動作する安全要求レベルの低い第1タスクと、安全要求レベルの高い第2タスクが存在する場合、第1タスクは割り当てられたスロット時間T2aからT2dで動作し、続きの動作をT2eからT2hの間で行う。
<Data access control for straddling tasks>
The data access control of the straddling task will be described with reference to FIG. If there is a first task with a low safety requirement level and a second task with a high safety requirement level that operate across multiple slots, the first task operates from the allocated slot time T2a to T2d, and continues. Is performed between T2e and T2h.
跨りのあるタスクのスロットにおいても、安全要求レベルの低いタスクに割り当てられたスロット全てにおいて、スロットの最終部(T2bからT2d及びT2fからT2h)にデータアクセス監視用のアクセス監視時間を設ける。 Even in the slots of tasks with straddles, access monitoring time for data access monitoring is provided at the final part of the slots (T2b to T2d and T2f to T2h) in all the slots assigned to the tasks with low safety requirements.
第1タスクが共有データ群205へアクセスを試みる際に、システム状態がアクセス監視状態である場合にはデータアクセス制御部105が第1タスクによる共有データ群205へのアクセスを保留し、タスク状態管理部107により第1タスクのタスク状態を待機状態へと遷移させる(S502)。システム状態がアクセス監視状態である場合に、第1タスクのタスク状態を待機状態303へと遷移させず、無限ループを実行させ、時間エラー判定にて待機状態303へ遷移させてもよい。保留された共有データ104へのアクセスは第1タスクの続きのスロット(T2eからT2f)にて開始される。第1タスクが共有データ群205へアクセスを試みる際に、システム状態がアクセス非監視状態である場合には第1タスクによる共有データ群205へのアクセスを実施する。
When the first task attempts to access the shared
<割り当てスロットに基づいたアクセス監視時間配置>
アクセス監視時間の配置は安全要求レベルの高いタスクの起動タイミングに左右されず、安全要求レベルの低いタスクのスロット時間によって決定される。図9を用いて説明する。第1タスクと安全要求レベルが同様な第3タスクが存在する場合、第1タスクはT3aからT3d及びT3jからT3lにて動作する。第3タスクはT3fからT3hにて動作する。アクセス監視時間は第1タスク及び第3タスクにそれぞれ割り当てられたスロット最終部(T3bからT3d,T3fからT3h及びT3jからT3l)に配置される。安全要求レベルの低いタスクのスロット時間に基づいてアクセス監視時間を配置することにより、共有データへのアクセスを行うタスク情報が無い場合においても、排他中のタスク切り替えによる影響を防ぐことが可能となる。
<Access monitoring time allocation based on allocated slots>
The allocation of access monitoring time does not depend on the start timing of tasks with high safety requirements, but is determined by the slot time of tasks with low safety requirements. This will be described with reference to FIG. If there is a third task with the same safety requirement level as the first task, the first task operates from T3a to T3d and from T3j to T3l. The third task operates from T3f to T3h. The access monitoring time is arranged in the final slot (T3b to T3d, T3f to T3h, and T3j to T3l) assigned to the first task and the third task, respectively. By arranging the access monitoring time based on the slot time of a task with a low safety requirement level, it is possible to prevent the influence of task switching during exclusion even when there is no task information for accessing shared data. ..
<データアクセス時動作>
タスクがデータアクセスを試みた際の動作フローについて図10を用いて説明する。タスクからデータアクセス要求をデータアクセス制御部105が受け取ると、システム状態管理部106にてシステム状態を確認(S201)し、システム状態がアクセス非監視状態(S201のno)の場合には共有データ群205へのアクセス状況を示すアクセスフラグをアクセス中へ遷移させ(S202)、共有データ群205へのアクセスを実行する(S203)。共有データ群205へのアクセス完了の後、アクセスフラグを非アクセス中へと遷移させる(S204)。システム状態がアクセス監視状態(S201のyes)の場合には、スケジュールテーブル507にて現在のスロットの時間エラー判定フラグの内容を判定する(S205)。前記時間エラー判定フラグが“しない”の場合(S205のno)、タスク状態管理部107にてタスクの状態を待機状態303へ遷移させ(S206)、続きのスロットにてタスク状態が実行状態301へ遷移した後にデータアクセスを行う(S202,S203,S204)。前記時間エラー判定フラグが“する”の場合(S205のyes)、現在のスロットのマージン内エラーフラグをONに遷移させ(S207)、現在実行状態301のタスクを強制終了させて休止状態304にする(S208)。強制終了には時間を要するため、S208にてタスクを一時的に待機状態303へ遷移させ、空いているスロットで休止状態304へ遷移させても良い。
<Operation during data access>
The operation flow when the task attempts to access data will be described with reference to FIG. When the data
<動作ログ>
動作ログの作成方法について図11及び図16を用いて説明する。各スロットにおけるタスクの開始時刻、終了時刻、タスクID及びスロット終了時の状態を取得(S701、S702)・記録する(S703)。特に終了時の状態を記録しておくことにより、タスクが正常に動作しているか、長い動作時間を有する跨りタスクか、異常が発生したことによる強制終了か、アクセス監視時間内でのデータアクセスによる終了か、アクセス監視時間内でのデータアクセスによる跨り中断かを動作ログから確認可能となる。
<Operation log>
The method of creating the operation log will be described with reference to FIGS. 11 and 16. The start time, end time, task ID, and state at the end of the slot in each slot are acquired (S701, S702) and recorded (S703). In particular, by recording the state at the end, it depends on whether the task is operating normally, a straddling task with a long operation time, forced termination due to an abnormality, or data access within the access monitoring time. It is possible to confirm from the operation log whether it is the end or the interruption due to data access within the access monitoring time.
以上説明した実施例によれば、時間駆動によるスケジューリングにおいて、排他制御に用いる共有データ群のアクセス情報の有無にかかわらず、安全要求レベルの低いタスクの排他取得による他タスクの動作への影響を防ぐことが可能となる。また、これら処理について動作ログを記録することにより、他タスクへ影響を起こすタイミングでのデータアクセスを試みたタスクの発見が可能となる。 According to the above-described embodiment, in time-driven scheduling, regardless of the presence or absence of access information of the shared data group used for exclusive control, the exclusive acquisition of a task with a low safety requirement level prevents the influence on the operation of other tasks. It becomes possible. In addition, by recording the operation log for these processes, it is possible to discover the task that tried to access the data at the timing that affects other tasks.
本発明にかかる第2の実施例について説明する。本実施例では、アクセス監視時間を超えてデータアクセスを行うタスクが存在する場合の例を示す。本実施例においては、第1タスク101もしくは第2タスク102が共有データ群205へデータアクセス中であることを示すアクセスフラグを用いたシステム制御を行う。タスクのデータアクセス開始時にデータアクセス制御部105にてアクセスフラグを“アクセス中”に遷移させ、データアクセス完了時にアクセスフラグを“非アクセス中”に遷移させる。アクセス監視時間の終了時にアクセスフラグが“アクセス中”の場合、車両制御装置2001を再起動することにより、全排他をリセットさせる。これによりアクセス監視時間を超えてデータアクセスを行った場合の排他による他タスクへの影響を最小限に抑え、早期の回復が可能となる。またアクセス監視時間開始時にタスク状態が実行状態かつアクセスフラグが“非アクセス中”である場合、異常発生中と判断しタスク状態管理部107によりタスクを待機状態へ遷移させてもよい。また、再起動する対象は車両制御装置2001に限らず、実装されるその他のシステム全体で再起動させてもよい。
A second embodiment according to the present invention will be described. In this embodiment, an example is shown when there is a task that accesses data beyond the access monitoring time. In this embodiment, system control is performed using an access flag indicating that the
以上説明した実施例によれば、データアクセス中かの状況を管理することにより、アクセス監視時間を超えてのデータアクセスによる他タスクの動作への影響を防止することが可能となる。 According to the embodiment described above, by managing the status of data access, it is possible to prevent the influence of data access exceeding the access monitoring time on the operation of other tasks.
本発明にかかる第3の実施例について説明する。本実施例では、安全要求レベルの高い第2タスクにより他タスクへ影響を与えることが許されない場合の例について説明する。本実施例においては、安全要求レベルの低い第1タスク101に割り当てられたスロットの最終部にデータアクセス監視用のアクセス監視時間を設けるだけでなく、安全要求レベルの高い第2タスク102に割り当てられたスロットの次のスロットが同様の安全要求レベルであった場合にも、第2タスク102に割り当てられたスロット最終部にデータアクセス監視用のアクセス監視時間を設ける。これにより、安全要求レベルの高い第2タスク102が誤動作を起こした場合に他の安全要求レベルの高い第2タスク102への影響を防ぐことが可能となる。
A third embodiment according to the present invention will be described. In this embodiment, an example in which the second task having a high safety requirement level is not allowed to affect other tasks will be described. In this embodiment, not only the access monitoring time for data access monitoring is provided at the final portion of the slot assigned to the
以上説明した実施例によれば、アクセス監視時間の配置対象を変更することにより、安全要求レベルの高いタスクによる他タスクへの影響を防止することが可能となる。 According to the embodiment described above, by changing the allocation target of the access monitoring time, it is possible to prevent the influence of the task having a high safety requirement level on other tasks.
本発明にかかる第4の実施例について説明する。本実施例では、開発ツールから本特許のスケジューリングテーブル501を生成する際の実施例を説明する。本実施例においては、各タスクの周期、最悪実行時間、安全要求レベル等の設計情報からスケジューリングテーブル501を自動生成する。自動生成時には安全要求レベルの情報をもとに、各スロットの最終部にデータアクセス監視用のアクセス監視時間を設けるかを決定する。アクセス監視時間を設ける場合には、アクセス監視時間を含めたスロット時間の配置が行われる。これにより、アクセス監視時間の必要有無を考えずにアプリケーション設計が可能となる。 A fourth embodiment according to the present invention will be described. In this embodiment, an embodiment when generating the scheduling table 501 of the present patent from the development tool will be described. In this embodiment, the scheduling table 501 is automatically generated from the design information such as the cycle of each task, the worst execution time, and the safety requirement level. At the time of automatic generation, it is decided whether to provide an access monitoring time for data access monitoring at the final part of each slot based on the information of the safety requirement level. When the access monitoring time is provided, the slot time including the access monitoring time is arranged. This makes it possible to design an application without considering the necessity of access monitoring time.
本発明の第5の実施例について図17、図18および図19を用いて説明する。第1コアから第Nコアまでの複数のコア1701、1702、1703が共有データ群へデータアクセスを行う制御装置において、各コアは安全要求レベルの低い第1タスク101と安全要求レベルの高い第2タスク102を有する。時間駆動スケジューリングで制御されている各コアにおいて、各スロットの最終部(T4bからT4dおよびT4eからT4h)にアクセス監視時間を有する。第1タスク101用スロットにおいて、アクセス監視時間は「アクセス時間(T4bからT4c) < アクセス監視時間(T4bからT4d)」となるように配置する。
A fifth embodiment of the present invention will be described with reference to FIGS. 17, 18 and 19. In a control device in which a plurality of
第2タスク102用スロットにおいて、アクセス監視時間は「アクセス時間×2(T4eからT4g) < アクセス監視時間(T4eからT4h)」となるように配置する。本実施例においては、各コアの状態を管理するシステム状態テーブル1901を使用する。システム状態テーブルは各コアがアクセス監視状態かアクセス非監視状態かの情報及び、"全コア用アクセス監視カウンタ"を保持する。全コア用アクセス監視カウンタは0からコア数の間を増減する。第1タスク101用スロットにおけるアクセス監視時間の開始時(T4b)にて、システム状態管理部105により該コアのシステム状態をアクセス監視状態へと遷移させる。
In the slot for the
第1タスク101用スロットにおけるアクセス監視時間の終了時(T4c)にて、システム状態管理部105により該コアのシステム状態をアクセス非監視状態へと遷移させる。アクセス監視状態のコアでは、第1タスク101における共有データ群205への新規データアクセスを禁止する。第2タスク102用スロットにおけるアクセス監視時間の開始時(T4e)にて、システム状態管理部105により該コアのシステム状態をアクセス監視状態へと遷移させ、システム状態管理部105により全コア用アクセス監視カウンタを1インクリメントさせる。第2タスク102用スロットにおけるアクセス監視時間の終了時(T4h)にて、システム状態管理部105により該コアのシステム状態をアクセス非監視状態へと遷移させ、全コア用アクセス監視カウンタを1デクリメントさせる。全コア用アクセス監視カウンタが1以上の場合、すべてのコアにおける第1タスクによる共有データ群205への新規データアクセスを禁止する。複数のコア1701、1702、1703により共有データ群205へのデータアクセス要求がある場合、システム状態がアクセス監視状態のコアの第2タスク102によるデータアクセスを優先する。これにより、アクセス監視時間より前に他コアの第1タスク101がアクセスした際にも、第1タスク101によるデータアクセス完了後に第2タスク102によるデータアクセスを実行する時間を確保可能となる。これにより、メニーコア環境における第1タスク101のデータアクセスによる第2コア102への影響を防ぐことが可能となる。また、第2タスク102用スロットにおけるアクセス監視時間は「アクセス時間×コア数 < アクセス監視時間」となるように配置してもよい。これにより、他コアの第2タスク102のデータアクセスによる影響を防ぐことが可能となる。
At the end of the access monitoring time (T4c) in the slot for the
以上説明した実施例によれば、複数のコアが存在する場合において、各コアにアクセス監視時間を設けることで、安全要求レベルの低いタスクによる安全要求レベルの高いタスクへの影響を防止することが可能となる。 According to the embodiment described above, when there are a plurality of cores, it is possible to prevent the influence of the task with the low safety requirement level on the task with the high safety requirement level by providing the access monitoring time for each core. It will be possible.
101 第1タスク
102 第2タスク
105 データアクセス制御部
106 システム状態管理部
107 タスク状態管理部
108 スケジューリング部
201 センサーフュージョン
202 マップフュージョン
203 ADAS
204 オートパーキング
205 共有データ群
206 タスク実行制御部
207 組み込みOS
208 CPU
209 メモリ
210 タイマ
211 ネットワークアダプタ
212 周辺装置
213 動作ログ管理部
214 アプリケーション
215 ハードウェア
301 実行状態
302 実行可能状態
303 待機状態
304 休止状態
501 スケジューリングテーブル
1101 動作ログ
1701 第一コア
1702 第二コア
1703 第三コア
2001 車両システム
2002 車両制御装置
2003 無線通信部
2004 駆動装置
2005 認識装置
2006 出力装置
2007 入力装置
101
204
208 CPU
209
Claims (9)
前記実行スロットは、前記定められた開始時刻より後に開始するアクセス監視時間を含み、
前記アクセス監視時間の開始時にシステム状態をアクセス監視状態に遷移させ、前記アクセス監視時間の終了時には遷移前の状態に遷移させるシステム状態管理部と、
前記アクセス監視状態の際には前記タスクによる前記共有データ群への新たなデータアクセスを禁止するデータアクセス制御部と、
を有することを特徴とする車両制御装置。 Tasks that can be continuously executed in execution slots that are separated into multiple parts and have a specified start time and end time are started based on the specified execution order, processed and executed in the assigned execution slots, and under exclusive control. In the vehicle control device that performs control via the shared data group in
The execution slot includes an access monitoring time beginning after the defined start time,
A system state management unit that transitions the system state to the access monitoring state at the start of the access monitoring time and transitions to the state before the transition at the end of the access monitoring time.
In the access monitoring state, a data access control unit that prohibits new data access to the shared data group by the task, and a data access control unit.
A vehicle control device characterized by having.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017136710A JP6861591B2 (en) | 2017-07-13 | 2017-07-13 | Vehicle control unit |
| PCT/JP2018/024506 WO2019012997A1 (en) | 2017-07-13 | 2018-06-28 | Vehicle control device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017136710A JP6861591B2 (en) | 2017-07-13 | 2017-07-13 | Vehicle control unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019020870A JP2019020870A (en) | 2019-02-07 |
| JP6861591B2 true JP6861591B2 (en) | 2021-04-21 |
Family
ID=65001242
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017136710A Active JP6861591B2 (en) | 2017-07-13 | 2017-07-13 | Vehicle control unit |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP6861591B2 (en) |
| WO (1) | WO2019012997A1 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7113091B2 (en) | 2019-02-07 | 2022-08-04 | 東芝キヤリア株式会社 | Rotary compressor, method for manufacturing rotary compressor, and refrigeration cycle device |
| FR3129005B1 (en) * | 2021-11-10 | 2024-03-22 | Vitesco Technologies | Method and device for monitoring and controlling a vehicle engine |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS56127260A (en) * | 1980-03-10 | 1981-10-05 | Hitachi Ltd | Volume sharing system |
| JP2579081B2 (en) * | 1991-08-15 | 1997-02-05 | 株式会社ピーエフユー | Competitive arbitration with prohibition time |
| JP2014241124A (en) * | 2013-01-25 | 2014-12-25 | 株式会社リコー | Exclusive control system |
-
2017
- 2017-07-13 JP JP2017136710A patent/JP6861591B2/en active Active
-
2018
- 2018-06-28 WO PCT/JP2018/024506 patent/WO2019012997A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019020870A (en) | 2019-02-07 |
| WO2019012997A1 (en) | 2019-01-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4062441B2 (en) | Parallel processing system and parallel processing program | |
| CN109684060B (en) | Mixed scheduling method for multiple types of time-critical tasks | |
| JP6838222B2 (en) | Vehicle control device and vehicle system | |
| CN103608792A (en) | Method and system for supporting resource isolation under multi-core architecture | |
| WO2018219480A1 (en) | Managing task dependency | |
| JP2004302837A (en) | Parallel processing system and program by os for single processor | |
| JP6861591B2 (en) | Vehicle control unit | |
| WO2019239522A1 (en) | Control controller and vehicle control system | |
| KR102544755B1 (en) | Distributed storage method and device, electronic apparatus, computer-readable medium and computer program product | |
| KR20160071260A (en) | Method for managing state of ECU in vehicle based on automotive open system architecture | |
| JP2006127463A (en) | Information processing apparatus, memory area management method, and computer program | |
| CN101976206B (en) | A kind of interruption processing method and device | |
| JP6796040B2 (en) | Access control device | |
| CN102754080A (en) | Multi-core processor system, interrupt program, and interrupt method | |
| JP2006031203A (en) | In-vehicle information terminal | |
| JP6803709B2 (en) | Vehicle control device and vehicle control system | |
| CN100576175C (en) | Method and system for parallel execution of multiple cores | |
| KR102184136B1 (en) | Method and apparatus for determining the period of resource supply model in a hierarchical scheduling system | |
| CN119440803B (en) | Control authority acquisition method and device, computer equipment and storage medium | |
| CN115080247B (en) | High-availability thread pool switching method and device | |
| KR102540724B1 (en) | Method for managing execution of task in the multi-core system, and apparatus implementing the same method | |
| JP2010026575A (en) | Scheduling method, scheduling device, and multiprocessor system | |
| JP2010020683A (en) | Thread control method, thread control device and real-time system | |
| JP2010191522A (en) | Program inspection method | |
| CN121893976A (en) | Task scheduling method, system and storage medium for driving assistance system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170714 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200124 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200127 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200623 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200731 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20201228 |
|
| RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20210118 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20210122 |
|
| A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20210222 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210304 |
|
| 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: 20210323 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210330 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6861591 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |