JPH05346877A - Operation monitoring system for multi-task system - Google Patents

Operation monitoring system for multi-task system

Info

Publication number
JPH05346877A
JPH05346877A JP4155449A JP15544992A JPH05346877A JP H05346877 A JPH05346877 A JP H05346877A JP 4155449 A JP4155449 A JP 4155449A JP 15544992 A JP15544992 A JP 15544992A JP H05346877 A JPH05346877 A JP H05346877A
Authority
JP
Japan
Prior art keywords
task
time
operation time
state
time limit
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
JP4155449A
Other languages
Japanese (ja)
Inventor
Kazuo Okada
一穂 岡田
Toshiro Mise
敏朗 三瀬
Eiichi Fukui
栄一 福井
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP4155449A priority Critical patent/JPH05346877A/en
Publication of JPH05346877A publication Critical patent/JPH05346877A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To prevent a malfunction of a watch dog timer caused by a task being in a waiting state, and also, to easily determine a limit time of an operation of the task at every task by executing the count by the watch dog timer with respect to the time when each task is actually in an executing state, in the multi-task system. CONSTITUTION:The system is provided with a task operation limit time table LMY for storing separately a limit time of an operation of each task, a watch dog timer circuit part TMR for counting an operation time of the task, and a task operation time counter table CNT for storing separately the counted operation time with regard to each task. In such a state, based on the task operation limit time table LMT and the task operation time counter table CNT, when the time when each task is operated actually exceeds the limit time of the operation of its task, abnormality of the system is detected and the system is initialized.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マルチタスクシステム
の動作監視方式に関するものであり、ウォッチドッグタ
イマーを用いてマルチタスクシステムの異常を自動的に
検出するために用いられるものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an operation monitoring system for a multitasking system, which is used to automatically detect an abnormality in the multitasking system by using a watchdog timer.

【0002】[0002]

【従来の技術】従来、1つのCPUにより複数のタスク
を時分割的に実行するマルチタスクシステムが広く用い
られている。一般のマルチタスクシステムにおいては、
そのシステムが正常に動作しているか否かをウォッチド
ッグタイマーにより監視している。これは各タスクが一
定時間以内にウォッチドッグタイマーに生存通知を行う
ことによりシステムの正常動作を確認する方法であり、
あらかじめ設定された時間内に生存通知が無ければ、シ
ステムの動作異常とみなし、システムを強制的に初期化
するものである。
2. Description of the Related Art Conventionally, a multi-task system has been widely used in which one CPU executes a plurality of tasks in a time-division manner. In a general multitasking system,
A watchdog timer monitors whether the system is operating normally. This is a method in which each task confirms the normal operation of the system by sending a live notification to the watchdog timer within a certain time.
If there is no notification of existence within a preset time, it is regarded as an abnormal operation of the system and the system is forcibly initialized.

【0003】[0003]

【発明が解決しようとする課題】上述の従来例では、タ
スクはあらかじめ設定された制限時間以内にウォッチド
ッグタイマーに生存通知を行う必要があるが、ウォッチ
ドッグタイマーでは、そのタスクが実行状態であるか待
ち状態であるかにかかわらず、タスクの動作時間をカウ
ントしている。そのため、例えば、あるタスクが入出力
待ち状態であり、正常動作しているにもかわらず、生存
通知が出来ないことにより、間違ってシステムが初期化
されてしまう場合もあり得る。また、タスクからの生存
通知を待つ所定の制限時間の値を設定するに際しても、
そのタスクの実行時間以外に入出力に要する時間や、タ
スクの切り替えに要する時間などを考慮に入れなければ
ならず、しかも誤動作防止のためにかなりの余裕を持た
せて大きな値を設定することが多く、意味のある値を設
定するのは困難であった。
In the above-mentioned conventional example, the task needs to notify the watchdog timer of its existence within a preset time limit, but in the watchdog timer, the task is in the running state. The task operation time is counted regardless of whether the task is in the waiting state. Therefore, for example, there is a case where the system is erroneously initialized due to the fact that a certain task is in the I / O wait state and is operating normally, but the live notification cannot be made. Also, when setting the value of the predetermined time limit for waiting for the notification of existence from the task,
In addition to the task execution time, the time required for input / output and the time required for task switching must be taken into consideration, and a large value can be set with a large margin to prevent malfunction. Often, it was difficult to set meaningful values.

【0004】本発明は、このような点に鑑みてなされた
ものであり、その目的とするところは、待ち状態にある
タスクによるウォッチドッグタイマーの誤動作を防止す
ると共に、タスクの動作の制限時間をタスクごとに容易
に決定可能としたマルチタスクシステムの動作監視方式
を提供することにある。
The present invention has been made in view of the above circumstances. An object of the present invention is to prevent a watchdog timer from malfunctioning due to a task in a waiting state and to limit a task operation time limit. It is to provide an operation monitoring method of a multitask system that can be easily determined for each task.

【0005】[0005]

【課題を解決するための手段】本発明に係るマルチタス
クシステムの動作監視方式にあっては、前記の課題を解
決するために、複数のタスクが同時に実行されるマルチ
タスクシステムにおいて、各タスクの動作の制限時間を
個別に記憶しておくためのタスク動作制限時間テーブル
LMTと、タスクの動作時間をカウントするためのウォ
ッチドッグタイマー回路部TMRと、各タスクについて
カウントされた動作時間を個別に記憶しておくためのタ
スク動作時間カウンタテーブルCNTと、タスク動作制
限時間テーブルLMTとタスク動作時間カウンタテーブ
ルCNTに基づいて各タスクが実際に動作した時間が当
該タスクの動作の制限時間を越えたときにシステムの異
常を検知してシステムを初期化するための初期化手段と
を備えることを特徴とするものである。
In order to solve the above-mentioned problems, in a multitask system operation monitoring method according to the present invention, in a multitask system in which a plurality of tasks are simultaneously executed, A task operation time limit table LMT for individually storing the operation time limit, a watchdog timer circuit unit TMR for counting the operation time of the task, and the operation time counted for each task are individually stored. When the time during which each task actually operates based on the task operation time counter table CNT, the task operation time limit table LMT and the task operation time counter table CNT exceeds the operation time limit of the task. It is provided with an initialization means for detecting an abnormality of the system and initializing the system. It is an.

【0006】[0006]

【作用】本発明にあっては、各タスクが実際に動作した
時間が当該タスクの動作の制限時間を越えたときにシス
テムの異常を検知してシステムを初期化するものである
から、各タスクの動作の制限時間を設定するときに、シ
ステムの運用状態により変化する入出力待ち時間やタス
クの切り替えに要する時間などを考慮せずに済み、ウォ
ッチドッグタイマーがタスクからの生存通知を待つ所定
の制限時間を、タスクの実行時間と関連させた意味のあ
る値に設定することが可能となる。
In the present invention, when the time when each task actually operates exceeds the operation time limit of the task, the system abnormality is detected and the system is initialized. When setting the time limit for the operation of the task, it is not necessary to consider the I / O wait time that changes depending on the system operation status and the time required for task switching, and the watchdog timer waits for the notification of existence from the task. It is possible to set the time limit to a meaningful value related to the task execution time.

【0007】[0007]

【実施例】図1は本発明の全体構成を示すブロック図で
ある。このシステムでは、2つのタスク1,2がOS
(オペレーティングシステム)により管理されており、
その状態はタスクコントロールブロック(TCB)に記
憶されている。各タスクは、ウォッチドッグタイマー回
路部TMRに対して生存通知を行う。ウォッチドッグタ
イマー回路部TMRは図2に示す動作フローに従い、周
期的にタスクコントロールブロック(TCB)を参照
し、状態がRUN(実行状態)であるタスクに対応する
カウンタを更新する。そして、カウンタの値をタスク動
作制限時間テーブルLMT上の対応する値と比較し、制
限時間を越えると、強制的にシステムリセットを行う。
また、あるタスクから生存通知があれば、そのタスクに
対応するカウンタの値をリセットする。ウォッチドッグ
タイマー回路部TMRはOS(オペレーティングシステ
ム)がタスクの実行状態に応じて更新するタスクコント
ロールブロック(TCB)を参照することにより実行中
のタスクを認識し、タスク動作時間カウンタテーブルC
NT上の実行中のタスクに対応するカウンタを更新し、
カウンタテーブルCNTのうちの1つ以上のカウンタの
値がタスク動作制限時間テーブルLMT上の対応する値
を越えると、システムを初期化する。
1 is a block diagram showing the overall structure of the present invention. In this system, two tasks 1 and 2 are OS
Managed by (operating system),
The state is stored in the task control block (TCB). Each task issues a live notification to the watchdog timer circuit unit TMR. According to the operation flow shown in FIG. 2, the watchdog timer circuit unit TMR periodically refers to the task control block (TCB) and updates the counter corresponding to the task whose state is RUN (execution state). Then, the counter value is compared with the corresponding value on the task operation time limit table LMT, and if the time limit is exceeded, the system is forcibly reset.
Also, if there is a live notification from a certain task, the value of the counter corresponding to that task is reset. The watchdog timer circuit unit TMR recognizes the task being executed by referring to the task control block (TCB) that the OS (operating system) updates according to the execution state of the task, and recognizes the task operation time counter table C.
Update the counter corresponding to the running task on NT,
When the value of one or more counters in the counter table CNT exceeds the corresponding value in the task operation time limit table LMT, the system is initialized.

