JP4516898B2 - Task controller - Google Patents
Task controller Download PDFInfo
- Publication number
- JP4516898B2 JP4516898B2 JP2005226145A JP2005226145A JP4516898B2 JP 4516898 B2 JP4516898 B2 JP 4516898B2 JP 2005226145 A JP2005226145 A JP 2005226145A JP 2005226145 A JP2005226145 A JP 2005226145A JP 4516898 B2 JP4516898 B2 JP 4516898B2
- Authority
- JP
- Japan
- Prior art keywords
- event
- level
- processing
- task
- time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は、タスク制御装置に関し、特に、リアルタイムOSにおけるタスクへのイベント通知において、タスク側でのイベント通知遅延時間のデッドラインレベルによるイベント処理を制御するタスク制御装置に関する。 The present invention relates to a task control device, and more particularly to a task control device that controls event processing according to a deadline level of an event notification delay time on a task side in event notification to a task in a real-time OS.
一般に、実時間処理が要求される監視制御装置などのOS(Operating System:オペレーティングシステム)としては、実時間制御での割込み処理や汎用周辺装置との入出力インタフェース機能などを実現するリアルタイムOSが用いられている。
リアルタイムOS上で各種の制御処理を実行するプログラムであるところのタスク(task)についても、当然のことながら実時間処理が要求されるようになってきており、リアルタイムOS上の全てのタスクを限られた時間内で処理することが必要となってきている。この要求を満たすために、タスクのスケジューリングアルゴリズムなどの改善が図られ、処理効率が向上するようになってきている。
このような、リアルタイムOS上でのタスクの動作を限られた時間内で処理させ得る方式の一例として、一定時間間隔で繰り返し実行される定周期タスクをスケジューリングするリアルタイムOSにおいて、タスク切替頻度を低減し、タスクでの処理が限られた時間内に終了しない所謂デッドライン違反の発生を抑制するようにしたものがある(例えば、特許文献1参照)。
また、タスクが到着すると、到着した時点でのCPUの負荷状態に応じてタスクをスケジューリングするかどうかを判定し、事前に過負荷を防止する。また、2回目以降では、タスクを実行した結果から得られる通信待ち時間を短くするように適応デッドラインを更新するようにし、動的な環境に適応することができ、またCPUを有効に使用することができるようにしたものがある(例えば、特許文献2参照)。
また、リアルタイムOSにおけるイベント発生時点からの遅延時間をタスク側へイベント通知として通知し、タスク側では遅延時間のデッドラインレベルの判定を行い、判定レベルに応じた適切な処理(プログラムモジュール)を選択して実行させるようにして、デッドライン異常をタスク側で認識可能とし、タスク側でデッドライン異常の段階に応じた、デッドライン異常によるシステム障害を事前に回避可能な処理プログラムの作成を可能としたものがある(例えば、特許文献3参照)。
As for the task (task) which is a program for executing various control processes on the real-time OS, it is natural that real-time processing is required, and all tasks on the real-time OS are limited. It has become necessary to process within a given time. In order to satisfy this requirement, task scheduling algorithms and the like have been improved, and processing efficiency has been improved.
As an example of such a method that can process the operation of a task on the real-time OS within a limited time, the task switching frequency is reduced in the real-time OS that schedules a periodic task that is repeatedly executed at regular time intervals. However, there is a technique that suppresses the occurrence of a so-called deadline violation in which processing in a task does not end within a limited time (see, for example, Patent Document 1).
When a task arrives, it is determined whether to schedule the task according to the load state of the CPU at the time of arrival, and an overload is prevented in advance. In the second and subsequent times, the adaptive deadline is updated so as to shorten the communication waiting time obtained from the result of executing the task, so that it can be adapted to a dynamic environment and the CPU is used effectively. There is one that can be used (for example, see Patent Document 2).
Also, the delay time from the event occurrence point in the real-time OS is notified to the task side as an event notification, and the task side determines the deadline level of the delay time and selects an appropriate process (program module) according to the determination level It is possible to create a processing program that makes it possible to recognize deadline anomalies on the task side and to avoid system failures due to deadline anomalies in advance according to the stage of the deadline anomaly on the task side. (For example, refer to Patent Document 3).
しかしながら、従来の技術では、リアルタイムOSの処理効率は向上しても、過負荷状態となった場合や負荷状態が継続し輻輳状態となった場合において、処理遅延(レイテンシ)によるデッドライン異常が発生する。デッドライン異常をタスク側で認識した場合も、負荷状態はすぐには解消されないため継続したデッドライン異常が発生し続け、同じ異常対応処理を繰り返し実行してしまっていた。また、CPU速度が変わったり、処理変更を行う場合に再度しきい値の変更や調整を行うことが困難であった。
即ち、従来の技術には以下のような問題点があった。
第1の問題点は、デッドライン異常が発生した場合に、タスク側では負荷状態を継続し同じ異常対応処理を繰り返し実行してしまう点である。その理由は、リアルタイムOS上で認識するイベントの発生から実際にタスク側で処理されるまで(遅延:レイテンシ)に、優先度レベルが同一のタスクで同時にイベント発生した場合や、高優先度レベルのタスク内でイベント発生が多発した場合などに、タスク側へのイベント待ち時間が発生し、その遅延時間におけるデッドライン異常レベルにより処理の振り分けを行っても負荷状態は継続されるため同じようにデッドライン異常レベルのイベントが多発し、また同じ異常対応したイベント処理が何度も繰り返し処理を実行してしまうからである。
第2の問題点は、プログラム設計、および処理変更、追加が発生した場合において、デッドラインしきい値を容易に設定できない点である。その理由は、CPU速度、ハード的なスペックにより処理時間が変わった際、全体の処理時間に対し各詳細処理のデッドラインしきい値を設定するのは困難であり、また変更があった場合の調整についても容易に行うことができないからである。
本発明はこのような状況に鑑みてなされたものであり、実際のイベント発生時刻からタスク側でイベント処理を行うまでにリアルタイムOS上のタスク制御で発生する遅延時間と遅延発生回数の情報を通知することで、対応したタスク側で順正常処理や異常処理およびデッドライン異常処理を行うことができるようにすることを目的とする。また、デッドラインのしきい値を容易に変更できるようにすることを目的とする。
However, with the conventional technology, even if the processing efficiency of the real-time OS is improved, a deadline abnormality occurs due to processing delay (latency) in the case of an overload state or when the load state continues and becomes a congestion state To do. Even when the task recognizes a deadline abnormality, the load state is not resolved immediately, so a continuous deadline abnormality continues to occur, and the same abnormality handling process is repeatedly executed. In addition, it is difficult to change or adjust the threshold value again when the CPU speed is changed or the process is changed.
That is, the conventional technique has the following problems.
The first problem is that when a deadline abnormality occurs, the task side continues the load state and repeatedly executes the same abnormality handling process. The reason is that when an event occurs at the same time in a task with the same priority level from the occurrence of an event recognized on the real-time OS until it is actually processed on the task side (delay: latency), When there are many events in the task, the event wait time to the task side occurs, and even if the processing is distributed according to the deadline abnormality level in the delay time, the load state will continue, so it will be dead as well This is because events of the line abnormality level occur frequently, and event processing corresponding to the same abnormality repeatedly executes processing.
The second problem is that the deadline threshold cannot be easily set when program design, process change, or addition occurs. The reason is that when the processing time changes due to CPU speed and hardware specifications, it is difficult to set the deadline threshold of each detailed processing for the entire processing time, and when there is a change This is because the adjustment cannot be easily performed.
The present invention has been made in view of such a situation, and notifies the information about the delay time and the number of delay occurrences generated in the task control on the real-time OS from the actual event occurrence time to the event processing on the task side. By doing so, it is an object to enable normal normal processing, abnormal processing, and deadline abnormal processing to be performed on the corresponding task side. It is another object of the present invention to make it possible to easily change the deadline threshold.
請求項1に記載のタスク制御装置は、実時間制御での割込み処理や周辺装置との入出力インタフェース機能などを実現するリアルタイムOSと、前記リアルタイムOS上で前記リアルタイムOSが検知するイベントの処理を実行する複数のタスクとを備えたタスク制御装置であって、各タスクに通知される遅延時間の測定をイベント通知の待ち時間で行う測定手段と、前記測定手段による測定結果をイベント毎に記憶する測定結果記憶手段と、前記測定結果を外部装置に出力する出力手段と、前記測定結果に基づいて前記外部装置に設定されたデッドラインしきい値で、レベル判定用しきい値テーブルを更新する更新手段と、前記タスクが、前記リアルタイムOSから通知されるイベントの発生時からの遅延時間により、前記レベル判定用しきい値テーブルに基づいて前記遅延時間のデッドラインのレベルを判定し、各レベルと各レベルの発生回数とに応じた処理プログラムを選択して実行することにより、前記イベントの処理を行うイベント処理手段と、前記レベル判定用しきい値テーブルと同一のマトリクス構造であり、データとして前記発生回数を記憶するためのカウンタを備える継続発生カウントテーブルに対し、前記レベルの判定で求められた前記レベル判定用しきい値テーブルのマトリクス位置と同位置の前記カウンタを更新するカウント更新手段とを備えることを特徴とする。
また、リアルタイムOSは、イベントの発生を検知するとイベントの処理を行ういずれかのタスクに対し、イベント通知を発行するタスク制御手段を備え、タスクのイベント処理手段は、イベント通知に付されたイベントの発生時からの遅延時間により、遅延時間のデッドラインのレベルを判定するレベル判定用しきい値テーブルと、各レベルでの継続発生回数を記憶する継続発生カウントテーブルと、レベルとレベルの発生回数とに応じた処理プログラムを選択するイベント実行処理マトリクステーブルとを含むようにすることができる。
また、外部ツールまたは外部装置との間の通信を制御する外部通信インタフェースをさらに備え、外部ツールまたは外部装置より、外部通信インタフェースを介してレベル判定用しきい値テーブルが更新されるようにすることができる。
また、レベル判定用しきい値テーブルは、行方向にイベントの番号が並べられ、列方向にデッドラインのレベルが並べられる構成を取り、各行と列との交点に、遅延時間に対するレベル毎のしきい値が定義されており、イベント実行処理マトリクステーブルは、行方向にイベントの番号が並べられ、列方向にデッドラインのレベルが並べられる構成を取り、各行と列との交点に、イベントの番号のレベルのイベント処理を実行する処理プログラムのモジュール名が発生回数毎に定義されているようにすることができる。
また、イベント処理手段は、タスク制御手段からイベント通知を受けてイベント通知に付されているイベントの番号のイベント処理を実行するいずれかのタスクが起動されると、タスクがレベル判定用しきい値テーブルを参照してイベントの番号の遅延時間のデッドラインのレベルを判定し、次に、タスクがイベント実行処理マトリクステーブルを参照してイベントの番号のレベルおよび発生回数に対応するモジュール名を選択し、モジュール名を有する処理プログラムに制御を渡して実行させることにより、イベントの番号を付されたイベントの処理を行わせるようにすることができる。
請求項6に記載のタスク制御方法は、実時間制御での割込み処理や周辺装置との入出力インタフェース機能などを実現するリアルタイムOSと、前記リアルタイムOS上で前記リアルタイムOSが検知するイベントの処理を実行する複数のタスクとを備えたタスク制御装置におけるタスク制御方法であって、各タスクに通知される遅延時間の測定をイベント通知の待ち時間で行う測定ステップと、前記測定ステップにおける測定結果をイベント毎に記憶する測定結果記憶ステップと、前記測定結果を外部装置に出力する出力ステップと、前記測定結果に基づいて前記外部装置に設定されたデッドラインしきい値で、レベル判定用しきい値テーブルを更新する更新ステップと、前記タスクが、前記リアルタイムOSから通知されるイベントの発生時からの遅延時間により、前記レベル判定用しきい値テーブルに基づいて前記遅延時間のデッドラインのレベルを判定し、各レベルと各レベルの発生回数とに応じた処理プログラムを選択して実行することにより、前記イベントの処理を行うイベント処理ステップと、前記レベル判定用しきい値テーブルと同一のマトリクス構造であり、データとして前記発生回数を記憶するためのカウンタを備える継続発生カウントテーブルに対し、前記レベルの判定で求められた前記レベル判定用しきい値テーブルのマトリクス位置と同位置の前記カウンタを更新するカウント更新ステップとを備えることを特徴とする。
The task control device according to
In addition, the real-time OS includes a task control unit that issues an event notification to any task that processes an event when the occurrence of the event is detected. The event event processing unit of the task includes an event notification attached to the event notification. Level determination threshold table for determining the level of the deadline of the delay time according to the delay time from the occurrence, the continuous occurrence count table for storing the number of continuous occurrences at each level, the level and the number of occurrences of the level And an event execution processing matrix table for selecting a processing program according to the above.
Further, an external communication interface for controlling communication with an external tool or an external device is further provided, and the threshold table for level determination is updated from the external tool or the external device via the external communication interface. Can do.
In addition, the threshold table for level determination has a configuration in which event numbers are arranged in the row direction and deadline levels are arranged in the column direction, and each level for the delay time is set at the intersection of each row and column. Threshold values are defined, and the event execution processing matrix table has a configuration in which event numbers are arranged in the row direction and deadline levels are arranged in the column direction, and the event number is at the intersection of each row and column. It is possible to define a module name of a processing program that executes event processing at different levels for each number of occurrences.
In addition, the event processing means receives the event notification from the task control means, and when any task that executes the event processing of the event number attached to the event notification is activated, the task is set to the threshold for level determination. Refer to the table to determine the deadline level of the delay time of the event number, and then the task refers to the event execution processing matrix table and selects the module name corresponding to the event number level and the number of occurrences. By passing control to a processing program having a module name and executing it, it is possible to perform processing of an event assigned an event number.
The task control method according to claim 6 includes: a real-time OS that realizes interrupt processing in real-time control, an input / output interface function with a peripheral device, and the like; and processing of events detected by the real-time OS on the real-time OS. A task control method in a task control device comprising a plurality of tasks to be executed , a measurement step of measuring a delay time notified to each task with an event notification waiting time, and a measurement result in the measurement step as an event a measurement result storing step of storing for each, and an output step of outputting the measurement result to the external device, in the deadline threshold value set in the external device based on the measurement results, the level determining threshold value table An update step for updating the event, and the task is notified of an event notified from the real-time OS. Based on the delay time from the time, the deadline level of the delay time is determined based on the threshold table for level determination, and a processing program corresponding to each level and the number of occurrences of each level is selected and executed. Thus, the event processing step for processing the event, and the same matrix structure as the threshold table for level determination, for the continuous occurrence count table comprising a counter for storing the number of occurrences as data, And a count update step of updating the counter at the same position as the matrix position of the threshold table for level determination obtained by the determination of the level .
本発明によれば、各タスクに通知される遅延時間の測定を負荷状態で行い、測定結果をイベント毎に記憶し、測定結果を外部装置に出力し、測定結果に基づいてデッドラインしきい値の設定を行い、レベル判定用しきい値テーブルを更新し、タスクが、リアルタイムOSから通知されるイベントの発生時からの遅延時間により、レベル判定用しきい値テーブルに基づいて遅延時間のデッドラインのレベルを判定し、各レベルと各レベルの発生回数とに応じた処理プログラムを選択して実行することにより、イベントの処理を行うようにしたので、イベント発生からの遅延時間および発生回数に対応したイベント処理を実行することができる。
また、外部ツールまたは外部装置との間の通信を制御する外部通信インタフェースを介して、外部ツールまたは外部装置より、レベル判定用しきい値テーブルを更新することができる。
According to the present invention, the delay time notified to each task is measured in a load state, the measurement result is stored for each event, the measurement result is output to an external device, and the deadline threshold value is based on the measurement result. The level determination threshold table is updated, and the delay time deadline based on the level determination threshold table is determined based on the delay time from the occurrence of the event notified by the real-time OS. Since the event is processed by determining the level of the event and selecting and executing the processing program according to each level and the number of occurrences of each level, it corresponds to the delay time and the number of occurrences from the event occurrence Event processing can be executed.
Further, the level determination threshold table can be updated from the external tool or the external device via the external communication interface that controls communication with the external tool or the external device.
本発明のタスクイベント通知遅延時間のタスク通知によるタスク処理方法は、リアルタイムOS12内でイベント発生(図1のS15)からタスク11側へのイベント通知(図1のS18)までの間、優先度レベルの低いタスク実行待ちや優先度レベルの同一タスクでの競合における実行待ち、同一タスク内での待ちイベントの連続発生におけるイベントの通知待ち時間が計測され、タスク制御部27でタスク21側へのイベント通知時にイベント通知遅延時間を付加したイベント通知が行われる。タスク21側では通知されたイベント通知遅延時間によりイベント毎に持つ遅延時間のデッドラインレベルを判定し(図2のS22)、レベルに該当する継続発生回数をカウントする。同じデッドラインレベルを継続する場合は図6に示したように発生した回数に対応する継続発生回数判定式62毎にイベント処理に対応するイベント実行処理関数ラベル63を定義しておき、該当するイベント処理を実行する。
The task processing method according to the task notification of the task event notification delay time of the present invention has a priority level from the event occurrence (S15 in FIG. 1) to the event notification to the task 11 side (S18 in FIG. 1) in the real-
ここで、デッドラインとは、イベント発生時点からタスク21でのイベント処理完了迄の制限時間のことである。即ち、或るイベントの発生時点からそのイベントのイベント処理が終了するまでの時間には、該当装置や該当システムで定められる制限時間が存在し、イベント処理の終了が制限時間を超えてしまった場合にはデッドライン異常となる。
Here, the deadline is a time limit from the time of event occurrence to the completion of event processing in the
また、本発明のデッドラインのしきい値設定方法では、適切な値へ設定するために外部ツール/他装置86より外部通信インタフェース(I/F)85を介して各種遅延時間の測定を行うことが可能であり、外部ツール/他装置86より設定を行うことを可能とする。
In the deadline threshold value setting method of the present invention, various delay times are measured from the external tool /
デッドラインレベルはタスク21側にて、<レベル1>正常処理(図2のS23)、<レベル2>順正常処理(1)、順正常処理(2)(図2のS24,S25)、<レベル3>異常処理(1)(図2のS26)、<レベル4>異常処理(2)という具合に段階的に定義し、さらに同一レベルでも発生した回数によって処理を区分する(<レベル2>1回目(X=1)は順正常処理(1)(図2のS24)、<レベル2>2回目以降(X>1)は順正常処理(2)(図2のS25)。
On the
各イベント毎に遅延時間のレベル毎のしきい値を決めるレベル判定用しきい値テーブル31(76,82)を作成する。また、同様のマトリクス構造で、イベントのレベル毎に継続して発生した回数をカウントする継続発生カウントテーブル41(77)を持ち、同じイベントで同じデッドラインレベルが繰り返し発生する場合はカウントアップする。またレベル変化が発生した場合には前回のレベルのカウントをクリアする。 A level determination threshold value table 31 (76, 82) for determining a threshold value for each delay time level for each event is created. Further, the same matrix structure has a continuous occurrence count table 41 (77) for counting the number of times of occurrence continuously for each event level. When the same deadline level repeatedly occurs in the same event, the count is incremented. If a level change occurs, the previous level count is cleared.
該当レベルと該当発生回数に応じた処理へジャンプできるようイベント処理名を定義するイベント実行処理マトリクステーブル51(61)を作成する。 An event execution processing matrix table 51 (61) is created that defines event processing names so as to jump to processing according to the corresponding level and the number of occurrences.
タスク21のイベント実行準備処理(図7のS71)にて、タスク制御部27からのイベント通知時に付加されたイベント通知遅延時間より該当イベントのデッドラインレベルをレベル判定用しきい値テーブル76で求め(マトリクス位置を求め)(図7のS72)、該当する継続発生カウントテーブル77のカウンタを更新し(図7のS73)、求めたデッドラインレベルと該当する継続発生回数に応じたイベント実行処理マトリクステーブル78内の該当イベント処理をコールし(図7のS74)、実行する。
In the event execution preparation process of task 21 (S71 in FIG. 7), the deadline level of the corresponding event is obtained from the level determination threshold table 76 from the event notification delay time added at the time of event notification from the
イベント発生15からの通知遅延時間がしきい値1以内<レベル1>であれば通常処理(図2のS23)、しきい値1より大きくしきい値2以内<レベル2>であれば順正常処理であるが発生回数が初回(X=1)の場合は順正常処理(1)(図2のS24)、発生回数が2回目以降(X>1)の場合は順正常処理(2)(図2のS25)、しきい値2より大きい<レベル3>であれば異常処理(1)(図2のS26)と処理を分けることが可能となる。
Normal processing (S23 in FIG. 2) if notification delay time from
遅延時間の測定は外部ツール/他装置86よりトリガを与えることにより行われる。即ち、タスク制御部81に隣接する測定モジュール84によって各イベント毎に発生した遅延時間が計測され、測定結果が図9に示したレベル判定用測定テーブル91に測定パターン毎に記録され、外部ツール/他装置86に対する出力を可能とする。測定した結果により適切なデッドラインしきい値の設定を行い、レベル判定用しきい値テーブル31(82)を更新する。即ち、外部ツール/他装置86より外部通信インタフェース85を介して書き換えモジュール83よりデッドラインしきい値テーブル(レベル判定用しきい値テーブル)31(82)の更新を行うことが可能となる。
The delay time is measured by applying a trigger from the external tool /
次に、本発明の実施の形態について図面を参照して詳細に説明する。 Next, embodiments of the present invention will be described in detail with reference to the drawings.
図1を参照すると、本発明の実施の形態は、監視制御装置などに搭載されるソフトウェアにおいて、タスク11とリアルタイムOS12で構成される。リアルタイムOS12内でイベント発生(図1のS15)からタスク11側へのイベント通知(図1のS18)までの間、タスク優先度レベルの低いタスク実行待ちや優先度レベルの同一タスクでの競合における実行待ち、同一タスク内での待ちイベントの連続発生におけるイベントの通知待ち時間が存在する。
Referring to FIG. 1, the embodiment of the present invention includes a task 11 and a real-
図2を参照すると、タスク制御部27からタスク21側へのイベント通知時にイベント通知遅延時間を付加したイベント通知が行われることにより、タスク21側では通知されたイベント通知遅延時間によりイベント毎に持つ遅延時間のデッドラインレベルを判定し(図2のS22)、レベルに応じたイベント処理を実行する。
Referring to FIG. 2, when an event notification with an event notification delay time is performed at the time of event notification from the
通知遅延時間に対する処理レベルの定義は、そのシステムに応じて異なる場合もあるが、大凡、システム上遅延時間として問題無いレベルではレベル1とし通常の処理(図2のS23)を行い、遅延と認識し再処理を行っても問題無いレベルではレベル2とし、且つ発生回数が初回であれば順正常の処理(1)(図2のS24)を行い、2回目以降も継続して発生する場合においては順正常の処理(2)(図2のS25)を行い、処理的にデッドタイムとするレベルではレベル3とし、且つ発生回数が初回であれば異常警報を発して処理を中止する異常処理(1)(図2のS26)を行い、発生回数が2回目以降であれば処理を行わない等異常停止を行う。
The definition of the processing level for the notification delay time may vary depending on the system. However, the level is generally set to
図3を参照すると、デッドラインレベルの判定に用いるための遅延時間に対するレベル毎のしきい値がイベント毎に定義される。例えば遅延時間0ミリ秒(msec)から10msec以内をレベル1と定義する場合は、レベル判定用しきい値テーブル31の該当イベントのレベル1しきい値箇所には10msecと定義され、11msecから20msec以内をレベル2と定義する場合は、レベル判定用しきい値テーブルの該当イベントのレベル2しきい値箇所には20msecと定義とする。また、最高レベルXでは1000msecより大きい場合全てという定義で扱い、レベル2がなくレベル1とレベル3と続く場合等は該当するレベル2の位置はレベル1と同値を定義するなどし、レベル判定の際は、レベルの低い方から判定に用いる。
Referring to FIG. 3, a threshold value for each level with respect to a delay time used for determining a deadline level is defined for each event. For example, when a delay time of 0 milliseconds (msec) to within 10 msec is defined as
図4を参照すると、レベル判定用しきい値テーブル31(76,82)と同様のマトリクステーブルで該当イベント該当レベル毎に対応するイベント実行処理名を定義しておき、前のレベル判定で求めた位置と継続発生カウントテーブル41(77)の同位置のカウンタを更新することにより該当イベントでの同一レベルでのレベル継続発生回数を記憶しておくことができる。 Referring to FIG. 4, an event execution process name corresponding to each level corresponding to the event is defined in a matrix table similar to the level determination threshold table 31 (76, 82), and obtained in the previous level determination. By updating the counter at the same position in the position and continuation occurrence count table 41 (77), it is possible to store the number of level continuation occurrences at the same level in the corresponding event.
図6を参照すると、各イベントと各レベル毎に発生回数によって処理を分けるために初回の場合(X=1)(Xは発生回数)、2回目以降(X>1)の場合、20回目以降(X>20)の場合など、発生した回数に対応する継続発生回数判定式62毎に、継続発生回数マトリクステーブル(イベント実行処理マトリクステーブル)61(51)にて該当するイベント処理に対応するイベント実行処理関数ラベル63を定義する。
Referring to FIG. 6, in order to divide the processing according to the number of occurrences for each event and each level, the first case (X = 1) (X is the number of occurrences), the second and later (X> 1), the 20th and later An event corresponding to the event processing corresponding to the continuous occurrence count matrix table (event execution processing matrix table) 61 (51) for each of the continuous occurrence
図10を参照すると、タスク制御部103からタスク101側へのイベント通知時にイベント通知遅延時間を付加したイベント通知が行われ、タスク101側において測定モード中においては測定処理(図10のS102)にて通知されたイベント通知遅延時間により測定開始時から該当イベントの発生回数、最大遅延時間、最小遅延時間、平均遅延時間の計測を行い、レベル判定用測定テーブル91に記録する。
Referring to FIG. 10, an event notification with an event notification delay time added is performed at the time of event notification from the
図7を参照すると、タスク21のイベント実行準備処理(図7のS71)にて、タスク制御部27からのイベント通知時に付加されたイベント通知遅延時間より該当イベントのデッドラインレベルをレベル判定用しきい値テーブル76(31,82)で求め(マトリクス位置を求め)(図7のS72)、イベント実行処理マトリクステーブル78(51,61)内の該当イベントと求めたレベルおよび発生回数に該当する処理を実行する。
Referring to FIG. 7, in the event execution preparation process for task 21 (S71 in FIG. 7), the deadline level of the corresponding event is used for level determination from the event notification delay time added at the time of event notification from
これにより、イベント発生(図1のS15)からの通知遅延時間がしきい値1以内<レベル1>であれば通常処理(図2のS23)、しきい値1より大きくしきい値2以内<レベル2>でありレベル2発生回数が初回であれば順正常処理(1)(図2のS24)、2回目以降であれば順正常処理(2)(図2のS25)、しきい値2より大きくしきい値3以内<レベル3>であれば異常処理(1)(図2のS26)と処理を分けることが可能となる。
As a result, if the notification delay time from the occurrence of the event (S15 in FIG. 1) is within the
図8を参照すると、外部ツール/他装置86よりトリガを与えることにより、タスク制御部81に隣接する測定モジュール84にて各イベント毎に発生した遅延時間を計測し、測定結果を図9に示したレベル判定用測定テーブル91(図9)に測定パターン毎に記録し、外部ツール/他装置86に対する出力を可能とする。
Referring to FIG. 8, by giving a trigger from the external tool /
測定した結果により適切なデッドラインしきい値の設定を行い、レベル判定用しきい値テーブル31(82)を更新する。即ち、外部ツール/他装置86より外部通信インタフェースを介して、書き換えモジュール83よりデッドラインしきい値テーブル(レベル判定用しきい値テーブル)82(31)の更新を行うことが可能となる。これにより、例えば、ネットワークで接続されたサーバから端末のレベル判定用しきい値テーブル31の内容を遠隔操作により更新することができる。
An appropriate deadline threshold value is set according to the measurement result, and the level determination threshold value table 31 (82) is updated. That is, the
上記実施の形態で、イベント通知28に含まれる遅延時間、およびデッドラインの各レベル発生回数を外部ツールや他装置86に通知することにより、イベント発生からの遅延時間および発生回数を考慮したイベント処理を行うことができるとともに、デバッグ機能的にCPUの負荷状況を把握することができる。また、イベント通知に含まれる各イベントの遅延時間の傾向および統計より、適切なCPU速度性能の算出および選択を可能とし、また、リアルタイムOSの最適化や最速化を検討することができる。
In the above embodiment, the delay time included in the
以上説明したように、本実施の形態により、次のような効果を奏する。
第1の効果は、タスク側へのイベント実行遅延時間を認識しデッドライン異常の発生した回数毎に細かく順正常系の処理を組めることである。その理由は、例えばデッドラインレベル2初回発生時の順正常処理1では再処理(リトライ処理)、2回目以降の順正常処理2では処理中断、デッドラインレベル2初回発生時の異常処理1でCPUの輻輳状態や半暴走状態が考えられ回復できない状態と判断し(他装置等の)外部へ処理できなかったことを通知する処理、2回目以降の異常処理2で全処理を中断しALMする処理など処理を分離できる。また、レベルの高い時にはソフトウェア自ら暴走検出(ウォッチドックタイマ・タイムアウト)機能を持つこととなり、さらにどのイベントでそれが発生したのか、何回その状態を継続しているかを把握することが可能となるからである。
As described above, according to the present embodiment, the following effects can be obtained.
The first effect is that the event execution delay time to the task side is recognized, and the normal normal processing can be finely assembled every time the deadline abnormality occurs. The reason is, for example, reprocessing (retry processing) in normal
第2の効果は、各種状態におけるイベント実行遅延時間を測定できることである。その理由は、各イベントの遅延時間の統計より、適切な処理構築ができ処理変更時やハードウェアの性能変更が発生した際の適切なしきい値の予測が可能となるからである。また、ハードウェア初期検討時のCPU速度性能の選択を可能とし、さらにまた、リアルタイムOS12の最適化や最速化を検討すること可能となる。
The second effect is that the event execution delay time in various states can be measured. The reason is that, from the statistics of the delay time of each event, an appropriate process can be constructed, and an appropriate threshold value can be predicted when the process is changed or when a hardware performance change occurs. In addition, it is possible to select the CPU speed performance at the time of initial hardware examination, and further, it is possible to examine optimization and maximum speed of the real-
なお、上記実施の形態の構成および動作は例であって、本発明の趣旨を逸脱しない範囲で適宜変更することができることは言うまでもない。 It should be noted that the configuration and operation of the above-described embodiment are examples, and it is needless to say that they can be changed as appropriate without departing from the spirit of the present invention.
11 タスク
12 リアルタイムOS
13,14,15 イベント1、2、3の発生
16 イベント通知遅延時間(T3)
17 タスクへのイベント通知
18 タスク側でのイベント処理
21 タスク
27 タスク制御部
28 イベント通知(イベント内容と遅延時間情報)
31 レベル判定用しきい値テーブル
41 継続発生カウントテーブル
51 レベル継続発生回数マトリクステーブル(イベント実行処理マトリクステーブル)
61 各イベントと各レベル毎のレベル継続発生回数マトリクステーブル(イベント実行処理マトリクステーブル)
62 継続発生回数判定式
63 イベント実行処理関数ラベル
76 レベル判定用しきい値テーブル
77 継続発生カウントテーブル
78 イベント実行処理マトリクステーブル
81 タスク制御部
82 レベル判定用しきい値テーブル
83 書き換えモジュール
84 測定モジュール
85 外部通信インタフェース
86 外部ツールまたは他装置
91 レベル判定用測定テーブル
101 タスク
102 測定処理部
103 タスク制御部
104 イベント通知(イベント内容と遅延時間情報)
13, 14, 15 Occurrence of
17 Event notification to task 18 Event processing on
31 level determination threshold table 41 continuous occurrence count table 51 level continuous occurrence frequency matrix table (event execution processing matrix table)
61 Matrix table of event continuation occurrence for each event and each level (event execution processing matrix table)
62 Continuous occurrence
Claims (6)
各タスクに通知される遅延時間の測定をイベント通知の待ち時間で行う測定手段と、
前記測定手段による測定結果をイベント毎に記憶する測定結果記憶手段と、
前記測定結果を外部装置に出力する出力手段と、
前記測定結果に基づいて前記外部装置に設定されたデッドラインしきい値で、レベル判定用しきい値テーブルを更新する更新手段と、
前記タスクが、前記リアルタイムOSから通知されるイベントの発生時からの遅延時間により、前記レベル判定用しきい値テーブルに基づいて前記遅延時間のデッドラインのレベルを判定し、各レベルと各レベルの発生回数とに応じた処理プログラムを選択して実行することにより、前記イベントの処理を行うイベント処理手段と、
前記レベル判定用しきい値テーブルと同一のマトリクス構造であり、データとして前記発生回数を記憶するためのカウンタを備える継続発生カウントテーブルに対し、前記レベルの判定で求められた前記レベル判定用しきい値テーブルのマトリクス位置と同位置の前記カウンタを更新するカウント更新手段と
を備えることを特徴とするタスク制御装置。 Task control including a real-time OS that realizes interrupt processing in real-time control, an input / output interface function with peripheral devices, and the like, and a plurality of tasks that execute processing of events detected by the real-time OS on the real-time OS A device,
Measuring means for measuring the delay time notified to each task with the event notification waiting time ;
Measurement result storage means for storing the measurement result by the measurement means for each event;
Output means for outputting the measurement result to an external device;
The measured by deadline threshold value set in the external device based on a result, and updating means for updating the threshold value table for level determination,
The task determines the level of the deadline of the delay time based on the threshold table for level determination based on the delay time from the occurrence of the event notified from the real-time OS. Event processing means for processing the event by selecting and executing a processing program according to the number of occurrences ;
The threshold for level determination obtained in the determination of the level with respect to the continuous generation count table having the same matrix structure as the threshold table for level determination and having a counter for storing the number of occurrences as data. A task control apparatus comprising: count update means for updating the counter at the same position as the matrix position of the value table .
前記タスクの前記イベント処理手段は、前記イベント通知に付された前記イベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定するレベル判定用しきい値テーブルと、各レベルでの継続発生回数を記憶する継続発生カウントテーブルと、前記レベルと前記レベルの発生回数とに応じた処理プログラムを選択するイベント実行処理マトリクステーブルとを含む
ことを特徴とする請求項1に記載のタスク制御装置。 The real-time OS includes task control means for issuing an event notification to any of the tasks that process the event when the occurrence of the event is detected,
The event processing means of the task includes a threshold table for level determination that determines a level of a deadline of the delay time based on a delay time from the occurrence of the event attached to the event notification, and a level determination threshold table for each level. The task according to claim 1, further comprising: a continuation occurrence count table that stores the number of continuation occurrences, and an event execution processing matrix table that selects a processing program according to the level and the number of occurrences of the level. Control device.
前記外部ツールまたは前記外部装置より、前記外部通信インタフェースを介して前記レベル判定用しきい値テーブルが更新される
ことを特徴とする請求項1または2に記載のタスク制御装置。 An external communication interface for controlling communication with an external tool or an external device;
The task control device according to claim 1 or 2, wherein the threshold table for level determination is updated from the external tool or the external device via the external communication interface.
ことを特徴とする請求項2または3に記載のタスク制御装置。 The level determination threshold table has a configuration in which the event numbers are arranged in the row direction and the deadline levels are arranged in the column direction, and each level corresponding to the delay time is set at the intersection of each row and column. The event execution processing matrix table has a configuration in which the event numbers are arranged in the row direction and the deadline levels are arranged in the column direction, and at the intersection of each row and column. The task control device according to claim 2, wherein a module name of a processing program that executes event processing at the level of the event number is defined for each occurrence number.
ことを特徴とする請求項1乃至4のいずれかに記載のタスク制御装置。 The event processing means receives the event notification from the task control means, and when any of the tasks for executing the event processing of the event number attached to the event notification is activated, the task is Refer to a threshold table for level determination to determine the level of the deadline of the delay time of the event number, and then the task refers to the event execution processing matrix table and the event number of the event A module name corresponding to a level and the number of occurrences is selected, control is passed to a processing program having the module name, and the event is numbered to be processed. Item 5. The task control device according to any one of Items 1 to 4.
各タスクに通知される遅延時間の測定をイベント通知の待ち時間で行う測定ステップと、
前記測定ステップにおける測定結果をイベント毎に記憶する測定結果記憶ステップと、
前記測定結果を外部装置に出力する出力ステップと、
前記測定結果に基づいて前記外部装置に設定されたデッドラインしきい値で、レベル判定用しきい値テーブルを更新する更新ステップと、
前記タスクが、前記リアルタイムOSから通知されるイベントの発生時からの遅延時間により、前記レベル判定用しきい値テーブルに基づいて前記遅延時間のデッドラインのレベルを判定し、各レベルと各レベルの発生回数とに応じた処理プログラムを選択して実行することにより、前記イベントの処理を行うイベント処理ステップと、
前記レベル判定用しきい値テーブルと同一のマトリクス構造であり、データとして前記発生回数を記憶するためのカウンタを備える継続発生カウントテーブルに対し、前記レベルの判定で求められた前記レベル判定用しきい値テーブルのマトリクス位置と同位置の前記カウンタを更新するカウント更新ステップと
を備えることを特徴とするタスク制御方法。 Task control including a real-time OS that realizes interrupt processing in real-time control, an input / output interface function with peripheral devices, and the like, and a plurality of tasks that execute processing of events detected by the real-time OS on the real-time OS A method for task control in a device, comprising:
A measurement step for measuring the delay time notified to each task with the event notification waiting time ,
A measurement result storage step for storing the measurement result in the measurement step for each event;
An output step of outputting the measurement result to an external device;
The measured by deadline threshold value set in the external device based on a result, the updating step of updating the threshold value table for level determination,
The task determines the level of the deadline of the delay time based on the threshold table for level determination based on the delay time from the occurrence of the event notified from the real-time OS. An event processing step for processing the event by selecting and executing a processing program according to the number of occurrences ; and
The threshold for level determination obtained in the determination of the level with respect to the continuous generation count table having the same matrix structure as the threshold table for level determination and having a counter for storing the number of occurrences as data. And a count updating step of updating the counter at the same position as the matrix position of the value table .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005226145A JP4516898B2 (en) | 2005-08-04 | 2005-08-04 | Task controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005226145A JP4516898B2 (en) | 2005-08-04 | 2005-08-04 | Task controller |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007041890A JP2007041890A (en) | 2007-02-15 |
JP4516898B2 true JP4516898B2 (en) | 2010-08-04 |
Family
ID=37799807
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005226145A Expired - Fee Related JP4516898B2 (en) | 2005-08-04 | 2005-08-04 | Task controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4516898B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009003686A (en) * | 2007-06-21 | 2009-01-08 | Honda Motor Co Ltd | Apparatus, method and program for analyzing software operation |
JP5231035B2 (en) * | 2008-01-31 | 2013-07-10 | 株式会社野村総合研究所 | Job processing system and job processing method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000155695A (en) * | 1998-11-19 | 2000-06-06 | Nec Corp | Qos controller, qos controlling method and storage medium |
JP2004070582A (en) * | 2002-08-05 | 2004-03-04 | Nec Corp | Event notification task control processing system and method and its program |
JP2004078665A (en) * | 2002-08-20 | 2004-03-11 | Nec Corp | Task control apparatus and task control method |
-
2005
- 2005-08-04 JP JP2005226145A patent/JP4516898B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000155695A (en) * | 1998-11-19 | 2000-06-06 | Nec Corp | Qos controller, qos controlling method and storage medium |
JP2004070582A (en) * | 2002-08-05 | 2004-03-04 | Nec Corp | Event notification task control processing system and method and its program |
JP2004078665A (en) * | 2002-08-20 | 2004-03-11 | Nec Corp | Task control apparatus and task control method |
Also Published As
Publication number | Publication date |
---|---|
JP2007041890A (en) | 2007-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4314463B2 (en) | Alarm management system | |
US6434591B1 (en) | Thread control system and method in a computer system | |
JP4387970B2 (en) | Data I / O program, device, and method | |
JP2006277115A (en) | Abnormality detection program and abnormality detection method | |
JP4516898B2 (en) | Task controller | |
JP5621613B2 (en) | Information processing apparatus, control method, and program | |
JP4764405B2 (en) | Information processing device | |
JP3859564B2 (en) | Event notification task control processing method and method, and program | |
EP2447837A2 (en) | Simulation apparatus, method, and computer-readable recording medium | |
JP2007503642A (en) | Circuit apparatus and method for supporting and monitoring a microcontroller | |
JP2006227962A (en) | System and method for monitoring application task | |
JP4492530B2 (en) | Computer control method, management computer and processing program therefor | |
JP4009602B2 (en) | Task processing method, apparatus, and program using real-time OS | |
JP2010277422A (en) | Interrupt handler | |
JP2017161994A (en) | Control computation device | |
JP4297796B2 (en) | Plant monitoring and operation device | |
JP5058416B2 (en) | Batch control system for online combination system, program for batch control of online combination system, and recording medium recording the program | |
CN106776202B (en) | Method and system for monitoring tasks of embedded operating system | |
US20170060666A1 (en) | Controller capable of detecting factor at time of abnormality of pc function | |
JP7069870B2 (en) | Information processing equipment | |
JP5603836B2 (en) | Maintenance management device, maintenance management method, and maintenance management program | |
JP2012089109A (en) | Computer resource control system | |
JP7379875B2 (en) | Control device and its maintenance support device | |
JP6302103B2 (en) | Job net management apparatus and program | |
JP2022093876A (en) | Control device and maintenance support device therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080711 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100104 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100119 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100319 |
|
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: 20100506 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100517 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130521 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140521 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |