JP4009602B2 - Task processing method, apparatus, and program using real-time OS - Google Patents

Task processing method, apparatus, and program using real-time OS Download PDF

Info

Publication number
JP4009602B2
JP4009602B2 JP2004057684A JP2004057684A JP4009602B2 JP 4009602 B2 JP4009602 B2 JP 4009602B2 JP 2004057684 A JP2004057684 A JP 2004057684A JP 2004057684 A JP2004057684 A JP 2004057684A JP 4009602 B2 JP4009602 B2 JP 4009602B2
Authority
JP
Japan
Prior art keywords
event
level
deadline
time
identification information
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
Application number
JP2004057684A
Other languages
Japanese (ja)
Other versions
JP2005250659A (en
Inventor
広志 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Communication Systems Ltd
Original Assignee
NEC Communication Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Communication Systems Ltd filed Critical NEC Communication Systems Ltd
Priority to JP2004057684A priority Critical patent/JP4009602B2/en
Publication of JP2005250659A publication Critical patent/JP2005250659A/en
Application granted granted Critical
Publication of JP4009602B2 publication Critical patent/JP4009602B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、リアルタイムOSを用いたタスク処理方法、装置、及びプログラムに係り、特にリアルタイムOS上で認識されるイベントに応じて該当するイベント処理を実行するためのタスク処理方法、装置、及びプログラムに関する。   The present invention relates to a task processing method, apparatus, and program using a real-time OS, and more particularly, to a task processing method, apparatus, and program for executing event processing corresponding to an event recognized on the real-time OS. .

監視制御装置等のリアルタイム制御が要求されるコンピュータを用いた制御装置やシステムでは、プロセッサ(CPU)により実行されるオペレーティングシステム(OS)として、処理効率の高いリアルタイムOSが望まれている。リアルタイムOSでは、次に実行すべきタスクを決定するための処理、即ちタスクスケジューリングの機能(アルゴリズム)が採用され、優先度が同一又は異なる複数のタスクを時分割で切り替えながら、それぞれのタスクを並列実行可能となっている。   In a control device or system using a computer that requires real-time control, such as a monitoring control device, a real-time OS with high processing efficiency is desired as an operating system (OS) executed by a processor (CPU). The real-time OS employs a process (algorithm) for determining a task to be executed next, that is, a task scheduling function (algorithm), and switches tasks with the same priority level or different priority levels in a time-sharing manner. It is executable.

このようなリアルタイムOSのタスクスケジューリング方法では、処理効率向上のため、採用されるアルゴリズムの改善が図られてきた。   In such a task scheduling method of the real-time OS, improvement of an algorithm employed has been attempted in order to improve processing efficiency.

例えば、特許文献1によれば、優先度の小さいタスクの実行開始を次の割り込み発生時まで遅延させることが可能な場合、現在実行中のタスクの実行を継続することにより、タスクの切替回数を低減し、優先度の小さいタスクで発生しやすいデッドライン違反(デッドライン異常)を低減するようにしたリアルタイムOSのタスク制御装置およびそのタスクスケジューリング方法が記載されている。   For example, according to Patent Document 1, when the start of execution of a task with a low priority can be delayed until the next interrupt occurs, the task switching count can be reduced by continuing the execution of the currently executing task. A real-time OS task control device and a task scheduling method for reducing deadline violations (deadline abnormalities) that tend to occur in tasks with a low priority are described.

また、特許文献2によれば、周期的マルチメディアタスクをスケジューリングするためのソフトリアルタイムにおけるスケジューリング方法として、新しいタスク到着時点でのCPUの負荷状態に応じてスケジューリング可能かどうかを判断し、スケジューリング可能である場合にスケジューリング対象のすべてのタスクを実行し、すべてのタスクを実行した結果から得られる各タスクの通信待ち時間に応じて各タスクの適応デッドラインを設定するものが記載されている。
特開2001−236236号公報 特開2001−350639号公報
According to Patent Document 2, as a soft real-time scheduling method for scheduling periodic multimedia tasks, it is possible to determine whether scheduling is possible according to the load state of the CPU when a new task arrives. In some cases, all tasks to be scheduled are executed, and an adaptive deadline for each task is set according to the communication waiting time of each task obtained from the result of executing all tasks.
JP 2001-236236 A JP 2001-350639 A

しかしながら、上述した従来技術では、タスクスケジューリング方法のアルゴリズム改善により処理効率が向上する反面、CPUが過負荷状態となった場合やその負荷状態が継続して輻輳状態となった場合、処理遅延によるデッドライン異常が一旦発生すると、このデッドライン異常をタスク側で認識した場合でも、負荷状態はすぐには解消されず、そのデッドライン異常が継続して発生し続け、同じ異常対応処理を繰り返し実行してしまうことがあった。   However, in the above-described prior art, the processing efficiency is improved by improving the algorithm of the task scheduling method, but on the other hand, if the CPU is overloaded or the loaded state is continuously congested, dead due to processing delay Once a line error occurs, even if the task recognizes this deadline error, the load condition will not be resolved immediately, the deadline error will continue to occur, and the same error handling process will be repeated. There was a case.

本発明は、このような従来の事情を考慮してなされたもので、リアルタイムOSのタスク処理において、デッドライン異常が発生した場合に負荷状態が継続して同じ異常対応処理を繰り返し実行するという事態を回避することを目的とする。   The present invention has been made in consideration of such conventional circumstances, and in the task processing of the real-time OS, when a deadline abnormality occurs, the load state continues and the same abnormality handling process is repeatedly executed. The purpose is to avoid.

上記目的を達成するため、本発明に係るリアルタイムOSを用いたタスク処理方法は、リアルタイムOS上で認識されるイベントに応じて該当するイベント処理を実行するタスク処理方法であって、前記リアルタイムOSからのイベント通知時に、イベント識別情報に加え、前記イベント発生時からの遅延時間を受け取るステップと、前記イベント識別情報で識別されるイベント毎に前記遅延時間に基づいて予め設定されたデッドライン異常レベルを判定するレベル判定ステップと、前記イベント毎に前記デッドライン異常レベルの継続発生回数を計数する計数ステップと、前記イベント毎に前記デッドライン異常レベルの継続発生回数に基づいて、予め設定されたイベント処理を決定する処理決定ステップと、決定された前記イベント処理を実行するステップとを有し、前記レベル判定ステップは、前記イベント識別情報と前記遅延時間のしきい値から前記デッドライン異常レベルを判定するレベル判定用しきい値判定テーブルを使用し、前記計数ステップは、前記イベント識別情報と前記デッドライン異常レベル毎に前記デッドライン異常レベルの継続発生回数を計数する継続発生回数カウントテーブルを使用し、前記処理決定ステップは、前記イベント識別情報、前記デッドライン異常レベル、及び前記デッドライン異常レベルの継続発生回数のしきい値に関連付けてイベント処理を決定する処理決定テーブルを使用することを特徴とする。 In order to achieve the above object, a task processing method using a real-time OS according to the present invention is a task processing method for executing event processing corresponding to an event recognized on the real-time OS. A step of receiving a delay time from the event occurrence time in addition to the event identification information, and a deadline abnormality level set in advance based on the delay time for each event identified by the event identification information A level determination step for determining, a counting step for counting the number of continuous occurrences of the deadline abnormal level for each event, and a preset event process based on the number of continuous occurrences of the deadline abnormal level for each event A process determining step for determining the event process and the determined event process Possess and executing, said level determination step, using the level determining threshold value determination table determines the deadline abnormal level from the threshold of the event identification information and the delay time, the counting step Uses a continuous occurrence count table that counts the number of continuous occurrences of the deadline abnormality level for each of the event identification information and the deadline abnormality level, and the process determining step includes the event identification information, the deadline abnormality A process determination table that determines an event process in association with a level and a threshold value of the number of continuous occurrences of the deadline abnormality level is used .

本発明に係るリアルタイムOSを用いたタスク処理方法において、前記イベント処理は、前記イベント毎に同一の前記デッドライン異常レベル内で前記継続発生回数によって割り当てられる複数段階の処理を含み、前記複数段階の処理は、複数段階の準正常処理、及び複数段階の異常処理を含んでもよい。 In task processing method using the real time OS according to the present invention, pre-Symbol event processing includes processing a plurality of steps to be assigned by the continuous occurrences of the same the deadline abnormal level in each said event, said plurality of stages This process may include a plurality of stages of quasi-normal processes and a plurality of stages of abnormal processes.

本発明に係るタスク処理装置は、リアルタイムOS上で認識されるイベントに応じて該当するイベント処理を実行するタスク処理装置であって、前記リアルタイムOSからのイベント通知時に、イベント識別情報に加え、前記イベント発生時からの遅延時間を受け取る手段と、前記イベント識別情報で識別されるイベント毎に前記遅延時間に基づいて予め設定されたデッドライン異常レベルを判定するレベル判定手段と、前記イベント毎に前記デッドライン異常レベルの継続発生回数を計数する計数手段と、前記イベント毎に前記デッドライン異常レベルの継続発生回数に基づいて、予め設定されたイベント処理を決定する処理決定手段と、決定された前記イベント処理を実行する手段とを有し、前記レベル判定手段は、前記イベント識別情報と前記遅延時間のしきい値から前記デッドライン異常レベルを判定するレベル判定用しきい値判定テーブルを有し、前記計数手段は、前記イベント識別情報と前記デッドライン異常レベル毎に前記デッドライン異常レベルの継続発生回数を計数する継続発生回数カウントテーブルを有し、前記処理決定手段は、前記イベント識別情報、前記デッドライン異常レベル、及び前記デッドライン異常レベルの継続発生回数のしきい値に関連付けてイベント処理を決定する処理決定テーブルを有することを特徴とする。 A task processing device according to the present invention is a task processing device that executes event processing corresponding to an event recognized on a real-time OS, and in addition to event identification information at the time of event notification from the real-time OS, Means for receiving a delay time from the occurrence of an event; level determining means for determining a preset deadline abnormality level based on the delay time for each event identified by the event identification information; and Counting means for counting the number of continuous occurrences of the deadline abnormal level, processing determining means for determining a preset event process based on the number of continuous occurrences of the deadline abnormal level for each event, and the determined have a means for executing the event process, the level determining means, said event identification information And a threshold determination table for level determination for determining the deadline abnormality level from the delay time threshold, and the counting means includes the deadline abnormality for each of the event identification information and the deadline abnormality level. A continuous occurrence count table that counts the number of continuous occurrences of a level, wherein the process determining means associates with the event identification information, the deadline abnormal level, and a threshold of the number of continuous occurrences of the deadline abnormal level And a process determination table for determining event processes .

本発明に係るプログラムは、リアルタイムOS上で認識されるイベントに応じて該当するイベント処理を実行するタスク処理装置で用いる制御プログラムであって、コンピュータに、前記リアルタイムOSからのイベント通知時に、イベント識別情報に加え、前記イベント発生時からの遅延時間を受け取るステップと、前記イベント識別情報で識別されるイベント毎に前記遅延時間に基づいて予め設定されたデッドライン異常レベルを判定するレベル判定ステップと、前記イベント毎に前記デッドライン異常レベルの継続発生回数を計数する計数ステップと、前記イベント毎に前記デッドライン異常レベルの継続発生回数に基づいて、予め設定されたイベント処理を決定する処理決定ステップと、決定された前記イベント処理を実行するステップとを実行させるためのものであり、前記レベル判定ステップは、前記イベント識別情報と前記遅延時間のしきい値から前記デッドライン異常レベルを判定するレベル判定用しきい値判定テーブルを使用し、前記計数ステップは、前記イベント識別情報と前記デッドライン異常レベル毎に前記デッドライン異常レベルの継続発生回数を計数する継続発生回数カウントテーブルを使用し、前記処理決定ステップは、前記イベント識別情報、前記デッドライン異常レベル、及び前記デッドライン異常レベルの継続発生回数のしきい値に関連付けてイベント処理を決定する処理決定テーブルを使用することを特徴とするThe program according to the present invention is a control program used in a task processing device that executes event processing corresponding to an event recognized on the real-time OS, and is configured to identify an event when an event is notified to the computer from the real-time OS. In addition to information, a step of receiving a delay time from the time of the event occurrence, a level determination step of determining a preset deadline abnormality level based on the delay time for each event identified by the event identification information, A counting step for counting the number of continuous occurrences of the deadline abnormal level for each event; a process determining step for determining a preset event process based on the number of continuous occurrences of the deadline abnormal level for each event; A step for executing the determined event processing. All SANYO for executing the flop, said level determination step, using the level determining threshold value determination table determines the deadline abnormal level from the threshold of the event identification information and the delay time The counting step uses a continuous occurrence count table that counts the event identification information and the number of continuous occurrences of the deadline abnormal level for each deadline abnormal level, and the process determining step includes the event identification information, A process determination table for determining event processing in association with the threshold of the deadline abnormal level and the number of continuous occurrences of the deadline abnormal level is used .

本発明によれば、イベント発生時刻からタスク側へのイベント実行遅延時間と、デッドライン異常の発生した回数とに応じて、正常処理、準正常処理、異常処理等のイベント処理のデッドライン異常に対する異常対応処理の段階を細かく設定して実行することができ、これによりデッドライン異常が発生した場合、タスク側で負荷状態が継続して同じ異常対応処理のタスクを繰り返し実行する事態を回避することができる。   According to the present invention, depending on the event execution delay time from the event occurrence time to the task side and the number of times the deadline abnormality has occurred, the deadline abnormality of event processing such as normal processing, semi-normal processing, abnormal processing, etc. It is possible to execute by setting the stage of the error handling process in detail, and when a deadline error occurs, avoid the situation where the task continues to load and the task of the same error handling process is repeated Can do.

次に、本発明に係るリアルタイムOSを用いたタスク処理方法、装置、及びプログラムを実施するための最良の形態について、図面を参照して詳細に説明する。   Next, the best mode for carrying out a task processing method, apparatus, and program using a real-time OS according to the present invention will be described in detail with reference to the drawings.

本実施例のタスク処理装置は、例えば監視制御装置等のリアルタイム制御が要求される制御装置に適用されるものである。   The task processing device according to the present embodiment is applied to a control device that requires real-time control, such as a monitoring control device.

図1は、本実施例のタスク処理装置の構成例を示す。図1に示すタスク処理装置1は、ハードウェア構成上、プログラム制御で動作するCPU(プロセッサ)11と、CPU11により実行されるソフトウェア14が格納されるメモリ(RAM/RAM)12と、入力器や表示器等のI/O(入出力)機器2に接続されるI/Oポート13とを有する。   FIG. 1 shows a configuration example of a task processing apparatus according to this embodiment. A task processing device 1 shown in FIG. 1 includes a CPU (processor) 11 that operates under program control, a memory (RAM / RAM) 12 that stores software 14 executed by the CPU 11, and an input device, And an I / O port 13 connected to an I / O (input / output) device 2 such as a display.

図2は、ソフトウェア14の構成例を概念的に示す。図2に示すソフトウェア14には、リアルタイムOS15と、このリアルタイムOS15上で動作する制御プログラム16と、リアルタイムOS15上で認識される各種イベント1〜yに応じてこれに該当するイベント1〜y処理を実行するためのイベント処理用プログラム17の実行単位として、リアルタイムOS15の管理下で起動(生成)されるタスク18(図中の例では複数のタスク1〜yが起動している場合を例示している。)と、このタスク18側で実行されるイベント実行準備処理(後述参照)時に参照される参照テーブル19とを有する。   FIG. 2 conceptually shows a configuration example of the software 14. The software 14 shown in FIG. 2 includes a real-time OS 15, a control program 16 that operates on the real-time OS 15, and event 1 -y processes corresponding to various events 1 -y recognized on the real-time OS 15. As an execution unit of the event processing program 17 to be executed, a task 18 activated (generated) under the management of the real-time OS 15 (in the example in the figure, a case where a plurality of tasks 1 to y are activated is illustrated) And a reference table 19 referred to in event execution preparation processing (described later) executed on the task 18 side.

リアルタイムOS15には、機能上、タスク18側で実行されるイベント処理を制御するタスク制御部21が含まれる。タスク制御部21には、タスク18に与えられる優先度レベル(優先順位)に基づいて次に実行すべきタスク18を決定するためのタスクスケジューリングの機能として、イベント1〜yの発生を認識する機能、イベント1〜yの発生を、そのイベントを識別可能なイベント識別情報(以下、説明の都合上、「イベント番号(イベントID)1〜y」と呼ぶ)と共にタスク18側に通知するイベント通知機能が含まれる。リアルタイムOS15では、イベント発生からタスク18側へのイベント通知までの間、優先度レベルの低いタスク18の実行待ち時間や、優先度レベルが同一のタスク17間での競合における実行待ち時間、同一タスク18内での待ちイベントの連続発生におけるイベント通知待ち時間が発生し、これら待ち時間がイベント発生時刻からイベント通知時刻の間の「イベント通知遅延時間」Tとなる。そこで、本実施例のイベント通知機能は、そのイベント通知遅延時間Tを計測し、計測されたイベント通知遅延時間Tをイベント番号1〜yに付加してイベント通知を行うようになっている。   The real-time OS 15 includes a task control unit 21 that controls event processing executed on the task 18 side. The task control unit 21 has a function of recognizing the occurrence of events 1 to y as a task scheduling function for determining the next task 18 to be executed based on the priority level (priority order) given to the task 18. An event notification function for notifying the task 18 of the occurrence of events 1 to y together with event identification information (hereinafter referred to as “event numbers (event IDs) 1 to y” for convenience of explanation) that can identify the events. Is included. In the real-time OS 15, the execution waiting time of the task 18 having a low priority level, the execution waiting time in the competition between the tasks 17 having the same priority level, the same task, from the event occurrence to the event notification to the task 18 side. The event notification waiting time in the continuous occurrence of the waiting events within 18 occurs, and these waiting times become the “event notification delay time” T between the event occurrence time and the event notification time. Therefore, the event notification function of this embodiment measures the event notification delay time T, and adds the measured event notification delay time T to event numbers 1 to y to perform event notification.

イベント処理用プログラム17は、ソフトウェア14(リアルタイムOS15及び制御プログラム16等)を成すプログラム部品(モジュール)で構成され、本実施例ではイベント1〜yに応じたイベント1〜y処理用プログラムIV1〜IVyから構成される。   The event processing program 17 is composed of program parts (modules) constituting the software 14 (real-time OS 15 and control program 16 and the like). In this embodiment, the event processing programs IV1 to IVy corresponding to the events 1 to y are used. Consists of

図3は、イベント処理用プログラム17の構成例を示す。図3に示すイベント1処理用プログラムIV1には、後述のデッドラインレベル(デッドライン異常レベル)毎に割り当てられる複数の処理プログラム、即ちレベル1用正常処理プログラム(EV1_1)、レベル2用準正常処理1プログラム(EV1_2_1)、レベル2用準正常処理2プログラム(EV1_2_2)、レベル3用異常処理1プログラム(EV1_3_1)、レベル3用異常処理2プログラム(EV1_3_2)、レベル3用異常処理3プログラム(EV1_3_3)、レベルx用異常処理1プログラム(EV1_x_1)、レベルx用異常処理2プログラム(EV1_x_1)が含まれる。図3の例では、イベント1処理用プログラムIV1のみ例示するが、その他のイベント2〜イベントy処理用プログラムIV2〜IVyについても同様である。   FIG. 3 shows a configuration example of the event processing program 17. The event 1 processing program IV1 shown in FIG. 3 includes a plurality of processing programs assigned for each deadline level (deadline abnormal level) described later, that is, a normal processing program for level 1 (EV1_1) and a semi-normal processing for level 2. 1 program (EV1_2_1), level 2 semi-normal processing 2 program (EV1_2_2), level 3 abnormal processing 1 program (EV1_3_1), level 3 abnormal processing 2 program (EV1_3_2), level 3 abnormal processing 3 program (EV1_3_3) The level x abnormality processing 1 program (EV1_x_1) and the level x abnormality processing 2 program (EV1_x_1) are included. In the example of FIG. 3, only the event 1 processing program IV1 is illustrated, but the same applies to the other event 2 to event y processing programs IV2 to IVy.

図4は、参照テーブル19の構成例を示す。図4に示すように、参照テーブル19には、レベル判定用しきい値テーブル31、同一レベル継続発生回数カウントテーブル32、及び同一レベル継続発生回数マトリクステーブル(イベント実行処理マトリクステーブル)33が含まれる。   FIG. 4 shows a configuration example of the reference table 19. As shown in FIG. 4, the reference table 19 includes a level determination threshold table 31, the same level continuous occurrence count table 32, and the same level continuous occurrence count matrix table (event execution processing matrix table) 33. .

図5は、レベル判定用しきい値テーブル31のデータ構造を示す。図5の例では、イベントを識別するイベント番号1〜yと、イベント処理のタスク実行に関するデッドラインレベルのレベル1〜xとを互いに関連付けるマトリクステーブルのマトリクス位置に、イベント通知遅延時間Tのしきい値が設定される。   FIG. 5 shows the data structure of the level determination threshold table 31. In the example of FIG. 5, the threshold of the event notification delay time T is set at the matrix position of the matrix table that associates the event numbers 1 to y for identifying the event with the levels 1 to x of the deadline level related to the task execution of the event processing. Value is set.

例えば、イベント1に対し、イベント通知遅延時間Tが「0ms(ミリ秒)から10ms以内」の範囲を「レベル1」と定義する場合は、「イベント1」と「レベル1」とのマトリクス位置に、しきい値として「10ms」が設定される。同様に、イベント通知遅延時間Tが「11msから20ms以内」の範囲を「レベル2」と定義する場合は、「イベント1」と「レベル2」とのマトリクス位置に、しきい値として「20ms」が設定される。また、デッドラインレベルの最高レベルとなる「レベルx」については、本実施例ではイベント通知遅延時間Tが「1000ms」より大きい場合全てというように上限値を設けない条件で設定する。その他、レベル2を設定せずにレベル1からレベル3と続く場合等は、該当するレベル2のしきい値は、レベル1と同値を設定する等し、レベル判定の際は、レベルの低い方から判定に用いる(図中の例では、イベント2のレベル1及び2の関係参照)。   For example, for event 1, when the range where event notification delay time T is “within 10 ms from 0 ms (milliseconds)” is defined as “level 1”, the matrix position of “event 1” and “level 1” “10 ms” is set as the threshold value. Similarly, when the range where the event notification delay time T is “within 20 ms from 11 ms” is defined as “level 2”, the threshold value “20 ms” is set at the matrix position of “event 1” and “level 2”. Is set. Further, “level x” that is the highest deadline level is set under the condition that no upper limit value is provided, such as all cases where the event notification delay time T is greater than “1000 ms” in this embodiment. In addition, when level 1 is continued from level 1 to level 3 without setting level 2, the threshold value of the corresponding level 2 is set to the same value as level 1, and the lower level is used for level judgment. (In the example in the figure, refer to the relationship between levels 1 and 2 of event 2).

これにより、イベント通知遅延時間Tのしきい値に基づいて、イベント1〜y毎にデッドラインレベルのレベル1〜xが判定可能となっている。   Thereby, based on the threshold value of the event notification delay time T, the levels 1 to x of the deadline level can be determined for each event 1 to y.

図6は、同一レベル継続発生回数カウントテーブル32のデータ構造を示す。図6の例では、イベント番号1〜yと、デッドラインレベルのレベル1〜xとを互いに関連付けるマトリクステーブルのマトリクス位置がカウンタとして設定され、そのマトリクス位置に、図5のレベル判定用しきい値テーブル31で判定されたイベント1〜y毎のデッドラインレベルのレベル1〜xと同一レベルが継続して発生する場合の継続発生回数Xが更新(カウントアップ及びリセット)可能に記憶される。これにより、同じイベントでデッドラインレベルが判定される度に該当するマトリクス位置の継続発生回数Xを1回カウントアップし、前回のレベルから変化があった場合は該当するマトリクス位置の継続発生回数Xを0回にリセットすることが可能となっている。   FIG. 6 shows the data structure of the same level continuous occurrence count table 32. In the example of FIG. 6, the matrix position of the matrix table that correlates the event numbers 1 to y and the deadline level levels 1 to x is set as a counter, and the level determination threshold value of FIG. When the same level as the level 1 to x of the deadline level determined for each event 1 to y determined in the table 31 is continuously generated, the number X of continuous occurrences is stored so that it can be updated (counted up and reset). As a result, every time the deadline level is determined in the same event, the continuous occurrence number X of the corresponding matrix position is counted up once, and if there is a change from the previous level, the continuous occurrence number X of the corresponding matrix position. Can be reset to 0 times.

図7及び図8は、同一レベル継続発生回数マトリクステーブル33のデータ構造を示す。図7の例では、イベント番号1〜yと、デッドラインレベルのレベル1〜xとを互いに関連付けるマトリクステーブルのマトリクス位置に、図6の同一レベル継続発生回数カウントテーブル32でカウントされた継続発生回数Xに応じて「イベント処理名」を設定可能となっている。図8の例では、図7と同様の関係を、各イベント1〜yの各レベル1〜x毎に個別に分けて示したものである。   7 and 8 show the data structure of the same level continuous occurrence frequency matrix table 33. FIG. In the example of FIG. 7, the number of continuous occurrences counted in the same level continuous occurrence count count table 32 in FIG. 6 at the matrix position of the matrix table that associates the event numbers 1 to y and the levels 1 to x of the deadline level with each other. An “event processing name” can be set according to X. In the example of FIG. 8, the same relationship as in FIG. 7 is shown separately for each level 1 to x of each event 1 to y.

例えば、各イベント1〜yと各レベル1〜x毎に継続発生回数Xによって処理を分けるため、初回の場合(X=1)、2回目以降(X>1)の場合、a回目以降(X>a、例えばa=10又は20等)の場合等、継続発生回数X毎に同一レベル継続発生回数マトリクステーブル33にて該当する「イベント処理名」が設定される。イベント処理名は、前述したイベント1〜y処理用プログラムIV1〜IVy(図3参照)に対応する。   For example, since the processing is divided according to the number of continuous occurrences X for each event 1 to y and each level 1 to x, the first time (X = 1), the second time or later (X> 1), the ath time (X > A (for example, a = 10 or 20), the corresponding “event process name” is set in the same level continuous occurrence count matrix table 33 for each continuous occurrence count X. The event processing names correspond to the above-described events 1 to y processing programs IV1 to IVy (see FIG. 3).

図9及び図10は、タスク18側のイベント実行準備処理を説明するものである。図9及び図10に示すイベント実行準備処理は、CPU11がメモリ12上の処理プログラム(リアルタイムOS15及び制御プログラム16の少なくとも一方)を実行することにより、行われる。   9 and 10 explain the event execution preparation process on the task 18 side. The event execution preparation process shown in FIGS. 9 and 10 is performed by the CPU 11 executing a processing program (at least one of the real-time OS 15 and the control program 16) on the memory 12.

図9に示すように、タスク18側では、タスク制御部21からイベント通知を受けると、イベント実行準備処理を実行する(ステップSt10)。この処理実行に際し、イベント番号1〜y及びイベント通知遅延時間Tを入力すると(ステップSt21)、レベル判定用しきい値テーブル31を参照して(ステップSt22)、イベント番号1〜yで認識されるイベント1〜y毎にイベント通知遅延時間Tに基づいてデッドラインレベルを判定する(ステップSt23)。   As shown in FIG. 9, when an event notification is received from the task control unit 21, the task 18 side executes an event execution preparation process (step St10). When this process is executed, if event numbers 1 to y and event notification delay time T are input (step St21), the level determination threshold table 31 is referenced (step St22), and the event numbers 1 to y are recognized. The deadline level is determined for each event 1 to y based on the event notification delay time T (step St23).

これにより、図10の例に示すように、イベント1〜y毎に、0≦T≦Tr1(しきい値1)の場合は遅延時間Tとして実質的に問題の無い「レベル1」、Tr1<T≦Tr2(しきい値2)の場合は遅延と認識し再処理を行っても実質的に問題の無い「レベル2」、Tr2<T≦Tr3(しきい値3)のときは処理的にデッドタイムとする「レベル3」とし、以下同様にTrx−2(しきい値x−2)<T≦Trx−1(しきい値x−1)の場合は「レベルx−1」とし、最後にTrx−1(しきい値x−1)<Tの場合は「レベルx」となるよう判定される。   As a result, as shown in the example of FIG. 10, for each event 1 to y, when 0 ≦ T ≦ Tr1 (threshold value 1), “level 1”, Tr1 < When T ≦ Tr2 (threshold value 2), it is recognized as a delay and “level 2” is not problematic even if reprocessing is performed. When Tr2 <T ≦ Tr3 (threshold value 3), processing is performed. “Level 3” is set as dead time, and similarly, “Trx-2 (threshold value x-2) <T ≦ Trx−1 (threshold value x−1)” is set to “level x−1”, and finally, If Trx-1 (threshold value x-1) <T, it is determined to be "level x".

次いで、同一レベル継続発生回数カウントテーブル32を参照して(ステップSt24)、イベント1〜yに応じて判定されたデッドラインレベルが前回と同一レベルの場合は(ステップSt25、YES)、該当するマトリクス位置の継続発生回数Xをカウントアップし(ステップSt26)、前回と同一レベルでなく、即ちレベルが変化した場合は(ステップSt25、NO)、前回のレベルに該当するマトリクス位置の継続発生回数Xをクリアし(ステップSt27)、今回判定されたレベルに該当するマトリクス位置の継続発生回数Xをカウントアップする(ステップSt28)。   Next, referring to the same level continuation occurrence count table 32 (step St24), if the deadline level determined according to events 1 to y is the same level as the previous time (step St25, YES), the corresponding matrix The number X of continuous occurrences of the position is counted up (step St26). If the level is not the same as the previous time, that is, if the level has changed (step St25, NO), the number of continuous occurrences X of the matrix position corresponding to the previous level is calculated. It is cleared (step St27), and the continuous occurrence count X of the matrix position corresponding to the level determined this time is counted up (step St28).

次いで、カウントされた継続発生回数Xを入力すると(ステップSt29)、同一レベル継続発生回数マトリクステーブル33を参照して(ステップSt30)、イベント処理名、即ち実行すべきイベント処理を決定する(ステップSt31)。   Next, when the counted number X of continuous occurrences is input (step St29), the event process name, that is, the event process to be executed is determined with reference to the same level continuous occurrence number matrix table 33 (step St30) (step St31). ).

これにより、図10の例に示すように、「レベル1」の場合はXに関係なく「正常処理」、「レベル2」の場合はX=1(1回目)のときに「準正常処理1」、X>1(2回目以降)のときに「準正常処理2」、「レベル3」の場合はX=1のときに「異常処理1」、X>1のときに「異常処理2」、X>a(例えば、a=10又は20)のときに「異常処理3」、「レベルx」の場合はX=1のときに「異常処理1」、X>1のときに「異常処理2」となるよう決定される。具体的には、同一レベル継続発生回数マトリクステーブル33内のイベント番号1〜y、レベル1〜x、及び継続発生回数Xで決まるマトリクス位置に設定されたイベント処理名、即ちイベント処理用プログラム17がコールされる。   As a result, as shown in the example of FIG. 10, “level 1” is “normal processing” regardless of X, and “level 2” is “quasi-normal processing 1” when X = 1 (first time). ”,“ Semi-normal processing 2 ”when X> 1 (second and later),“ Abnormal processing 1 ”when X = 1 when“ Level 3 ”,“ Abnormal processing 2 ”when X> 1 , X> a (for example, a = 10 or 20), “abnormal processing 3”, “level x”, “abnormal processing 1” when X = 1, “abnormal processing” when X> 1 2 ". Specifically, the event processing name set in the matrix position determined by the event numbers 1 to y, levels 1 to x, and the continuous occurrence count X in the same level continuous occurrence count matrix table 33, that is, the event processing program 17 is stored. Called.

上記イベント処理については、使用されるシステムに応じて異なる場合もあるが、本実施例では、イベント通知遅延時間Tとして実質的に問題の無い「レベル1」では、通常の「正常処理」を行い、遅延と認識し再処理(リトライ処理)を行っても実質的に問題の無い「レベル2」では、継続発生回数Xが初回の場合は「準正常処理1」を行い、2回目以降も継続して発生する場合は「準正常処理2」を行い、処理的にデッドタイムとする「レベル3」では、継続発生回数Xが初回であれば異常警報を発して処理を中止する「異常処理1」を行い、発生回数が2回目以降であれば処理を行わない等の異常停止を行う「異常処理2」等、遅延時間T及び継続発生回数Xによって段階的に処理が区分される。   The above event processing may differ depending on the system used, but in this embodiment, normal “normal processing” is performed at “level 1”, which has substantially no problem as the event notification delay time T. In “level 2”, which is recognized as a delay and re-processed (retry process), there is virtually no problem. If the number of continuous occurrences X is the first time, “quasi-normal process 1” is performed and the second and subsequent times are continued. If the error occurs, “quasi-normal processing 2” is performed. In “level 3”, which is a dead time in processing, if the continuous occurrence count X is the first time, an abnormal alarm is issued and the processing is stopped. The process is divided stepwise according to the delay time T and the number of continuous occurrences X, such as “abnormal process 2” in which an abnormal stop is performed such that the process is not performed if the occurrence number is the second or later.

次いで、上記イベント実行準備処理で決定されたイベント処理、即ち正常処理、準正常処理1、2、及びレベル3以降の各レベルにおける異常処理1、2、3のいずれかに該当するイベント処理用プログラム17が実行される(ステップSt20)。   Next, the event processing program corresponding to any of the event processing determined in the event execution preparation processing, that is, normal processing, quasi-normal processing 1, 2 and abnormal processing 1, 2, 3 in each level after level 3. 17 is executed (step St20).

これにより、例えば、デッドラインレベルが「レベル2」の場合、初回発生時の「準正常処理2」では、再処理(リトライ処理)、2回目以降の「準正常処理2」では処理中断、またデッドラインレベルがレベル3の場合、初回発生時の「異常処理2」ではCPUの輻輳状態や半暴走状態が考えられ回復できない状態と判断し、他装置等の外部へ処理できなかったことを通知する処理、2回目以降の「異常処理2」では全処理を中断しアラーム(ALM)を通知する処理など、イベント処理を分離して実行できる。また、デッドラインレベルの高い時には、ソフトウェア自ら暴走検出(ウォッチドックタイマ・タイムアウト)機能を持つこととなり、さらにどのイベントでそれが発生したのか、何回その状態を継続しているかを把握することが可能となる。   Thus, for example, when the deadline level is “level 2”, the “semi-normal process 2” at the first occurrence is reprocessed (retry process), the second and subsequent “semi-normal process 2” is interrupted, or When the deadline level is level 3, it is judged that the abnormal condition 2 at the first occurrence cannot be recovered because the CPU is congested or semi-runaway, and it is not possible to process to other devices. In the second and subsequent “abnormal process 2”, event processes such as a process for interrupting all processes and notifying an alarm (ALM) can be performed separately. In addition, when the deadline level is high, the software itself has a runaway detection (watchdog timer / timeout) function, and it is possible to grasp which event has occurred and how many times the state has continued. It becomes possible.

次に、図11及び図12を参照して、本実施例の全体動作を説明する。   Next, the overall operation of the present embodiment will be described with reference to FIGS.

まず、図11に示すように、時刻t1にて、リアルタイムOS15内でイベント1が発生したとする。このイベント発生に際し、タスク制御部21にて、イベント発生からタスク18側へのイベント通知までの間、優先度レベルの低いタスク18の実行待ち、優先度レベルの同一タスク18での競合における実行待ち、同一タスク18内での待ちイベントの連続発生におけるイベントの通知待ち時間が計測され、タスク18側へのイベント通知時t2にイベント通知遅延時間T1(例えば、T1=20ms)を付加したイベント通知が行われる(ステップSt11)。   First, as shown in FIG. 11, it is assumed that event 1 occurs in the real-time OS 15 at time t1. When this event occurs, the task control unit 21 waits for execution of a task 18 with a low priority level and waits for execution in a conflict with the same task 18 with the same priority level between the event occurrence and the event notification to the task 18 side. The event notification waiting time in the continuous occurrence of the waiting event in the same task 18 is measured, and an event notification in which an event notification delay time T1 (for example, T1 = 20 ms) is added to the event notification time t2 to the task 18 side. Performed (step St11).

これにより、タスク18側では、図12に示すイベント実行準備処理(ステップSt10)が実行される。即ち、タスク制御部21よりイベント通知時間T1が付加されたイベント通知を受けると(ステップSt11)、レベル判定用しきい値テーブル31を参照して、イベント番号とイベント通知遅延時間T1とで求まるマトリクス位置によりデッドラインレベルが判定される(ステップSt12)。図12の例では、イベント1及びT1=20msから、「レベル3」と判定された場合を示す。   Thereby, on the task 18 side, the event execution preparation process (step St10) shown in FIG. 12 is executed. That is, when an event notification to which the event notification time T1 is added is received from the task control unit 21 (step St11), the matrix obtained by the event number and the event notification delay time T1 is referred to the level determination threshold table 31. The deadline level is determined based on the position (step St12). The example of FIG. 12 shows a case where “level 3” is determined from event 1 and T1 = 20 ms.

次いで、同一レベル継続発生カウントテーブル32を参照して、同じイベントで同じレベルが繰り返し発生する場合は、該当するマトリクス位置(カウンタ)の継続発生回数Xのカウント値を1回アップし、レベル変化が発生した場合には前回のレベルのカウント値をクリアする(ステップSt13)。図12の例では、同一レベル、即ちレベル3内で、X=6からX=7にカウントアップされた場合を示す。   Next, referring to the same level continuous occurrence count table 32, if the same level is repeatedly generated in the same event, the count value of the continuous occurrence count X of the corresponding matrix position (counter) is increased by 1 to change the level. If it occurs, the count value of the previous level is cleared (step St13). The example of FIG. 12 shows a case where the count is increased from X = 6 to X = 7 within the same level, that is, level 3.

次いで、同一レベル継続発生カウントテーブル33を参照して、判定されたレベルと、そのレベルでの継続発生回数X(カウント値)に基づいて、該当するイベント処理名のプログラムが決定され、イベント処理用プログラム17側にコールされる(ステップSt14)。図12の例では、イベント1、レベル3、及びX=7に基づいて、イベント1処理用プログラムEV1のレベル3用異常処理2プログラム(EV1_3_2)が決定された場合を示す。   Next, with reference to the same level continuous occurrence count table 33, the program of the corresponding event processing name is determined based on the determined level and the number of continuous occurrences X (count value) at that level, and for event processing Called to the program 17 side (step St14). The example of FIG. 12 shows a case where the level 1 abnormality processing 2 program (EV1_3_2) of the event 1 processing program EV1 is determined based on the event 1, level 3, and X = 7.

最後に、上記イベント実行準備処理によりコールされたイベント処理名のプログラムが実行される(ステップSt20)。図12の例では、イベント1処理用プログラムEV1のレベル3用異常処理2プログラム(EV1_3_2)が実行された場合を示す。   Finally, the program with the event process name called by the event execution preparation process is executed (step St20). The example of FIG. 12 shows a case where the level 3 abnormality processing 2 program (EV1_3_2) of the event 1 processing program EV1 is executed.

以下同様に、図11に戻り、上記イベント1処理が実行中の時刻t3にてリアルタイムOS15内で発生したイベント2に対しては、イベント1処理終了後の時刻t5にてイベント通知遅延時間T2が付加されたイベント通知が行われ、これにより、タスク18側にて上記処理にて決定されるイベント2処理が実行され、このイベント2処理が実行中の時刻t4にて発生したイベント3に対しては、イベント1処理終了後の時刻t5にて時刻t6イベント通知遅延時間T3が付加されたイベント通知が行われ、これにより、タスク18側にて上記処理にて決定されるイベント3処理が実行される。   Similarly, returning to FIG. 11, for event 2 that occurred in the real-time OS 15 at the time t3 when the event 1 process is being executed, the event notification delay time T2 is set at the time t5 after the end of the event 1 process. The added event notification is performed, whereby the event 2 process determined by the above process is executed on the task 18 side, and the event 3 generated at the time t4 when the event 2 process is being executed is performed. The event notification to which the time t6 event notification delay time T3 is added is performed at time t5 after the end of the event 1 processing, whereby the event 3 processing determined by the above processing is executed on the task 18 side. The

従って、本実施例によれば、実際のイベント発生時刻からタスク18側でイベント処理を行うまでにリアルタイムOS15上のタスク制御で発生するイベント通知遅延時間Tを通知することで、タスク18側にて遅延時間のデッドラインレベル判定を行いそのレベルに応じた処理を実行できる。例えば、イベント発生からのイベント通知遅延時間Tがしきい値2以内、即ち「レベル1」であれば、通常処理、またしきい値1より大きくしきい値2以内、即ち「レベル2」であれば、準正常処理で、同一レベルの継続発生回数Xが初回の場合は準正常処理1、2回目以降の場合は準正常処理2、さらにしきい値2より大きい「レベル3」であれば、異常処理等、処理を細かく分けることが可能となり、タスク側で準正常処理、異常処理、デッドライン異常処理等を行うことができる。   Therefore, according to this embodiment, by notifying the event notification delay time T generated by the task control on the real-time OS 15 from the actual event occurrence time to the event processing on the task 18 side, It is possible to determine the deadline level of the delay time and execute processing corresponding to the level. For example, if the event notification delay time T from the occurrence of an event is within the threshold value 2, that is, “level 1”, it is normal processing, and is greater than the threshold value 1 and within the threshold value 2, that is, “level 2” For example, in the case of quasi-normal processing, if the number X of continuous occurrences of the same level is the first time, quasi-normal processing 1, if it is the second or later, quasi-normal processing 2, and if “level 3” is greater than the threshold 2, It is possible to subdivide the processing such as abnormal processing, and quasi-normal processing, abnormal processing, deadline abnormal processing, etc. can be performed on the task side.

これによれば、イベント通知遅延時間に加え、同一レベルが繰り返し発生する場合の継続発生回数を考慮に入れてイベント処理を実行するため、イベント通知遅延時間のみのでデッドライン異常レベルの振り分けを行なう場合と比べ、次の利点がある。   According to this, in addition to the event notification delay time, event processing is performed taking into account the number of continuous occurrences when the same level occurs repeatedly. Has the following advantages:

即ち、イベント通知遅延時間のみを考慮に入れたイベント処理の場合は、イベントの発生から実際にタスク側で処理されるまで、優先度レベルが同一のタスクで同時にイベント発生した場合や、高優先度タスク内でイベント発生が多発した場合などにリアルタイムOS上のタスク側へのイベント待ち時間が発生した場合、デッドライン異常においてデッドライン異常レベルに応じた該当イベント処理を行なっても、デッドライン異常に応じたイベント処理は発生した回数を意識しないため、負荷状態が継続した場合に同様のイベント処理が継続され何度も実行される事態が生じるが、本実施例のようにイベント通知遅延時間に加え同一レベルの継続発生回数を考慮に入れたイベント処理の場合は、このような事態を回避できる。   In other words, in the event processing that takes into account only the event notification delay time, from the occurrence of an event until the task is actually processed on the task side, when an event occurs at the same time at the same priority level, or high priority If an event waiting time to the task side on the real-time OS occurs when events occur frequently in the task, even if the corresponding event processing corresponding to the deadline abnormality level is performed in the deadline abnormality, the deadline abnormality will occur. Since the corresponding event processing is not aware of the number of occurrences, if the load state continues, the same event processing will continue and will be executed many times, but in addition to the event notification delay time as in this example Such a situation can be avoided in the case of event processing that takes into account the number of continuous occurrences of the same level.

さらに、本実施例では、イベント通知遅延時間、及びデッドラインの各レベル発生回数を外部ソフトウェアや他装置に通知することにより、イベント発生からの遅延時間を考慮した処理を行え、デバッグ機能的にCPUの負荷状況の把握することができる。   Furthermore, in this embodiment, the event notification delay time and the number of occurrences of each level of the deadline are notified to external software and other devices, so that processing considering the delay time from the event occurrence can be performed, and the CPU is functionally debugged. It is possible to grasp the load situation.

本発明の実施例のタスク処理装置の構成を示す図である。It is a figure which shows the structure of the task processing apparatus of the Example of this invention. 図1に示すタスク処理装置のソフトウェア構成を示す図である。It is a figure which shows the software structure of the task processing apparatus shown in FIG. 図2に示すイベント処理用プログラムの構成を示す図である。It is a figure which shows the structure of the program for event processing shown in FIG. 図2に示す参照テーブルの構成を示す図である。It is a figure which shows the structure of the reference table shown in FIG. 図4に示すレベル判定用しきい値テーブルのデータ構造図である。FIG. 5 is a data structure diagram of a level determination threshold table shown in FIG. 4. 図4に示す同一レベル継続発生回数カウントテーブルのデータ構造図である。It is a data structure figure of the same level continuation occurrence frequency count table shown in FIG. 図4に示す同一レベル継続発生回数マトリクステーブルのデータ構造図である。It is a data structure figure of the same level continuation occurrence frequency matrix table shown in FIG. 図4に示す同一レベル継続発生回数マトリクステーブルの各イベントと他レベル毎のデータ構造を示す図である。It is a figure which shows the data structure for each event and every other level of the same level continuation occurrence frequency matrix table shown in FIG. 図2に示すタスク側のイベント実行準備処理を説明するフローチャートである。3 is a flowchart for explaining an event execution preparation process on the task side shown in FIG. 2. 図2に示すタスク側のイベント実行準備処理を模式的に説明する図である。It is a figure which illustrates typically the event execution preparation process by the side of a task shown in FIG. 図1に示すタスク処理装置によるイベント処理の動作タイミングを示す図。The figure which shows the operation timing of the event processing by the task processing apparatus shown in FIG. 図1に示すタスク処理装置によるイベント処理を模式的に説明するフローチャートである。3 is a flowchart schematically explaining event processing by the task processing device shown in FIG. 1.

符号の説明Explanation of symbols

1 タスク処理装置
2 I/O機器
11 CPU
12 メモリ(ROM/RAM)
13 I/Oポート
14 ソフトウェア
15 リアルタイムOS
16 制御プログラム
17 イベント通知用プログラム
18 タスク
19 参照テーブル
31 レベル判定用しきい値テーブル
32 同一レベル継続発生回数カウントテーブル
33 同一レベル継続発生回数マトリクステーブル
1 Task processing device 2 I / O device 11 CPU
12 Memory (ROM / RAM)
13 I / O port 14 Software 15 Real-time OS
16 Control program 17 Event notification program 18 Task 19 Reference table 31 Level determination threshold table 32 Same level continuous occurrence count table 33 Same level continuous occurrence count matrix table

Claims (9)

リアルタイムOS上で認識されるイベントに応じて該当するイベント処理を実行するタスク処理方法であって、
前記リアルタイムOSからのイベント通知時に、イベント識別情報に加え、前記イベント発生時からの遅延時間を受け取るステップと、
前記イベント識別情報で識別されるイベント毎に前記遅延時間に基づいて予め設定されたデッドライン異常レベルを判定するレベル判定ステップと、
前記イベント毎に前記デッドライン異常レベルの継続発生回数を計数する計数ステップと、
前記イベント毎に前記デッドライン異常レベルの継続発生回数に基づいて、予め設定されたイベント処理を決定する処理決定ステップと、
決定された前記イベント処理を実行するステップとを有し、
前記レベル判定ステップは、前記イベント識別情報と前記遅延時間のしきい値から前記デッドライン異常レベルを判定するレベル判定用しきい値判定テーブルを使用し、
前記計数ステップは、前記イベント識別情報と前記デッドライン異常レベル毎に前記デッドライン異常レベルの継続発生回数を計数する継続発生回数カウントテーブルを使用し、
前記処理決定ステップは、前記イベント識別情報、前記デッドライン異常レベル、及び前記デッドライン異常レベルの継続発生回数のしきい値に関連付けてイベント処理を決定する処理決定テーブルを使用することを特徴とするリアルタイムOSを用いたタスク処理方法。
A task processing method for executing event processing corresponding to an event recognized on a real-time OS,
Receiving a delay time from the occurrence of the event in addition to the event identification information at the time of event notification from the real-time OS;
A level determination step for determining a preset deadline abnormality level based on the delay time for each event identified by the event identification information;
A counting step for counting the number of continuous occurrences of the deadline abnormal level for each event;
A process determination step for determining a preset event process based on the number of continuous occurrences of the deadline abnormality level for each event,
It was determined to have a and executing the event process,
The level determination step uses a threshold determination table for level determination that determines the deadline abnormality level from the threshold value of the event identification information and the delay time,
The counting step uses a continuous occurrence count table that counts the number of continuous occurrences of the deadline abnormal level for each event identification information and the deadline abnormal level,
The process determination step uses a process determination table that determines an event process in association with a threshold value of the event identification information, the deadline abnormal level, and the number of continuous occurrences of the deadline abnormal level. Task processing method using a real-time OS.
前記イベント処理は、前記イベント毎に同一の前記デッドライン異常レベル内で前記継続発生回数によって割り当てられる複数段階の処理を含むことを特徴とする請求項記載のタスク処理方法。 The event processing task processing method according to claim 1, characterized in that it comprises a processing of multiple steps assigned by the continuous occurrences of the same the deadline abnormal level in each said event. 前記複数段階の処理は、複数段階の準正常処理、及び複数段階の異常処理を含むことを特徴とする請求項記載のタスク処理方法。 The task processing method according to claim 2, wherein the plurality of stages include a plurality of stages of quasi-normal processes and a plurality of stages of abnormal processes. リアルタイムOS上で認識されるイベントに応じて該当するイベント処理を実行するタスク処理装置であって、
前記リアルタイムOSからのイベント通知時に、イベント識別情報に加え、前記イベント発生時からの遅延時間を受け取る手段と、
前記イベント識別情報で識別されるイベント毎に前記遅延時間に基づいて予め設定されたデッドライン異常レベルを判定するレベル判定手段と、
前記イベント毎に前記デッドライン異常レベルの継続発生回数を計数する計数手段と、
前記イベント毎に前記デッドライン異常レベルの継続発生回数に基づいて、予め設定されたイベント処理を決定する処理決定手段と、
決定された前記イベント処理を実行する手段とを有し、
前記レベル判定手段は、前記イベント識別情報と前記遅延時間のしきい値から前記デッドライン異常レベルを判定するレベル判定用しきい値判定テーブルを有し、
前記計数手段は、前記イベント識別情報と前記デッドライン異常レベル毎に前記デッドライン異常レベルの継続発生回数を計数する継続発生回数カウントテーブルを有し、
前記処理決定手段は、前記イベント識別情報、前記デッドライン異常レベル、及び前記デッドライン異常レベルの継続発生回数のしきい値に関連付けてイベント処理を決定する処理決定テーブルを有することを特徴とするリアルタイムOSを用いたタスク処理装置。
A task processing device that executes event processing corresponding to an event recognized on a real-time OS,
Means for receiving a delay time from the event occurrence time in addition to the event identification information at the time of event notification from the real-time OS;
Level determination means for determining a preset deadline abnormality level based on the delay time for each event identified by the event identification information;
Counting means for counting the number of continuous occurrences of the deadline abnormal level for each event,
A process determining means for determining a preset event process based on the number of continuous occurrences of the deadline abnormality level for each event,
It was determined to have a means for executing the event process,
The level determination means has a threshold determination table for level determination that determines the deadline abnormality level from the threshold value of the event identification information and the delay time,
The counting means has a continuous occurrence count table for counting the number of continuous occurrences of the deadline abnormal level for each event identification information and the deadline abnormal level,
The process determination means includes a process determination table that determines an event process in association with the threshold value of the event identification information, the deadline abnormal level, and the number of continuous occurrences of the deadline abnormal level. A task processing device using an OS.
前記イベント処理は、前記イベント毎に同一の前記デッドライン異常レベル内で前記継続発生回数によって割り当てられる複数段階の処理を含むことを特徴とする請求項記載のタスク処理装置。 5. The task processing apparatus according to claim 4 , wherein the event processing includes a plurality of steps assigned by the number of continuous occurrences within the same deadline abnormality level for each event. 前記複数段階の処理は、複数段階の準正常処理、及び複数段階の異常処理を含むことを特徴とする請求項記載のタスク処理装置。 6. The task processing apparatus according to claim 5, wherein the plurality of stages of processing include a plurality of stages of quasi-normal processes and a plurality of stages of abnormal processes. リアルタイムOS上で認識されるイベントに応じて該当するイベント処理を実行するタスク処理装置で用いる制御プログラムであって、
コンピュータに、
前記リアルタイムOSからのイベント通知時に、イベント識別情報に加え、前記イベント発生時からの遅延時間を受け取るステップと、
前記イベント識別情報で識別されるイベント毎に前記遅延時間に基づいて予め設定されたデッドライン異常レベルを判定するレベル判定ステップと、
前記イベント毎に前記デッドライン異常レベルの継続発生回数を計数する計数ステップと、
前記イベント毎に前記デッドライン異常レベルの継続発生回数に基づいて、予め設定されたイベント処理を決定する処理決定ステップと、
決定された前記イベント処理を実行するステップとを実行させるためのものであり、
前記レベル判定ステップは、前記イベント識別情報と前記遅延時間のしきい値から前記デッドライン異常レベルを判定するレベル判定用しきい値判定テーブルを使用し、
前記計数ステップは、前記イベント識別情報と前記デッドライン異常レベル毎に前記デッドライン異常レベルの継続発生回数を計数する継続発生回数カウントテーブルを使用し、
前記処理決定ステップは、前記イベント識別情報、前記デッドライン異常レベル、及び前記デッドライン異常レベルの継続発生回数のしきい値に関連付けてイベント処理を決定する処理決定テーブルを使用することを特徴とするプログラム
A control program used in a task processing device that executes event processing corresponding to an event recognized on a real-time OS,
On the computer,
Receiving a delay time from the occurrence of the event in addition to the event identification information at the time of event notification from the real-time OS;
A level determination step for determining a preset deadline abnormality level based on the delay time for each event identified by the event identification information;
A counting step for counting the number of continuous occurrences of the deadline abnormal level for each event;
A process determination step for determining a preset event process based on the number of continuous occurrences of the deadline abnormality level for each event,
And executing the determined event processing step ,
The level determination step uses a threshold determination table for level determination that determines the deadline abnormality level from the threshold value of the event identification information and the delay time,
The counting step uses a continuous occurrence count table that counts the number of continuous occurrences of the deadline abnormal level for each event identification information and the deadline abnormal level,
The process determination step uses a process determination table that determines an event process in association with a threshold value of the event identification information, the deadline abnormal level, and the number of continuous occurrences of the deadline abnormal level. Program .
前記イベント処理は、前記イベント毎に同一の前記デッドライン異常レベル内で前記継続発生回数によって割り当てられる複数段階の処理を含むことを特徴とする請求項記載のプログラム。 The program according to claim 7 , wherein the event process includes a plurality of stages assigned by the number of continuous occurrences within the same deadline abnormality level for each event. 前記複数段階の処理は、複数段階の準正常処理、及び複数段階の異常処理を含むことを特徴とする請求項記載のプログラム。 9. The program according to claim 8, wherein the plurality of stages include a plurality of stages of quasi-normal processes and a plurality of stages of abnormal processes.
JP2004057684A 2004-03-02 2004-03-02 Task processing method, apparatus, and program using real-time OS Expired - Fee Related JP4009602B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004057684A JP4009602B2 (en) 2004-03-02 2004-03-02 Task processing method, apparatus, and program using real-time OS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004057684A JP4009602B2 (en) 2004-03-02 2004-03-02 Task processing method, apparatus, and program using real-time OS

Publications (2)

Publication Number Publication Date
JP2005250659A JP2005250659A (en) 2005-09-15
JP4009602B2 true JP4009602B2 (en) 2007-11-21

Family

ID=35031102

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004057684A Expired - Fee Related JP4009602B2 (en) 2004-03-02 2004-03-02 Task processing method, apparatus, and program using real-time OS

Country Status (1)

Country Link
JP (1) JP4009602B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4609381B2 (en) 2006-06-14 2011-01-12 株式会社デンソー Abnormality monitoring program, recording medium, and electronic device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0537721B1 (en) * 1991-10-15 1998-11-25 Hewlett-Packard Company Hardware-configured operating system kernel for a multitasking processor
JPH08272627A (en) * 1995-03-30 1996-10-18 Ricoh Co Ltd Real-time task controller
JPH09244984A (en) * 1996-03-08 1997-09-19 Nippon Telegr & Teleph Corp <Ntt> Event order correction method
JP3663950B2 (en) * 1999-01-20 2005-06-22 株式会社デンソー Electronic control unit for automobile
JP2002073354A (en) * 2000-08-29 2002-03-12 Ricoh Co Ltd Task control device and task contol method
JP3859564B2 (en) * 2002-08-05 2006-12-20 日本電気株式会社 Event notification task control processing method and method, and program
JP2004078665A (en) * 2002-08-20 2004-03-11 Nec Corp Task control apparatus and task control method
JP2004207821A (en) * 2002-12-24 2004-07-22 Nippon Hoso Kyokai <Nhk> Subtitle broadcast receiver, subtitle broadcast receiving method, and subtitle broadcast receiving program
JP2004289683A (en) * 2003-03-24 2004-10-14 Sharp Corp Data receiver, data reception method, data reception program, and computer-readable record medium having the program recorded thereon
JP3952992B2 (en) * 2003-06-03 2007-08-01 ソニー株式会社 Information processing apparatus, process control method, and computer program
JP2005039738A (en) * 2003-07-18 2005-02-10 Sony Corp Moving picture cluster processing system

Also Published As

Publication number Publication date
JP2005250659A (en) 2005-09-15

Similar Documents

Publication Publication Date Title
US8230430B2 (en) Scheduling threads in a multiprocessor computer
US20090044060A1 (en) Method for Supervising Task-Based Data Processing
US6434591B1 (en) Thread control system and method in a computer system
EP2983086A1 (en) System fault detection and processing method, device, and computer readable storage medium
CN111897637B (en) Job scheduling method, device, host and storage medium
JP4610322B2 (en) Interrupt processing control method and apparatus
JP4009602B2 (en) Task processing method, apparatus, and program using real-time OS
US20080098404A1 (en) Information processing apparatus, control method for information processing apparatus and program
JP3859564B2 (en) Event notification task control processing method and method, and program
JP2965075B2 (en) Program execution status monitoring method
JP4516898B2 (en) Task controller
CN115269158A (en) Method for software defined interrupt management controller
JP2006227962A (en) System and method for monitoring application task
JP2008204013A (en) Thread operation failure detecting method and multi-thread system
JP4297796B2 (en) Plant monitoring and operation device
JP2008204011A (en) Multi-thread system and thread operation failure detecting method
JPH10269110A (en) Method for avoiding hang-up of computer system, and computer system using the same method
CN111880915B (en) Processing method, device, equipment and storage medium for thread task
JPH11282725A (en) Computer
JP2004078665A (en) Task control apparatus and task control method
CN106776202B (en) Method and system for monitoring tasks of embedded operating system
JP2000259433A (en) Device and method for detecting deadlock
CN114911703A (en) Detection method of real-time operation system and computing equipment
CN112783626A (en) Interrupt processing method and device, electronic equipment and storage medium
CN117806803A (en) Task enqueuing method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20060412

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070206

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070404

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070903

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100907

Year of fee payment: 3

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

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees