JPH0962520A - Infinite loop monitoring device - Google Patents

Infinite loop monitoring device

Info

Publication number
JPH0962520A
JPH0962520A JP7237653A JP23765395A JPH0962520A JP H0962520 A JPH0962520 A JP H0962520A JP 7237653 A JP7237653 A JP 7237653A JP 23765395 A JP23765395 A JP 23765395A JP H0962520 A JPH0962520 A JP H0962520A
Authority
JP
Japan
Prior art keywords
task
monitoring
infinite loop
executed
ready list
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
JP7237653A
Other languages
Japanese (ja)
Inventor
Masao Ueyasu
雅雄 上保
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP7237653A priority Critical patent/JPH0962520A/en
Publication of JPH0962520A publication Critical patent/JPH0962520A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To monitor an infinite loop with a software and to automatically cancel that state. SOLUTION: For example, tasks A and B are started and when the property of the task A is higher, the task A starts operation. This is displayed on a ready list 5 of an OS part 2. A monitor task 3 periodically receives the instruction from a timer task 4, refers to the ready list 5 and compares the task, which bad been executed in the last reference with the task being executed this time. When the same task is contotnuiusly displayed on the ready list 5, the state of infinite loop is judged and system restart processing is automatically performed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、情報処理装置内で
タスクが何らかの異常によって無限ループ状態になった
ことを検出しこれを回復させる無限ループ監視装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an infinite loop monitoring apparatus which detects that a task has entered an infinite loop state due to some abnormality in an information processing apparatus and recovers it.

【0002】[0002]

【従来の技術】情報処理装置において複数のタスクが起
動され、これらのタスクがそれぞれ一定の処理を実行す
るようなものにおいて、いずれか一つのタスクのみが実
行を許される環境では、各タスクに所定の優先度順を設
ける。即ち、各タスクはその優先度順に従って順にCP
Uを専有し所定の処理を実行する。あるタスクの実行中
は、他のタスクは実行待ち状態となる。ここで、実行中
のタスクが何らかの原因で無限ループ状態となり、いわ
ゆるデッドロックによってその後の処理ができなくなる
ことがある。情報処理装置をオペレータが監視し、この
ような無限ループ状態を認識すると、リセットボタンを
押してハードウェアリセットをかけることによって情報
処理装置の再立上げを行う。このような無限ループ状態
をハードウェア的に自動検出する装置も知られている。
2. Description of the Related Art In a system in which a plurality of tasks are activated in an information processing apparatus and each of these tasks executes a certain process, in an environment in which only one of the tasks is permitted to execute, a predetermined number is assigned to each task. Priority order is established. That is, each task is sequentially assigned a CP according to its priority order.
It occupies U and executes predetermined processing. While one task is being executed, another task is in a waiting state. Here, the task being executed may enter an infinite loop state for some reason, and so-called deadlock may prevent further processing. When the operator monitors the information processing apparatus and recognizes such an infinite loop state, the information processing apparatus is restarted by pressing the reset button and performing a hardware reset. A device that automatically detects such an infinite loop state by hardware is also known.

【0003】[0003]

【発明が解決しようとする課題】ところで、上記のよう
な従来の無限ループの監視には次のような解決すべき課
題があった。無限ループ状態がオペレータにより認識さ
れれば、オペレータはリセット操作を行うことによって
無限ループ状態から脱出できる。ところが、オペレータ
が常に情報処理装置の動作状態を監視していなければ、
その状態が放置されることもあり、いつまでも他のタス
クが待機状態のままとされれば処理が滞る。
The conventional monitoring of an infinite loop as described above has the following problems to be solved. If the infinite loop state is recognized by the operator, the operator can escape from the infinite loop state by performing a reset operation. However, if the operator does not constantly monitor the operating state of the information processing device,
The state may be left unattended, and processing will be delayed if other tasks are left in the waiting state forever.

【0004】一方、ハードウェア的に無限ループを検出
する装置は、装置自体のコストアップを招き、装置の小
型化を妨げる。また、既に運用中の情報処理装置に対し
てこの種の装置を組み込むことは容易でない。
On the other hand, a device that detects an infinite loop in terms of hardware increases the cost of the device itself and hinders the downsizing of the device. Further, it is not easy to incorporate this type of device into an information processing device that is already in operation.

【0005】[0005]

【課題を解決するための手段】本発明は以上の点を解決
するため以下の構成を採用する。 (構成)本発明の無限ループ監視装置は、複数のタスク
が、それぞれ設定された優先度順に処理されるものにお
いて、起動したタスクが無限ループ状態になっているか
どうかを監視する監視タスクと、この監視タスクに対し
て周期的に監視動作を実行させるために一定の周期で監
視動作指示を出力するタイマタスクと、現在動作中のタ
スクを表示するレデイリストとを備え、監視タスクは、
監視動作時に、レデイリストを参照して実行中のタスク
を認識し、前回の監視動作時に実行中であったタスクと
同一かどうかを比較して、所定回数だけ監視動作を繰り
返してもなお同一のタスクが実行中のときは、無限ルー
プ状態と判断してシステムリスタート処理を実行する。
The present invention adopts the following configurations in order to solve the above points. (Structure) The infinite loop monitoring apparatus of the present invention is a monitoring task for monitoring whether or not a started task is in an infinite loop state in a case where a plurality of tasks are processed in the set priority order, respectively. The monitoring task includes a timer task that outputs a monitoring operation instruction at a fixed cycle in order to periodically execute the monitoring operation for the monitoring task, and a ready list that displays the currently operating task.
During the monitoring operation, the ready list is referenced to recognize the task being executed, and it is compared with the task that was being executed at the previous monitoring operation to see if it is the same. When the task is being executed, the system restart processing is executed by determining that the task is in an infinite loop state.

【0006】(作用)この情報処理装置では、処理待ち
の状態のタスクのうち最も優先度の高いタスクのみが実
行を許される。実行中のタスクはレデイリストを参照す
れば分かる。周期的にレデイリストを参照して同一タス
クが実行中の状態を継続していれば、無限ループ状態と
判断する。タイマタスクはこのような監視タイミングを
適当な間隔に設定して、監視タスクを動作させる。従っ
て、周期が長すぎると無限ループ検出のタイミングが遅
れる。短すぎると、監視タスクの監視動作が不必要に増
えるので適切な周期が設定される。タイマタスクにメッ
セージ送信をさせるための計時処理は、割込みハンドラ
がOS部の側で実行している。これはタイマタスク自身
による計時処理よりもOS部の側の割込みハンドラの方
が正確に計時できるからで、タイマタスク自身が正確に
適切な計時を行えれば、タイマタスクの側にそのような
計時機能を持たせてよい。
(Operation) In this information processing apparatus, only the task having the highest priority among the tasks waiting to be processed is allowed to execute. You can see what tasks are running by looking at the readylist. If the same task continues to be executed by periodically referring to the ready list, it is determined to be an infinite loop state. The timer task sets such a monitoring timing at an appropriate interval to operate the monitoring task. Therefore, if the cycle is too long, the timing of infinite loop detection is delayed. If it is too short, the monitoring operation of the monitoring task unnecessarily increases, so that an appropriate cycle is set. The interrupt handler executes the timekeeping process for causing the timer task to send a message on the OS unit side. This is because the interrupt handler on the OS side can time more accurately than the timer task itself, so if the timer task itself can time properly, such a timer It may have a function.

【0007】(構成)上記の装置において、タスクの実
行内容により、無限ループと判断するための所定回数の
閾値を異ならせるようにしてもよい。 (作用)タスクの性質によっては実行時間の長いものと
短いものがあるため、閾値を変えて適切迅速な判断を行
う。
(Structure) In the above apparatus, the threshold value of a predetermined number of times for judging an infinite loop may be changed depending on the execution content of the task. (Function) Depending on the nature of the task, there are long and short execution times, so the threshold is changed to make appropriate and prompt judgment.

【0008】[0008]

【発明の実施の形態】以下、本発明の実施の形態を具体
例を用いて説明する。図1は、本発明の装置の一例を示
す機能ブロック図である。この図は、情報処理装置の中
で動作する各種のタスクとOS(オペレーションシステ
ム)の部分を図解したものである。タスク部1には、こ
の装置によって監視の対象となるタスクA及びタスクB
と、無限ループ監視のために設けられた監視タスク3、
タイマタスク4等が設けられている。また、OS部2に
は現在実行中のタスクを表示するレデイリスト5と、時
間を計測するための割込みハンドラ6が設けられてい
る。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to specific examples. FIG. 1 is a functional block diagram showing an example of the device of the present invention. This figure illustrates various tasks operating in the information processing apparatus and an OS (operation system) portion. The task unit 1 includes a task A and a task B to be monitored by this device.
And a monitoring task 3 provided for infinite loop monitoring,
A timer task 4 and the like are provided. Further, the OS section 2 is provided with a ready list 5 for displaying currently executing tasks and an interrupt handler 6 for measuring time.

【0009】本発明は、このように複数のタスクがそれ
ぞれ設定された優先度順に処理され、実行中のタスクが
CPUを専有するような情報処理装置に適用される。こ
の図の例では、タスクAの方がタスクBよりも優先度が
高く、先に実行される構成となっている。また、監視タ
スク3は、起動した後、実際に動作中のタスクが無限ル
ープ状態になっているかどうかを監視する処理を行う部
分である。タイマタスク4は、この監視タスク3に対し
て一定の周期で監視動作を実行させるために監視動作を
指示するメッセージを送信するプログラムから構成され
る。このメッセージはメールボックス3Aに格納され、
監視タスク3がそのメッセージを読み取ることによって
タイマタスク4の監視動作指示が監視タスク3に伝えら
れる構成となっている。
The present invention is applied to an information processing apparatus in which a plurality of tasks are processed in the set priority order and the task being executed occupies the CPU. In the example of this figure, the task A has a higher priority than the task B and is configured to be executed first. Also, the monitoring task 3 is a part that performs processing for monitoring whether or not the task that is actually operating is in an infinite loop state after being activated. The timer task 4 is composed of a program that sends a message instructing the monitoring task 3 to execute the monitoring operation at a constant cycle. This message is stored in mailbox 3A,
When the monitoring task 3 reads the message, the monitoring operation instruction of the timer task 4 is transmitted to the monitoring task 3.

【0010】OS部2のレディリスト5は、丁度現在実
行中のタスクをOSのハンドリング機能によって取得し
表示する部分である。従って、タスクAが実行中はレデ
ィリスト5にタスクAと表示され、タスクAの処理が終
了しタスクBが実行を開始すると、レディリスト5には
タスクBと表示される。監視タスク3はタイマタスク4
から監視動作指示を受けると、その都度レディリスト5
を参照して実行中のタスクを認識する。また、監視タス
ク3には前回レディリスト5を参照して表示されていた
タスク名が保持されている。そして、監視動作時には、
前回動作していたタスクと今回レディリスト5を参照し
て得たタスクの名前を比較し、同一であればそのタスク
が継続的に動作していることを認識する。この場合、タ
イマタスク4から出力される監視動作指示のタイミング
を適当な間隔に選んでおき、何回かレディリスト5を参
照してずっと同一のタスクが動作している場合には無限
ループ状態と判断する。監視タスク3はこの判断をした
場合、情報処理装置のシステムリスタート処理を実行す
る。
The ready list 5 of the OS section 2 is a section for acquiring and displaying the task currently being executed by the handling function of the OS. Therefore, the task A is displayed in the ready list 5 while the task A is being executed, and the task B is displayed in the ready list 5 when the processing of the task A is finished and the task B is started to be executed. Monitoring task 3 is timer task 4
Whenever a monitoring operation instruction is received from the ready list 5
Recognize the task being executed by referring to. Further, the monitoring task 3 holds the task name displayed by referring to the ready list 5 last time. And during the monitoring operation,
The previously operating task and the name of the task obtained by referring to the ready list 5 this time are compared, and if they are the same, it is recognized that the task is continuously operating. In this case, the timing of the monitoring operation instruction output from the timer task 4 is selected at an appropriate interval, and the infinite loop state is set when the same task is operating all the time by referring to the ready list 5 several times. to decide. When the monitoring task 3 makes this determination, it executes the system restart process of the information processing apparatus.

