[go: up one dir, main page]

JP2000293382A - Task start controller using real-time operating system - Google Patents

Task start controller using real-time operating system

Info

Publication number
JP2000293382A
JP2000293382A JP11103879A JP10387999A JP2000293382A JP 2000293382 A JP2000293382 A JP 2000293382A JP 11103879 A JP11103879 A JP 11103879A JP 10387999 A JP10387999 A JP 10387999A JP 2000293382 A JP2000293382 A JP 2000293382A
Authority
JP
Japan
Prior art keywords
task
event
standby state
executed
occurrence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11103879A
Other languages
Japanese (ja)
Inventor
Tomokazu Sawada
朋一 沢田
Kenji Sunami
堅二 角南
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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP11103879A priority Critical patent/JP2000293382A/en
Publication of JP2000293382A publication Critical patent/JP2000293382A/en
Pending legal-status Critical Current

Links

Abstract

(57)【要約】 【課題】無駄な処理を無くし、タスク起動の最適化を図
ることができるリアルタイムオペレーティングシステム
を用いたタスク起動制御装置を提供する。 【解決手段】ECU1のCPU10は各イベントの発生
を検出して、所望の演算プログラムを実行する。演算プ
ログラムには、第1のイベントの発生で実行される第1
タスク群と、第2のイベントの発生で実行される第2タ
スク群とを備え、さらに、両タスク群には少なくとも1
つの同一タスクが含まれている。イベントの発生により
第1、第2タスク群を起動すべくタスクを待機状態にす
る前に、ステップ104でタスク状態を判断し、既に同
一タスクが待機状態にある時にはステップ105の処理
を迂回することにより待機状態への移行を禁止する。よ
って、同じタスクがつながっていたらそのタスクはリス
トにつなげない。
(57) [Problem] To provide a task activation control device using a real-time operating system capable of optimizing task activation by eliminating unnecessary processing. A CPU of an ECU detects the occurrence of each event and executes a desired arithmetic program. The arithmetic program includes a first event executed when the first event occurs.
A task group and a second task group that is executed when a second event occurs.
Contains two identical tasks. Before putting the tasks into the standby state to activate the first and second task groups due to the occurrence of the event, the task state is determined in the step 104, and when the same task is already in the standby state, the process in the step 105 is bypassed. To prohibit the transition to the standby state. Therefore, if the same task is connected, the task cannot be connected to the list.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、リアルタイムオ
ペレーティングシステムを用いたタスク起動制御装置に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a task activation control device using a real-time operating system.

【0002】[0002]

【従来の技術】従来、タスク起動をするものとして、特
開平10−105416号公報に示すものがある。それ
は、イベントの発生(パラメータの取り込み時)から要
求時間内にデータを処理するリアルタイムオペレーティ
ングシステムを用いてタスクを起動する起動制御装置に
おいて、イベントによって起動するタスクを共通のヘッ
ダファイルにする。そうすることで、タスクの接続形態
の変更に対してタスクヘッダファイルの変更のみで済
み、変更が容易に実施できる。
2. Description of the Related Art Conventionally, there is an apparatus disclosed in Japanese Patent Application Laid-Open No. 10-105416 for activating a task. That is, in an activation control device that activates a task using a real-time operating system that processes data within a requested time from the occurrence of an event (at the time of capturing parameters), a task activated by an event is made a common header file. By doing so, only the task header file needs to be changed for the change of the task connection mode, and the change can be easily implemented.

【0003】[0003]

【発明が解決しようとする課題】上記技術では、イベン
トが発生することによってタスクを起動するが(リスト
につなげるが)、同じタスクを起動するイベントが同時
に複数発生した場合には、そのタスクを同じタイミング
で何度も起動してしまう。
In the above-mentioned technology, a task is activated by the occurrence of an event (although the task is linked), but when a plurality of events that activate the same task occur simultaneously, the task is set to the same task. It starts many times at the timing.

