JPS6118045A - Detecting system of program runaway - Google Patents

Detecting system of program runaway

Info

Publication number
JPS6118045A
JPS6118045A JP59138620A JP13862084A JPS6118045A JP S6118045 A JPS6118045 A JP S6118045A JP 59138620 A JP59138620 A JP 59138620A JP 13862084 A JP13862084 A JP 13862084A JP S6118045 A JPS6118045 A JP S6118045A
Authority
JP
Japan
Prior art keywords
program
instruction
counter
instructions
reset
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
JP59138620A
Other languages
Japanese (ja)
Inventor
Riichiro Take
理一郎 武
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 JP59138620A priority Critical patent/JPS6118045A/en
Publication of JPS6118045A publication Critical patent/JPS6118045A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To detect easily a program runaway by using a counter, etc. and with a reset instruction to decide whether or not the processing time for a prescribed number of instructions to be executed is set within time needed for normal execution of said instructions. CONSTITUTION:An information processor is started and the clocks are supplied to a CPU1 and a counter 4 from a clock generator 3. Then the program of a memory 2 is executed by the CPU1. Thus an instruction of a program instruction area is fetched and executed by the CPU1. Then it is checked whether a counter overflow signal is supplied from the counter 4 or not. When no counter overflow signal is delivered, an instruction is read to the CPU1 out of a program. If this instruction is equal to a counter resetting instruction, the counter 4 is reset. Otherwise the corresponding instruction is processed as usual. Furthermore the generation of the counter overflow signal is checked. When an overflow signal is produced, it is decided that the program processing has an abnormality. Thus an abnormal end of program is decided.

Description

【発明の詳細な説明】 1′産業上の利用分野〕 本発明はプログラムの暴走検出方式の改良に関する。[Detailed description of the invention] 1' Industrial application field] The present invention relates to an improvement in a program runaway detection method.

従来公知のノイマン型計算機におりるデータ処理はその
メインメモリに格納されるプログラムの制御によって遂
行されるようになっている。
Data processing in a conventionally known Neumann type computer is performed under the control of a program stored in its main memory.

そのプログラムがこれを格納する命令領域を正常に実行
しζいる限り何らの不都合も生じないのであるが、何ら
かの原因でプログラムが命令領域を正常に実行しなくな
る場合にこれを可及的早期に検出してプログラムエラー
の範囲を最小限に食い留めることが計算機の正常な稼動
上必要になる。
As long as the program is correctly executing the instruction area in which it is stored, no problems will occur, but if for some reason the program is not executing the instruction area normally, this should be detected as early as possible. It is necessary to keep the range of program errors to a minimum for the normal operation of the computer.

〔従来の技術〕[Conventional technology]

従来におけるプログラムの暴走判定方式としては、メモ
リのデータ領域に保護をかけ、インストラクションのロ
ードモードでその領域にアクセスすることを禁止する方
式や、インストラクションコードの先頭は必ず特定アド
レス、例えば偶数アドレスから始まるように為し、イン
ストラクションのロードモードでは奇数アドレスからア
クセスするのを禁止する方式がある。
Conventional methods for determining runaway programs include protecting the data area of memory and prohibiting access to that area in instruction load mode, and ensuring that the beginning of the instruction code always starts at a specific address, such as an even address. To do this, there is a method that prohibits access from odd addresses in the instruction load mode.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかしながら、これらの方式はアクセスする領域への禁
止を生せしめる手段の性質上それに要するハードウェア
の複雑化が避けられないばかりか、特に後者の方式にお
いてはインストラクションコードセットの設計に制限が
課せられてしまう欠点がある。
However, these methods not only inevitably complicate the required hardware due to the nature of the means for prohibiting access to the area, but also, especially in the latter method, restrictions are imposed on the design of the instruction code set. There is a drawback.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上述の技術的課題を解決し得るプログラムの暴
走検出方式を提供するもので、その手段はプログラムに
よって制御される情報処理システムにおいて、該システ
ムの処理単位毎に予め決められた値ずつカウント値を単
調に変更せしめ、カウント設定値超過信号を発生し得る
手段と、該手段をリセットするべく前記プログラム中に
置かれたリセット命令とを備え、前記カウント設定値超
過信号の発生で前記プログラムの異常を検出するように
したものである。
The present invention provides a program runaway detection method that can solve the above-mentioned technical problem, and the method is to count a predetermined value for each processing unit of the system in an information processing system controlled by a program. means capable of monotonically changing the value and generating a count set value exceeded signal, and a reset instruction placed in the program to reset the means, wherein generation of the count set value exceeded signal causes the program to be terminated. It is designed to detect abnormalities.