【0008】図3は、タスク1、タスク2の時間による
状態遷移と、生存通知のタイミングと、カウントのタイ
ミングを例示している。この例では、ウォッチドッグタ
イマー回路部TMRによりカウントされるタスク動作の
制限時間は、タスク1については20、タスク2につい
ては30とする。この場合の動作を順に説明すると、ま
ず、図4に示すようにOS(オペレーティングシステ
ム)によりタスクコントロールブロック(TCB)が更
新され、タスク1の状態はRUN状態、タスク2の状態
はREADY状態となり、ウォッチドッグタイマー回路
部TMRは、タスク動作時間カウンタテーブルCNTに
おいて、状態がRUN状態であるタスク1に対応するカ
ウンタのみを更新し、タスク1がWAIT状態になると
きはタスク1のカウンタは10となる。次に、図5に示
すように、タスク1がI/O(入出力装置)からの入出
力完了待ちのためにWAIT状態になり、タスク2がR
UN状態になると、ウォッチドッグタイマー回路部TM
Rは、タスク動作時間カウンタテーブルCNTにおい
て、状態がRUN状態であるタスク2に対応するカウン
タのみを更新する。タスク2に対応するカウンタは、2
2までカウントアップされると、タスク2からの生存通
知によりリセットされて、再び0になり、タスク2がR
EADY状態に戻るまでにカウンタは18までカウント
アップされる。そして、図6に示すように、タスク1が
再びRUN状態になると、ウォッチドッグタイマー回路
部TMRは、タスク動作時間カウンタテーブルCNTに
おいて、状態がRUN状態であるタスク1に対応するカ
ウンタのみを更新する。タスク1に対応するカウンタ
は、15までカウントアップされると、タスク1からの
生存通知によりリセットされて、0になる。
FIG. 3 exemplifies the state transitions of task 1 and task 2 over time, the timing of alive notification, and the timing of counting. In this example, the time limit of the task operation counted by the watchdog timer circuit unit TMR is 20 for task 1 and 30 for task 2. The operation in this case will be described in order. First, as shown in FIG. 4, the task control block (TCB) is updated by the OS (operating system), the state of task 1 becomes the RUN state, the state of task 2 becomes the READY state, The watchdog timer circuit unit TMR updates only the counter corresponding to the task 1 whose state is the RUN state in the task operation time counter table CNT, and when the task 1 enters the WAIT state, the counter of the task 1 becomes 10. . Next, as shown in FIG. 5, task 1 enters the WAIT state to wait for the completion of input / output from the I / O (input / output device), and task 2 outputs R.
When it goes to the UN state, the watchdog timer circuit section TM
R updates only the counter corresponding to the task 2 whose state is the RUN state in the task operation time counter table CNT. The counter corresponding to task 2 is 2
When it is counted up to 2, it is reset by the live notification from the task 2, becomes 0 again, and the task 2 becomes R.
The counter is incremented to 18 before returning to the EADY state. Then, as shown in FIG. 6, when the task 1 becomes the RUN state again, the watchdog timer circuit unit TMR updates only the counter corresponding to the task 1 whose state is the RUN state in the task operation time counter table CNT. .. When the counter corresponding to task 1 is counted up to 15, it is reset to 0 by the live notification from task 1.

【0009】[0009]

【発明の効果】本発明によれば、マルチタスクシステム
において、各タスクが実際に実行状態である時間に対し
てウォッチドッグタイマーによるカウントを行うため
に、待ち状態にあるタスクがウォッチドッグタイマーに
生存通知をしないことにより間違ってリセットされるよ
うな不都合が生じることはなく、各タスクの動作の制限
時間を設定するときに、他のタスクの動作や入出力待ち
時間などを考慮せずに済み、強制的なリセットを行う制
限時間の設定値を個々のタスクのプログラムを元に容易
に決定できるという効果がある。
According to the present invention, in a multitasking system, a task in a waiting state is alive in the watchdog timer because the watchdog timer counts the time when each task is actually in the executing state. There is no inconvenience such as being reset accidentally by not notifying, and when setting the time limit of the operation of each task, it is not necessary to consider the operation of other tasks or the input / output wait time, This has an effect that the set value of the time limit for forcibly resetting can be easily determined based on the program of each task.

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

【図1】本発明の全体構成を示すブロック図である。FIG. 1 is a block diagram showing an overall configuration of the present invention.

【図2】本発明の動作説明のためのフローチャートであ
る。
FIG. 2 is a flowchart for explaining the operation of the present invention.

【図3】本発明におけるタスクの状態変遷の様子を示す
説明図である。
FIG. 3 is an explanatory diagram showing a state transition of a task according to the present invention.

【図4】本発明における第1のタスクの実行時の第1の
動作を示す説明図である。
FIG. 4 is an explanatory diagram showing a first operation during execution of the first task in the present invention.

【図5】本発明における第2のタスクの実行時の動作を
示す説明図である。
FIG. 5 is an explanatory diagram showing an operation at the time of execution of a second task in the present invention.

【図6】本発明における第1のタスクの実行時の第2の
動作を示す説明図である。
FIG. 6 is an explanatory diagram showing a second operation when the first task according to the present invention is executed.

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

LMT タスク動作制限時間テーブル CNT タスク動作時間カウンタテーブル TMR ウォッチドッグタイマー回路部 LMT task operation time limit table CNT Task operation time counter table TMR Watchdog timer circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数のタスクが同時に実行されるマル
チタスクシステムにおいて、各タスクの動作の制限時間
を個別に記憶しておくためのタスク動作制限時間テーブ
ルと、タスクの動作時間をカウントするためのウォッチ
ドッグタイマー回路部と、各タスクについてカウントさ
れた動作時間を個別に記憶しておくためのタスク動作時
間カウンタテーブルと、タスク動作制限時間テーブルと
タスク動作時間カウンタテーブルに基づいて各タスクが
実際に動作した時間が当該タスクの動作の制限時間を越
えたときにシステムの異常を検知してシステムを初期化
するための初期化手段とを備えることを特徴とするマル
チタスクシステムの動作監視方式。
1. In a multitask system in which a plurality of tasks are executed simultaneously, a task operation time limit table for individually storing the operation time limit of each task and a task operation time limit table for counting the task operation time Based on the watchdog timer circuit section, the task operation time counter table for individually storing the operation time counted for each task, and the task operation time limit table and the task operation time counter table An operation monitoring method for a multi-task system, comprising: an initialization means for detecting a system abnormality and initializing the system when the operation time exceeds the operation time limit of the task.
JP4155449A 1992-06-15 1992-06-15 Operation monitoring system for multi-task system Pending JPH05346877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4155449A JPH05346877A (en) 1992-06-15 1992-06-15 Operation monitoring system for multi-task system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4155449A JPH05346877A (en) 1992-06-15 1992-06-15 Operation monitoring system for multi-task system

Publications (1)

Publication Number Publication Date
JPH05346877A true JPH05346877A (en) 1993-12-27

Family

ID=15606291

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4155449A Pending JPH05346877A (en) 1992-06-15 1992-06-15 Operation monitoring system for multi-task system

Country Status (1)

Country Link
JP (1) JPH05346877A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612636A (en) * 2020-12-22 2021-04-06 浙江中控技术股份有限公司 Control method of hardware watchdog and watchdog system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612636A (en) * 2020-12-22 2021-04-06 浙江中控技术股份有限公司 Control method of hardware watchdog and watchdog system

Similar Documents

Publication Publication Date Title
CN102761439B (en) Device and method for detecting and recording abnormity on basis of watchdog in PON (Passive Optical Network) access system
JPS60263235A (en) Microcomputer system
US7318171B2 (en) Policy-based response to system errors occurring during OS runtime
JP2006277115A (en) Abnormality detection program and abnormality detection method
JPH10214208A (en) System for monitoring abnormality of software
JPH05346877A (en) Operation monitoring system for multi-task system
JP2965075B2 (en) Program execution status monitoring method
JP2006227962A (en) System and method for monitoring application task
JPS63163932A (en) System monitoring system for control computer
JPH01312638A (en) Retry controller for abnormality supervisory of micro processor
JP2870250B2 (en) Microprocessor runaway monitor
JPS62145336A (en) Program loop detection system for computer system
JPH10269110A (en) Method for avoiding hang-up of computer system, and computer system using the same method
JPS63280345A (en) Detection of program abnormality
JPH05233374A (en) Watchdog timer device
JPH04148246A (en) Watchdog timer
JPS6389941A (en) Monitor and control equipment for microprocessor applied equipment
JPH04195437A (en) Program runaway monitoring device
JPH04155543A (en) Self detecting system for microcomputer malfunction
JP2006120059A (en) Deadlock avoidance operating system
JPS59148961A (en) Monitoring system of operation of processor
JPH05265807A (en) System stall detecting system
JPS5834855B2 (en) Computer monitoring method
JPH11327959A (en) Method and device for monitoring abnormality of processor
JPH041831A (en) Monitor system for program runaway