【0004】具体的には、自動車用ECU(エンジン制
御用ECU)において、吸気圧pm、吸気温tha、水
温thwのいずれかが変化したら実行されるタスクの場
合、図7に示すように吸気圧pmが変化した直後に吸気
温thaが変化したら、同じ処理(タスク1)が2回コ
ールされ、最終的に同じタスクが2度実行されてしま
う。
[0004] More specifically, in the case of a task to be executed when any one of the intake pressure pm, the intake temperature th a, and the water temperature thw changes in an automobile ECU (engine control ECU), as shown in FIG. If the intake air temperature “tha” changes immediately after the change of “pm”, the same process (task 1) is called twice, and finally the same task is executed twice.

【0005】これにより、処理負荷が増大する原因とな
りうる。この発明は、以上のような事情に鑑みなされた
ものであり、その目的は、無駄な処理を無くし、タスク
起動の最適化を図ることができるリアルタイムオペレー
ティングシステムを用いたタスク起動制御装置を提供す
ることにある。
[0005] This may cause an increase in processing load. The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a task activation control device using a real-time operating system capable of eliminating unnecessary processing and optimizing task activation. It is in.

【0006】[0006]

【課題を解決するための手段】請求項1に記載の発明に
よれば、イベントの発生により第1、第2タスク群を起
動すべくタスクを待機状態にする前に、タスク状態が判
断され、既に同一タスクが待機状態にある時には待機状
態への移行が禁止される。
According to the first aspect of the present invention, a task state is determined before a task is put into a standby state to activate the first and second task groups upon occurrence of an event, When the same task is already in the standby state, the transition to the standby state is prohibited.

【0007】このように、同じタスクがつながっていた
らそのタスクはリストにつなげないことで、無駄な処理
を無くし、タスク起動の最適化を図ることができる。
As described above, if the same task is connected, the task is not connected to the list, so that useless processing can be eliminated and task activation can be optimized.

【0008】[0008]

【発明の実施の形態】以下、この発明を具体化した実施
の形態を図面に従って説明する。本実施形態において
は、エンジン制御用ECU(ECU;Electric Contr
olUnit )に適用している。
Embodiments of the present invention will be described below with reference to the drawings. In the present embodiment, an engine control ECU (ECU; Electric Contr)
olUnit).

【0009】図1には、ECU1の全体構成を示す。E
CU1は自動車のエンジンを制御するためのものであ
る。ECU1は多重伝送路2に接続され、多重伝送路2
を介して他の電子機器と接続されLANを構築したり、
修理用ツール(図示略)と接続できるようになってい
る。
FIG. 1 shows the overall configuration of the ECU 1. E
CU1 is for controlling the engine of the automobile. The ECU 1 is connected to the multiplex transmission line 2 and the multiplex transmission line 2
Connected to other electronic devices via LAN to build LAN,
It can be connected to a repair tool (not shown).

【0010】ECU1はMPU(マイクロコンピュー
タ)3と外部RAM(ランダムアクセスメモリ)4と入
出力(I/O)ユニット5と通信ユニット6とインター
フェース回路7にて構成されている。MPU3は、RO
M(リードオンリメモリ)8と内部RAM9とCPU
(中央処理装置)10を備えている。
The ECU 1 comprises an MPU (microcomputer) 3, an external RAM (random access memory) 4, an input / output (I / O) unit 5, a communication unit 6, and an interface circuit 7. MPU3 is RO
M (read only memory) 8, internal RAM 9, and CPU
(Central processing unit) 10.

【0011】ECU1には吸気管圧力センサ11とエン
ジン回転数センサ12と水温センサ13と吸気温センサ
14が接続されている。吸気管圧力センサ11からエン
ジンの吸気管圧力pmに応じた信号が出力され、エンジ
ン回転数センサ12からエンジン回転数Neに応じた信
号が出力される。また、水温センサ13からエンジン冷
却水温thwに応じた信号が出力され、吸気温センサ1
4から吸気温度thaに応じた信号が出力される。各セ
ンサ11〜14の信号は入出力(I/O)ユニット5を
介してMPU3に取り込まれる。
The ECU 1 is connected to an intake pipe pressure sensor 11, an engine speed sensor 12, a water temperature sensor 13, and an intake temperature sensor 14. The intake pipe pressure sensor 11 outputs a signal corresponding to the intake pipe pressure pm of the engine, and the engine speed sensor 12 outputs a signal corresponding to the engine speed Ne. Further, a signal corresponding to the engine cooling water temperature thw is output from the water temperature sensor 13 and the intake air temperature sensor 1
4 outputs a signal corresponding to the intake air temperature th. The signals from the sensors 11 to 14 are taken into the MPU 3 via the input / output (I / O) unit 5.