〔作用〕[Effect]

本発明方式によれば、プログラムの予め決められた数の
命令の実行経過時間が、それら命令が正常に実行される
場合に要する所要時間内にあるか否かを調べる手段とし
て、カウント設定値超過判定手段とリセット命令とを擁
して構成されているから、プログラムの暴走を簡易なハ
ードウェアにて検出することができる。
According to the method of the present invention, as a means for checking whether the elapsed execution time of a predetermined number of instructions of a program is within the time required for normal execution of those instructions, Since it is configured to include a determination means and a reset instruction, runaway of a program can be detected with simple hardware.

〔実施例〕〔Example〕

以下、添付図面を参照しながら本発明の詳細な説明する
Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

第1図は本発明の一実施例を示す。この図において、1
は中央処理装置(以下、CP Uと略称する。)で、そ
こにはそこでの演算処理のためのプ      ′ログ
ラムの命令(機械語)及びデータを格納しているメモリ
2が接続されるほか、クロック発生器3のクロック出力
が接続されている。クロック発生器3のクロック出力は
カウンタ4のカウントアンプ人力4Aに接続されている
。カウンタ4には又リセット入力4B及びカウンタ溢れ
信号出力4Cがあって、これらはCPUIに接続されて
いる。
FIG. 1 shows an embodiment of the invention. In this figure, 1
is a central processing unit (hereinafter abbreviated as CPU), to which is connected a memory 2 that stores program instructions (machine language) and data for arithmetic processing therein; The clock output of clock generator 3 is connected. The clock output of the clock generator 3 is connected to the count amplifier 4A of the counter 4. The counter 4 also has a reset input 4B and a counter overflow signal output 4C, which are connected to the CPUI.

これに加えて、上述プログラム内の予め決められた数、
例えば10の命令毎にカウンタ4を初期設定値、例えば
零に戻すカウンタリセット命令が埋め込まれ、更にJU
MP命令、BRANCH命令等のプログラムの順次の命
令の実行処理から外れた処理を生ぜしめる命令の前後に
もカウンタリセット命令が埋め込まれてメモリ2にプロ
グラムが格納されている。
In addition to this, a predetermined number within the above program,
For example, a counter reset instruction that returns the counter 4 to the initial setting value, for example, zero, is embedded every 10 instructions, and the JU
A program is stored in the memory 2 with a counter reset instruction embedded before and after an instruction such as an MP instruction or a BRANCH instruction that causes a process outside the sequential execution process of the program's instructions.

このような構成の下においてプログラムの暴走がどのよ
うにして検出されるかを以下に説明する。
How a program runaway is detected under such a configuration will be described below.

情報処理装置が動作状態に入り、クロック発生器3から
CP IJ 1及びカウンタ4にクロックが(1給され
てメモリ2のプログラムがCPUIにて実行されるよう
になると、プログラム命令領域の命令がCPUIに取り
込まれて実行された後、カウンタ4からのカウンタ溢れ
信号があるか否かが調べられ、カウンタ溢れ信号が届い
ていなければ(第2図のステップS]のN)、プログラ
ム中から命令をCPUIに読み込む(ステップS2)。
When the information processing device enters the operating state and the clock generator 3 supplies the clock (1) to the CP IJ 1 and the counter 4, and the program in the memory 2 starts to be executed on the CPUI, the instructions in the program instruction area are transferred to the CPUI. After the command is fetched and executed, it is checked whether there is a counter overflow signal from the counter 4, and if the counter overflow signal has not arrived (N in step S in Figure 2), the command is executed from within the program. Load it into the CPUI (step S2).

そして、その命令がカウンタリセット命令であるか否か
が調べられ、もしそうであるならば(ステップS3のY
)カウンタ4をリセットする(ステップ34)。
Then, it is checked whether the instruction is a counter reset instruction, and if so (Y in step S3).
) Reset counter 4 (step 34).