【0011】図2には、本発明の装置の具体的な動作説
明図を示す。図の(a)は、タスクAとタスクBとが正
常に動作しそのデータを終了した場合のタイムチャート
で、(b)はタスクAが無限ループ状態になった場合の
タイムチャートである。図の(a)において、図1に示
した監視タスク3は図2のt1,t2,t3,t4,t
5の各時刻に監視動作指示に従ってレディリスト5を参
照するものとする。この場合に、タスクAは時刻t1,
t2にレディリスト5を参照した場合に動作中であっ
た。しかしながら、時刻t3にはタスクBが動作中とい
うように表示が切り替わっている。そして、時刻t5に
はタスクBの処理は終了し、例えば他のタスク名がレデ
ィリスト5に表示される。監視タスク3はこのようなタ
スクの処理終了を認識し、情報処理装置が正常に動作し
ていることを確認する。一方、(b)に示すように、監
視タスク3が時刻t1,t2,t3,t4,t5と繰り
返しレディリスト5を参照していずれの場合にもタスク
Aが実行中という表示があったとする。この場合、例え
ば6回目を閾値に設定しておき、6回目の時刻t6にな
おタスクAが動作中であった場合には、監視タスク3
は、ここでタスクAの無限ループ状態と判断し、システ
ムリスタート処理を行う。
FIG. 2 shows a concrete operation explanatory diagram of the apparatus of the present invention. (A) of the figure is a time chart when the task A and the task B operate normally and end the data, and (b) is a time chart when the task A enters an infinite loop state. 2A, the monitoring task 3 shown in FIG. 1 has t1, t2, t3, t4, t shown in FIG.
5, the ready list 5 is referred to in accordance with the monitoring operation instruction. In this case, task A has time t1,
It was operating when the ready list 5 was referenced at t2. However, at time t3, the display is switched such that task B is operating. Then, at time t5, the processing of task B ends, and other task names are displayed in the ready list 5, for example. The monitoring task 3 recognizes the end of the processing of such a task and confirms that the information processing device is operating normally. On the other hand, as shown in (b), it is assumed that the monitoring task 3 refers to the times t1, t2, t3, t4, t5 and the repeat ready list 5, and in any case there is a display that the task A is being executed. In this case, for example, the sixth time is set as the threshold value, and if the task A is still operating at the sixth time t6, the monitoring task 3
Determines that task A is in an infinite loop state and performs system restart processing.

【0012】以上が本発明の装置の動作の概略である
が、以下本発明の装置の動作を更に具体的に説明する。
図3は、装置の起動処理フローチャートである。まず、
装置の起動に伴って監視タスクが起動され待機状態にな
る(ステップS1)。次のステップS2では、タイマタ
スク4が起動され、OS部2の割込みハンドラ6もスタ
ートされる。更に、ステップS3、ステップS4におい
て、タスクA及びタスクBが起動され、情報処理装置の
運用状態となる(ステップS5)。
The above is the outline of the operation of the apparatus of the present invention, and the operation of the apparatus of the present invention will be described more specifically below.
FIG. 3 is a flow chart of the startup process of the device. First,
The monitoring task is activated along with the activation of the apparatus and enters a standby state (step S1). In the next step S2, the timer task 4 is started and the interrupt handler 6 of the OS section 2 is also started. Further, in steps S3 and S4, the task A and the task B are activated, and the information processing apparatus enters the operating state (step S5).

【0013】図4は、装置起動後の無限ループ検出動作
フローチャートである。まず、ステップS1において、
OS部2の割込みハンドラ6はタイムアウトを検出する
と、ステップS2において、タイマタスク4に対しタイ
ムアウト割込みをかける。そして、タイマタスクが動作
を開始し、監視タスク3に対し監視動作指示のためのメ
ッセージを送信する。ステップS3では、監視タスク3
がこのメッセージを受信し、無限ループの判断を行う。
FIG. 4 is a flow chart of the infinite loop detection operation after the apparatus is activated. First, in step S1,
When the interrupt handler 6 of the OS unit 2 detects a timeout, it issues a timeout interrupt to the timer task 4 in step S2. Then, the timer task starts its operation, and sends a message for instructing the monitoring operation to the monitoring task 3. In step S3, the monitoring task 3
Receives this message and makes an infinite loop decision.

【0014】図5には、このような無限ループの判断処
理サブルーチンのフローチャートを示す。まず、監視タ
スク3はステップS1において、レディリスト5のタス
ク名を参照する。次に、ステップS2において、監視タ
スク3に用意された内部テーブルのRUNフラグをチェ
ックする。
FIG. 5 shows a flowchart of such an infinite loop judgment processing subroutine. First, the monitoring task 3 refers to the task name of the ready list 5 in step S1. Next, in step S2, the RUN flag of the internal table prepared for the monitoring task 3 is checked.