【0012】また、ECU1には燃料噴射弁15が接続
され、MPU3は入出力(I/O)ユニット5を介して
燃料噴射弁15を駆動制御する。通信ユニット6とイン
ターフェース回路7を用いて、MPU3からデータを多
重伝送路2に送出したり、多重伝送路2からデータを受
信する。
A fuel injection valve 15 is connected to the ECU 1, and the MPU 3 controls the driving of the fuel injection valve 15 via an input / output (I / O) unit 5. The communication unit 6 and the interface circuit 7 are used to send data from the MPU 3 to the multiplex transmission line 2 and to receive data from the multiplex transmission line 2.

【0013】CPU10はセンサ11〜14からの信号
および通信によるデータに基づいてエンジンの運転状態
に応じた最適燃料噴射量(噴射時間)を演算して燃料噴
射弁15を駆動制御する。また、CPU10は自己診断
を行い、各種センサやアクチュエータの異常発生の有無
を判断する。
The CPU 10 calculates the optimum fuel injection amount (injection time) according to the operating state of the engine based on the signals from the sensors 11 to 14 and the data through communication, and controls the driving of the fuel injection valve 15. In addition, the CPU 10 performs a self-diagnosis and determines whether or not various sensors and actuators are abnormal.

【0014】MPU3はイグニッションスイッチ16を
介してバッテリ17に接続されている。外部RAM4は
直接、バッテリ17に接続されており、スイッチオフ後
も記憶内容が保持される。この外部RAM4には前述の
自己診断結果が記憶される。
The MPU 3 is connected to a battery 17 via an ignition switch 16. The external RAM 4 is directly connected to the battery 17 and retains the stored contents even after the switch is turned off. This self-diagnosis result is stored in the external RAM 4.

【0015】MPU3にはリアルタイムオペレーティン
グシステムが搭載されており、各イベントの発生を検出
して所望の演算プログラムを実行する。つまり、MPU
3により、第1のイベントの発生(第1の環境変化)を
検出する第1の検出手段と、第1のイベントの発生(第
1の環境変化)とは異なる第2のイベントの発生(第2
の環境変化)を検出する第2の検出手段と、第1、第2
の検出手段からの情報に基づき所望の演算プログラムを
実行する演算装置とが構成されている。また、この演算
プログラムには、第1のイベントの発生(第1の環境変
化)で実行される第1タスク群と、第2のイベントの発
生(第2の環境変化)で実行される第2タスク群とを備
え、さらに、両タスク群には少なくとも1つの同一タス
クが含まれている。
The MPU 3 is equipped with a real-time operating system, and detects the occurrence of each event and executes a desired arithmetic program. In other words, MPU
3, the first detecting means for detecting the occurrence of the first event (the first environmental change) and the occurrence of the second event (the second event) different from the occurrence of the first event (the first environmental change) 2
Detecting means for detecting an environmental change), first and second
And an arithmetic unit for executing a desired arithmetic program based on the information from the detecting means. The arithmetic program includes a first task group executed when a first event occurs (first environment change) and a second task group executed when a second event occurs (second environment change). Task groups, and both task groups include at least one identical task.

【0016】このリアルタイムオペレーティングシステ
ムについて図2を用いて詳しく説明する。図2は、リア
ルタイムオペレーティングシステムにて、あるパラメー
タ(吸気管圧力pm、吸気温tha、水温thwの変
化)によって起動されるタスクを示すものである。吸気
管圧力pmが変化した際のタスク群が、タスク5とタス
ク6とタスク1により構成され、吸気温thaが変化し
た際のタスク群が、タスク1とタスク2とタスク3によ
り構成され、水温thwが変化した際のタスク群が、タ
スク1とタスク4により構成されている。このイベント
毎の各タスク群はリアルタイムオペレーティングシステ
ムのイベントハンドラによって選択される(スイッチが
切り換えられる)。
The real-time operating system will be described in detail with reference to FIG. FIG. 2 shows a task activated by a certain parameter (changes in the intake pipe pressure pm, the intake air temperature th a, and the water temperature thw) in the real-time operating system. A task group when the intake pipe pressure pm changes is composed of task 5, task 6, and task 1, and a task group when the intake temperature th is changed is composed of task 1, task 2, and task 3, and the water temperature A task group when thw changes is composed of task 1 and task 4. Each task group for each event is selected (switched) by an event handler of the real-time operating system.