CP [J lに読み込まれた命令がカウンタリセット
命令でないならば(ステップS3のN)、その命令の通
常の処理を行なう(ステップS5)。
If the instruction read into CP [J l is not a counter reset instruction (N in step S3), normal processing of that instruction is performed (step S5).

ステップS4.S5の処理後、ステップS1に戻ってカ
ウンタ溢れ信号が届いているか否かが調べられるという
処理順序を繰り返すが、もしカウンタ溢れ信号が発生し
ているならば(ステップSIのY)、プログラム処理に
異常が生じているものとして、プログラムの異常終了と
なる(ステップS6)。
Step S4. After the process in S5, the process returns to step S1 to check whether a counter overflow signal has arrived or not, and repeats the processing order. However, if a counter overflow signal has been generated (Y in step SI), program processing is performed. Assuming that an abnormality has occurred, the program terminates abnormally (step S6).

例えば、カウンタ4がクロック発生器3の1クロツク毎
に1インクリメントされ、プログラムの10命令毎にカ
ウンタリセット命令が埋め込まれており1命令が必ず1
0クロック以内に終了するとすると、プログラム命令領
域の命令が正常に実行されているならばカウンタは10
0を超えることはない。従って、カウンタが101以上
になったとすると、プログラム命令領域の命令が正常に
実行されていないことを検出することができる。
For example, the counter 4 is incremented by 1 every 1 clock of the clock generator 3, and a counter reset instruction is embedded in every 10 instructions of the program, so that each instruction is always equal to 1.
Assuming that it completes within 0 clocks, the counter will be 10 if the instructions in the program instruction area are executed normally.
It never exceeds 0. Therefore, if the counter becomes 101 or more, it can be detected that the instructions in the program instruction area are not being executed normally.

なお、上記実施例におけるカウンタのインクリメント手
段はクロック発生器とする例について説明したが、プロ
グラムの処理経過時間を計測せしめ得るその伯の処理単
位時間毎にインクリメント信号をカウンタに供給し得る
ものにて代替させてもよい。又、カウンタは初期値から
デクリメントされるものであってもよい。
Although the example in which the incrementing means of the counter in the above embodiment is a clock generator has been described, it is also possible to use a clock generator which can supply an increment signal to the counter every unit processing time that can measure the elapsed processing time of the program. May be substituted. Further, the counter may be decremented from the initial value.

〔発明の効果〕〔Effect of the invention〕

以上述べたように、本発明によれば、実行される予め決
められた数の命令の処理時間がそれら命令の正常な実行
時に要する所要時間内にあるか否かを、カウンタ等とそ
のリセット命令で判定するように構成しているから、プ
ログラムの暴走を比較的に簡易なハードウェアで検出す
ることができる。
As described above, according to the present invention, whether or not the processing time of a predetermined number of instructions to be executed is within the time required for normal execution of those instructions is determined by a counter or the like and its reset instruction. Since the configuration is configured to make a determination based on the following, program runaway can be detected using relatively simple hardware.

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

第1図は本発明の一実施例を示す図、第2図は第1図実
施例の動作説明のためのフローチャートである。 図中、IはCP[J、2はメモリ、3はクロック発生器
、4はカウンタである。
FIG. 1 is a diagram showing an embodiment of the present invention, and FIG. 2 is a flowchart for explaining the operation of the embodiment of FIG. In the figure, I is CP[J, 2 is a memory, 3 is a clock generator, and 4 is a counter.

Claims (4)

【特許請求の範囲】[Claims] (1) プログラムによって制御される情報処理システ
ムにおいて、該システムの処理単位毎に予め決められた
値ずつカウント値を単調に変更せしめカウント設定値超
過信号を発生する手段と、該手段をその初期値ヘリセッ
トするべく前記プログラム中に置かれたリセット命令と
を備え、前記カウント設定値超過信号の発生で前記プロ
グラムの異常を検出するようにしたことを特徴とするプ
ログラムの暴走検出方式。
(1) In an information processing system controlled by a program, a means for monotonically changing a count value by a predetermined value for each processing unit of the system and generating a count set value excess signal, and a means for generating a count value excess signal; A program runaway detection method, comprising: a reset command placed in the program to reset the program; and an abnormality in the program is detected by generation of the count setting value excess signal.
(2)前記手段は前記システムのクロックによりインク
リメントされるカウンタであることを特徴とする特許請
求の範囲第1項記載のプログラムの暴走検出方式。
(2) The program runaway detection method according to claim 1, wherein the means is a counter that is incremented by a clock of the system.
(3)前記リセット命令は予め決められた数の命令毎に
設けられたことを特徴とする特許請求の範囲第1項又は
第2項記載のプログラムの暴走検出方式。
(3) The program runaway detection method according to claim 1 or 2, wherein the reset instruction is provided for each predetermined number of instructions.
(4)前記リセット命令は予め決められた数の命令毎に
、且つプログラムの順次の命令の実行から外れた命令の
実行を生ぜしめる命令の前後に置かれていることを特徴
とする特許請求の範囲第1項又は第2項記載のプログラ
ムの暴走検出方式。
(4) The reset instruction is placed every predetermined number of instructions before and after an instruction that causes the execution of an instruction that is out of the sequential execution of instructions in the program. A runaway detection method for a program according to the first or second item of the scope.
JP59138620A 1984-07-04 1984-07-04 Detecting system of program runaway Pending JPS6118045A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59138620A JPS6118045A (en) 1984-07-04 1984-07-04 Detecting system of program runaway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59138620A JPS6118045A (en) 1984-07-04 1984-07-04 Detecting system of program runaway

Publications (1)

Publication Number Publication Date
JPS6118045A true JPS6118045A (en) 1986-01-25

Family

ID=15226324

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59138620A Pending JPS6118045A (en) 1984-07-04 1984-07-04 Detecting system of program runaway

Country Status (1)

Country Link
JP (1) JPS6118045A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5793601U (en) * 1980-11-28 1982-06-09
EP0590637A1 (en) * 1992-09-30 1994-04-06 Nec Corporation Dectection of improper CPU operation from lap time pulses and count of executed significant steps
JP2008185227A (en) * 2007-01-26 2008-08-14 Mitsubishi Electric Corp Remote control device of hot water supply device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5793601U (en) * 1980-11-28 1982-06-09
EP0590637A1 (en) * 1992-09-30 1994-04-06 Nec Corporation Dectection of improper CPU operation from lap time pulses and count of executed significant steps
US5694336A (en) * 1992-09-30 1997-12-02 Nec Corporation Detection of improper CPU operation from lap time pulses and count of executed significant steps
JP2008185227A (en) * 2007-01-26 2008-08-14 Mitsubishi Electric Corp Remote control device of hot water supply device

Similar Documents

Publication Publication Date Title
EP0461792B1 (en) Master/slave checking system
US4839895A (en) Early failure detection system for multiprocessor system
US6321289B1 (en) Apparatus for automatically notifying operating system level applications of the occurrence of system management events
US6463492B1 (en) Technique to automatically notify an operating system level application of a system management event
JP2000322264A (en) Electronic equipment
JPS6118045A (en) Detecting system of program runaway
KR102603835B1 (en) Method and apparatus for protecting the program counter structure of a processor system and monitoring processing of interrupt requests
JPH0147818B2 (en)
JPS58181160A (en) Controlling system of emergency operation
JP3171615B2 (en) Data transfer retry control method
JP2548378B2 (en) RAS check function inspection method
JPS6158054A (en) Run away detection of program
JPS6211745B2 (en)
JPH0149975B2 (en)
JPH0814779B2 (en) Initialization method for arithmetic and control unit
JPS6152747A (en) Microprocessor
JP2648029B2 (en) In-circuit emulator
JPH03208132A (en) Single chip microcomputer
JPH0772874B2 (en) Interrupt receiving device
JPS63155330A (en) Microprogram controller
JPH1124962A (en) Microcomputer device
JPS63150732A (en) Program running supervisory equipment
JPH08263324A (en) Debug facilitation device
JPH0769846B2 (en) Error processing circuit verification device
JPS6383839A (en) Device preventing for malfunction of microcomputer