[go: up one dir, main page]

JPH04280329A - Program abnormality detection method - Google Patents

Program abnormality detection method

Info

Publication number
JPH04280329A
JPH04280329A JP3067704A JP6770491A JPH04280329A JP H04280329 A JPH04280329 A JP H04280329A JP 3067704 A JP3067704 A JP 3067704A JP 6770491 A JP6770491 A JP 6770491A JP H04280329 A JPH04280329 A JP H04280329A
Authority
JP
Japan
Prior art keywords
task
interval
interrupt
time
value
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.)
Withdrawn
Application number
JP3067704A
Other languages
Japanese (ja)
Inventor
Hajime Sugano
肇 菅野
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP3067704A priority Critical patent/JPH04280329A/en
Publication of JPH04280329A publication Critical patent/JPH04280329A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、プログラムの異常を検
出するためのプログラム動作異常検出方式に関し、特に
タイムスライス・マルチタスクOS(オペレーティング
・システム)にいてタスクの動作異常を検出するための
プログラム異常検出方式に関するものである。
[Field of Industrial Application] The present invention relates to a program operation abnormality detection method for detecting program abnormalities, and in particular, to a program operation abnormality detection method for detecting task operation abnormalities in a time-sliced multitasking OS (operating system). This relates to an anomaly detection method.

【0002】ソフトウエア処理の複雑化に伴って、従来
用いられているシングルタスクOSに代わって、マルチ
タスクOSが一般的に広く用いられるようになった。シ
ングルタスクOSの場合は、一つのプログラム(タスク
)がシーケンシャルに実行されるので、プログラム異常
の検出は比較的容易であるが、マルチタスクOSの場合
は、複数のプログラム(タスク)が同時に実行されるた
め、プログラム異常が発生した場合、まずはじめにどの
プログラム(タスク)で異常が発生したのかを検出する
ことが必要となる。
[0002] As software processing becomes more complex, multi-task OSes have come into widespread use in place of conventionally used single-task OSs. In the case of a single-tasking OS, one program (task) is executed sequentially, so it is relatively easy to detect program abnormalities, but in the case of a multi-tasking OS, multiple programs (tasks) are executed simultaneously. Therefore, when a program abnormality occurs, it is first necessary to detect in which program (task) the abnormality has occurred.

【0003】マルチタスクOSには大別して2種類のも
のがある。その一つはOSが提供するシステムコールお
よび割り込み等の事象の発生により、タスクによる中央
処理装置(CPU)の使用権の切り替えすなわちディス
パッチを行う方法であり、もう一つはTSS(時分割シ
ステム)と同様にある一定時間間隔でタスクのディスパ
ッチを行う方法である。両者の大きな違いは、ディスパ
ッチの方法が異なる点にあり、前者の場合はタスク自身
がディスパッチの事象を発生させるが、後者の場合はO
Sがディスパッチの事象を発生させる。後者の場合のO
Sは、タイムスライスOSと呼ばれる。
[0003] There are two types of multitasking OS. One is a method of switching the right to use the central processing unit (CPU) by a task, that is, dispatching, based on the occurrence of events such as system calls and interrupts provided by the OS, and the other is a method using TSS (time sharing system). Similarly, this method dispatches tasks at regular intervals. The major difference between the two is that the dispatch method is different; in the former case, the task itself generates the dispatch event, but in the latter case, the task itself
S causes a dispatch event. O in the latter case
S is called a time slice OS.

【0004】マルチタスクOSに対するプログラム動作
異常検出方式は、ある一定時間間隔でタスクのディスパ
ッチを行うタイムスライスOS下のタスクに対しも、動
作異常状態のタスクの検出を行うことができるものであ
ることが要望される。
[0004] The program malfunction detection method for a multitasking OS is capable of detecting malfunctioning tasks even for tasks under a time slice OS, which dispatches tasks at certain fixed time intervals. is requested.

【0005】[0005]

【従来の技術】図7は、タイムスライスOSの動作を説
明するものであって、3つのタスクA,B,Cが動作し
ている場合を表し、タスクAとタスクBとタスクCとが
一定時間Tごとに順次実行されることが示されている。 図中、Tはタイムスライスを行う時間間隔(ディスパッ
チ間隔)であり、実線は実行状態を表している。
[Prior Art] Fig. 7 explains the operation of a time slice OS, and shows a case where three tasks A, B, and C are operating, and task A, task B, and task C are constant. It is shown that the process is executed sequentially every time T. In the figure, T is the time interval (dispatch interval) at which time slicing is performed, and the solid line represents the execution state.

【0006】図8は、タイムスライスOSにおける異常
発生時の動作を示したものであって、タスクBにおいて
デッドロック,無限ループ等の異常が発生した場合を表
している。図中Pは、以後のこの時間間隔Tにおいては
、タスクBはタイムスライスによってCPUの使用権を
得るが、動作を行うことができないことを示している。
FIG. 8 shows the operation of the time slice OS when an abnormality occurs, and shows a case where an abnormality such as a deadlock or an infinite loop occurs in task B. P in the figure indicates that during this subsequent time interval T, task B obtains the right to use the CPU by time slicing, but cannot perform any operations.

【0007】このようにタイムスライスOSの場合は、
図8に示されるように、例えばタスクBに異常が発生し
ても、従来は異常を検出する手段がないため、異常が発
生しているにも拘わらず、一定時間Tの経過によってタ
イムスライスが実行されて、タスクAとタスクCに処理
が移行する。このためシステム全体としては、動作異常
となることなく動作を継続する。
[0007] In this way, in the case of a time slice OS,
As shown in FIG. 8, even if an abnormality occurs in task B, for example, there is no means to detect the abnormality in the past. The task is executed and the processing shifts to task A and task C. Therefore, the system as a whole continues to operate without any abnormality.

【0008】[0008]

【発明が解決しようとする課題】上述のようにタイムス
ライスOSの場合、あるタスクが動作異常となっても、
一定時間間隔で異常が発生したタスクに対してもディス
パッチを行い、CPUの使用時間を割り当ててしまう。 このため、あるタスクに動作異常が発生しても、他のタ
スクは正常に動作できるため、システム全体としては、
異常になることなく動作し続けるという問題がある。
[Problem to be solved by the invention] As mentioned above, in the case of a time slice OS, even if a certain task malfunctions,
Dispatch is also performed for tasks in which an abnormality occurs at regular time intervals, and CPU usage time is allocated. Therefore, even if one task malfunctions, other tasks can operate normally, and the system as a whole
The problem is that it continues to operate without becoming abnormal.

【0009】本発明はこのような従来技術の課題を解決
しようとするものであって、タイムスライス・マルチタ
スクOSにおいて、タスクの動作異常を検出することよ
って、異常動作が継続的に行われるのを防止することが
できるプログラム異常検出方式を提供することを目的と
している。
[0009] The present invention aims to solve the problems of the prior art as described above, by detecting an abnormal operation of a task in a time-sliced multitasking OS, and thereby preventing the abnormal operation from occurring continuously. The purpose of the present invention is to provide a program abnormality detection method that can prevent such problems.

【0010】0010

【課題を解決するための手段】本発明は、核となるプロ
グラムを有するカーネル部と、カーネル部に対するタイ
ムスライス用割り込みを発生するタイムスライス用割り
込み部と、この割り込みに基づくカーネル部からの起動
に応じて複数のタスクをディスパッチするスケジューラ
とからなるオペレーティングシステム(OS)において
、一定時間間隔で動作するインターバルタイマと、各タ
スクの現在の動作状態を表示するタスク動作状態テーブ
ルと、各タスクの前回の動作状態を表示するタスク前動
作状態テーブルと、各タスクの動作時間間隔数を計数す
るタスク動作間隔カウンタと、各タスクの正常動作時の
最大許容動作間隔を保持するタスク動作間隔テーブルと
を設け、インターバルタイマが、各タスクの現動作状態
と前動作状態とを比較して変化がないときタスクの動作
時間間隔の計数値と動作間隔のテーブル値とを比較して
計数値がテーブル値より大きいときタスクにおける動作
異常発生を判定することを特徴とするものである。
[Means for Solving the Problems] The present invention provides a kernel section that has a core program, a time slicing interrupt section that generates a time slicing interrupt for the kernel section, and a time slicing interrupt section that generates a time slicing interrupt for the kernel section, and a time slicing interrupt section that generates a time slicing interrupt for the kernel section. In an operating system (OS) that consists of a scheduler that dispatches multiple tasks according to the schedule, there is an interval timer that operates at fixed time intervals, a task operation status table that displays the current operation status of each task, and a task operation status table that displays the current operation status of each task. A pre-task operation state table that displays the operation state, a task operation interval counter that counts the number of operation time intervals of each task, and a task operation interval table that holds the maximum allowable operation interval during normal operation of each task, When the interval timer compares the current operating state and previous operating state of each task and there is no change. When the counted value of the task's operating time interval is compared with the table value of the operating interval and the counted value is greater than the table value. This method is characterized by determining the occurrence of an operational abnormality in a task.

【0011】また本発明は、核となるプログラムを有す
るカーネル部と、カーネル部に対するタイムスライス用
割り込みを発生するタイムスライス用割り込み部と、こ
の割り込みに基づくカーネル部からの起動に応じて複数
のタスクをディスパッチするスケジューラとからなるオ
ペレーティングシステム(OS)において、各タスクの
現在の動作状態を表示するタスク動作状態テーブルと、
各タスクの前回の動作状態を表示するタスク前動作状態
テーブルと、各タスクの動作時間間隔数を計数するタス
ク動作間隔カウンタと、各タスクの正常動作時の最大許
容動作間隔を保持するタスク動作間隔テーブルとを設け
、タイムスライス用割り込み部が一定時間間隔で動作し
て、各タスクの現動作状態と前動作状態とを比較して変
化がないときタスクの動作時間間隔の計数値と動作間隔
のテーブル値とを比較して計数値がテーブル値より大き
いときタスクにおける動作異常発生を判定することを特
徴とするものである。
The present invention also provides a kernel section having a core program, a time slicing interrupt section that generates a time slicing interrupt for the kernel section, and a plurality of tasks activated by the kernel section based on the interrupt. In an operating system (OS) consisting of a scheduler that dispatches tasks, a task operation status table that displays the current operation status of each task;
A pre-task operation state table that displays the previous operation state of each task, a task operation interval counter that counts the number of operation time intervals for each task, and a task operation interval that maintains the maximum allowable operation interval during normal operation of each task. The time slicing interrupt section operates at fixed time intervals, and when there is no change in the current operating state of each task and the previous operating state, the count value of the task operating time interval and the operating interval are calculated. This feature is characterized in that by comparing the count value with a table value, it is determined that an operational abnormality has occurred in the task when the count value is larger than the table value.

【0012】さらに本発明は、核となるプログラムを有
するカーネル部と、カーネル部に対するタイムスライス
用割り込みを発生するタイムスライス用割り込み部と、
この割り込みに基づくカーネル部からの起動に応じて複
数のタスクをディスパッチするスケジューラとからなる
オペレーティングシステム(OS)において、各タスク
の現在の動作状態を表示するタスク動作状態テーブルと
、各タスクの前回の動作状態を表示するタスク前動作状
態テーブルと、各タスクの動作時間間隔数を計数するタ
スク動作間隔カウンタと、各タスクの正常動作時の最大
許容動作間隔を保持するタスク動作間隔テーブルとを設
け、スケジューラが一定時間間隔で動作して、各タスク
の現動作状態と前動作状態とを比較して変化がないとき
タスクの動作時間間隔の計数値と動作間隔のテーブル値
とを比較して計数値がテーブル値より大きいときタスク
における動作異常発生を判定することを特徴とするもの
である。
Further, the present invention provides a kernel section having a core program, a time slicing interrupt section generating a time slicing interrupt for the kernel section,
In an operating system (OS) consisting of a scheduler that dispatches multiple tasks in response to startup from the kernel section based on this interrupt, there is a task operation status table that displays the current operation status of each task, and a task operation status table that displays the current operation status of each task. A pre-task operation state table that displays the operation state, a task operation interval counter that counts the number of operation time intervals of each task, and a task operation interval table that holds the maximum allowable operation interval during normal operation of each task, When the scheduler operates at fixed time intervals and there is no change in the current operating state of each task and the previous operating state, compare the counted value of the task operating time interval with the table value of the operating interval and calculate the counted value. This method is characterized in that it is determined that an operational abnormality has occurred in a task when is larger than a table value.

【0013】[0013]

【作用】図1は本発明の原理的構成を示したものである
。本発明の対象であるオペレーティングシステム(OS
)は、核となるプログラムを有するカーネル部1と、こ
のカーネル部1に対する一定時間間隔ごとの割り込みを
発生するタイムスライス用割り込み部2と、このタイム
スライス用割り込み部2からの割り込みに基づいて複数
のタスク3に対して処理装置の使用権を順次割り当てる
スケジューラ4とからなっている。本発明においては、
これに対して、一定時間間隔で動作するインターバルタ
イマ5を設けるとともに、タスク動作状態テーブル6を
設けて、各タスクの現在の動作状態を表示し、タスク前
動作状態テーブル7を設けて、各タスクの前回の動作状
態を表示し、タスク動作間隔カウンタ8を設けて、各タ
スクの動作時間間隔数を計数し、タスク動作間隔テーブ
ル9を設けて、各タスクの正常動作時の最大許容動作間
隔を保持する。そして、インターバルタイマ5が、各タ
スクの現動作状態と前動作状態とを比較して変化がない
とき、このタスクの動作時間間隔の計数値と動作間隔の
テーブル値とを比較して計数値がテーブル値より大きい
とき、このタスクにおける動作異常発生を判定する。
[Operation] FIG. 1 shows the basic structure of the present invention. The operating system (OS) that is the subject of this invention
) consists of a kernel part 1 that has a core program, a time slice interrupt part 2 that generates interrupts to this kernel part 1 at regular time intervals, and a plurality of time slice interrupt parts based on the interrupts from this time slice interrupt part 2. and a scheduler 4 that sequentially allocates the right to use the processing device to the tasks 3 of . In the present invention,
In response to this, an interval timer 5 that operates at fixed time intervals is provided, a task operation status table 6 is provided to display the current operation status of each task, and a pre-task operation status table 7 is provided to display each task. A task operation interval counter 8 is provided to count the number of operation time intervals for each task, and a task operation interval table 9 is provided to calculate the maximum allowable operation interval during normal operation of each task. Hold. Then, when the interval timer 5 compares the current operating state and the previous operating state of each task and there is no change, the counted value of the operating time interval of this task is compared with the table value of the operating interval, and the counted value is determined. When it is larger than the table value, it is determined that an operational abnormality has occurred in this task.

【0014】また本発明においては、上述のようなオペ
レーティングシステム(OS)において、タスク動作状
態テーブル6を設けて、各タスクの現在の動作状態を表
示し、タスク前動作状態テーブル7を設けて、各タスク
の前回の動作状態を表示し、タスク動作間隔カウンタ8
を設けて、各タスクの動作時間間隔数を計数し、タスク
動作間隔テーブル9を設けて、各タスクの正常動作時の
最大許容動作間隔を保持する。そして、タイムスライス
用割り込み部2が一定時間間隔で動作して、各タスクの
現動作状態と前動作状態とを比較して変化がないときこ
のタスクの動作時間間隔の計数値と動作間隔のテーブル
値とを比較して計数値がテーブル値より大きいとき、こ
のタスクにおける動作異常発生を判定する。
Further, in the present invention, in the operating system (OS) as described above, a task operation state table 6 is provided to display the current operation state of each task, and a pre-task operation state table 7 is provided. Displays the previous operation status of each task, and displays the task operation interval counter 8.
is provided to count the number of operation time intervals of each task, and a task operation interval table 9 is provided to hold the maximum allowable operation interval during normal operation of each task. The time slicing interrupt unit 2 operates at fixed time intervals and compares the current operating state and previous operating state of each task, and if there is no change, a table of the counted value of the operating time interval of this task and the operating interval When the counted value is larger than the table value, it is determined that an operational abnormality has occurred in this task.

【0015】さらに本発明においては、上述のような処
理装置のオペレーティングシステム(OS)において、
タスク動作状態テーブル6を設けて、各タスクの現在の
動作状態を表示し、タスク前動作状態テーブル7を設け
て、各タスクの前回の動作状態を表示し、タスク動作間
隔カウンタ8を設けて、各タスクの動作時間間隔数を計
数し、タスク動作間隔テーブル9を設けて、各タスクの
正常動作時の最大許容動作間隔を保持する。そして、ス
ケジューラ4が一定時間間隔で動作して、各タスクの現
動作状態と前動作状態とを比較して変化がないときこの
タスクの動作時間間隔の計数値と動作間隔のテーブル値
とを比較して計数値がテーブル値より大きいとき、この
タスクにおける動作異常発生を判定する。
Further, in the present invention, in the operating system (OS) of the processing device as described above,
A task operation status table 6 is provided to display the current operation status of each task, a pre-task operation status table 7 is provided to display the previous operation status of each task, a task operation interval counter 8 is provided, The number of operation time intervals of each task is counted, and a task operation interval table 9 is provided to hold the maximum allowable operation interval during normal operation of each task. Then, the scheduler 4 operates at fixed time intervals, compares the current operating state and previous operating state of each task, and when there is no change, compares the counted value of the operating time interval of this task with the table value of the operating interval. When the count value is larger than the table value, it is determined that an operational abnormality has occurred in this task.

【0016】従って本発明によれば、タイムスライス・
マルチタスクOSにおいて、一定時間間隔でタスクの動
作状態変化をチェックすることによって、タイムスライ
スOS下のタスクで発生した異常の検出を行うことがで
きる。
Therefore, according to the present invention, the time slice
In a multitasking OS, abnormalities occurring in tasks under a time slice OS can be detected by checking changes in the operating states of tasks at regular time intervals.

【0017】[0017]

【実施例】図2は、本発明の一実施例の構成を示したも
のであって、11はタイムスライスOS部を示し、タイ
ムスライスOS部11において、12はタイムスライス
用割り込みを発生する処理を行うタイムスライス用割り
込み部、13はOSの核となるカーネル部、14はタス
ク切り替え処理を行うスケジューラである。15はタス
ク群を示し、151 〜15n はそれぞれタスクであ
る。 16は一定時間間隔を計時するインターバルタイマ、1
7は各タスクの動作状態を示すタスク動作状態テーブル
、18は各タスクの前回の動作状態を示すタスク前動作
状態テーブル、19は各タスクの動作間隔を示すタスク
動作間隔テーブル、20は各タスクの動作間隔を計数す
るタスク動作間隔カウンタである。
[Embodiment] FIG. 2 shows the configuration of an embodiment of the present invention, in which numeral 11 indicates a time slice OS section, and in the time slice OS section 11, numeral 12 indicates a process for generating a time slice interrupt. 13 is a kernel section that is the core of the OS, and 14 is a scheduler that performs task switching processing. 15 indicates a task group, and 151 to 15n are tasks, respectively. 16 is an interval timer that measures fixed time intervals;
7 is a task operation state table showing the operation state of each task, 18 is a pre-task operation state table showing the previous operation state of each task, 19 is a task operation interval table showing the operation interval of each task, and 20 is a table of each task. This is a task operation interval counter that counts operation intervals.

【0018】図3は、図2の実施例におけるタイムスラ
イスによるタスクの実行を説明するものであって、A,
B,Cの3個のタスクがあるシステムにおける動作例を
示し、図中、17はタスク動作状態テーブル、Tはタイ
ムスライスを行う時間間隔である。タスク動作状態テー
ブル17はタスク数分の要素を持つことが必要であり、
この例では3個の要素をタスクA,B,Cに対応して有
している。
FIG. 3 explains the execution of tasks by time slices in the embodiment of FIG.
An example of operation in a system with three tasks B and C is shown. In the figure, 17 is a task operation state table, and T is a time interval at which time slicing is performed. The task operation state table 17 needs to have elements for the number of tasks,
In this example, there are three elements corresponding to tasks A, B, and C.

【0019】ある時間間隔TにおいてタスクAの処理が
行われて、終了時、タスク動作状態テーブル17におけ
るタスクAの領域がインクリメントされることによって
、動作状態の書き込みが行われる。すなわちタスク動作
状態テーブル17は、タスクが1つの処理を行うごとに
、インクリメントされる。次の時間間隔Tにおいて、タ
スクBの処理が行われて、終了時、タスク動作状態テー
ブル17におけるタスクBの領域がインクリメントされ
ることによって、動作状態の書き込みが行われる。さら
に次の時間間隔Tにおいて、タスクCの処理が行われて
、タスク動作状態テーブル17におけるタスクCの領域
がインクリメントされることによって、動作状態の書き
込みが行われる。以下このような処理が時間間隔Tごと
に順次繰り返して行われる。
Task A is processed in a certain time interval T, and when it is finished, the area for task A in the task operation status table 17 is incremented, thereby writing the operation status. That is, the task operation state table 17 is incremented every time a task performs one process. In the next time interval T, task B is processed, and at the end, the area of task B in the task operation status table 17 is incremented, thereby writing the operation status. Furthermore, in the next time interval T, task C is processed, and the area of task C in the task operation state table 17 is incremented, thereby writing the operation state. Thereafter, such processing is sequentially repeated at every time interval T.

【0020】図4は、図2の実施例におけるインターバ
ルタイマの動作を示すフローチャートであって、インタ
ーバルタイマ16を使用して異常検出を行う場合を示し
、図3に示された3個のタスクA,B,Cを有する場合
を例示している。
FIG. 4 is a flowchart showing the operation of the interval timer in the embodiment of FIG. 2, showing a case where abnormality detection is performed using the interval timer 16. , B, and C.

【0021】まずタスク動作状態テーブル17からタス
クAの動作状態を獲得する(S1)。次に、インターバ
ルタイマ16は、タスク前動作状態テーブル18からタ
スクAの前動作状態を獲得する(S2)。そして前状態
と現状態との間に変化があったか否かをみて(S3)、
変化がないときは、タスク動作間隔カウンタ20のタス
クAの領域をカウントアップして(S4)、次に動作間
隔カウンタ20におけるタスクAの時間間隔カウント値
が、タスク動作間隔テーブル19に予め設定されている
タスクAの動作間隔値より大きいか否かをみて(S5)
、大きいときはタスクAに動作異常発生と判定する。動
作間隔カウンタ20におけるタスクAのカウント値が、
タスク動作間隔テーブル19に予め設定されているタス
クAの動作間隔値より大きくないときは、タスクAの処
理を終了して、同様にタスクBとタスクCの動作状態変
化をチェックし、正常でなければ動作異常発生を判定し
、正常であれば処理を終了する。
First, the operating state of task A is obtained from the task operating state table 17 (S1). Next, the interval timer 16 acquires the previous operation state of task A from the pre-task operation state table 18 (S2). Then, check whether there is a change between the previous state and the current state (S3),
If there is no change, the task A area of the task operation interval counter 20 is counted up (S4), and then the time interval count value of task A in the operation interval counter 20 is preset in the task operation interval table 19. Check whether it is larger than the operation interval value of task A (S5).
, when it is large, it is determined that an abnormal operation has occurred in task A. The count value of task A in the operation interval counter 20 is
If the operation interval value is not greater than the operation interval value of task A preset in the task operation interval table 19, the process of task A is finished, and changes in the operation states of tasks B and C are checked in the same way to see if they are normal. If the operation is normal, it is determined whether an abnormality has occurred, and if the operation is normal, the process is terminated.

【0022】ステップS3に戻って、前状態と現状態と
の間に変化があるときは、タスク動作状態テーブル17
の値をタスク前動作状態テーブル18にセットし(S6
)、タスク動作間隔カウンタ20のタスクAの領域のカ
ウント値をクリアして(S7)、次のタスクBとタスク
Cの処理に移行する。
Returning to step S3, if there is a change between the previous state and the current state, the task operation state table 17
The value of is set in the pre-task operation state table 18 (S6
), the count value in the area of task A of the task operation interval counter 20 is cleared (S7), and the process moves to the next task B and task C.

【0023】1このように、インターバルタイマ16は
、一定時間間隔Tの割り込みによって動作し、動作時に
各タスクのタスク前動作状態テーブル18とタスク動作
状態テーブル17とを比較して、動作状態に変化がある
か否かを調べる。変化がある場合には、そのタスクは前
の状態と変わっているので、正常動作していることにな
る。変化がない場合には、タスク動作間隔テーブル20
に指定されている時間数分インターバルタイマの割り込
みのカウントアップを行う。指定時間が経過しても動作
状態に変化がない場合には、そのタスクに異常が発生し
たものとして、処理を行う。タスク動作間隔テーブル2
0には、各タスクごとの処理時間間隔の最大値より大き
な値を設定しておく。すなわち、タスク動作間隔テーブ
ル20に記載されている時間以上、タスクの動作状態が
変化しないということは、タスクになんらかの異常が発
生して、通常の処理時間より長くかかっていることを示
しているので、これによってタスクごとの異常検出を行
うことができる。
1 As described above, the interval timer 16 operates by interrupts at fixed time intervals T, and compares the pre-task operation state table 18 and task operation state table 17 of each task during operation, and changes the operation state. Find out if there is. If there is a change, the task has changed from its previous state and is therefore operating normally. If there is no change, the task operation interval table 20
The interval timer interrupt counts up for the number of minutes specified in . If there is no change in the operating state after the specified time has elapsed, it is assumed that an abnormality has occurred in that task and processing is performed. Task operation interval table 2
0 is set to a value larger than the maximum value of the processing time interval for each task. In other words, the fact that the operational state of a task does not change for more than the time listed in the task operation interval table 20 indicates that some abnormality has occurred in the task and the processing time is longer than normal. , This makes it possible to detect abnormalities for each task.

【0024】図5は、本発明の他の実施例の構成を示し
たものであって、図2におけると同じものを同じ番号で
示しているが、インターバルタイマ16を欠いている。 図5の実施例においては、タイムスライス用割り込み部
12において、図2の実施例に示されたインターバルタ
イマ16によるタスク異常検出と同様の処理を行うもの
であり、この場合の処理方法は図2の実施例の場合と同
様にして実現できる。
FIG. 5 shows the structure of another embodiment of the invention, in which the same parts as in FIG. 2 are designated by the same numbers, but the interval timer 16 is omitted. In the embodiment of FIG. 5, the time slice interrupt unit 12 performs the same process as the task abnormality detection by the interval timer 16 shown in the embodiment of FIG. 2, and the processing method in this case is shown in FIG. This can be realized in the same manner as in the embodiment.

【0025】図6は、本発明のさらに他の実施例の構成
を示したものであって、図2におけると同じものを同じ
番号で示しているが、インターバルタイマ16を欠いて
いる。図6の実施例においては、スケジューラ14にお
いて、図2の実施例に示されたインターバルタイマ16
によるタスク異常検出と同様の処理を行うものであり、
この場合の処理方法は図2の実施例の場合と同様にして
実現できる。
FIG. 6 shows the configuration of yet another embodiment of the present invention, in which the same components as in FIG. 2 are designated by the same numbers, but the interval timer 16 is omitted. In the embodiment of FIG. 6, the scheduler 14 uses the interval timer 16 shown in the embodiment of FIG.
It performs the same processing as task abnormality detection by
The processing method in this case can be implemented in the same manner as in the embodiment of FIG.

【0026】[0026]

【発明の効果】以上説明したように本発明のプログラム
異常検出方式によれば、タイムスライス・マルチタスク
OSにおいて、一定時間間隔の割り込み動作によって、
各タスクの動作状態変化を監視することによって、タイ
ムスライスOS下のタスクで発生した動作異常の検出を
行うことができる。
Effects of the Invention As explained above, according to the program abnormality detection method of the present invention, in a time-sliced multitasking OS, interrupt operations at fixed time intervals can be performed.
By monitoring changes in the operating state of each task, it is possible to detect an abnormal operation occurring in a task under the time slice OS.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の原理的構成を示す図である。FIG. 1 is a diagram showing the basic configuration of the present invention.

【図2】本発明の一実施例の構成を示す図である。FIG. 2 is a diagram showing the configuration of an embodiment of the present invention.

【図3】図2の実施例におけるタイムスライスによるタ
スクの実行を説明する図である。
FIG. 3 is a diagram illustrating task execution using time slices in the embodiment of FIG. 2;

【図4】図2の実施例におけるインターバルタイマの動
作を示すフローチャートである。
FIG. 4 is a flowchart showing the operation of an interval timer in the embodiment of FIG. 2;

【図5】本発明の他の実施例の構成を示す図である。FIG. 5 is a diagram showing the configuration of another embodiment of the present invention.

【図6】本発明のさらに他の実施例の構成を示す図であ
る。
FIG. 6 is a diagram showing the configuration of still another embodiment of the present invention.

【図7】タイムスライスOSの動作を説明する図である
FIG. 7 is a diagram illustrating the operation of a time slice OS.

【図8】タイムスライスOSにおける異常発生時の動作
を示す図である。
FIG. 8 is a diagram showing operations when an abnormality occurs in the time slice OS.

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

1  カーネル部 2  タイムスライス用割り込み部 3  タスク 4  スケジューラ 5  インターバルタイマ 6  タスク動作状態テーブル 7  タスク前動作状態テーブル 8  タスク動作間隔カウンタ 9  タスク動作間隔テーブル 1 Kernel part 2 Interrupt section for time slice 3. Task 4 Scheduler 5 Interval timer 6 Task operation status table 7 Pre-task operation status table 8 Task operation interval counter 9 Task operation interval table

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】  核となるプログラムを有するカーネル
部(1)と、該カーネル部(1)に対するタイムスライ
ス用割り込みを発生するタイムスライス用割り込み部(
2)と、該割り込みに基づく前記カーネル部(1)から
の起動に応じて複数のタスク(3)をディスパッチする
スケジューラ(4)とからなるオペレーティングシステ
ム(OS)において、一定時間間隔で動作するインター
バルタイマ(5)と、各タスクの現在の動作状態を表示
するタスク動作状態テーブル(6)と、各タスクの前回
の動作状態を表示するタスク前動作状態テーブル(7)
と、各タスクの動作時間間隔数を計数するタスク動作間
隔カウンタ(8)と、各タスクの正常動作時の最大許容
動作間隔を保持するタスク動作間隔テーブル(9)とを
設け、前記インターバルタイマ(5)が、各タスクの現
動作状態と前動作状態とを比較して変化がないとき該タ
スクの動作時間間隔の計数値と動作間隔のテーブル値と
を比較して該計数値が該テーブル値より大きいとき該タ
スクにおける動作異常発生を判定することを特徴とする
プログラム異常検出方式。
1. A kernel section (1) having a core program, and a time slicing interrupt section (1) that generates a time slicing interrupt for the kernel section (1).
2) and a scheduler (4) that dispatches a plurality of tasks (3) in response to activation from the kernel unit (1) based on the interrupt, an interval operating system that operates at regular time intervals. A timer (5), a task operation status table (6) that displays the current operation status of each task, and a pre-task operation status table (7) that displays the previous operation status of each task.
, a task operation interval counter (8) that counts the number of operation time intervals of each task, and a task operation interval table (9) that holds the maximum allowable operation interval during normal operation of each task, and the interval timer ( 5) Compares the current operation state and previous operation state of each task and when there is no change, compares the count value of the operation time interval of the task with the table value of the operation interval, and determines that the count value is the table value. A method for detecting a program abnormality, characterized in that when the value is larger than that, it is determined that an operational abnormality has occurred in the task.
【請求項2】  核となるプログラムを有するカーネル
部(1)と、該カーネル部(1)に対するタイムスライ
ス用割り込みを発生するタイムスライス用割り込み部(
2)と、該割り込みに基づく前記カーネル部(1)から
の起動に応じて複数のタスク(3)をディスパッチする
スケジューラ(4)とからなるオペレーティングシステ
ム(OS)において、各タスクの現在の動作状態を表示
するタスク動作状態テーブル(6)と、各タスクの前回
の動作状態を表示するタスク前動作状態テーブル(7)
と、各タスクの動作時間間隔数を計数するタスク動作間
隔カウンタ(8)と、各タスクの正常動作時の最大許容
動作間隔を保持するタスク動作間隔テーブル(9)とを
設け、前記タイムスライス用割り込み部(2)が一定時
間間隔で動作して、各タスクの現動作状態と前動作状態
とを比較して変化がないとき該タスクの動作時間間隔の
計数値と動作間隔のテーブル値とを比較して該計数値が
該テーブル値より大きいとき該タスクにおける動作異常
発生を判定することを特徴とするプログラム異常検出方
式。
2. A kernel section (1) having a core program, and a time slicing interrupt section (1) that generates a time slicing interrupt for the kernel section (1).
2) and a scheduler (4) that dispatches a plurality of tasks (3) in response to activation from the kernel unit (1) based on the interrupt, the current operating state of each task. a task operation status table (6) that displays the previous operation status of each task, and a pre-task operation status table (7) that displays the previous operation status of each task.
A task operation interval counter (8) for counting the number of operation time intervals of each task, and a task operation interval table (9) for holding the maximum allowable operation interval during normal operation of each task are provided. The interrupt unit (2) operates at fixed time intervals, compares the current operating state of each task with the previous operating state, and when there is no change, calculates the counted value of the operating time interval of the task and the table value of the operating interval. A program abnormality detection method, characterized in that when the counted value is larger than the table value, it is determined that an operational abnormality has occurred in the task.
【請求項3】  核となるプログラムを有するカーネル
部(1)と、該カーネル部(1)に対するタイムスライ
ス用割り込みを発生するタイムスライス用割り込み部(
2)と、該割り込みに基づく前記カーネル部(1)から
の起動に応じて複数(3)のタスクをディスパッチする
スケジューラ(4)とからなるオペレーティングシステ
ム(OS)において、各タスクの現在の動作状態を表示
するタスク動作状態テーブル(6)と、各タスクの前回
の動作状態を表示するタスク前動作状態テーブル(7)
と、各タスクの動作時間間隔数を計数するタスク動作間
隔カウンタ(8)と、各タスクの正常動作時の最大許容
動作間隔を保持するタスク動作間隔テーブル(9)とを
設け、前記スケジューラ(4)が一定時間間隔で動作し
て、各タスクの現動作状態と前動作状態とを比較して変
化がないとき該タスクの動作時間間隔の計数値と動作間
隔のテーブル値とを比較して該計数値が該テーブル値よ
り大きいとき該タスクにおける動作異常発生を判定する
ことを特徴とするプログラム異常検出方式。
3. A kernel section (1) having a core program, and a time slicing interrupt section (1) that generates a time slicing interrupt for the kernel section (1).
2) and a scheduler (4) that dispatches a plurality of (3) tasks in response to activation from the kernel unit (1) based on the interrupt, the current operating state of each task. a task operation status table (6) that displays the previous operation status of each task, and a pre-task operation status table (7) that displays the previous operation status of each task.
, a task operation interval counter (8) that counts the number of operation time intervals of each task, and a task operation interval table (9) that holds the maximum allowable operation interval during normal operation of each task, and the scheduler (4) ) operates at fixed time intervals, and when there is no change when comparing the current operating state and previous operating state of each task, compare the counted value of the operating time interval of the task with the table value of the operating interval. A program abnormality detection method characterized in that it is determined that an operational abnormality has occurred in the task when a count value is larger than the table value.
JP3067704A 1991-03-08 1991-03-08 Program abnormality detection method Withdrawn JPH04280329A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3067704A JPH04280329A (en) 1991-03-08 1991-03-08 Program abnormality detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3067704A JPH04280329A (en) 1991-03-08 1991-03-08 Program abnormality detection method

Publications (1)

Publication Number Publication Date
JPH04280329A true JPH04280329A (en) 1992-10-06

Family

ID=13352615

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3067704A Withdrawn JPH04280329A (en) 1991-03-08 1991-03-08 Program abnormality detection method

Country Status (1)

Country Link
JP (1) JPH04280329A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10198583A (en) * 1997-01-10 1998-07-31 Nec Corp Detection/processing system/method for idle running process
JP2007334587A (en) * 2006-06-14 2007-12-27 Denso Corp Abnormality monitoring program, recording medium and electronic apparatus
JP2010033245A (en) * 2008-07-28 2010-02-12 Nippon Signal Co Ltd:The Duplicated data processing circuit
JP2015057685A (en) * 2013-08-12 2015-03-26 株式会社三菱東京Ufj銀行 Monitoring system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10198583A (en) * 1997-01-10 1998-07-31 Nec Corp Detection/processing system/method for idle running process
JP2007334587A (en) * 2006-06-14 2007-12-27 Denso Corp Abnormality monitoring program, recording medium and electronic apparatus
US7996732B2 (en) 2006-06-14 2011-08-09 Denso Corporation Program-execution monitoring method, system, and program
JP2010033245A (en) * 2008-07-28 2010-02-12 Nippon Signal Co Ltd:The Duplicated data processing circuit
JP2015057685A (en) * 2013-08-12 2015-03-26 株式会社三菱東京Ufj銀行 Monitoring system

Similar Documents

Publication Publication Date Title
EP0652518B1 (en) Operating system based performance monitoring of programs
US6269478B1 (en) Monitoring method for recognizing endless loops and blocked processes in a computer system using task state comparisons
US7962913B2 (en) Scheduling threads in a multiprocessor computer
US5920689A (en) System and method for low overhead, high precision performance measurements using state transitions
JPS61163447A (en) Non-action state detector
EP1652086B1 (en) Kernel-level method of flagging problems in applications
JPH04280329A (en) Program abnormality detection method
JP2965075B2 (en) Program execution status monitoring method
JPS63163932A (en) System monitoring system for control computer
JP3859564B2 (en) Event notification task control processing method and method, and program
JP3269489B2 (en) Process monitoring system and process monitoring method
JP2006227962A (en) Application task monitoring system and method
JP4313858B2 (en) calculator
JP2870250B2 (en) Microprocessor runaway monitor
JPS63280345A (en) Program error detection method
JPH05241906A (en) Programmable controller
JPH05257748A (en) Microprocessor device
JPH10269110A (en) A method for avoiding a hang-up of a computer system and a computer system using the method.
JPH0334037A (en) System abnormality detection processing method
JPS62145336A (en) Program loop detection method for computer systems
JPS59135557A (en) Information processor
JPS5868166A (en) Processor fault monitoring device
JPH05346877A (en) Operation monitoring system for multi-task system
JPH03288242A (en) Load controlling method for computer system
JPH01183701A (en) Plant supervisory unit

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980514