【0015】図6には、監視タスクの内部テーブル説明
図を示す。監視タスク3の内部テーブルはこの図に示す
ように、タスク名とRUNフラグと連続RUNカウンタ
と閾値を表示したものである。タスク名は監視対象とな
るタスクAとタスクBの名前が書き込まれている。ま
た、RUNフラグは動作中のものが“1”、待機中のも
のが“0”となっている。ここでは、タスクAが動作中
のためタスクAのRUNフラグは“1”、タスクBのR
UNフラグは“0”となっている。連続RUNカウンタ
は、例えばタスクAの動作中、監視タスク3が監視動作
を1回実行し、レディリスト5でタスクAの名称を認識
する度に“1”だけカウントアウトされるカウンタであ
る。
FIG. 6 is an explanatory diagram of the internal table of the monitoring task. As shown in this figure, the internal table of the monitoring task 3 displays the task name, the RUN flag, the continuous RUN counter, and the threshold value. As the task name, the names of task A and task B to be monitored are written. Further, the RUN flag is "1" when operating and "0" when waiting. Here, since the task A is operating, the RUN flag of the task A is “1” and the R of the task B is R.
The UN flag is "0". The continuous RUN counter is a counter that is counted out by “1” each time the monitoring task 3 executes the monitoring operation once during the operation of the task A and recognizes the name of the task A in the ready list 5, for example.

【0016】もし、タスクAの動作が終了し、タスクB
が動作している状態に切り替わったときは連続RUNカ
ウンタはゼロクリアされる。従って、連続RUNカウン
タが順番にカウントアップされるのはタスクAが継続的
に動作していることを示す。図の例では連続RUNカウ
ンタが“5”である。タスクBは動作していないため
“0”である。閾値は連続RUNカウンタの数値がいく
つになった場合に無限ループ状態と判断するかを示すた
めの基準となる。各タスク毎に設けたのは、タスクの性
質上、あまり長時間の処理がないものと比較的長時間処
理を継続するものとがあるからである。
If the operation of task A is completed, task B
Is switched to the operating state, the continuous RUN counter is cleared to zero. Therefore, the continuous RUN counter being incremented in sequence indicates that the task A is continuously operating. In the illustrated example, the continuous RUN counter is "5". Since the task B is not operating, it is “0”. The threshold value serves as a reference for indicating when the numerical value of the continuous RUN counter is reached to determine the infinite loop state. The reason for providing each task is that, due to the nature of the task, there are those that do not process for too long and those that continue for a relatively long time.

【0017】図5のステップS2において、このような
内部テーブルのRUNフラグをチェックし、これがオン
即ち“1”の状態のときはステップS3において、連続
RUNカウンタを“1”だけアップする。即ち、動作中
であって連続RUNカウンタが“0”でなければそれに
“1”を加算する。そして、ステップS4において、連
続RUNカウンタの値と閾値の値とを比較する。ステッ
プS4において、もし閾値よりオーバーしている場合に
は、無限ループが発生したと判断してこの判断処理を終
える。連続RUNカウンタが閾値未満であれば、まだ無
限ループをしていないと判断して、この判断処理を抜け
る。
In step S2 of FIG. 5, the RUN flag of such an internal table is checked, and when it is ON, that is, in the state of "1", the continuous RUN counter is incremented by "1" in step S3. That is, if the continuous RUN counter is operating and is not "0", "1" is added to it. Then, in step S4, the value of the continuous RUN counter is compared with the value of the threshold value. In step S4, if the value exceeds the threshold value, it is determined that an infinite loop has occurred, and this determination process ends. If the continuous RUN counter is less than the threshold value, it is determined that the infinite loop is not yet performed, and this determination processing is exited.

【0018】一方、ステップS2において、内部テーブ
ルのRUNフラグがオフの場合、即ち前回実行中でなか
ったものの場合、ステップS5に移り、今回実行中とな
ったタスク名に対応するRUNフラグをオンにし、即ち
“1”にして、連続RUNカウンタを“1”だけアップ
する。元々連続RUNカウンタは“0”であったはずだ
からここでは連続RUNカウンタは無条件に“1”とな
る。また、ステップS6において、他のタスク、例えば
タスクAのRUNフラグはオフ即ち“0”にされ、連続
RUNカウンタは“0”にクリアされる。
On the other hand, in step S2, if the RUN flag in the internal table is off, that is, if the RUN flag was not being executed last time, the process proceeds to step S5, and the RUN flag corresponding to the task name being executed this time is turned on. That is, it is set to "1" and the continuous RUN counter is incremented by "1". Since the continuous RUN counter should have been originally "0", the continuous RUN counter is unconditionally "1" here. In step S6, the RUN flag of another task, for example task A, is turned off, that is, "0", and the continuous RUN counter is cleared to "0".

【0019】図5に示したような無限ループの判断処理
を終えると、図4のステップS4に移る。このステップ
S4では、無限ループ判断の結果により処理を分岐す
る。そして、無限ループでない場合には再びステップS
1に戻り、ステップS1からステップS3の処理を繰り
返す。一方、無限ループであった場合にはステップS5
に移り、監視タスク3はシステムリスタート処理を実行
する。このシステムリスタート処理はソフトウェアによ
って自動的に情報処理装置にリセットをかける処理であ
る。
When the endless loop determination process as shown in FIG. 5 is completed, the process proceeds to step S4 in FIG. In step S4, the process branches depending on the result of the endless loop determination. If the loop is not an infinite loop, step S is performed again.
Returning to step 1, the processing from step S1 to step S3 is repeated. On the other hand, if it is an infinite loop, step S5
Then, the monitoring task 3 executes the system restart process. This system restart processing is processing for automatically resetting the information processing device by software.

【0020】上記の図3〜図5に示したように、監視タ
スク3自体は比較的簡単な処理を実行するプログラムに
よって構成される。また、タイマタスク4も一定の周期
でのタイマ割込みを行う簡単なプログラムによって構成
される。従って、無限ループ検出のためのハードウェア
と比較すると、低価格でどのような情報処理装置に対し
ても簡単に適用でき、無限ループを確実に検出しそこか
ら脱出できる。また、ハードウェアによる場合、各種の
原因で障害を生じ易い。これに対して本発明の場合、ソ
フトウェアによる監視のため情報処理装置が正常に動作
する限り、障害の発生のおそれがない。また、タスクの
種類や内容により無限ループ判断の時間を変えられるの
で、判断の最適化が可能である。
As shown in FIGS. 3 to 5, the monitoring task 3 itself is composed of a program for executing a relatively simple process. The timer task 4 is also composed of a simple program that performs a timer interrupt at a fixed cycle. Therefore, as compared with hardware for detecting an infinite loop, it can be easily applied to any information processing device at a low price, and an infinite loop can be reliably detected and escaped therefrom. Further, when using hardware, a failure is likely to occur due to various causes. On the other hand, in the case of the present invention, as long as the information processing device normally operates due to the monitoring by software, there is no risk of failure. In addition, since the time of infinite loop judgment can be changed depending on the type and content of the task, the judgment can be optimized.

【0021】本発明は上記のような構成のため、無限ル
ープ状態に陥った場合にそのデッドロックを解除し、シ
ステムを自動的に再起動するよう構成されている。従っ
て、例えばネットワーク中継装置のように、長時間デッ
ドロック状態が放置されると、そのネットワークを使用
した通信等に大きな影響のあるシステム等に特に有効に
活用できる。
Due to the above-mentioned configuration, the present invention is configured to release the deadlock and automatically restart the system when an infinite loop state occurs. Therefore, when a deadlock state is left for a long time, such as a network relay device, it can be effectively used particularly for a system or the like which has a great influence on communication using the network.

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

【図1】本発明の装置の機能ブロック図である。FIG. 1 is a functional block diagram of an apparatus of the present invention.

【図2】本発明の装置の動作説明図である。FIG. 2 is an explanatory diagram of the operation of the device of the present invention.

【図3】装置の起動処理フローチャートである。FIG. 3 is a flowchart of a startup process of the device.

【図4】無限ループ検出動作フローチャートである。FIG. 4 is an infinite loop detection operation flowchart.

【図5】無限ループ判断処理フローチャートである。FIG. 5 is an endless loop determination processing flowchart.

【図6】監視タスク内部テーブル説明図である。FIG. 6 is an explanatory diagram of a monitoring task internal table.

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

1 タスク部 2 OS部 3 監視タスク 4 タイマタスク 5 レディリスト 6 割込みハンドラ 1 task part 2 OS part 3 monitoring task 4 timer task 5 ready list 6 interrupt handler

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 複数のタスクが、それぞれ設定された優
先度順に処理されるものにおいて、 起動したタスクが無限ループ状態になっているかどうか
を監視する監視タスクと、 この監視タスクに対して周期的に監視動作を実行させる
ために一定の周期で監視動作指示を出力するタイマタス
クと、 現在動作中のタスクを表示するレデイリストとを備え、 前記監視タスクは、 監視動作時に、前記レデイリストを参照して実行中のタ
スクを認識し、前回の監視動作時に実行中であったタス
クと同一かどうかを比較して、 所定回数だけ監視動作を繰り返してもなお同一のタスク
が実行中のときは、無限ループ状態と判断してシステム
リスタート処理を実行することを特徴とする無限ループ
監視装置。
1. A monitoring task that monitors whether or not a started task is in an infinite loop state in which a plurality of tasks are processed in the order of priority set respectively, and a periodic task for this monitoring task. It is equipped with a timer task that outputs a monitoring operation instruction at a fixed cycle in order to execute a monitoring operation, and a ready list that displays the task that is currently running. The monitoring task refers to the ready list during the monitoring operation. Then, it recognizes the task being executed, compares it with the task that was being executed at the time of the previous monitoring operation, and if the same task is still running even after repeating the monitoring operation a predetermined number of times, An infinite loop monitoring device characterized by executing a system restart process by judging an infinite loop state.
【請求項2】 タスクの実行内容により、無限ループと
判断するための所定回数の閾値を異ならせることを特徴
とする請求項1記載の無限ループ監視装置。
2. The endless loop monitoring device according to claim 1, wherein a threshold value of a predetermined number of times for judging an endless loop is varied depending on the execution content of the task.
JP7237653A 1995-08-23 1995-08-23 Infinite loop monitoring device Pending JPH0962520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7237653A JPH0962520A (en) 1995-08-23 1995-08-23 Infinite loop monitoring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7237653A JPH0962520A (en) 1995-08-23 1995-08-23 Infinite loop monitoring device

Publications (1)

Publication Number Publication Date
JPH0962520A true JPH0962520A (en) 1997-03-07

Family

ID=17018518

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7237653A Pending JPH0962520A (en) 1995-08-23 1995-08-23 Infinite loop monitoring device

Country Status (1)

Country Link
JP (1) JPH0962520A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19827430C2 (en) * 1997-07-22 2001-07-12 Siemens Ag Monitoring procedure for the detection of infinite loops and blocked processes in a computer system
KR100455623B1 (en) * 2001-12-27 2004-11-06 엘지전자 주식회사 Method for Processing of Endless Loop Task in Multi Tasking Operating System
JP2014089672A (en) * 2012-10-31 2014-05-15 Keihin Corp Electronic control device for vehicle
JP2015057685A (en) * 2013-08-12 2015-03-26 株式会社三菱東京Ufj銀行 Monitoring system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19827430C2 (en) * 1997-07-22 2001-07-12 Siemens Ag Monitoring procedure for the detection of infinite loops and blocked processes in a computer system
KR100455623B1 (en) * 2001-12-27 2004-11-06 엘지전자 주식회사 Method for Processing of Endless Loop Task in Multi Tasking Operating System
JP2014089672A (en) * 2012-10-31 2014-05-15 Keihin Corp Electronic control device for vehicle
JP2015057685A (en) * 2013-08-12 2015-03-26 株式会社三菱東京Ufj銀行 Monitoring system

Similar Documents

Publication Publication Date Title
JP2007507034A (en) Method and apparatus for monitoring and resetting a coprocessor
JP2007241832A (en) Computer system, startup monitoring method, and startup monitoring program
JP2001056772A (en) Fault monitoring system
JPH0962520A (en) Infinite loop monitoring device
JPS63163932A (en) System monitoring system for control computer
CN111796949A (en) Communication task processing method, device, equipment and storage medium
JPH11282725A (en) Computer
JP2004070582A (en) Event notification task control processing system and method and its program
JPH09212389A (en) Method and device for detecting abnormal state of computer system
JP2004213122A (en) Stable operation method of control system by client/server and program therefor
JPH064318A (en) Error detecting system
JP2677175B2 (en) External event detection method for computer system
JP3524700B2 (en) Task monitoring method
JPH11184828A (en) Test system for multiprocessor system
JPH1165623A (en) Programmable controller
JPH0334037A (en) Processing system for detection of system abnormality
JPH05233333A (en) Task start-up state detecting system
CN114647540A (en) Embedded scheduler fault recovery method, embedded system and storage medium
JPH0581051A (en) Resource destruction supervisory system
JPH11327959A (en) Method and device for monitoring abnormality of processor
JP2004199423A (en) Processing supervisory device
JPH06214830A (en) Supervisory and controlling system for information processor
JP2003173274A (en) Software system
JPH11120140A (en) Method for automatically activating appllication on terminal computer
JPH05324416A (en) System error history saving system