JP2004070582A - Event notification task control processing system and method and its program - Google Patents

Event notification task control processing system and method and its program Download PDF

Info

Publication number
JP2004070582A
JP2004070582A JP2002227480A JP2002227480A JP2004070582A JP 2004070582 A JP2004070582 A JP 2004070582A JP 2002227480 A JP2002227480 A JP 2002227480A JP 2002227480 A JP2002227480 A JP 2002227480A JP 2004070582 A JP2004070582 A JP 2004070582A
Authority
JP
Japan
Prior art keywords
event
processing
task
level
delay 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.)
Granted
Application number
JP2002227480A
Other languages
Japanese (ja)
Other versions
JP3859564B2 (en
Inventor
Hiroshi Takahashi
高橋 広志
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 Corp
MX Mobiling Ltd
Original Assignee
NEC Corp
MX Mobiling 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 Corp, MX Mobiling Ltd filed Critical NEC Corp
Priority to JP2002227480A priority Critical patent/JP3859564B2/en
Publication of JP2004070582A publication Critical patent/JP2004070582A/en
Application granted granted Critical
Publication of JP3859564B2 publication Critical patent/JP3859564B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an event notification task control processing system which prevents in advance any system failure due to delay by notifying a delay time since the generation of an event in a real time OS to a task side, and selecting and executing proper processing corresponding to the delay time at the task side, and detects any deadline abnormality at the task side. <P>SOLUTION: This information processor is provided with a real time OS for realizing interruption processing in real time control or an input/output interface function with peripheral equipment and a plurality of tasks for executing the processing of events detected by the real time OS on the real time OS. The task is provided with an event processing means for executing the processing of the event by deciding the level of the dead line of a delay time since the generation of the event notified from the real time OS, and selecting and executing a processing program corresponding to the level. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明はイベント通知タスク制御処理方式及び方法並びにプログラムに関し、特に、リアルタイムOSにおけるイベント発生からの遅延時間をタスク側へ通知し、タスク側では遅延時間に応じた適切な処理を実行することを可能とする、イベント通知タスク制御処理方式及び方法並びにプログラムに関する。
【0002】
【従来の技術】
一般に、実時間処理が要求される監視制御装置などのOS(Operating System:オペレーティングシステム)としては、実時間制御での割込み処理や汎用周辺装置との入出力インタフェース機能などを実現するリアルタイムOSが用いられている。
【0003】
リアルタイムOS上で各種の制御処理を実行するプログラムであるところのタスク(task)についても、当然のことながら実時間処理が要求されるようになってきており、リアルタイムOS上の全てのタスクを限られた時間内で処理することが必要となってきている。この要求を満たすために、タスクのスケジューリングアルゴリズムなどの改善が図られ、処理効率が向上するようになってきている。
【0004】
このような、リアルタイムOS上でのタスクの動作を限られた時間内で処理させ得る方式の一例として、特開2001−236236号公報記載の「タスク制御装置およびそのタスクスケジューリング方法」が知られている。
【0005】
この公報では、一定時間間隔で繰り返し実行される定周期タスクをスケジューリングするリアルタイムOSにおいて、タスク切替頻度を低減し、タスクでの処理が限られた時間内に終了しない所謂デッドライン違反の発生を抑制する技術が記載されている。
【0006】
【発明が解決しようとする課題】
しかしながら、上述した従来のタスク制御方式においては、タスクでの処理が過負荷状態となった場合や、負荷状態が継続して輻輳状態となった場合においては、タスクでの処理遅延によるデッドライン異常が発生してしまう、という問題点を有している。
【0007】
この事は、例えば、実時間処理が要求される監視制御装置などにおいて、処理遅延により機器などの監視情報そのものが遅延してしまい、結果として現在の実際の機器状態とは異なる監視情報により無効な制御を行ってしまう、といった状況が発生し得るものとなっている。また、中継装置などにおいては、中継遅延が発生していることを認識できず、結果として遅延したままの無意味な処理を継続する、という状況も発生してしまう。
【0008】
タスクでの処理遅延によるデッドライン異常が発生してしまう要因の1つとして、デッドライン異常をタスク側で認識できていない、という点を挙げることができる。リアルタイムOSでは、或る事象が発生した場合に、これをイベント(event)として捉えており、イベントの処理は該当のタスクに行わせるようスケジューリングを行っている。しかし、優先度レベルが同一のタスクで同時に複数のイベント処理を行おうとする場合や、高優先度レベルのタスク内で処理すべきイベントが多発した場合などにおいては、リアルタイムOS上で認識したイベント発生時から実際にタスク側で該イベントの処理を行うまでの時間に、イベント処理の待ち時間が発生してしまい、該イベントの処理を行うタスクでは、この待ち時間の発生を検知できず、遅延したままでイベント処理を実行してしまうという事である。
【0009】
また、デッドライン異常とはならないまでも、例えば、監視制御装置などにおいて、機器などの状態変化の事象は不定期に発生する割込みイベントとして認識され、リアルタイムOSからタスク側へのイベント通知に遅延が発生してしまうが、タスク側ではこの遅延時間を認識できないため、遅延したままでのイベント処理を実行してしまう、という問題点を有している。
【0010】
そこで本発明の目的は、リアルタイムOSにおけるイベント発生時点からの遅延時間をタスク側へ通知し、タスク側では遅延時間に応じた適切な処理を選択して実行することにより、デッドライン異常をタスク側にて検知して遅延によるシステム障害を事前に回避することを可能とする、イベント通知タスク制御処理方式及び方法並びにプログラムを提供することにある。
【0011】
【課題を解決するための手段】
本発明のイベント通知タスク制御処理方式は、実時間制御での割込み処理や周辺装置との入出力インタフェース機能などを実現するリアルタイムOSと、前記リアルタイムOS上で前記リアルタイムOSが検知するイベントの処理を実行する複数のタスクと、を備えた情報処理装置において、前記タスクが、前記リアルタイムOSから通知されるイベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定し、前記レベルに応じた処理プログラムを選択して実行することにより、該イベントの処理を行うイベント処理手段を備える、ことを特徴とする。
【0012】
また、前記リアルタイムOSは、イベントの発生を検知すると該イベントの処理を行う何れかの前記タスクに対し、イベント通知を発行するタスク制御手段を備え、前記タスクの前記イベント処理手段は、前記イベント通知に付された該イベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定するレベル判定用しきい値テーブルと、前記レベルに応じた処理プログラムを選択するイベント実行処理マトリクステーブルと、を含む、ことを特徴とする。
【0013】
さらに、前記タスク制御手段は、イベントの発生を検知し該イベントにイベント番号を付す制御を行うイベント発生検知部と、該イベントの処理を担当する何れかの前記タスクを選択してスケジューリングし、該イベントの処理を前記タスクに実行させるためのイベント通知を、前記タスクに発行して前記タスクの起動を制御するイベント通知部と、前記イベント発生検知部にて該イベントの発生を検知した時間から、前記イベント通知部が前記イベント通知を発行する時間までの遅延時間を計測する遅延時間計測部と、から構成され、前記イベント通知には、該イベントの前記イベント番号と前記遅延時間が付される、ことを特徴とする。
【0014】
また、前記レベル判定用しきい値テーブルは、行方向に前記イベント番号が並べられ、列方向にデッドラインのレベルが並べられる構成を取り、各行と列との交点に、前記遅延時間に対する前記レベル毎のしきい値が定義されており、前記イベント実行処理マトリクステーブルは、行方向に前記イベント番号が並べられ、列方向にデッドラインのレベルが並べられる構成を取り、各行と列との交点に、前記イベント番号の前記レベルのイベント処理を実行する処理プログラムのモジュール名が定義されている、ことを特徴とする。
【0015】
さらに、前記イベント処理手段は、前記タスク制御手段から前記イベント通知を受けて前記イベント通知に付されている前記イベント番号のイベント処理を実行する何れかの前記タスクが起動されると、前記タスクが前記レベル判定用しきい値テーブルを参照して前記イベント番号の前記遅延時間のデッドラインのレベルを判定し、次に、前記タスクが前記イベント実行処理マトリクステーブルを参照して前記イベント番号の前記レベルに対応するモジュール名を選択し、前記モジュール名を有する処理プログラムに制御を渡して実行させることにより、前記イベント番号を付されたイベントの処理を行わせる、ことを特徴とする。
【0016】
本発明のイベント通知タスク制御処理方法は、実時間制御での割込み処理や周辺装置との入出力インタフェース機能などを実現するリアルタイムOSと、前記リアルタイムOS上で前記リアルタイムOSが検知するイベントの処理を実行する複数のタスクと、を備えた情報処理装置において、前記タスクが、前記リアルタイムOSから通知されるイベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定し、前記レベルに応じた処理プログラムを選択して実行することにより、該イベントの処理を行う、ことを特徴とする。
【0017】
また、前記リアルタイムOSは、イベントの発生を検知すると該イベントの処理を行う何れかの前記タスクに対し、イベント通知を発行し、前記イベント通知を受けた前記タスクは、前記イベント通知に付された該イベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定し、前記レベルに応じた処理プログラムを選択し、前記処理プログラムに制御を渡して実行させることにより該イベントの処理を行う、ことを特徴とする。
【0018】
さらに、前記リアルタイムOSは、イベントの発生を検知すると該イベントにイベント番号を付し、該イベントの発生時からイベント通知発行までの遅延時間を計測し、該イベントの処理を行う何れかの前記タスクを起動可能になると、前記イベント番号と前記遅延時間を付した前記イベント通知を前記タスクに対して発行し、前記タスクは、前記イベント番号の前記遅延時間のデッドラインのレベルを判定し、次に、前記タスクは、前記イベント番号の前記レベルに対応するモジュール名を選択し、前記モジュール名を有する処理プログラムに制御を渡して実行させることにより、該イベントの処理を行わせる、ことを特徴とする。
【0019】
本発明のプログラムは、コンピュータに、イベントの発生を検知し、該イベントの処理を行う何れかのタスクプログラムに対し、イベント通知を発行する手順と、前記イベント通知を受けた前記タスクプログラムに、前記イベント通知に付されたイベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定する手順と、前記レベルに応じた処理プログラムを選択させ、前記処理プログラムに制御を渡して実行させる手順と、を実行させることにより該イベントの処理を行わせることを特徴とする。
【0020】
また、コンピュータに、イベントの発生を検知すると該イベントにイベント番号を付す手順と、該イベントの発生時からイベント通知発行までの遅延時間を計測する手順と、該イベントの処理を行う何れかのタスクプログラムを起動可能になると、前記イベント番号と前記遅延時間を付した前記イベント通知を前記タスクプログラムに対して発行する手順と、前記タスクプログラムに、前記イベント番号の前記遅延時間のデッドラインのレベルを判定する手順と、前記イベント番号の前記レベルに対応するモジュール名を選択させる手順と、前記モジュール名を有する処理プログラムに制御を渡して実行させる手順と、を実行させることにより該イベントの処理を行わせる、ことを特徴とする。
【0021】
さらに、コンピュータに、イベントの発生を検知し該イベントのイベント通知を発行する手順と、前記イベント通知に付された該イベントの発生時からの遅延時間のデッドラインのレベルを判定する手順と、前記レベルに応じた処理プログラムを選択させ前記処理プログラムに制御を渡して実行させる手順と、を実行させることを特徴とする。
【0022】
また、コンピュータに、イベントの発生を検知すると該イベントにイベント番号を付す手順と、該イベントの発生時からイベント通知発行までの遅延時間を計測する手順と、前記イベント番号と前記遅延時間を付した前記イベント通知を発行する手順と、前記イベント番号の前記遅延時間のデッドラインのレベルを判定する手順と、前記イベント番号の前記レベルに対応するモジュール名を選択させる手順と、前記モジュール名を有する処理プログラムに制御を渡して実行させる手順と、を実行させることを特徴とする。
【0023】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照して説明する。
【0024】
図1は、本発明のイベント通知タスク制御処理方式の一実施形態を示すブロック図である。
【0025】
図1に示す本実施の形態は、通信機器などの監視・制御を行う監視制御装置など、CPU(Central Processing Unit:中央処理装置)と記憶装置、及びその他必要な周辺機器・周辺装置などによって構成される情報処理装置であるところの装置90を一例として示すものであるが、前述のハードウェアの図示は省略するものとし、ソフトウェアのみの構成を示すものである。
【0026】
図1において、装置90は、実時間制御での割込み処理や周辺装置との入出力インタフェース機能などを実現するリアルタイムOS(Operating System:オペレーティングシステム)80と、リアルタイムOS80上で監視制御の対象機器などから生ずるイベント(事象)の処理を実行するプログラムであるところの複数n個のタスク10と、タスク10が参照してタスク10自身の処理内容を決定するためのレベル判定用しきい値テーブル20と、イベント実行処理マトリクステーブル30と、から構成されている。
【0027】
リアルタイムOS80は、イベントの発生を検知し該イベントの処理を該当のタスク10に実行させるためのイベント通知70を発行するタスク制御部60を備えている。
【0028】
タスク制御部60は、イベントの発生を検知し該イベントにイベント番号を付す制御を行うイベント発生検知部61と、該イベントの処理を担当する該当タスク10を選択してスケジューリングし、該イベントの処理を該当タスク10に実行させるためのイベント通知70を、該当タスク10に発行して該当タスクの起動を制御するイベント通知部63と、イベント発生検知部61にてイベント発生を検知した時間から、イベント通知部63がイベント通知70を発行する時間までの遅延時間を計測する遅延時間計測部62と、から構成されている。イベント通知70には、該イベントのイベント番号と前記の遅延時間が付されるものとなる。
【0029】
タスク10は、タスク10−1からタスク10−n迄の複数n個で構成されており、それぞれイベント通知70で通知されるイベント番号に対応するイベント処理を行う。イベント通知70により起動されたタスク10は、イベント通知70に付されている遅延時間から、レベル判定用しきい値テーブル20を参照して該遅延時間のデッドラインのレベル判定を行い(図1のS0)、判定したレベルに応じた処理を、イベント実行処理マトリクステーブル30を参照して選択し、該イベントの処理(図1のS1〜Sxの何れかの処理)を行うようになっている。
【0030】
ここで、デッドラインとは、イベント発生時点からタスク10でのイベント処理完了迄の制限時間のことである。すなわち、或るイベントの発生時点から該イベントのイベント処理が終了するまでの時間には、該当装置や該当システムで定められる制限時間が存在し、イベント処理の終了が制限時間を超えてしまった場合にはデッドライン異常となる。本実施形態においては、上述の遅延時間がデッドライン異常を判定するために用いられることとなる。
【0031】
デッドラインは、イベントごとに該当装置や該当システムに応じて定められる値であるが、大凡、遅延時間として問題の無いレベルでは、レベル1と判定して通常の処理(図1のS1)を行い、遅延しているとの認識は成されるが再処理を行って問題の無いレベルでは、レベル2と判定してリトライ処理などの準正常処理(図1のS2)を行い、イベント処理的に見てデッドラインを超えていると判定されるレベルでは、レベル3と判定して、イベント処理をタイムアウトとして中止して、処理を中断するなどの異常処理1(図1のS3)を行い、該当装置や該当システムとしてデッドラインを超えていると判定されるレベルでは、レベル4と判定して処理を行わずに他装置など外部へデッドライン異常を報告するなどの異常処理2(図1のS4)を行う。なお、該当装置や該当システムの要求に応じて、更なる判定レベルと対応する処理(図1のSx)を付け加えたものであっても良い。
【0032】
次に、図2を参照して、図1に示したレベル判定用しきい値テーブル20について説明する。
【0033】
図2は、レベル判定用しきい値テーブルの構成の一例を説明する図である。
【0034】
図2のレベル判定用しきい値テーブル20は、遅延時間の付されたイベント通知70を受けたタスク10が、該遅延時間のデッドラインのレベル判定を行うためのテーブルである。レベル判定用しきい値テーブル20の、行方向にはイベント番号が、列方向にはデッドラインのレベルが並べられる構成となっており、各行と列との交点に、遅延時間に対するレベル毎のしきい値が定義されている。
【0035】
例えば、イベント番号がイベント1の行201において、遅延時間0ms(milliーsecond:ミリ秒)〜3ms以内をレベル1と定義する場合は、レベル1の列211のしきい値個所(行201と列211の交点)に「0〜3ms」と定義し、3ms〜12ms以内をレベル2と定義する場合は、レベル2の列212のしきい値個所(行201と列212の交点)に「3〜12ms」と定義する。同様にして、12ms〜30ms以内をレベル3と定義する場合は、レベル3の列213のしきい値個所(行201と列213の交点)に「12〜30ms」と定義する。なお、最高レベルのレベルx(列21x)では、200msより大きい場合は全てレベルxであると定義するため、レベルxの列21xのしきい値個所(行201と列21xの交点)には「200ms〜」と定義されている。
【0036】
イベント番号がイベント2の行202においても同様にしきい値が定義されているが、イベント2においては、レベル2が無くレベル1からレベル3と続くものとしているため、レベル2の列212のしきい値個所(行202と列212の交点)には、レベル1と同じ値、すなわち、「0〜3ms」が定義されている。また、イベント番号がイベントyの行20yにおいては、レベル1、2、3だけのしきい値が定義されており、レベル4以降は無いものとしている。なお、タスク10が遅延時間のデッドラインのレベル判定を行う際には、レベルの低い方から(レベル1の方から)レベル判定用しきい値テーブル20を用いるものとする。
【0037】
次に、図3を参照して、図1に示したイベント実行処理マトリクステーブル30について説明する。
【0038】
図3は、イベント実行処理マトリクステーブルの構成の一例を説明する図である。
【0039】
図3のイベント実行処理マトリクステーブル30は、遅延時間の付されたイベント通知70を受けたタスク10が、該遅延時間のデッドラインのレベル判定を行った後に、判定したレベルに応じた処理を選択するためのテーブルである。イベント実行処理マトリクステーブル30の構成は、レベル判定用しきい値テーブル20と同様のマトリクステーブルで、該当イベント番号の該当レベル毎に、対応するイベント処理を実行するプログラムのモジュール名、すなわち該プログラムのエントリーアドレスを定義しておくテーブルである。
【0040】
例えば、イベント番号がイベント1で、デッドラインのレベル判定を行った結果がレベル2であったとすると、タスク10は、イベント実行処理マトリクステーブル30の行301(イベント1)と列312(レベル2)の交点に定義されている「EVENT1_2」というモジュール名を有するプログラムを実行させることにより、イベント1のレベル2のイベント処理を行う。同様に、イベント番号がイベント2で、レベル判定の結果がレベル3であったとすると、タスク10は、行302(イベント2)と列313(レベル3)の交点に定義されている「EVENT2_3」というモジュール名を有するプログラムを実行させて、イベント2のレベル3のイベント処理を行う。
【0041】
なお、レベル判定用しきい値テーブル20及びイベント実行処理マトリクステーブル30は、タスク10の外部に存在するものとして説明を行ったが、この2つのテーブルを、タスク10の内部に存在させるようにしても良い。この場合には、タスク10の各々が処理するものとなっているイベント番号に関する部分だけのテーブルを、各タスク10が保持すればよい。
【0042】
次に、図4、図5を参照して、本実施形態の動作について詳細に説明する。なお、図4、図5において図1、図2、図3に示す構成要素に対応するものは同一の参照数字または符号を付し、その説明を省略する。
【0043】
図4は、本実施形態の動作の概観を説明する図である。
【0044】
図4において、時刻t1に、機器などの状態変化などの事象であるところの「イベント1」が発生し、これをタスク制御部60のイベント発生検知部61が検知したものとする。この時、「イベント1」のイベント処理を行うタスク10−1よりも高優先度或いは同一優先度のタスク10−mが実行中であるとすると、このタスク10−mの実行が終了するまでの待ち時間が生ずる。この待ち時間が時刻t2まで続いたものとすると、タスク制御部60の遅延時間計測部62は、t2−t1=T1を遅延時間として計測し、その後イベント通知部63がタスク10−1に対して、時刻t2にイベント通知70−1を発行し、タスク10−1を起動する。イベント通知70−1には、イベント番号として「イベント1」が、遅延時間として「T1」が付されている。
【0045】
イベント通知70−1の発行により、時刻t2にタスク10−1が起動され、「イベント1」に対するイベント処理が開始される。イベント処理を行うタスク10−1の動作について図5を参照して説明する。
【0046】
図5は、本実施形態のタスクの動作を説明する図である。
【0047】
図5において、タスク10は、タスク制御部60から「イベント番号」と「遅延時間」が付加されたイベント通知70を受けて、起動される(S10)。
【0048】
次に、タスク10は、レベル判定用しきい値テーブル20を参照し、イベント通知70に付されている「イベント番号」と「遅延時間」からデッドラインのレベル判定を行う(S11)。ここで、タスク10−1の動作として具体的に説明すると、タスク10−1に通知されたイベント通知70−1には、「イベント番号」として「イベント1」が付されているので、先ずレベル判定用しきい値テーブル20の行201(イベント番号=イベント1)を参照することとなる。次に「遅延時間」が行201のどの列に対応するかを判定する。「遅延時間」として「T1」が付されており、「T1」=5msであったとすると、5msは列212に対応するものであるため、そのレベルは「レベル2」であると判定される。
【0049】
次に、タスク10は、イベント実行処理マトリクステーブル30を参照し、ステップS11で求めたレベルに該当するイベント処理を行うモジュール名を求める(S12)。ここで、タスク10−1の動作として具体的に説明すると、「イベント番号」が「イベント1」で、かつ、そのレベルが「レベル2」と判定されたものであるため、イベント実行処理マトリクステーブル30の行301(イベント1)と列312(レベル2)の交点に記載の「EVENT1_2」が、求めるモジュール名となる。なお、今求めたイベント実行処理マトリクステーブル30のマトリクス位置(行301と列312の交点)は、レベル判定用しきい値テーブル20のマトリクス位置(行201と列212の交点)と全く同じ位置である。
【0050】
モジュール名が求まると、タスク10は該モジュール(プログラム)に制御を渡して実行させ、該モジュールがイベント処理を行う(S13)。タスク10−1の動作として具体的に説明すると、ステップS12で求めたモジュール名は「EVENT1_2」であるため、タスク10−1は該モジュール「EVENT1_2」に制御を渡して実行させ、該モジュール「EVENT1_2」が「イベント1」の「レベル2」のイベント処理を行う。「イベント1」の「レベル2」のイベント処理がリトライ処理であるとすれば、「EVENT1_2」のモジュールは、リトライ処理を行うようプログラミングされているモジュールである。
【0051】
上述したように、タスク10−1による「イベント1」のイベント処理は、図4の時刻t2に開始され、図4に示すように「イベント1処理」として時刻t5まで行われる。
【0052】
タスク10−1による「イベント1処理」が行われている間の時刻t3に「イベント2」が発生し、これをタスク制御部60のイベント発生検知部61が検知したものとする。この時、「イベント2」のイベント処理を行うタスク10−2の優先度よりも、「イベント1処理」を実行中のタスク10−1の優先度の方が高い(或いは同一)ものとすると、タスク10−1の実行が終了する時刻t5まで、タスク10−2の起動は待たされることとなり、この間の待ち時間、すなわちt5−t3=T2を、タスク制御部60の遅延時間計測部62が遅延時間として計測する。
【0053】
タスク10−1の「イベント1処理」が時刻t5に終了すると、タスク制御部60のイベント通知部63は、イベント番号が「イベント2」、遅延時間が「T2」のイベント通知70−2を、タスク10−2に対して時刻t5に発行し、タスク10−2を起動する。
【0054】
起動されたタスク10−2は、図5を参照して述べたと同様の動作により、「イベント2処理」を実行する。すなわち、タスク10−2は起動されると(図5のS10)、イベント通知70−2に付加されている「イベント番号=イベント2」と「遅延時間=T2」から、レベル判定用しきい値テーブル20を参照して、「イベント2」のデッドラインのレベル判定を行い(図5のS11)、次に、イベント実行処理マトリクステーブル30を参照して、求めたレベルに該当するイベント処理を行うモジュール名を求め(図5のS12)、求めたモジュール名のプログラムを実行させて、「イベント2処理」を行わせる(図5のS13)。
【0055】
タスク10−1による「イベント1処理」が実行されている間の時刻t4に、「イベント1」が再度検知された場合も同様に、この2度目の「イベント1」のイベント通知70−3は、タスク10−2による「イベント2処理」が終了する時刻t6まで待たされる。そして、時刻t6になった時に、タスク制御部60のイベント通知部63から、「イベント番号=イベント1」、「遅延時間=T3=t6−t4」のイベント通知70−3が、タスク10−1に対して発行され、上述と同様の動作により、時刻t6からタスク10−1による「イベント1処理」が再度実行される。
【0056】
【発明の効果】
以上説明したように、本発明のイベント通知タスク制御処理方式及び方法並びにプログラムは、リアルタイムOSにおけるイベント発生時点からの遅延時間をタスク側へイベント通知として通知し、タスク側では遅延時間のデッドラインレベルの判定を行い、判定レベルに応じた適切な処理(プログラムモジュール)を選択して実行させる事ができるので、デッドライン異常をタスク側で認識可能となり、タスク側でデッドライン異常の段階に応じた処理プログラムを作成可能となる、という効果を有している。従って、デッドライン異常によるシステム障害を事前に回避可能な処理プログラムを作成可能となる。
【0057】
また、タスク側でデッドライン異常の段階に応じた処理プログラムを作成できるので、例えば、遅延時間がデッドライン異常でない時は正常処理、遅延時間がデッドライン異常に近い時は、準正常処理としてリトライ処理、デッドラインを超えていると判定される時は、異常処理その1として処理中断或いは他装置等外部に対し処理不可能であった旨の通知処理、デッドラインを大幅に超えている時は、CPUの輻輳状態や半暴走状態が考えられるため、回復不可能な状態と判断し、異常処理その2として全処理を中断し他装置等外部へ異常事態を通知する処理、などのように処理内容を分離することが可能となると共に、ウォッチドッグタイマのタイムアウト時と同様に、処理プログラム自体の暴走検出機能を持つこととなり、さらに、どのイベントで暴走検出が成されたかを把握することが可能となる、という効果を有している。
【図面の簡単な説明】
【図1】本発明のイベント通知タスク制御処理方式の一実施形態を示すブロック図である。
【図2】レベル判定用しきい値テーブルの構成の一例を説明する図である。
【図3】イベント実行処理マトリクステーブルの構成の一例を説明する図である。
【図4】本実施形態の動作の概観を説明する図である。
【図5】本実施形態のタスクの動作を説明する図である。
【符号の説明】
10  タスク
20  レベル判定用しきい値テーブル
30  イベント実行処理マトリクステーブル
60  タスク制御部
61  イベント発生検知部
62  遅延時間計測部
63  イベント通知部
70  イベント通知
80  リアルタイムOS
90  装置
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an event notification task control processing method, method, and program, and in particular, notifies a task of a delay time from the occurrence of an event in a real-time OS, and allows the task to execute an appropriate process according to the delay time. And an event notification task control processing method and method.
[0002]
[Prior art]
Generally, as an OS (Operating System) such as a monitoring control device that requires real-time processing, a real-time OS that realizes interrupt processing in real-time control and an input / output interface function with a general-purpose peripheral device is used. Have been.
[0003]
Naturally, real-time processing is also required for tasks that are programs that execute various control processes on the real-time OS, and all tasks on the real-time OS are limited. It is becoming necessary to process within the allotted time. In order to satisfy this requirement, improvements have been made in the task scheduling algorithm and the like, and the processing efficiency has been improved.
[0004]
As an example of such a method capable of processing a task operation on a real-time OS within a limited time, a “task control device and a task scheduling method thereof” described in JP-A-2001-236236 is known. I have.
[0005]
In this publication, in a real-time OS that schedules periodic tasks that are repeatedly executed at fixed time intervals, the frequency of task switching is reduced, and the occurrence of a so-called deadline violation in which processing in a task is not completed within a limited time is suppressed. The technology to do this is described.
[0006]
[Problems to be solved by the invention]
However, in the conventional task control method described above, when processing in a task becomes overloaded or when the load state continues to become congested, deadline abnormality due to processing delay in the task occurs. Is generated.
[0007]
This is because, for example, in a monitoring control device or the like that requires real-time processing, monitoring information itself such as a device is delayed due to a processing delay, and as a result, invalid monitoring information is generated due to monitoring information different from the current actual device state. A situation such as control may occur. In addition, in a relay device or the like, it is not possible to recognize that a relay delay has occurred, and as a result, a situation occurs in which a meaningless process is continued with the delay.
[0008]
One of the factors that cause the deadline abnormality due to the processing delay in the task is that the task side cannot recognize the deadline abnormality. In the real-time OS, when a certain event occurs, the event is regarded as an event, and the processing of the event is scheduled to be performed by a corresponding task. However, when trying to process a plurality of events at the same task with the same priority level, or when there are many events to be processed in a task with a high priority level, the event recognized on the real-time OS A waiting time for event processing occurs between the time and the actual processing of the event on the task side, and the task for processing the event cannot detect the occurrence of the waiting time and is delayed. This means that event processing is executed as it is.
[0009]
Even if a deadline error does not occur, for example, in a monitoring control device, a status change event of a device or the like is recognized as an interrupt event that occurs irregularly, and a delay occurs in the event notification from the real-time OS to the task side. However, since the task cannot recognize the delay time, there is a problem that the event processing is executed with the delay.
[0010]
Therefore, an object of the present invention is to notify a task of a delay time from the time of occurrence of an event in a real-time OS to the task side, and select and execute an appropriate process according to the delay time, thereby preventing a deadline abnormality from occurring on the task side. It is an object of the present invention to provide an event notification task control processing method, method, and program, which can detect in advance and prevent a system failure due to delay in advance.
[0011]
[Means for Solving the Problems]
The event notification task control processing method according to the present invention includes a real-time OS that realizes an interrupt process in real-time control and an input / output interface function with peripheral devices, and a process of an event detected by the real-time OS on the real-time OS. A plurality of tasks to be executed, the task determines a deadline level of the delay time based on a delay time from the occurrence of an event notified from the real-time OS; And an event processing unit that processes the event by selecting and executing a processing program corresponding to the event.
[0012]
The real-time OS further includes a task control unit that issues an event notification to any of the tasks that perform processing of the event when the occurrence of the event is detected, and the event processing unit of the task includes the event notification unit. A threshold value table for determining a deadline level of the delay time based on the delay time from the occurrence of the event, and an event execution processing matrix table for selecting a processing program corresponding to the level And the following.
[0013]
Further, the task control means detects an occurrence of an event and performs control for assigning an event number to the event, and selects and schedules any one of the tasks in charge of processing of the event. An event notification for causing the task to execute event processing is issued to the task, an event notification unit that controls the activation of the task, and a time at which the occurrence of the event is detected by the event occurrence detection unit, A delay time measuring unit that measures a delay time until the event notification unit issues the event notification.The event notification includes the event number of the event and the delay time. It is characterized by the following.
[0014]
Further, the level determination threshold table has a configuration in which the event numbers are arranged in a row direction and deadline levels are arranged in a column direction. At the intersection of each row and column, the level with respect to the delay time is set. Each event threshold is defined, and the event execution processing matrix table has a configuration in which the event numbers are arranged in the row direction and deadline levels are arranged in the column direction, and at the intersection of each row and column. , A module name of a processing program for executing the event processing of the level of the event number is defined.
[0015]
Further, 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 started, the task is executed. The task determines the level of the deadline of the delay time of the event number by referring to the threshold table for level determination, and then the task refers to the event execution processing matrix table to determine the level of the event number. Is selected, and control is passed to and executed by a processing program having the module name, whereby the event with the event number is processed.
[0016]
An event notification task control processing method according to the present invention includes a real-time OS realizing interrupt processing in real-time control and an input / output interface function with a peripheral device, and a process of an event detected by the real-time OS on the real-time OS. A plurality of tasks to be executed, the task determines a deadline level of the delay time based on a delay time from the occurrence of an event notified from the real-time OS; The processing of the event is performed by selecting and executing a processing program corresponding to the event.
[0017]
Further, the real-time OS issues an event notification to any of the tasks that perform the processing of the event when detecting the occurrence of the event, and the task that has received the event notification is attached to the event notification. The deadline level of the delay time is determined based on the delay time from the occurrence of the event, a processing program corresponding to the level is selected, and control is passed to the processing program to execute the event. Is performed.
[0018]
Further, when the real-time OS detects the occurrence of the event, the real-time OS assigns an event number to the event, measures a delay time from the occurrence of the event to the issuance of the event notification, and executes any one of the tasks for processing the event. When it becomes possible to start, the event notification with the event number and the delay time is issued to the task, the task determines the level of the deadline of the delay time of the event number, The task performs a process of the event by selecting a module name corresponding to the level of the event number and passing control to a processing program having the module name to execute the processing. .
[0019]
The program according to the present invention includes the steps of: issuing, to a computer, a task that detects the occurrence of an event and issuing an event notification to any task program that processes the event; and A procedure for determining the level of the deadline of the delay time based on the delay time from the occurrence of the event attached to the event notification, and selecting a processing program corresponding to the level, passing control to the processing program and executing the processing program And causing the event to be processed by executing the procedure.
[0020]
Further, the computer provides a procedure for assigning an event number to the event when the occurrence of the event is detected, a procedure for measuring a delay time from the occurrence of the event to the issuance of the event notification, and a task for processing the event. When the program can be started, a procedure for issuing the event notification with the event number and the delay time to the task program, and the task program sets a deadline level of the delay time of the event number to the task program. The processing of the event is performed by executing a determining procedure, a procedure of selecting a module name corresponding to the level of the event number, and a procedure of passing control to a processing program having the module name and executing the processing program. To be characterized.
[0021]
A step of detecting the occurrence of an event and issuing an event notification of the event to the computer; a step of determining a level of a deadline of a delay time from the occurrence of the event attached to the event notification; Selecting a processing program according to the level and passing control to the processing program to execute the processing program.
[0022]
Also, the computer has a procedure for attaching an event number to the event when the occurrence of the event is detected, a procedure for measuring a delay time from the occurrence of the event to the issuance of the event notification, and attaching the event number and the delay time. Issuing the event notification, determining a level of the deadline of the delay time of the event number, selecting a module name corresponding to the level of the event number, and processing having the module name And a step of giving control to the program and executing the program.
[0023]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, embodiments of the present invention will be described with reference to the drawings.
[0024]
FIG. 1 is a block diagram showing an embodiment of the event notification task control processing method according to the present invention.
[0025]
The embodiment shown in FIG. 1 includes a CPU (Central Processing Unit), a storage device, and other necessary peripheral devices and peripheral devices, such as a supervisory control device for monitoring and controlling communication devices and the like. 1 shows an example of an information processing apparatus 90 which is an information processing apparatus to be executed, but the illustration of the above-mentioned hardware is omitted, and only the configuration of software is shown.
[0026]
In FIG. 1, a device 90 includes a real-time OS (Operating System) 80 for realizing interrupt processing in real-time control and an input / output interface function with peripheral devices, and a device to be monitored and controlled on the real-time OS 80. A plurality of n tasks 10 which are programs for executing processing of events (events) arising from the above; a level determination threshold table 20 for the task 10 to refer to and determine the processing content of the task 10 itself; , And an event execution processing matrix table 30.
[0027]
The real-time OS 80 includes a task control unit 60 that detects the occurrence of an event and issues an event notification 70 for causing the task 10 to execute the processing of the event.
[0028]
The task control unit 60 selects and schedules an event occurrence detection unit 61 that detects occurrence of an event and assigns an event number to the event, and a task 10 that is in charge of processing the event. Event notification 70 for causing the corresponding task 10 to execute the event notification to the corresponding task 10 to control the activation of the corresponding task, and an event notification from the time when the event occurrence is detected by the event occurrence detecting unit 61. A delay time measuring unit 62 that measures a delay time until the notification unit 63 issues the event notification 70. The event notification 70 is provided with the event number of the event and the delay time.
[0029]
The task 10 is composed of a plurality of n tasks 10-1 to 10-n, and performs an event process corresponding to the event number notified by the event notification 70, respectively. The task 10 started by the event notification 70 determines the deadline level of the delay time from the delay time attached to the event notification 70 by referring to the level determination threshold table 20 (see FIG. 1). S0), a process corresponding to the determined level is selected with reference to the event execution process matrix table 30, and the process of the event (any one of S1 to Sx in FIG. 1) is performed.
[0030]
Here, the deadline is a time limit from the occurrence of the event to the completion of the event processing in the task 10. In other words, when the time from the occurrence of a certain event to the end of the event processing of the event has a time limit defined by the corresponding device or system, and the end of the event processing exceeds the time limit Will be deadline abnormal. In the present embodiment, the above-described delay time is used to determine a deadline abnormality.
[0031]
The deadline is a value determined according to the corresponding device or the corresponding system for each event. Generally, at a level where there is no problem in the delay time, it is determined to be level 1 and normal processing (S1 in FIG. 1) is performed. At a level where recognition is made but there is no problem with reprocessing, it is determined to be level 2 and quasi-normal processing such as retry processing (S2 in FIG. 1) is performed. At the level where it is judged that the deadline is exceeded, the level is determined to be level 3, the event processing is timed out, the processing is interrupted, and abnormal processing 1 (S3 in FIG. 1) is performed. At a level determined to exceed the deadline as a device or a corresponding system, an abnormal process 2 (e.g., reporting a deadline error to another device or the like outside without performing the process as determined as level 4 (see FIG. 1). 4) perform. It should be noted that a process (Sx in FIG. 1) corresponding to a further determination level may be added in response to a request from the device or system.
[0032]
Next, the level determination threshold value table 20 shown in FIG. 1 will be described with reference to FIG.
[0033]
FIG. 2 is a diagram illustrating an example of the configuration of a threshold value table for level determination.
[0034]
The threshold table 20 for level determination in FIG. 2 is a table for the task 10 receiving the event notification 70 with the delay time to determine the level of the deadline of the delay time. In the level determination threshold table 20, the event number is arranged in the row direction and the deadline level is arranged in the column direction. At the intersection of each row and column, the level of the delay time is set for each level. Threshold is defined.
[0035]
For example, in the row 201 of the event number 1, when the delay time within 0 ms (millisecond: millisecond) to 3 ms is defined as the level 1, the threshold value of the column 211 of the level 1 (the row 201 and the column In the case where 3 to 12 ms is defined as “level 2” and “3 to 12 ms” is defined as “level 2”, “3 to 3 ms” is defined in the threshold portion of column 212 of level 2 (intersection of row 201 and column 212). 12 ms ". Similarly, when the level within 12 ms to 30 ms is defined as level 3, "12 to 30 ms" is defined at the threshold value (intersection between row 201 and column 213) in column 213 of level 3. In addition, at the highest level x (column 21x), if it is longer than 200 ms, it is defined as the level x. Therefore, the threshold value of the column 21x of the level x (the intersection of the row 201 and the column 21x) is " 200 ms ~ ".
[0036]
The threshold value is similarly defined in the row 202 having the event number of the event 2, but since the event 2 does not have the level 2 but continues from the level 1 to the level 3, the threshold of the column 212 of the level 2 is defined. At the value part (the intersection of the row 202 and the column 212), the same value as that of the level 1, that is, “0 to 3 ms” is defined. Further, in the row 20y of the event number of the event y, the thresholds of only the levels 1, 2, and 3 are defined, and it is assumed that there is no threshold after the level 4. Note that when the task 10 determines the level of the deadline of the delay time, the threshold value table 20 for level determination is used from the lower level (from the level 1).
[0037]
Next, the event execution processing matrix table 30 shown in FIG. 1 will be described with reference to FIG.
[0038]
FIG. 3 is a diagram illustrating an example of the configuration of an event execution processing matrix table.
[0039]
The event execution processing matrix table 30 in FIG. 3 indicates that the task 10 having received the event notification 70 with the delay time determines the deadline level of the delay time, and then selects the processing according to the determined level. It is a table for doing. The configuration of the event execution processing matrix table 30 is the same matrix table as the level determination threshold table 20, and for each corresponding level of the corresponding event number, the module name of the program that executes the corresponding event processing, that is, This is a table that defines entry addresses.
[0040]
For example, assuming that the event number is event 1 and the result of the deadline level determination is level 2, the task 10 executes the processing in the row 301 (event 1) and the column 312 (level 2) of the event execution processing matrix table 30. Is executed by executing a program having a module name “EVENT1_2” defined at the intersection of. Similarly, assuming that the event number is event 2 and the result of the level determination is level 3, the task 10 is called “EVENT2_3” defined at the intersection of the row 302 (event 2) and the column 313 (level 3). The program having the module name is executed, and event processing of event 3 of level 3 is performed.
[0041]
The description has been given assuming that the level determination threshold table 20 and the event execution processing matrix table 30 exist outside the task 10, but the two tables are made to exist inside the task 10. Is also good. In this case, each task 10 only needs to hold a table of a portion related to the event number that is to be processed by each task 10.
[0042]
Next, the operation of the present embodiment will be described in detail with reference to FIGS. In FIGS. 4 and 5, components corresponding to those shown in FIGS. 1, 2 and 3 are denoted by the same reference numerals or symbols, and description thereof is omitted.
[0043]
FIG. 4 is a diagram illustrating an overview of the operation of the present embodiment.
[0044]
In FIG. 4, it is assumed that “event 1”, which is an event such as a change in the state of a device or the like, occurs at time t1 and is detected by the event occurrence detection unit 61 of the task control unit 60. At this time, if it is assumed that the task 10-m having a higher priority or the same priority as the task 10-1 that performs the event processing of the "event 1" is being executed, the task 10-m until the execution of the task 10-m ends Latency occurs. Assuming that this waiting time lasts until time t2, the delay time measuring unit 62 of the task control unit 60 measures t2-t1 = T1 as a delay time, and then the event notification unit 63 sends the task notification to the task 10-1. Issue the event notification 70-1 at time t2, and activate the task 10-1. The event notification 70-1 has "Event 1" as the event number and "T1" as the delay time.
[0045]
By issuing the event notification 70-1, the task 10-1 is activated at time t2, and event processing for “event 1” is started. The operation of task 10-1 for performing event processing will be described with reference to FIG.
[0046]
FIG. 5 is a diagram illustrating the operation of the task according to the present embodiment.
[0047]
In FIG. 5, the task 10 is activated upon receiving an event notification 70 to which an “event number” and a “delay time” are added from the task control unit 60 (S10).
[0048]
Next, the task 10 refers to the level determination threshold table 20 and determines the level of the deadline from the “event number” and the “delay time” attached to the event notification 70 (S11). Here, the operation of the task 10-1 will be specifically described. In the event notification 70-1 notified to the task 10-1, "event 1" is added as an "event number". The row 201 (event number = event 1) of the threshold value table for determination 20 will be referred to. Next, it is determined which column of the row 201 the “delay time” corresponds to. If “T1” is added as “delay time” and “T1” = 5 ms, the level is determined to be “level 2” because 5 ms corresponds to the column 212.
[0049]
Next, the task 10 refers to the event execution processing matrix table 30, and obtains a module name for performing the event processing corresponding to the level obtained in step S11 (S12). Here, the operation of the task 10-1 will be specifically described. Since the “event number” is determined to be “event 1” and the level thereof is determined to be “level 2”, the event execution processing matrix table “EVENT1_2” described at the intersection of the row 301 (event 1) and the column 312 (level 2) of 30 is the module name to be obtained. The matrix position (intersection point between row 301 and column 312) of the event execution processing matrix table 30 just obtained is exactly the same as the matrix position (intersection point between row 201 and column 212) in the threshold value table 20 for level determination. is there.
[0050]
When the module name is obtained, the task 10 transfers control to the module (program) to execute the module, and the module performs event processing (S13). To be more specific, as the operation of the task 10-1, the module name obtained in step S12 is “EVENT1_2”. Therefore, the task 10-1 transfers control to the module “EVENT1_2” to execute the module “EVENT1_2”. Performs event processing of “level 2” of “event 1”. If the event processing of “level 2” of “event 1” is a retry processing, the module of “EVENT1_2” is a module that is programmed to perform the retry processing.
[0051]
As described above, the event processing of “event 1” by the task 10-1 is started at time t2 in FIG. 4, and is performed until time t5 as “event 1 processing” as shown in FIG.
[0052]
It is assumed that “event 2” occurs at time t3 during “event 1 processing” by the task 10-1, and the event occurrence detection unit 61 of the task control unit 60 detects this. At this time, assuming that the priority of the task 10-1 executing the “event 1 process” is higher (or the same) than the priority of the task 10-2 performing the event process of “event 2”. The activation of the task 10-2 is waited until the time t5 when the execution of the task 10-1 ends, and the delay time during this time, that is, t5−t3 = T2, is delayed by the delay time measurement unit 62 of the task control unit 60. Measure as time.
[0053]
When the “event 1 process” of the task 10-1 ends at time t5, the event notification unit 63 of the task control unit 60 sends the event notification 70-2 having the event number “event 2” and the delay time “T2” to It is issued to the task 10-2 at time t5 to activate the task 10-2.
[0054]
The activated task 10-2 executes “event 2 processing” by the same operation as described with reference to FIG. That is, when the task 10-2 is activated (S10 in FIG. 5), the level determination threshold value is obtained from “event number = event 2” and “delay time = T2” added to the event notification 70-2. The deadline level of “event 2” is determined with reference to the table 20 (S11 in FIG. 5), and then the event processing corresponding to the determined level is performed with reference to the event execution processing matrix table 30. The module name is obtained (S12 in FIG. 5), and the program of the obtained module name is executed to perform “event 2 processing” (S13 in FIG. 5).
[0055]
Similarly, when the “event 1” is detected again at time t4 during the execution of the “event 1 process” by the task 10-1, the event notification 70-3 of the second “event 1” is , Is waited until time t6 when the “event 2 processing” by the task 10-2 ends. Then, at time t6, an event notification 70-3 of “event number = event 1” and “delay time = T3 = t6-t4” is sent from the event notification unit 63 of the task control unit 60 to the task 10-1. The “event 1 process” by the task 10-1 is executed again from time t6 by the same operation as described above.
[0056]
【The invention's effect】
As described above, the event notification task control processing method, method, and program of the present invention notify the task side of the delay time from the event occurrence time in the real-time OS to the task side as an event notification, and the task side deadline level of the delay time And the appropriate processing (program module) according to the determination level can be selected and executed, so that the task can recognize the deadline abnormality and the task can respond to the deadline abnormality stage This has the effect that a processing program can be created. Therefore, it is possible to create a processing program capable of avoiding a system failure due to a deadline abnormality in advance.
[0057]
Also, the task side can create a processing program according to the stage of the deadline abnormality. For example, when the delay time is not deadline abnormal, normal processing is performed. If it is determined that the process has exceeded the deadline, the process is interrupted as a part of the abnormal process 1 Since the CPU may be in a congested state or a semi-runaway state, it is determined that the state is unrecoverable. In addition to being able to separate the contents, as with the time out of the watchdog timer, the processing program itself has a runaway detection function. Runaway detection becomes possible to grasp whether made in the event, has the effect that.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of an event notification task control processing method according to the present invention.
FIG. 2 is a diagram illustrating an example of a configuration of a level determination threshold table.
FIG. 3 is a diagram illustrating an example of a configuration of an event execution processing matrix table.
FIG. 4 is a diagram illustrating an overview of the operation of the present embodiment.
FIG. 5 is a diagram illustrating the operation of a task according to the present embodiment.
[Explanation of symbols]
10 tasks
20 Threshold table for level judgment
30 Event execution processing matrix table
60 Task control unit
61 Event occurrence detector
62 Delay time measurement unit
63 Event notification section
70 Event notification
80 Real-time OS
90 devices

Claims (12)

実時間制御での割込み処理や周辺装置との入出力インタフェース機能などを実現するリアルタイムOSと、前記リアルタイムOS上で前記リアルタイムOSが検知するイベントの処理を実行する複数のタスクと、を備えた情報処理装置において、前記タスクが、前記リアルタイムOSから通知されるイベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定し、前記レベルに応じた処理プログラムを選択して実行することにより、該イベントの処理を行うイベント処理手段を備える、ことを特徴とするイベント通知タスク制御処理方式。An information comprising: a real-time OS realizing interrupt processing in real-time control and an input / output interface function with peripheral devices; and a plurality of tasks for executing processing of events detected by the real-time OS on the real-time OS. In the processing device, the task determines a deadline level of the delay time based on a delay time from an occurrence of an event notified from the real-time OS, and selects and executes a processing program according to the level. An event notification task control processing method, further comprising an event processing means for processing the event. 前記リアルタイムOSは、イベントの発生を検知すると該イベントの処理を行う何れかの前記タスクに対し、イベント通知を発行するタスク制御手段を備え、前記タスクの前記イベント処理手段は、前記イベント通知に付された該イベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定するレベル判定用しきい値テーブルと、前記レベルに応じた処理プログラムを選択するイベント実行処理マトリクステーブルと、を含む、ことを特徴とする請求項1に記載のイベント通知タスク制御処理方式。The real-time OS includes a task control unit that issues an event notification to any of the tasks that perform the processing of the event when the occurrence of the event is detected, and the event processing unit of the task attaches the event notification to the task. A threshold value table for determining a deadline level of the delay time based on the delay time from the occurrence of the event, an event execution processing matrix table for selecting a processing program corresponding to the level, The event notification task control processing method according to claim 1, further comprising: 前記タスク制御手段は、イベントの発生を検知し該イベントにイベント番号を付す制御を行うイベント発生検知部と、該イベントの処理を担当する何れかの前記タスクを選択してスケジューリングし、該イベントの処理を前記タスクに実行させるためのイベント通知を、前記タスクに発行して前記タスクの起動を制御するイベント通知部と、前記イベント発生検知部にて該イベントの発生を検知した時間から、前記イベント通知部が前記イベント通知を発行する時間までの遅延時間を計測する遅延時間計測部と、から構成され、前記イベント通知には、該イベントの前記イベント番号と前記遅延時間が付される、ことを特徴とする請求項2に記載のイベント通知タスク制御処理方式。The task control means detects an occurrence of an event and performs control to assign an event number to the event, and selects and schedules one of the tasks in charge of processing of the event, and An event notification unit for issuing an event notification for causing the task to execute processing to the task and controlling activation of the task; and a time when the event occurrence detection unit detects the occurrence of the event. And a delay time measuring unit that measures a delay time until a notification unit issues the event notification.The event notification includes the event number of the event and the delay time. 3. The event notification task control processing method according to claim 2, wherein: 前記レベル判定用しきい値テーブルは、行方向に前記イベント番号が並べられ、列方向にデッドラインのレベルが並べられる構成を取り、各行と列との交点に、前記遅延時間に対する前記レベル毎のしきい値が定義されており、前記イベント実行処理マトリクステーブルは、行方向に前記イベント番号が並べられ、列方向にデッドラインのレベルが並べられる構成を取り、各行と列との交点に、前記イベント番号の前記レベルのイベント処理を実行する処理プログラムのモジュール名が定義されている、ことを特徴とする請求項3に記載のイベント通知タスク制御処理方式。The level determination threshold table has a configuration in which the event numbers are arranged in the row direction and deadline levels are arranged in the column direction, and at the intersection of each row and column, A threshold is defined, and the event execution processing matrix table has a configuration in which the event numbers are arranged in the row direction and deadline levels are arranged in the column direction, and at the intersection of each row and column, 4. The event notification task control processing method according to claim 3, wherein a module name of a processing program for executing the event processing of the level of the event number is defined. 前記イベント処理手段は、前記タスク制御手段から前記イベント通知を受けて前記イベント通知に付されている前記イベント番号のイベント処理を実行する何れかの前記タスクが起動されると、前記タスクが前記レベル判定用しきい値テーブルを参照して前記イベント番号の前記遅延時間のデッドラインのレベルを判定し、次に、前記タスクが前記イベント実行処理マトリクステーブルを参照して前記イベント番号の前記レベルに対応するモジュール名を選択し、前記モジュール名を有する処理プログラムに制御を渡して実行させることにより、前記イベント番号を付されたイベントの処理を行わせる、ことを特徴とする請求項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 started, the task is set to the level. The task determines the level of the deadline of the delay time of the event number by referring to the threshold table for determination, and then, the task corresponds to the level of the event number by referring to the event execution processing matrix table. 5. The event according to claim 4, wherein a module name to be selected is selected, and control is passed to a processing program having the module name to execute the processing, whereby the event with the event number is processed. Notification task control processing method. 実時間制御での割込み処理や周辺装置との入出力インタフェース機能などを実現するリアルタイムOSと、前記リアルタイムOS上で前記リアルタイムOSが検知するイベントの処理を実行する複数のタスクと、を備えた情報処理装置において、前記タスクが、前記リアルタイムOSから通知されるイベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定し、前記レベルに応じた処理プログラムを選択して実行することにより、該イベントの処理を行う、ことを特徴とするイベント通知タスク制御処理方法。An information comprising: a real-time OS realizing interrupt processing in real-time control and an input / output interface function with peripheral devices; and a plurality of tasks for executing processing of events detected by the real-time OS on the real-time OS. In the processing device, the task determines a deadline level of the delay time based on a delay time from an occurrence of an event notified from the real-time OS, and selects and executes a processing program according to the level. And an event notification task control processing method. 前記リアルタイムOSは、イベントの発生を検知すると該イベントの処理を行う何れかの前記タスクに対し、イベント通知を発行し、前記イベント通知を受けた前記タスクは、前記イベント通知に付された該イベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定し、前記レベルに応じた処理プログラムを選択し、前記処理プログラムに制御を渡して実行させることにより該イベントの処理を行う、ことを特徴とする請求項6に記載のイベント通知タスク制御処理方法。Upon detecting the occurrence of an event, the real-time OS issues an event notification to any of the tasks that perform the processing of the event, and the task that has received the event notification outputs the event attached to the event notification. The deadline level of the delay time is determined based on the delay time from the occurrence of the event, a processing program corresponding to the level is selected, and control is passed to the processing program to execute the event. The event notification task control processing method according to claim 6, wherein: 前記リアルタイムOSは、イベントの発生を検知すると該イベントにイベント番号を付し、該イベントの発生時からイベント通知発行までの遅延時間を計測し、該イベントの処理を行う何れかの前記タスクを起動可能になると、前記イベント番号と前記遅延時間を付した前記イベント通知を前記タスクに対して発行し、前記タスクは、前記イベント番号の前記遅延時間のデッドラインのレベルを判定し、次に、前記タスクは、前記イベント番号の前記レベルに対応するモジュール名を選択し、前記モジュール名を有する処理プログラムに制御を渡して実行させることにより、該イベントの処理を行わせる、ことを特徴とする請求項6或いは請求項7の何れか1項に記載のイベント通知タスク制御処理方法。When detecting the occurrence of an event, the real-time OS assigns an event number to the event, measures a delay time from the occurrence of the event to the issuance of an event notification, and activates any of the tasks for processing the event. When enabled, the event number and the event notification with the delay time is issued to the task, the task determines the deadline level of the delay time of the event number, and then, The task is configured to select a module name corresponding to the level of the event number, pass control to a processing program having the module name and execute the program, thereby causing the event to be processed. The event notification task control processing method according to any one of claims 6 and 7. コンピュータに、イベントの発生を検知し、該イベントの処理を行う何れかのタスクプログラムに対し、イベント通知を発行する手順と、前記イベント通知を受けた前記タスクプログラムに、前記イベント通知に付されたイベントの発生時からの遅延時間により、前記遅延時間のデッドラインのレベルを判定する手順と、前記レベルに応じた処理プログラムを選択させ、前記処理プログラムに制御を渡して実行させる手順と、を実行させることにより該イベントの処理を行わせることを特徴とするプログラム。A computer, which detects the occurrence of an event and issues an event notification to any task program that processes the event, and the task program that has received the event notification is attached to the event notification. A procedure for determining the level of the deadline of the delay time based on a delay time from the occurrence of the event, and a procedure for selecting a processing program according to the level and passing control to the processing program to execute the processing program are executed. Causing the computer to process the event. コンピュータに、イベントの発生を検知すると該イベントにイベント番号を付す手順と、該イベントの発生時からイベント通知発行までの遅延時間を計測する手順と、該イベントの処理を行う何れかのタスクプログラムを起動可能になると、前記イベント番号と前記遅延時間を付した前記イベント通知を前記タスクプログラムに対して発行する手順と、前記タスクプログラムに、前記イベント番号の前記遅延時間のデッドラインのレベルを判定する手順と、前記イベント番号の前記レベルに対応するモジュール名を選択させる手順と、前記モジュール名を有する処理プログラムに制御を渡して実行させる手順と、を実行させることにより該イベントの処理を行わせる、ことを特徴とするプログラム。When the computer detects the occurrence of an event, the computer assigns an event number to the event, a procedure for measuring a delay time from the occurrence of the event to the issuance of the event notification, and a task program for processing the event. Issuing a notification of the event with the event number and the delay time to the task program when the start is enabled; and determining a deadline level of the delay time of the event number in the task program. Performing a process of the event by executing a procedure, a procedure of selecting a module name corresponding to the level of the event number, and a procedure of passing control to a processing program having the module name to execute the processing. A program characterized by the following. コンピュータに、イベントの発生を検知し該イベントのイベント通知を発行する手順と、前記イベント通知に付された該イベントの発生時からの遅延時間のデッドラインのレベルを判定する手順と、前記レベルに応じた処理プログラムを選択させ前記処理プログラムに制御を渡して実行させる手順と、を実行させることを特徴とするプログラム。A step of detecting the occurrence of an event and issuing an event notification of the event to the computer; a step of determining a level of a deadline of a delay time from the occurrence of the event attached to the event notification; Selecting a corresponding processing program and passing control to the processing program to execute the processing program. コンピュータに、イベントの発生を検知すると該イベントにイベント番号を付す手順と、該イベントの発生時からイベント通知発行までの遅延時間を計測する手順と、前記イベント番号と前記遅延時間を付した前記イベント通知を発行する手順と、前記イベント番号の前記遅延時間のデッドラインのレベルを判定する手順と、前記イベント番号の前記レベルに対応するモジュール名を選択させる手順と、前記モジュール名を有する処理プログラムに制御を渡して実行させる手順と、を実行させることを特徴とするプログラム。A step of attaching an event number to the event when the occurrence of the event is detected in the computer; a step of measuring a delay time from the occurrence of the event to the issuance of the event notification; and the step of attaching the event number and the delay time A step of issuing a notification, a step of determining a level of a deadline of the delay time of the event number, a step of selecting a module name corresponding to the level of the event number, and a processing program having the module name. A program for passing control and executing the program.
JP2002227480A 2002-08-05 2002-08-05 Event notification task control processing method and method, and program Expired - Fee Related JP3859564B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002227480A JP3859564B2 (en) 2002-08-05 2002-08-05 Event notification task control processing method and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002227480A JP3859564B2 (en) 2002-08-05 2002-08-05 Event notification task control processing method and method, and program

Publications (2)

Publication Number Publication Date
JP2004070582A true JP2004070582A (en) 2004-03-04
JP3859564B2 JP3859564B2 (en) 2006-12-20

Family

ID=32014507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002227480A Expired - Fee Related JP3859564B2 (en) 2002-08-05 2002-08-05 Event notification task control processing method and method, and program

Country Status (1)

Country Link
JP (1) JP3859564B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005250659A (en) * 2004-03-02 2005-09-15 Nec Mobiling Ltd Task processing method and device using real time os and program
JP2007041890A (en) * 2005-08-04 2007-02-15 Nec Corp Task control device
US8418188B2 (en) 2010-03-11 2013-04-09 Toyota Jidosha Kabushiki Kaisha Task execution controller and recording medium on which task execution control program is recorded
JP2016519371A (en) * 2013-04-19 2016-06-30 クロノ−セイフ Task time allocation method enabling deterministic error recovery in real time
WO2019187041A1 (en) * 2018-03-30 2019-10-03 住友電気工業株式会社 System, server computer thereof, control method, and computer program
CN110928872A (en) * 2018-09-19 2020-03-27 佳能株式会社 Processing system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05204674A (en) * 1991-10-15 1993-08-13 Hewlett Packard Co <Hp> Multitasking data processing system
JPH09244984A (en) * 1996-03-08 1997-09-19 Nippon Telegr & Teleph Corp <Ntt> Event order correction method
JPH11237995A (en) * 1998-02-23 1999-08-31 Matsushita Electric Ind Co Ltd Event controller
JP2000207174A (en) * 1999-01-20 2000-07-28 Denso Corp Electronic control unit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05204674A (en) * 1991-10-15 1993-08-13 Hewlett Packard Co <Hp> Multitasking data processing system
JPH09244984A (en) * 1996-03-08 1997-09-19 Nippon Telegr & Teleph Corp <Ntt> Event order correction method
JPH11237995A (en) * 1998-02-23 1999-08-31 Matsushita Electric Ind Co Ltd Event controller
JP2000207174A (en) * 1999-01-20 2000-07-28 Denso Corp Electronic control unit

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
岩橋正実: "オブジェクト指向で実現するリアルタイム設計", TECH I リアルタイムシステム実現のための自律オブジェクト指向, vol. 第12巻, CSND200301931005, 1 April 2002 (2002-04-01), pages 61 - 82, ISSN: 0000766849 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005250659A (en) * 2004-03-02 2005-09-15 Nec Mobiling Ltd Task processing method and device using real time os and program
JP2007041890A (en) * 2005-08-04 2007-02-15 Nec Corp Task control device
JP4516898B2 (en) * 2005-08-04 2010-08-04 日本電気株式会社 Task controller
US8418188B2 (en) 2010-03-11 2013-04-09 Toyota Jidosha Kabushiki Kaisha Task execution controller and recording medium on which task execution control program is recorded
JP2016519371A (en) * 2013-04-19 2016-06-30 クロノ−セイフ Task time allocation method enabling deterministic error recovery in real time
JPWO2019187041A1 (en) * 2018-03-30 2021-04-08 住友電気工業株式会社 System, its server computer, control method and computer program
CN111919200A (en) * 2018-03-30 2020-11-10 住友电气工业株式会社 System, server computer therefor, control method, and computer program
US20210096918A1 (en) * 2018-03-30 2021-04-01 Sumitomo Electric Industries, Ltd. System, server computer thereof, control method, and computer program
WO2019187041A1 (en) * 2018-03-30 2019-10-03 住友電気工業株式会社 System, server computer thereof, control method, and computer program
JP7070664B2 (en) 2018-03-30 2022-05-18 住友電気工業株式会社 System, its server computer, control method and computer program
US11945382B2 (en) 2018-03-30 2024-04-02 Sumitomo Electric Industries, Ltd. System, server computer thereof, control method, and computer program
CN110928872A (en) * 2018-09-19 2020-03-27 佳能株式会社 Processing system and method
CN110928872B (en) * 2018-09-19 2023-12-22 佳能株式会社 Processing system and method

Also Published As

Publication number Publication date
JP3859564B2 (en) 2006-12-20

Similar Documents

Publication Publication Date Title
US6434591B1 (en) Thread control system and method in a computer system
US7627705B2 (en) Method and apparatus for handling interrupts in embedded systems
WO2006076853A1 (en) A method of processing multi-thread/multi-task/multi-processor
US7444450B2 (en) Method and system for detecting excessive interrupt processing for a processor
JP2007018282A (en) Process control system and its control method
US10379931B2 (en) Computer system
JP6955163B2 (en) Information processing equipment, information processing methods and programs
JP5579935B2 (en) Detection of abnormal operation caused by interrupt processing
JP3859564B2 (en) Event notification task control processing method and method, and program
US8095695B2 (en) Control apparatus for process input-output device
JP2965075B2 (en) Program execution status monitoring method
KR100697988B1 (en) Apparatus and method for protecting system from excessive occurrence of interrupt
JP2006227962A (en) System and method for monitoring application task
JPH10269110A (en) Method for avoiding hang-up of computer system, and computer system using the same method
JPH11237995A (en) Event controller
JP4009602B2 (en) Task processing method, apparatus, and program using real-time OS
JP2000089971A (en) Method and device for controlling interruption order
JP4387863B2 (en) Disturbance occurrence detection program and disturbance occurrence detection method
JPH08329022A (en) Input/output process load decentralization control system for multiprocessor system
JP2000259433A (en) Device and method for detecting deadlock
JPS63280345A (en) Detection of program abnormality
JPS59135557A (en) Information processor
JPH0644087A (en) Scheduling control system of computer system
JPS62113260A (en) Timer monitor control system for multi-cpu system
JPH11327959A (en) Method and device for monitoring abnormality of processor

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050304

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050715

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20060410

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060613

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060802

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060919

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100929

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees