JPH05241872A - Abnormality detection system for task - Google Patents

Abnormality detection system for task

Info

Publication number
JPH05241872A
JPH05241872A JP4039432A JP3943292A JPH05241872A JP H05241872 A JPH05241872 A JP H05241872A JP 4039432 A JP4039432 A JP 4039432A JP 3943292 A JP3943292 A JP 3943292A JP H05241872 A JPH05241872 A JP H05241872A
Authority
JP
Japan
Prior art keywords
task
function
address
abnormality
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4039432A
Other languages
Japanese (ja)
Inventor
Yutaka Hasegawa
豊 長谷川
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 Engineering Ltd
Original Assignee
NEC Engineering 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 Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP4039432A priority Critical patent/JPH05241872A/en
Publication of JPH05241872A publication Critical patent/JPH05241872A/en
Pending legal-status Critical Current

Links

Landscapes

  • Retry When Errors Occur (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To easily detect the abnormality of a task without providing an exclu sive abnormality detection function on the task side and to recover from the fault at an early stage when a certain task is fallen into an indefinite loop state by a logic abnormality or a hardware abnormality in the task control by a time division OS. CONSTITUTION:In a software where a program (task) performing plural different processings operates in a time division, a task identification function identifying a task in operation when the processing within a certain task is fallen into an indefinite loop by a logic abnormality or a hardware abnormality, an address detection function detecting the operation address of the task identified in this task identification function, an address decision function deciding that the address detected by this address detection function has only changes within a stipulated range (the task does not move), a state recognition function recognizing the abnormal state by the decision of this address decision function and a restart function changing the operation address of the task to the head of the task when the abnormal state is recognized by this state recognition function.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、タスクの異常検出方式
に関し、特に、あらゆるソフトウェア/ファームウェア
において複数のタスクが時分割で調停され動作している
時のタスクの異常検出方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a task abnormality detection method, and more particularly to a task abnormality detection method when a plurality of tasks are arbitrated and operating in time division in any software / firmware.

【0002】[0002]

【従来の技術】複数の異なる処理を行うプログラム(タ
スク)がタスクを時分割で順番に動作させる目的で開発
されたプログラム(オペレーティング・システム(O
S))の基で動作している時に、タスクの時分割動作は
図2、図3のようになる。
2. Description of the Related Art A program (task) that performs a plurality of different processes is developed for the purpose of sequentially operating tasks in a time-sharing manner (operating system (O
When operating under S)), the task time-sharing operation is as shown in FIGS.

【0003】図2に示すように、タスクAが時間Tだけ
動作すると、OSはタスクAの動作状態に関係なく強制
的にタスクAの処理を打ち切りタスクBを動作させる。
OSはタスクAの処理を打ち切る際に、図3に示すよう
にその打ち切られたプログラムアドレス、処理データ等
の動作環境の保存を行い、次にタスクAを動作させる時
には無条件で保存されている動作環境を復帰させて処理
を続行させる。このようにしてタスクはOSの制御でA
→B→C→Aと順番に動作する。
As shown in FIG. 2, when the task A operates for the time T, the OS forcibly cancels the processing of the task A and operates the task B regardless of the operating state of the task A.
When the OS terminates the processing of task A, it saves the operating environment such as the aborted program address and processing data as shown in FIG. 3, and is unconditionally preserved when the task A is operated next time. Restore the operating environment and continue processing. In this way, the task is controlled by the OS
→ B → C → A operates in this order.

【0004】[0004]

【発明が解決しようとする課題】従来における時分割O
Sによるタスク制御では、1つのタスクが論理的異常ま
たはハードウェア異常により無限ループ状態になって
も、時分割で他のタスクに動作が移り、プログラム全体
を外から見た場合には、タスクの異常を容易に検出する
ことができず、障害を早期に復旧させることができな
い。
[Problems to be Solved by the Invention] Time division O in the prior art
In the task control by S, even if one task enters an infinite loop state due to a logical abnormality or a hardware abnormality, the operation moves to another task in time sharing, and if the entire program is viewed from the outside, the task Abnormalities cannot be easily detected and failures cannot be recovered early.

【0005】本発明は上記実情に鑑みてなされたもので
あり、従って本発明の目的は、従来の技術に内在する上
記課題を解決することを可能とした新規なタスクの異常
検出方式を提供することにある。
The present invention has been made in view of the above circumstances, and therefore an object of the present invention is to provide a novel task abnormality detection system which can solve the above problems inherent in the prior art. Especially.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係るタスクの異常検出方式は、複数の異な
る処理を行うプログラム(タスク)が時分割で動作する
ソフトウェアにおいて、あるタスク内の処理が論理的異
常またはハードウェア異常により無限ループに陥った場
合に動作中のタスクを判別するタスク判別機能と、この
タスク判別機能において判別されたタスクの動作アドレ
スを検出するアドレス検出機能と、このアドレス検出機
能で検出されたアドレスが規定範囲内の変化しか無い
(タスクが動いていない)ことを判定するアドレス判定
機能と、このアドレス判定機能の判定により異常状態を
認識する状態認識機能と、この状態認識機能で異常状態
で認識した場合そのタスクの動作アドレスをタスクの先
頭に変更するリスタート機能とを備えて構成される。
In order to achieve the above object, the task abnormality detection method according to the present invention is a task in which a program (task) performing a plurality of different processes operates in a time-division manner. Task discrimination function that discriminates the task that is operating when the processing of is in an infinite loop due to a logical abnormality or hardware abnormality, and an address detection function that detects the operating address of the task discriminated by this task discrimination function, An address determination function that determines that the address detected by this address detection function has only a change within a specified range (task is not running), and a state recognition function that recognizes an abnormal state by the determination of this address determination function, A lister that changes the operation address of the task to the beginning of the task when the status recognition function recognizes it in an abnormal state. Constituted by a door function.

【0007】即ち、本発明においては、動作しているタ
スクを切り替える際に保存するタスクの動作環境を規定
するデータ群の中からプログラムアドレスだけを抽出
し、監視する機能をOSの中に持たせる。
That is, according to the present invention, only the program address is extracted from the data group defining the operating environment of the task to be saved when the operating task is switched, and the OS is provided with the function of monitoring. ..

【0008】このプログラムアドレスは一定時間毎のタ
スクの動きを示している。よってこのプログラムアドレ
スにほとんど変化が無い場合には、そのタスクは動作し
ていない(無限ループ状態にある)可能性がある。
This program address indicates the movement of the task at regular time intervals. Therefore, when there is almost no change in this program address, the task may not be operating (in an infinite loop state).

【0009】OSが1タスクに連続動作を許可する時間
をTとし、タスクが処理すべきデータが無い場合に動作
しているアドレス区間をαバイトとしその動作時間をβ
とした場合に、そのタスクを判別するタスク判別機能
と、プログラムアドレスを抽出するアドレス検出機能
と、過去にT/β回抽出したプログラムアドレスの最大
値最小値の差分がαバイト未満であることを判定するア
ドレス判定機能により、そのタスクは何らかの障害によ
って停止(無限ループ動作)していると見なすことがで
きる。
The time during which the OS permits one task to perform continuous operation is T, and the address section in which there is no data to be processed by the task is α bytes, and its operating time is β.
In this case, the difference between the task discrimination function for discriminating the task, the address detection function for extracting the program address, and the maximum and minimum values of the program address extracted T / β times in the past is less than α bytes. The task can be considered to be stopped (infinite loop operation) due to some failure by the address determination function.

【0010】これを状態認識機能により異常状態と認識
し、OSが復帰させる動作環境データをクリアしてプロ
グラムアドレスをタスクの先頭位置に変更するリスター
ト機能により、OSはタスクをリスタートさせる。ま
た、アラーム出力機能により異常状態及び異常箇所を外
部に通知する。
This is recognized as an abnormal state by the state recognition function, and the OS restarts the task by the restart function that clears the operating environment data returned by the OS and changes the program address to the head position of the task. Also, an alarm output function notifies the outside of the abnormal state and the abnormal place.

【0011】[0011]

【実施例】以下、本発明をその好ましい一実施例につい
て図面を参照して具体的に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The preferred embodiment of the present invention will be described below in detail with reference to the drawings.

【0012】図1は本発明を実現するための機能を組み
込んだOSの処理フローを示す図である。
FIG. 1 is a diagram showing a processing flow of an OS incorporating a function for realizing the present invention.

【0013】図2は正常時の各タスクの動作を示す構成
図である。
FIG. 2 is a block diagram showing the operation of each task under normal conditions.

【0014】図2において、OSがタスクAの動作をタ
スクBに切り替える場合には、その時点でのタスクAの
動作環境を保存する(図3)。この際に本発明を実現す
る機能を組み込む(図1)。
In FIG. 2, when the OS switches the operation of task A to task B, the operating environment of task A at that time is saved (FIG. 3). At this time, the function for realizing the present invention is incorporated (FIG. 1).

【0015】OS内には予め各タスク毎にタスクの動作
を判定する為のプログラムアドレスを記録するエリアと
タスクが何時間停止状態にあるかを数えるカウンタエリ
アを設ける。
In the OS, an area for recording a program address for judging the task operation for each task and a counter area for counting how long the task is in a stopped state are provided in advance.

【0016】切り替え処理に際しては、切り替えられた
タスクを判別し、以前の切り替え時に記録されているプ
ログラムアドレスと今回のプログラムアドレスとの差分
が規定値以上であれば無条件にそのプログラムアドレス
を記録し、カウンタをゼロクリアする。規定値未満であ
れば、プログラムアドレスは記録せずにその代わりカウ
ンタを+1する。このカウンタが規定値に達した場合に
は、保存されている動作環境をクリアし、次に動作させ
るべきプログラムアドレスをタスクの先頭に変更する。
In the switching processing, the switched task is discriminated, and if the difference between the program address recorded at the previous switching and the program address at this time is equal to or more than a specified value, the program address is unconditionally recorded. , Clear the counter to zero. If it is less than the specified value, the program address is not recorded and the counter is incremented by +1 instead. When this counter reaches the specified value, the stored operating environment is cleared and the program address to be operated next is changed to the beginning of the task.

【0017】これにより、次にそのタスクが動作する時
には、そのタスクだけがリスタートすることになり停止
状態から復帰することができる。また、アラームを外部
に通知することにより異常状態の認識が可能となる。
As a result, when the task is operated next time, only the task is restarted, and the stopped state can be recovered. Further, it is possible to recognize the abnormal state by notifying the alarm to the outside.

【0018】[0018]

【発明の効果】以上説明したように、本発明によれば、
時分割OSの基で動作しているタスクの異常停止状態を
OS内部で検出することにより、そのタスクだけをリス
タートさせて全体として短時間で正常処理に復帰するこ
とができるという効果が得られる。
As described above, according to the present invention,
By detecting an abnormal stop state of a task operating under the time-sharing OS inside the OS, it is possible to restart only that task and return to normal processing in a short time as a whole. ..

【0019】本発明によれば、また、個々のタスク側に
専用の異常検出機能を持たせる必要がないために、処理
を効率良く進められるという効果が得られる。
According to the present invention, since it is not necessary for each task side to have a dedicated abnormality detecting function, the effect that the processing can be efficiently advanced is obtained.

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

【図1】本発明を実現する機能を組み込んだOSの動作
を示した図である。
FIG. 1 is a diagram showing an operation of an OS incorporating a function for realizing the present invention.

【図2】時分割OSの基に動作する各タスクの動きを示
した図である。
FIG. 2 is a diagram showing the movement of each task that operates based on a time-division OS.

【図3】従来の時分割制御OSの動作を示した図であ
る。
FIG. 3 is a diagram showing an operation of a conventional time division control OS.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 複数の異なる処理を行うプログラム(タ
スク)が時分割で動作するソフトウェアにおいて、ある
タスク内の処理が論理的異常またはハードウェア異常に
より無限ループに陥った場合に動作中のタスクを判別す
るタスク判別機能と、該タスク判別機能において判別さ
れたタスクの動作アドレスを検出するアドレス検出機能
と、該アドレス検出機能で検出されたアドレスが規定範
囲内の変化しか無い(タスクが動いていない)ことを判
定するアドレス判定機能と、該アドレス判定機能の判定
により異常状態を認識する状態認識機能と、該状態認識
機能で異常状態を認識した場合そのタスクの動作アドレ
スをタスクの先頭に変更するリスタート機能とを有する
ことを特徴としたタスクの異常検出方式。
1. In software in which a program (task) that performs a plurality of different processes operates in a time-sharing manner, a task that is operating when a process in a task falls into an infinite loop due to a logical abnormality or a hardware abnormality is executed. The task discrimination function for discriminating, the address detection function for detecting the operation address of the task discriminated by the task discrimination function, and the address detected by the address detection function have only the change within the specified range (the task is not moving. ), An address judgment function that recognizes an abnormal state by the judgment of the address judgment function, and if the abnormal state is recognized by the state recognition function, the operation address of the task is changed to the head of the task. A task abnormality detection method characterized by having a restart function.
【請求項2】 前記状態認識機能で異常状態を認識した
場合に異常状態及び異常箇所を外部に通知するアラーム
出力機能を有することを更に特徴とする請求項1に記載
のタスクの異常検出方式。
2. The task abnormality detection method according to claim 1, further comprising an alarm output function for notifying an abnormal state and an abnormal portion to the outside when the abnormal state is recognized by the state recognition function.
JP4039432A 1992-02-26 1992-02-26 Abnormality detection system for task Pending JPH05241872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4039432A JPH05241872A (en) 1992-02-26 1992-02-26 Abnormality detection system for task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4039432A JPH05241872A (en) 1992-02-26 1992-02-26 Abnormality detection system for task

Publications (1)

Publication Number Publication Date
JPH05241872A true JPH05241872A (en) 1993-09-21

Family

ID=12552841

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4039432A Pending JPH05241872A (en) 1992-02-26 1992-02-26 Abnormality detection system for task

Country Status (1)

Country Link
JP (1) JPH05241872A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100362476C (en) * 2004-07-02 2008-01-16 株式会社Ntt都科摩 Task management system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100362476C (en) * 2004-07-02 2008-01-16 株式会社Ntt都科摩 Task management system

Similar Documents

Publication Publication Date Title
EP1844444B1 (en) Identifying spurious regions in a video frame
US6952449B2 (en) Detection apparatus for road obstructions
JP4701100B2 (en) Abnormal behavior detection device
KR100827234B1 (en) Fault-tolerant method and apparatus for touch sensor
US10867394B2 (en) Object tracking device, object tracking method, and recording medium
US5493539A (en) Two-stage detection and discrimination system for side scan sonar equipment
JPH05241872A (en) Abnormality detection system for task
CN111924427B (en) Scraper conveyor floating chain fault identification method and device and electronic equipment
US11881053B2 (en) Systems and methods for hierarchical facial image clustering
CN114524339B (en) Method, device, equipment and storage medium for detecting safe operation of elevator car
CN100340427C (en) Passenger protection device
CN117657204A (en) Method and device for automatic driving
JP7273875B2 (en) Determination device, moving body, determination method and program
KR102520724B1 (en) Method for failure detection of circuit breaker and apparatus for performing the same
CN113128439A (en) Flame real-time detection algorithm and system based on video image sequence
JPH0512591A (en) Monitoring device
JP3713835B2 (en) Image recognition device for monitoring
KR102502648B1 (en) Method and devices for detecting anomaly in a time series using rnn
CN117473514B (en) Intelligent operation and maintenance method and system of industrial control system
CN111531582B (en) Industrial robot fault detection method and system based on vision
US20240194053A1 (en) Reducing false alarms in security system
US11574461B2 (en) Time-series based analytics using video streams
CN110825062B (en) Emergency processing system and method for strip steel cleaning section signals
JPH05108418A (en) Detection system for program abnormality
US20230042120A1 (en) Reducing false alarms in security system