【0017】つまり、イベントの発生(吸気管圧力p
m、吸気温tha、水温thwの変化)に伴い、そのイ
ベントの種類に対応するようにスケジューリングが行わ
れる。具体的には、吸気管圧力pmが変化した場合には
タスク5とタスク6とタスク1が連結され、また、吸気
温thaが変化した場合にはタスク1とタスク2とタス
ク3が連結され、さらに、水温thwが変化した場合に
はタスク1とタスク4が連結される。
That is, the occurrence of an event (intake pipe pressure p
m, the intake air temperature tha, and the water temperature thw), the scheduling is performed so as to correspond to the type of the event. Specifically, when the intake pipe pressure pm changes, the task 5, the task 6, and the task 1 are connected, and when the intake temperature th a changes, the task 1, the task 2, and the task 3 are connected, Further, when the water temperature thw changes, task 1 and task 4 are linked.

【0018】このように、タスク1〜タスク6は、吸気
管圧力pm、吸気温tha、水温thwのいずれかが変
化した時にのみ実行されるタスクであり、かつ、各タス
ク群には少なくとも1つの同一タスク(図2の場合は、
タスク1)が含まれている。
As described above, the tasks 1 to 6 are executed only when any one of the intake pipe pressure pm, the intake air temperature tha, and the water temperature thw changes, and each task group includes at least one task. The same task (in the case of FIG. 2,
Task 1) is included.

【0019】そして、このタスク群がイベントの発生に
伴って起動され、待機状態のタスク(タスク群を構成す
る各タスク)が順に実行される。例えば、吸気管圧力p
mが変化したら、タスク5,6,1が順に実行される。
Then, this task group is started with the occurrence of the event, and the tasks in the standby state (the tasks constituting the task group) are executed in order. For example, the intake pipe pressure p
When m changes, tasks 5, 6, and 1 are executed in order.

【0020】次に、このように構成したECU1、つま
り、リアルタイムオペレーティングシステムを用いたタ
スク起動制御装置の作用を説明する。この作用説明で
は、入力パラメータとして、吸気管圧力pmと吸気温t
haと水温thwを使用し、それらをCPU10に取り
込んで処理する場合について説明する。
Next, the operation of the ECU 1 configured as described above, that is, the operation of the task activation control device using the real-time operating system will be described. In the description of this operation, the intake pipe pressure pm and the intake air temperature t
A case will be described in which ha and the water temperature thw are used, and they are taken into the CPU 10 for processing.

【0021】図3には、スケジューリングのフローチャ
ートを示す。この処理は4ms毎に起動する。図4に
は、起動されるタスクデータとスケジューリングの例を
示す。図4において、吸気管圧力pmが変化した直後に
吸気温thaが変化し、さらにその直後に水温thwが
変化した場合を示す。つまり、タスクが実行される前に
pm、tha、thwが連続して変化したときの例であ
る。
FIG. 3 shows a flowchart of the scheduling. This process starts every 4 ms. FIG. 4 shows an example of task data to be activated and scheduling. FIG. 4 shows a case where the intake air temperature tha changes immediately after the intake pipe pressure pm changes, and the water temperature thw changes immediately thereafter. That is, this is an example in which pm, tha, and thw continuously change before the task is executed.

【0022】図3において、CPU10はステップ10
0でパラメータの取り込みを行う。つまり、吸気管圧力
pmと吸気温thaと水温thwを4ms毎に取り込
む。そして、CPU10はステップ101で吸気管圧力
pmと吸気温thaと水温thwに関し、前回の取り込
み値に対し変化があったか否か判定する。変化がなけれ
ば、CPU10は図3のフローチャートの処理を終了す
る。
In FIG. 3, the CPU 10 determines in step 10
At 0, the parameters are fetched. That is, the intake pipe pressure pm, the intake air temperature tha, and the water temperature thw are taken in every 4 ms. Then, in step 101, the CPU 10 determines whether or not the intake pipe pressure pm, the intake air temperature tha, and the water temperature thw have changed from the previous intake value. If there is no change, the CPU 10 ends the processing of the flowchart in FIG.

【0023】一方、CPU10はステップ101で前回
の取り込み値に対し変化があると、環境が変化してイベ
ントが発生したとして、リアルタイムオペレーティング
システムのイベントハンドラによる割り込みを行い、以
後の処理を実行する(OSのスケジューリングにタスク
を追加する)。
On the other hand, if there is a change from the previous captured value in step 101, the CPU 10 determines that an event has occurred due to a change in the environment, interrupts the event handler of the real-time operating system, and executes the subsequent processing ( Add tasks to OS scheduling).

【0024】まず、ステップ102に移行して、CPU
10は起動するタスクリストの先頭にいく(タスクリス
トの先頭をポインタで指す)。そして、CPU10はス
テップ103で先頭タスクから順に1個ずつタスクの状
態を読み出し、ステップ104でタスク状態が待機状態
か否か(登録済みか否か)を判断する。例えば、吸気管
圧力pmが変化したと判断されると、図2のごとく、タ
スク5、タスク6、タスク1が実行されるべきプログラ
ムであるので、その先頭タスクであるタスク5の状態が
まず判断される。
First, the routine proceeds to step 102, where the CPU
Reference numeral 10 indicates the head of the task list to be started (pointing to the head of the task list by a pointer). Then, the CPU 10 reads out the states of the tasks one by one in order from the leading task in step 103, and determines in step 104 whether the task state is the standby state (whether or not the task has been registered). For example, when it is determined that the intake pipe pressure pm has changed, as shown in FIG. 2, since the tasks 5, 6, and 1 are programs to be executed, the state of task 5, which is the first task, is determined first. Is done.

【0025】タスクの状態は、以下のようにして判断さ
れる。各タスクは図5に示すようなプログラム文でコー
ディングされ、タスクが構成されている。そして、各タ
スクの先頭アドレスにはタスク関数名(Tsk)やタス
クの優先度(pri)と共に、タスクの状態を示すフラ
グ情報(flag)が配設されている。正確には、図5
のプログラム文には該当アドレスのみ記述され、図6に
示すようにフラグ状態はアドレスの示す任意のRAMエ
リアに格納されている。図6の例では$00が実行中
を、$01が待機中を、$11が休止中を示している。
CPU10はこのフラグ情報をみて、図6の例では$0
1となっていないか否か判断する。
The state of a task is determined as follows. Each task is coded by a program statement as shown in FIG. 5, and the task is configured. At the head address of each task, flag information (flag) indicating the status of the task is arranged along with the task function name (Tsk) and the task priority (pri). To be precise, FIG.
Only the corresponding address is described in the program sentence of (1), and the flag state is stored in an arbitrary RAM area indicated by the address as shown in FIG. In the example of FIG. 6, $ 00 indicates that the job is being executed, $ 01 indicates that the job is waiting, and $ 11 indicates that the job is paused.
The CPU 10 looks at this flag information, and in the example of FIG.
It is determined whether it is not 1.

【0026】そして、図3のステップ104において図
6のデータを読み出した結果、このデータが待機中を示
す$01でなければ、ステップ105で当該タスクを待
機中を示す$01にする($11から$01に変更す
る)。
Then, as a result of reading the data of FIG. 6 in step 104 of FIG. 3, if this data is not $ 01 indicating that the task is waiting, then in step 105, the task is set to $ 01 indicating that the task is waiting (# 11 To $ 01).

【0027】ここで、図4において、吸気管圧力pmが
変化した時[1]の処理として、図3のステップ104
において先頭のタスク5(図2参照)が待機中でないの
で、ステップ105で待機中にする(登録する)。
Here, in FIG. 4, when the intake pipe pressure pm changes, the process of [1] is performed in step 104 of FIG.
Since the first task 5 (see FIG. 2) is not in standby, it is set in standby (registered) in step 105.

【0028】一方、図3のステップ104で当該タスク
が待機状態であれば、ステップ105の処理は行わな
い。そして、ステップ105あるいは104の処理を行
った後に、CPU10はステップ106に移行して読み
出すタスクがないか判定し、読み出すタスクが有る場合
にはステップ103に戻る。よって、読み出すタスクが
有る場合にはステップ103〜105の処理が繰り返さ
れる。
On the other hand, if the task is in the standby state in step 104 of FIG. 3, the processing of step 105 is not performed. Then, after performing the processing of step 105 or 104, the CPU 10 proceeds to step 106 to determine whether there is a task to be read, and if there is a task to be read, returns to step 103. Therefore, if there is a task to be read, the processing of steps 103 to 105 is repeated.

【0029】図4の場合には、前述したように吸気管圧
力pmが変化した場合にタスク5を待機中にした後にお
いて、タスク6が読み出され(ステップ103)、待機
中でないので待機中にされ(ステップ105)、さら
に、タスク1が読み出され(ステップ103)、待機中
でないので待機中にされる(ステップ105)。
In the case of FIG. 4, as described above, after the task 5 is put on standby when the intake pipe pressure pm changes, the task 6 is read out (step 103). (Step 105), and the task 1 is read out (step 103). Since the task 1 is not waiting, the task 1 is put on standby (step 105).

【0030】そして、図3のステップ106において、
読み出すタスクがなくなると、図3のフローチャートの
処理を終了する。図4の場合に、次に吸気温thaが変
化した際[2]には、図3のステップ103で先頭のタ
スク1(図2参照)が読み出され、ステップ104で図
6のデータを読み出した結果、このデータが待機中を示
す$01であるので、ステップ105の処理は行わな
い。よって、吸気管圧力pmの変化に伴うタスク群の末
尾のタスク1の後に、吸気温thaの変化に伴うタスク
群の先頭のタスク1をつなげないことになる。
Then, in step 106 of FIG.
When there is no task to be read, the process of the flowchart in FIG. 3 ends. In the case of FIG. 4, when the intake air temperature th changes next [2], the first task 1 (see FIG. 2) is read in step 103 of FIG. 3, and the data of FIG. 6 is read in step 104. As a result, since this data is $ 01 indicating standby, the process of step 105 is not performed. Therefore, the task 1 at the end of the task group associated with the change in the intake pipe pressure pm cannot be connected to the task 1 at the head of the task group associated with the change in the intake air temperature th.

【0031】その後、図2のタスク2が読み出され(ス
テップ103)、待機中でないので待機中にされ(ステ
ップ105)、さらに、タスク3が読み出され(ステッ
プ103)、待機中でないので待機中にされる(ステッ
プ105)。
Thereafter, the task 2 in FIG. 2 is read (step 103), and is set in a standby state because it is not in standby (step 105). Further, the task 3 is read out (step 103) and is in standby state because it is not in standby. (Step 105).

【0032】そして、図3のステップ106において、
読み出すタスクがなくなると、図3のフローチャートの
処理を終了する。図4の場合に、次に水温thwが変化
した際[3]には、図3のステップ103で先頭のタス
ク1(図2参照)が読み出され、ステップ104で図6
のデータを読み出した結果、このデータが待機中を示す
$01であるので、ステップ105の処理は行わない。
よって、吸気温thaの変化に伴うタスク群の末尾のタ
スク3の後に、水温thwの変化に伴うタスク群の先頭
のタスク1をつなげないことになる。
Then, in step 106 of FIG.
When there is no task to be read, the process of the flowchart in FIG. 3 ends. In the case of FIG. 4, when the water temperature thw changes next [3], the first task 1 (see FIG. 2) is read in step 103 of FIG.
As a result of reading this data, the data is $ 01 indicating that it is on standby, so that the processing of step 105 is not performed.
Therefore, the task 1 at the head of the task group associated with the change in the water temperature thw cannot be connected after the task 3 at the end of the task group associated with the change in the intake air temperature th.

【0033】その後、図2のタスク4が読み出され(ス
テップ103)、待機中でないので待機中にされる(ス
テップ105)。そして、図3のステップ106におい
て、読み出すタスクがなくなると、図3のフローチャー
トの処理を終了する。
Thereafter, the task 4 in FIG. 2 is read (step 103), and is in a standby state (step 105) because it is not in a standby state. Then, when there is no task to be read in step 106 of FIG. 3, the processing of the flowchart of FIG. 3 ends.

【0034】以上のように、吸気管圧力pmを前回値と
比較してもし違いがあれば、OSのスケジューリングに
タスクを追加するが、このときに既に登録されているタ
スクがないので全部待機中にし(登録し)、次に、吸気
温thaが変化してOSのスケジューリングに追加する
ときに、タスク1が既に登録されているのでそれだけ省
いて登録する。同様に、水温thwが変化した時もタス
ク1が登録されているのでそれだけ省く。これにより、
同じタスクが実行されないので、処理の負担が減る。
As described above, if there is a difference even if the intake pipe pressure pm is compared with the previous value, a task is added to the scheduling of the OS. Next, when the intake air temperature “tha” changes and is added to the scheduling of the OS, the task 1 has already been registered, so that the task 1 is omitted and registered. Similarly, when the water temperature thw changes, the task 1 is registered, so that the task 1 is omitted. This allows
Since the same task is not executed, the processing load is reduced.

【0035】つまり、既にタスク状態が待機中($0
1)であるなら、図3のステップ104で登録済みと判
断され、ステップ105の処理は実行されない。よっ
て、同じタスク(図4ではタスク1)が2回実行される
ことはない。
That is, the task state is already waiting ($ 0
If it is 1), it is determined that registration has been completed in step 104 of FIG. 3, and the processing of step 105 is not executed. Therefore, the same task (task 1 in FIG. 4) is not executed twice.

【0036】このように本実施の形態は、下記の特徴を
有する。 (イ)少なくとも2つのタスク群における両タスク群に
少なくとも1つの同一タスクが含まれる場合において、
図3に示すごとくステップ105にてイベントの発生に
より第1、第2タスク群を起動すべくタスクを待機状態
にする前に、ステップ104でタスク状態を判断し、既
に同一タスクが待機状態にある時にはステップ105の
処理を迂回することにより待機状態への移行を禁止する
ようにした。
As described above, this embodiment has the following features. (B) When both task groups in at least two task groups include at least one same task,
As shown in FIG. 3, before the task is put into a standby state in order to activate the first and second task groups due to the occurrence of an event in step 105, the task state is determined in step 104, and the same task is already in the standby state. In some cases, the process of step 105 is bypassed to prohibit the transition to the standby state.

【0037】よって、同じタスクがつながっていたらそ
のタスクはリストにつなげないことで、無駄な処理を無
くし、タスク起動の最適化を図ることができる。つま
り、同じタスクがつながっていたらそのタスクはリスト
につなげないことで、前回の結果と同じ結果になる無駄
なタスクを起動しない構造を構築できる(無駄な処理を
省くことができる)。
Therefore, if the same task is connected, the task is not connected to the list, thereby eliminating unnecessary processing and optimizing task activation. In other words, if the same task is connected, the task is not connected to the list, so that a structure that does not start a useless task having the same result as the previous result can be constructed (useless processing can be omitted).

【図面の簡単な説明】[Brief description of the drawings]

【図1】 エンジン制御ECUの構成図。FIG. 1 is a configuration diagram of an engine control ECU.

【図2】 タスクリストの説明図。FIG. 2 is an explanatory diagram of a task list.

【図3】 CPUの処理内容を示すフローチャート。FIG. 3 is a flowchart showing processing contents of a CPU.

【図4】 スケジューリングの説明のための図。FIG. 4 is a diagram for explaining scheduling.

【図5】 OSのプログラムソース例を示す図。FIG. 5 is a diagram showing an example of an OS program source.

【図6】 フラグ状態を示すデータの格納用メモリを示
す図。
FIG. 6 is a diagram showing a memory for storing data indicating a flag state;

【図7】 従来技術を説明するための図。FIG. 7 is a diagram for explaining a conventional technique.

【符号の説明】[Explanation of symbols]

1…ECU、3…MPU、10…CPU 1 ... ECU, 3 ... MPU, 10 ... CPU

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 第1のイベントの発生を検出する第1の
イベント検出手段と、 前記第1のイベントとは異なる第2のイベントの発生を
検出する第2のイベント検出手段と、 前記第1、第2のイベントの発生に基づき所望の演算プ
ログラムを実行する演算装置とを備え、 前記演算プログラムには、前記第1のイベントの発生で
実行される第1タスク群と、前記第2のイベントの発生
で実行される第2タスク群とを備え、さらに、両タスク
群には少なくとも1つの同一タスクが含まれるものであ
って、 イベントの発生により前記第1、第2タスク群を起動す
べくタスクを待機状態にする前に、タスク状態を判断
し、既に同一タスクが待機状態にある時には待機状態へ
の移行を禁止することを特徴とするリアルタイムオペレ
ーティングシステムを用いたタスク起動制御装置。
A first event detecting means for detecting occurrence of a first event; a second event detecting means for detecting occurrence of a second event different from the first event; , An arithmetic device that executes a desired arithmetic program based on the occurrence of a second event, wherein the arithmetic program includes a first task group executed when the first event occurs, and a second event And a second task group to be executed when the event occurs. In addition, both task groups include at least one same task, and the first and second task groups are activated when an event occurs. A real-time operating system characterized in that the task status is determined before the task is put into the standby state, and the transition to the standby state is prohibited when the same task is already in the standby state. There was a task start control device.
JP11103879A 1999-04-12 1999-04-12 Task start controller using real-time operating system Pending JP2000293382A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11103879A JP2000293382A (en) 1999-04-12 1999-04-12 Task start controller using real-time operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11103879A JP2000293382A (en) 1999-04-12 1999-04-12 Task start controller using real-time operating system

Publications (1)

Publication Number Publication Date
JP2000293382A true JP2000293382A (en) 2000-10-20

Family

ID=14365732

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11103879A Pending JP2000293382A (en) 1999-04-12 1999-04-12 Task start controller using real-time operating system

Country Status (1)

Country Link
JP (1) JP2000293382A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100426201B1 (en) * 2001-12-27 2004-04-06 씨멘스 오토모티브 주식회사 A task imformation driving system of e.c.u
JP2021057043A (en) * 2019-09-30 2021-04-08 マレリ ヨーロッパ エス.ピー.エー. Processing system having trust anchor computing device and corresponding method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100426201B1 (en) * 2001-12-27 2004-04-06 씨멘스 오토모티브 주식회사 A task imformation driving system of e.c.u
JP2021057043A (en) * 2019-09-30 2021-04-08 マレリ ヨーロッパ エス.ピー.エー. Processing system having trust anchor computing device and corresponding method
JP7635494B2 (en) 2019-09-30 2025-02-26 マレリ ヨーロッパ エス.ピー.エー. Processing system with trust anchor computing device and corresponding method - Patents.com

Similar Documents

Publication Publication Date Title
CN102741818B (en) Failure diagnostic system, electronic control unit for vehicle, failure diagnostic method
JP3610915B2 (en) Processing execution apparatus and program
JP2010285001A (en) Electronic control system, function substitution method
JP4728020B2 (en) Vehicle control software and vehicle control apparatus
JP2009145117A (en) Vehicle information storage device
JP2002189606A (en) Processing execution device and storage medium
JP2000066963A (en) Diagnostic device for microcomputer memory
EP1712424B1 (en) Vehicle control apparatus
JP3883842B2 (en) Electronic control device for vehicle
JP2000293382A (en) Task start controller using real-time operating system
JP3923810B2 (en) Electronic control device for vehicle
JP2006327217A (en) Program for vehicle control and electronic control device for vehicle
JP4828947B2 (en) Vehicle control device input/output device
JP2010113419A (en) Multicore controller
JP2003294129A (en) Electronic control device for vehicle
US20020147761A1 (en) Processing execution apparatus having data reference limiting function
JP3908020B2 (en) Electronic control device for vehicle
JP4375105B2 (en) Microcomputer monitoring device failure diagnosis method and vehicle electronic control device
JPH1139172A (en) Electronic controller
JP5085719B2 (en) Vehicle control software and vehicle control apparatus
JP2004318672A (en) Processor
JP6887277B2 (en) Electronic control device for automobiles
JP5287657B2 (en) VEHICLE CONTROL DEVICE AND ITS CONTROL METHOD
JP6061973B2 (en) Programmable device configuration control method and control device having programmable device
JP2004104253A (en) Vehicle control system