JPH04275664A - Mutual monitoring method and device between processors - Google Patents

Mutual monitoring method and device between processors

Info

Publication number
JPH04275664A
JPH04275664A JP3036275A JP3627591A JPH04275664A JP H04275664 A JPH04275664 A JP H04275664A JP 3036275 A JP3036275 A JP 3036275A JP 3627591 A JP3627591 A JP 3627591A JP H04275664 A JPH04275664 A JP H04275664A
Authority
JP
Japan
Prior art keywords
processor
common memory
data
processors
message
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.)
Granted
Application number
JP3036275A
Other languages
Japanese (ja)
Other versions
JP2870202B2 (en
Inventor
Shigeru Kamiya
茂 神谷
Takayuki Toda
孝之 戸田
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric 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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP3036275A priority Critical patent/JP2870202B2/en
Publication of JPH04275664A publication Critical patent/JPH04275664A/en
Application granted granted Critical
Publication of JP2870202B2 publication Critical patent/JP2870202B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)

Abstract

PURPOSE:To present the mutual monitoring method and device to exactly monitor the operational states of processors concerning the monitoring method and device mutually between the processors at a system composed of the plural processors. CONSTITUTION:In a program BM-1 to be executed in each cycle t2 at a processor BM, the contents of a common memory D to write a message by a processor A are read out (S28), and it is discriminated (S29) whether a value read out this time is same as a value read out the last time or not. When the read-out data is the same as the last time data, the data of a common memory CM are cleared (S30) and when it is different from the value read out the last time, the data of the common memory CM are incremented (S31). Then, another program BM-2 compares the data of the common memory CM with a rated value in each fixed cycle and when the data is larger than the rated value, the abnormality of the processor A is judged.

Description

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

【0001】0001

【産業上の利用分野】本発明は、複数のプロセッサから
なるコンピュータシステムにおけるプロセッサ相互間の
監視方法及びその装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for monitoring mutual processors in a computer system comprising a plurality of processors.

【0002】0002

【従来の技術】複数のプロセッサからなるコンピュータ
システムでは、通常個々のプロセッサが自己診断機能を
有しており、自己の異常を検出したときには、異常の発
生を他のプロセッサに通知するようになっている。
[Prior Art] In a computer system consisting of a plurality of processors, each processor usually has a self-diagnosis function, and when it detects an abnormality in itself, it notifies other processors of the occurrence of the abnormality. There is.

【0003】この自己診断機能により、例えばある機械
を制御するコンピュータシステムにおいて、制御を行っ
ているプロセッサが自己の異常を検出すると、他のプロ
セッサに異常の発生が通知され、正常に動作している他
のプロセッサが機械を安全に停止させることができる。
With this self-diagnosis function, for example, in a computer system that controls a certain machine, if the controlling processor detects an abnormality in itself, other processors are notified of the occurrence of the abnormality, and the computer system is operating normally. Other processors can safely stop the machine.

【0004】しかしながら、例えばプロセッサ自身が動
作を停止してしまうような故障では、当然のことながら
自己診断機能も働かなくなってしまうので、他のプロセ
ッサは異常の発生を知ることができないという問題点が
あった。
[0004] However, for example, in the case of a failure where the processor itself stops operating, the self-diagnosis function also stops working, so there is a problem that other processors cannot know that an abnormality has occurred. there were.

【0005】そこで、従来、複数のプロセッサ間で相互
に動作の監視を行い、1つのプロセッサが故障して自己
診断機能が動作しない場合でも、他のプロセッサがその
プロセッサの異常を検出できるようにしている。
[0005] Conventionally, a plurality of processors mutually monitor their operations, so that even if one processor fails and the self-diagnosis function does not work, other processors can detect an abnormality in that processor. There is.

【0006】以下、少なくとも2個のプロセッサA、B
と、それらのプロセッサによりアクセスされる共通メモ
リC、Dとで構成されるマルチプロセッサシステムを例
にとり、従来の相互監視方法を説明する。
[0006] Below, at least two processors A and B
A conventional mutual monitoring method will be explained by taking as an example a multiprocessor system consisting of a computer and common memories C and D accessed by these processors.

【0007】図11〜図15は、従来の相互監視方法に
おけるプロセッサA及びプロセッサBの処理内容を示す
フローチャートである。このプロセッサシステムでは、
プロセッサAにおいて周期t0 、t1 毎に相互監視
の為のプログラムA−1、A−2が実行され、プロセッ
サBにおいて周期t2 、t3 毎に相互監視の為のプ
ログラムB−1、B−2が実行される。
FIGS. 11 to 15 are flowcharts showing the processing contents of processor A and processor B in the conventional mutual monitoring method. In this processor system,
Programs A-1 and A-2 for mutual monitoring are executed in processor A every cycle t0 and t1, and programs B-1 and B-2 for mutual monitoring are executed in processor B every cycle t2 and t3. be done.

【0008】先ず、図11及び図12を参照してプロセ
ッサA側での処理を説明する。プロセッサAでは、周期
t0 毎に図11に示すプログラムA−1が起動される
。 このプログラムA−1では、図11のステップS1に示
すように共通メモリCを「0」にクリアする。
First, the processing on the processor A side will be explained with reference to FIGS. 11 and 12. In the processor A, a program A-1 shown in FIG. 11 is activated every cycle t0. In this program A-1, the common memory C is cleared to "0" as shown in step S1 of FIG.

【0009】さらに、プロセッサAでは、周期t1 毎
に図12に示すプログラムA−2が起動される。このプ
ログラムA−2では、ステップS2で共通メモリCのデ
ータを読み出し、次のステップS3で今回読み出したデ
ータと前回読み出したデータとが一致するか否かを判別
する。
Furthermore, in the processor A, a program A-2 shown in FIG. 12 is activated every cycle t1. In this program A-2, data in the common memory C is read in step S2, and in the next step S3 it is determined whether the data read this time and the data read last time match.

【0010】データが一致しないときは、共通メモリC
が、後述するプロセッサB側のプログラムB−1により
「1」づつインクリメントされている場合であり、この
場合には、ステップS4でプロセッサBが正常に動作し
ているものと判断して、処理を終了させる。
[0010] When the data do not match, the common memory C
is incremented by "1" by program B-1 on the processor B side, which will be described later. In this case, it is determined in step S4 that processor B is operating normally, and the process is Terminate it.

【0011】他方、ステップS3の判別で今回読み出し
たデータと前回読み出したデータとが一致した場合には
ステップ5で、プロセッサBに何らかの異常が発生して
共通メモリCのデータがインクリメントされなかったも
のと判断して、処理を終了させる。
On the other hand, if the currently read data matches the previously read data in step S3, then in step S5 it is determined that some abnormality has occurred in processor B and the data in common memory C has not been incremented. It is determined that this is the case, and the process is terminated.

【0012】次に、プロセッサB側での処理を図13及
び図14を参照して説明する。プロセッサBでは、周期
t2 毎に図13に示すプログラムB−1が実行される
。 このプログラムB−1では、図13のステップS6で共
通メモリCのデータを読み出し、次のステップS7でそ
の値をインクリメントする。さらに、ステップS8でそ
のインクリメントしたデータを共通メモリCに書き込む
Next, processing on the processor B side will be explained with reference to FIGS. 13 and 14. In processor B, program B-1 shown in FIG. 13 is executed every cycle t2. In this program B-1, data in the common memory C is read in step S6 of FIG. 13, and the value is incremented in the next step S7. Furthermore, the incremented data is written to the common memory C in step S8.

【0013】また、プロセッサBでは、周期t3 毎に
図14に示すプログラムB−2が実行される。このプロ
グラムB−2では、図14のステップS9で共通メモリ
Cのデータを読み出し、次のステップS10でそのデー
タが規定値未満か否かを判別する。
Furthermore, in processor B, program B-2 shown in FIG. 14 is executed every cycle t3. In this program B-2, data in the common memory C is read in step S9 of FIG. 14, and it is determined in the next step S10 whether or not the data is less than a specified value.

【0014】共通メモリCのデータが規定値未満のとき
は、上述したプロセッサB側のプログラムB−1により
「1」づつインクリメントされる共通メモリCの内容が
、プロセッサA側のプログラムA−1により周期t0 
毎にクリアされている場合である。
When the data in the common memory C is less than the specified value, the contents of the common memory C, which are incremented by 1 by the program B-1 on the processor B side mentioned above, are incremented by 1 by the program A-1 on the processor A side. Period t0
This is the case where it is cleared every time.

【0015】この場合には、ステップS11でプロセッ
サAが正常動作をしているものと判断して、処理を終了
させる。他方、ステップS10の判別で共通メモリCの
データが規定値以上のときは、プログラムA−1が実行
されず共通メモリCがクリアされない状態で、プログラ
ムB−1により共通メモリCのデータがインクリメント
され規定値以上となった場合である。
In this case, it is determined in step S11 that processor A is operating normally, and the process is terminated. On the other hand, if the data in the common memory C is equal to or greater than the specified value in the determination in step S10, the data in the common memory C is incremented by the program B-1 while the program A-1 is not executed and the common memory C is not cleared. This is the case when the value exceeds the specified value.

【0016】この場合には、ステップS12でプロセッ
サAに異常が発生したものと判断し、さらに次のステッ
プS13で共通メモリCに上記規定値を書き込み、処理
を終了させる。
In this case, it is determined in step S12 that an abnormality has occurred in the processor A, and in the next step S13, the specified value is written in the common memory C, and the process is terminated.

【0017】尚、プログラムB−1の起動周期t2 と
プログラムB−2の起動周期t3 とが等しいときには
、それらのプログラムを1つにまとめて、図15に示す
プログラムB−0を作成することができる。
Incidentally, when the starting period t2 of program B-1 and the starting period t3 of program B-2 are equal, it is possible to combine these programs into one and create program B-0 shown in FIG. can.

【0018】このプログラムB−0では、ステップS1
4で共通メモリCのデータを読み出し、ステップS15
で読み出したデータが規定値未満か否かを判別する。読
み出したデータが規定値未満であれば、ステップS16
でプロセッサAは正常に動作しているものと判定し、次
のステップS17で共通メモリCのデータを「1」イン
クリメントし、さらにステップS18でそのデータを共
通メモリCに書き込んだ後、処理を終了する。
In this program B-0, step S1
4, the data of the common memory C is read, and step S15
It is determined whether the read data is less than the specified value. If the read data is less than the specified value, step S16
Processor A determines that it is operating normally, increments the data in common memory C by "1" in step S17, writes that data to common memory C in step S18, and then ends the process. do.

【0019】他方、共通メモリCのデータが規定値と等
しい場合には、ステップS19でプロセッサAに異常が
発生したものと判定し、次のステップS20で規定値を
セットし、さらにステップS18でその規定値を共通メ
モリCに書き込んだ後、処理を終了する。
On the other hand, if the data in the common memory C is equal to the specified value, it is determined in step S19 that an abnormality has occurred in the processor A, the specified value is set in the next step S20, and the specified value is set in step S18. After writing the specified value into the common memory C, the process ends.

【0020】次に、プロセッサA、Bが正常なとき、あ
るいはプロセッサA又はBに異常が発生したときのプロ
セッサの動作を、図16〜図18の動作タイムチャート
を参照して説明する。
Next, the operation of the processors when processors A and B are normal or when an abnormality occurs in processor A or B will be explained with reference to the operation time charts of FIGS. 16 to 18.

【0021】プロセッサA、Bが正常に動作していると
きには、図16の動作タイムチャートに示すように、プ
ログラムB−1により周期t2 毎に共通メモリCのデ
ータが「1」づつ増加し、さらに、プログラムA−1に
より周期t0 毎に共通メモリCの内容がクリアされる
When processors A and B are operating normally, as shown in the operation time chart of FIG. , the contents of the common memory C are cleared every cycle t0 by program A-1.

【0022】このときプロセッサAにおいて周期t1 
毎に実行されるプログラムA−2により、共通メモリC
の値が変化していることが検出できるので、プロセッサ
Bが正常に動作しているものと判定できる。
At this time, in processor A, the period t1
By program A-2 executed every time, the common memory C
Since it can be detected that the value of is changing, it can be determined that processor B is operating normally.

【0023】また、図16には示していないが、プロセ
ッサBにおいて周期t3 毎に実行されるプログラムB
−2により、共通メモリCのデータが規定値未満である
ことが検出できるので、プロセッサAが正常に動作して
いるものと判定できる。
Although not shown in FIG. 16, program B is executed in processor B every cycle t3.
-2, it can be detected that the data in the common memory C is less than the specified value, so it can be determined that the processor A is operating normally.

【0024】次に、プロセッサAに異常が発生した場合
の動作を、図17の動作タイムチャートを参照して説明
する。プロセッサAに異常が発生すると、プロセッサB
側のプログラムB−1により共通メモリCの内容はイン
クリメントされるが、プログラムA−1により共通メモ
リCの内容が「0」にクリアされなくなるので、図17
に示すように共通メモリCの値が次第に増大していく。
Next, the operation when an abnormality occurs in processor A will be explained with reference to the operation time chart of FIG. If an error occurs in processor A, processor B
Although the contents of the common memory C are incremented by the side program B-1, the contents of the common memory C are not cleared to "0" by the program A-1.
The value of the common memory C gradually increases as shown in FIG.

【0025】その結果、プロセッサBにおいて周期t3
 毎に実行されるプログラムB−2により、共通メモリ
Cの値が規定値以上であることが検出され、プロセッサ
Aは異常と判定される。
As a result, in processor B, the period t3
The program B-2 executed each time detects that the value in the common memory C is greater than or equal to the specified value, and the processor A is determined to be abnormal.

【0026】次に、プロセッサBに異常が発生した場合
の動作を、図18の動作タイムチャート参照して説明す
る。プロセッサBに異常が発生すると、上述したプログ
ラムB−1により共通メモリCの値がインクリメントさ
れなくなり、図18に示すように共通メモリCの値が一
定値となる。
Next, the operation when an abnormality occurs in processor B will be explained with reference to the operation time chart of FIG. When an abnormality occurs in processor B, the value in common memory C is no longer incremented by the program B-1 described above, and the value in common memory C becomes a constant value as shown in FIG.

【0027】その結果、プロセッサAで周期t1 毎に
実行されるプログラムA−1により、共通メモリCから
今回読み出したデータと前回読み出したデータとの一致
が検出され、プロセッサBは異常と判定される。
As a result, program A-1, which is executed by processor A every cycle t1, detects a match between the data read this time and the data read last time from common memory C, and processor B is determined to be abnormal. .

【0028】なお、プロセッサBに異常が発生した場合
でも、プロセッサAにより共通レジスタCがクリアされ
る前後に共通メモリCのデータを読み出して比較したと
きには、今回のデータと前回のデータが一致しないこと
になるので、プロセッサBが正常と判断される場合が起
こる。
[0028] Even if an abnormality occurs in processor B, when the data in common memory C is read and compared before and after common register C is cleared by processor A, the current data and the previous data do not match. Therefore, processor B may be determined to be normal.

【0029】この場合でも、プログラムA−2での共通
メモリCのデータの比較を複数回繰り返すようにすれば
、プロセッサBに異常が発生している場合には、クリア
した後の共通メモリCの内容が一定値「0」となるので
、プロセッサBの異常を確実に検出することができる。
Even in this case, if the comparison of the data in the common memory C in program A-2 is repeated multiple times, if an abnormality occurs in the processor B, the data in the common memory C after being cleared can be Since the content is a constant value of "0", an abnormality in processor B can be reliably detected.

【0030】なお、各プログラムの起動周期t0 、t
1 、t2 は、次のような関係を満たす必要がある。 t0 >t2                   
          ■t1 >t2        
                     ■t1 
≠n×t0 (n=1、2、・・・)  ■■の条件は
、正常時に共通メモリCのデータが増えていくための条
件であり、■の条件と■の条件は、正常時に共通メモリ
Cの前回の読み出しデータと今回の読み出しデータが一
致しない為の条件である。
[0030] Note that the startup cycle of each program is t0, t
1 and t2 must satisfy the following relationship. t0 > t2
■t1 >t2
■t1
≠n×t0 (n=1, 2,...) ■■ Condition is a condition for the data in common memory C to increase during normal times, and conditions ■ and ■ are common during normal times. This is a condition for the previous read data of the memory C and the current read data not to match.

【0031】[0031]

【発明が解決しようとする課題】しかしながら、上述し
た従来の相互監視方法では、プロセッサAとプロセッサ
Bとが非同期で動作している場合に、例えば図19に示
すタイミングでプログラムが起動すると問題が生じる。
However, in the conventional mutual monitoring method described above, a problem occurs when a program is started at the timing shown in FIG. 19, for example, when processor A and processor B operate asynchronously. .

【0032】図19に示すように、プロセッサBが共通
メモリCのデータを読み出した直後に、プロセッサAが
共通メモリCを「0」にクリアした場合には、次にプロ
グラムB−1により、読み出したデータがインクリメン
トされ、そのインクリメントされたデータが共通メモリ
Cに書き込まれる。
As shown in FIG. 19, if processor A clears common memory C to "0" immediately after processor B reads data from common memory C, then program B-1 The incremented data is incremented and the incremented data is written to the common memory C.

【0033】この結果、共通メモリCのデータはクリア
されずデータが増え続け、規定値以上となった時点でプ
ログラムB−2によりプロセッサAに異常が発生したも
のと誤って判定されてしまう。
As a result, the data in the common memory C is not cleared and continues to increase, and when the data exceeds the specified value, the program B-2 erroneously determines that an abnormality has occurred in the processor A.

【0034】本発明の目的は、複数のプロセッサからな
るシステムにおいて、プロセッサの動作状態を正確に検
出できるプロセッサ間の相互監視方法及びその装置を提
供することである。
An object of the present invention is to provide a method and apparatus for mutual monitoring between processors that can accurately detect the operating states of processors in a system consisting of a plurality of processors.

【0035】[0035]

【課題を解決するための手段】図1は、本発明の原理説
明図である。複数のプロセッサとその複数のプロセッサ
からアクセス可能な共通メモリC、Dとからなるシステ
ムであって、複数のプロセッサの中で互いに動作を監視
しているプロセッサA、Bの一方のプロセッサAが、周
期t0 毎に共通メモリDにメッセージを書き込む。さ
らに、周期t1 毎に共通メモリCのデータを読み出し
、今回読み出したデータと前回読み出したデータとを比
較し、データが不一致であればプロセッサBは正常と判
定し、データが一致すればプロセッサBは異常と判定す
る。
[Means for Solving the Problems] FIG. 1 is a diagram illustrating the principle of the present invention. In a system consisting of a plurality of processors and common memories C and D that can be accessed by the plurality of processors, processor A, one of the processors A and B, which monitors each other's operations among the plurality of processors, A message is written to the common memory D every t0. Furthermore, the data in the common memory C is read every cycle t1, and the data read this time and the data read last time are compared. If the data do not match, processor B is determined to be normal; if the data match, processor B Determined as abnormal.

【0036】他方のプロセッサBが、周期t2 毎に共
通メモリDのメッセージを読み出し、プロセッサAから
のメッセージの有無を判断し、メッセージが存在する場
合には共通メモリCをクリアし、メッセージが存在しな
い場合には共通メモリCのデータをインクリメント又は
ディクリメントする。さらに、周期t3 毎に共通メモ
リCのデータと基準値とを比較し、データが基準値未満
であればプロセッサAは正常と判定し、基準値以上であ
ればプロセッサAは異常と判定する。
The other processor B reads the message from the common memory D every cycle t2, determines whether there is a message from the processor A, and if a message exists, clears the common memory C and determines that no message exists. In this case, the data in the common memory C is incremented or decremented. Further, the data in the common memory C is compared with a reference value every cycle t3, and if the data is less than the reference value, the processor A is determined to be normal, and if the data is greater than or equal to the reference value, the processor A is determined to be abnormal.

【0037】[0037]

【作用】本発明の相互監視方法では、一方のプロセッサ
Aが共通メモリDに所定のメッセージを書き込んだか否
かにより、他方のプロセッサBが共通メモリCのデータ
をクリア、あるいはインクリメント(又はディクリメン
ト)するようにした。
[Operation] In the mutual monitoring method of the present invention, depending on whether one processor A writes a predetermined message to the common memory D, the other processor B clears or increments (or decrements) the data in the common memory C. I decided to do so.

【0038】従って、従来のようにプログラムの起動タ
イミングによって、例えば共通メモリCのデータをイン
クリメント(又はディクリメント)している途中で、そ
の共通メモリCの内容がクリアされるということが発生
せず、プロセッサが正常に動作しているのに、誤って異
常と判定することを防止できる。
Therefore, unlike in the past, the contents of the common memory C are not cleared while the data in the common memory C is being incremented (or decremented) depending on the program start timing. , it is possible to prevent the processor from being erroneously determined to be abnormal even though it is operating normally.

【0039】[0039]

【実施例】以下、本発明の実施例を図面を参照しながら
説明する。図2は、本発明の第1実施例のプロセッサシ
ステムの構成図である。プロセッサカードA(例えば、
プロセッサAが搭載されたボード)と、N枚のプロセッ
サカードB〔以下、このカード上の任意のプロセッサを
プロセッサBM (M=1、2・・・N)と呼ぶ〕と、
それらのプロセッサから共通にアクセスされる共通メモ
リカードXとは、それぞれシステムバスEを介して接続
されている。
Embodiments Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 2 is a block diagram of a processor system according to a first embodiment of the present invention. Processor card A (e.g.
a board on which a processor A is mounted), N processor cards B [hereinafter, any processor on this card will be referred to as a processor BM (M=1, 2...N)],
A common memory card X that is commonly accessed by these processors is connected via a system bus E, respectively.

【0040】プロセッサカードAとプロセッサカードB
とは、共通メモリカードXを経由して互いのデータを受
け渡しする。共通メモリカードX内には多数のデータ格
納領域があり、このデータ格納領域には、プロセッサA
によりメッセージが書き込まれ、プロセッサBM によ
りそのメッセージが読み出される共通メモリDと、プロ
セッサBM によりクリア又はインクリメント(又はデ
ィクリメント)され、プロセッサAによりその内容が読
み出されるN個の共通メモリCM (M=1、2、3・
・・N)等が設けられている。
Processor card A and processor card B
and exchange data with each other via the common memory card X. There are many data storage areas in the common memory card
a common memory D into which messages are written and read out by processor BM; and N common memories CM (M=1 , 2, 3・
...N) etc. are provided.

【0041】なお、この実施例では、N個のプロセッサ
Bの異常の有無を検出する為にN個の共通メモリCM 
を設けている。次に、第1実施例のプロセッサA及びB
M で実行される相互監視プログラムについて、図3〜
図6のフローチャートを参照しながら説明する。
In this embodiment, in order to detect the presence or absence of abnormality in N processors B, N common memories CM are used.
has been established. Next, processors A and B of the first embodiment
Regarding the mutual monitoring program executed in M, Figure 3~
This will be explained with reference to the flowchart in FIG.

【0042】図3は、プロセッサAで周期t0 毎に実
行されるプログラムA−1のフローチャートである。こ
のプログラムA−1は、共通メモリDにメッセージとし
て「0」又は「1」を書き込むプログラムである。
FIG. 3 is a flowchart of a program A-1 executed by processor A every cycle t0. This program A-1 is a program that writes "0" or "1" into the common memory D as a message.

【0043】先ず、図3のステップS21で、前回共通
メモリDにメッセージとして「0」を書き込んだか否を
判別する。前回共通メモリDに「0」を書き込んでいる
場合には、ステップS22に進み、今回は共通メモリD
にメッセージとして「1」を書き込む。
First, in step S21 of FIG. 3, it is determined whether "0" was written as a message in the common memory D last time. If "0" was written in the common memory D last time, the process advances to step S22, and the common memory D is written this time.
Write "1" as a message to .

【0044】一方、前回共通メモリDに「1」を書き込
んでいる場合には、ステップS23に進み今回は、共通
メモリDにメッセージとして「0」を書き込む。ここで
、プログラムA−1において、共通メモリDにメッセー
ジとして「0」と「1」を交互に書き込んでいるのは、
プロセッサBM 側でプロセッサAが正常に動作してい
るか否かを判定できるようにする為である。
On the other hand, if "1" was written in the common memory D last time, the process advances to step S23 and "0" is written in the common memory D as a message this time. Here, in program A-1, the reason why "0" and "1" are written alternately as messages to the common memory D is as follows.
This is to enable processor BM to determine whether processor A is operating normally.

【0045】次に、図4は、プロセッサAで周期t1 
毎に実行されるプログラムA−2のフローチャートであ
る。このプログラムA−2は、共通メモリCM から今
回読み出したデータと、前回読み出したデータとを比較
することで、プロセッサBM の異常を検出する処理で
ある。
Next, FIG. 4 shows that processor A has a period t1.
It is a flowchart of program A-2 executed every time. This program A-2 is a process for detecting an abnormality in the processor BM by comparing the data read this time from the common memory CM with the data read last time.

【0046】先ず、図4のステップS24で共通メモリ
CM のデータを読み出す。次にステップS25で今回
読み出した共通メモリCM のデータと前回読み出した
データとを比較し、両者が一致するか否かを判別する。
First, in step S24 of FIG. 4, data in the common memory CM is read. Next, in step S25, the data read out this time in the common memory CM is compared with the data read out last time, and it is determined whether or not they match.

【0047】データが一致しない場合は、ステップS2
6でプロセッサBMは正常に動作しているものと判断し
、処理を終了する。他方、データが一致する場合は、プ
ロセッサBM において後述するプログラムBM −1
が実行されず、共通メモリCM の値がインクリメント
されない場合であり、この場合にはステップS27でプ
ロセッサBM に異常が発生したものと判断し、処理を
終了する。
If the data do not match, step S2
At step 6, the processor BM determines that it is operating normally and ends the process. On the other hand, if the data match, the processor BM executes the program BM-1, which will be described later.
is not executed and the value of the common memory CM is not incremented. In this case, it is determined in step S27 that an abnormality has occurred in the processor BM, and the process is terminated.

【0048】次に図5は、プロセッサBM で周期t2
 毎に実行されるプログラムBM −1のフローチャー
トである。このプログラムBM −1は、共通メモリD
の値が前回の値と同じか否かにより、共通メモリCM 
をクリア又はインクリメントする処理である。
Next, FIG. 5 shows that the processor BM has a period t2.
It is a flowchart of program BM-1 executed every time. This program BM-1 is stored in the common memory D
Common memory CM depends on whether the value is the same as the previous value or not.
This is the process of clearing or incrementing .

【0049】先ず、図5のステップS28で共通メモリ
Dの内容を読み出す。そして、ステップS29で今回読
み出した共通メモリDの内容と、前回読み出した共通メ
モリDの内容とを比較し、両者が一致するか否かを判別
する。
First, in step S28 of FIG. 5, the contents of the common memory D are read. Then, in step S29, the contents of the common memory D read this time are compared with the contents of the common memory D read last time, and it is determined whether or not they match.

【0050】共通メモリDの内容が一致しないときは、
プロセッサAにより前述したプログラムA−1が実行さ
れ、共通メモリDの値が「0」から「1」に、あるいは
「1」から「0」に周期t0 毎に交互に書き換えられ
ている場合であり、この場合には、ステップS30に進
み共通メモリCM を「0」にクリアして、処理を終了
する。
[0050] When the contents of the common memory D do not match,
This is a case where the above-mentioned program A-1 is executed by processor A and the value of common memory D is alternately rewritten from "0" to "1" or from "1" to "0" every cycle t0. In this case, the process advances to step S30, where the common memory CM is cleared to "0", and the process ends.

【0051】他方、共通メモリDの値が一致する場合は
、時間t0 の間プログラムA−1が実行されず、共通
メモリDの値が書き換えられていない場合であり、この
場合には、ステップS31に進み共通メモリCM を「
1」インクリメントして、処理を終了する。
On the other hand, if the values in the common memory D match, it means that the program A-1 has not been executed during the time t0 and the value in the common memory D has not been rewritten. In this case, step S31 Go to "Common Memory CM"
1" increment and end the process.

【0052】次に図6は、プロセッサBM で周期t3
 毎に実行されるプログラムBM ー2のフローチャー
トである。このプログラムBM −2は、共通メモリC
M のデータを規定値(基準値)と比較することで、プ
ロセッサAの異常を検出する処理である。
Next, FIG. 6 shows that the processor BM has a period t3.
2 is a flowchart of program BM-2 that is executed every time. This program BM-2 is stored in the common memory C
This process detects an abnormality in processor A by comparing the data of M with a specified value (reference value).

【0053】先ず、図6のステップS32で共通メモリ
CM のデータを読み出す。次に、ステップS33で、
読み出した共通メモリCM のデータが規定値未満か否
かを判別する。
First, in step S32 of FIG. 6, data in the common memory CM is read. Next, in step S33,
It is determined whether the read data of the common memory CM is less than a specified value.

【0054】共通メモリCM のデータが規定値未満で
あったときには、プロセッサAにより周期t0 毎に共
通メモリDの内容が書き換えられ、その結果に基づいて
プログラムBM −1により一定周期t2毎に共通メモ
リCM が「0」にクリアされている場合である。
When the data in the common memory CM is less than the specified value, the processor A rewrites the contents of the common memory D at every period t0, and based on the result, the program BM-1 rewrites the contents of the common memory at every fixed period t2. This is the case when CM is cleared to "0".

【0055】この場合には、ステップS34でプロセッ
サAが正常に動作しているものと判断して、処理を終了
する。他方、共通メモリCM のデータが規定値以上で
あったときには、プログラムA−1により共通メモリD
の値が書き換えられていない為に、プログラムBM −
1により共通メモリCM がインクリメントされ規定値
以上となった場合である。
In this case, it is determined in step S34 that processor A is operating normally, and the process is terminated. On the other hand, when the data in the common memory CM is greater than the specified value, the data in the common memory CM is
Since the value of has not been rewritten, the program BM −
This is a case where the common memory CM is incremented by 1 and becomes equal to or greater than the specified value.

【0056】この場合には、ステップS35でプロセッ
サAに異常が発生したものと判断し、さらに次のステッ
プS36で共通メモリCM に規定値を設定してプロセ
ッサAに異常が発生したことを記憶する。
In this case, it is determined in step S35 that an abnormality has occurred in processor A, and in the next step S36, a specified value is set in the common memory CM to store that an abnormality has occurred in processor A. .

【0057】次に、プロセッサA及びBM で上述した
プログラムが実行されたときの共通レジスタD及びCM
 の値の時間的変化を示した図7〜図9の動作タイムチ
ャートを参照しながら、各プロセッサの動作を説明する
Next, common registers D and CM when the above program is executed by processors A and BM
The operation of each processor will be described with reference to the operation time charts of FIGS. 7 to 9, which show temporal changes in the value of .

【0058】先ず、プロセッサA及びBM が正常なと
きのプロセッサの動作を、図7の動作タイムチャートを
参照して説明する。ある時刻にプロセッサAがプログラ
ムA−1を実行して共通メモリDのデータ値を「1」か
ら「0」に書き換えた後に、プロセッサBM がプログ
ラムBM −1を実行したとする。この場合、共通メモ
リDから今回読み出した値と前回読み出した値とは一致
しないので、プログラムBM −1により共通メモリC
M が「0」にクリアされる。
First, the operations of the processors A and BM when they are normal will be explained with reference to the operation time chart of FIG. Assume that processor A executes program A-1 at a certain time and rewrites the data value of common memory D from "1" to "0", and then processor BM executes program BM-1. In this case, the value read from the common memory D this time and the value read last time do not match, so the program BM-1
M is cleared to "0".

【0059】次にプログラムA−1が実行されるまでの
t0 期間、共通メモリDの値は「0」のまま変化しな
いので、その間プロセッサBM によりプログラムBM
 −1が実行される毎に共通メモリCM の値が順次増
加していく。
During the period t0 until the next program A-1 is executed, the value of the common memory D remains "0" and does not change, so the processor BM executes the program BM.
-1 is executed, the value of the common memory CM increases sequentially.

【0060】そして、周期t0 後に再びプログラムA
−1が実行されて共通メモリDのデータ値が「0」から
「1」に書き換えられると、プログラムBM −1によ
り共通メモリDの今回の読み出し値と前回の読み出し値
との不一致が検出され、再び共通メモリCM が「0」
にクリアされる。
[0060] Then, after the period t0, the program A is started again.
-1 is executed and the data value of the common memory D is rewritten from "0" to "1", the program BM-1 detects a mismatch between the current read value and the previous read value of the common memory D, Common memory CM is “0” again
cleared.

【0061】すなわち、プロセッサAが正常に動作して
いるときには、共通メモリDの値が「1」から「0」へ
、あるいは「0」から「1」へ交互に書き換えられ、プ
ロセッサB側のプログラムBM −1で共通レジスタD
の前回の値と今回の値の不一致が検出され、共通メモリ
Cがクリアされる。この結果、共通メモリCM の値が
一定値以下に抑えられるので、プログラムBM −2に
よりプロセッサAが正常に動作していると判定される。
That is, when processor A is operating normally, the value of common memory D is alternately rewritten from "1" to "0" or from "0" to "1", and the program on processor B side is rewritten. Common register D at BM-1
A mismatch between the previous value and the current value is detected, and the common memory C is cleared. As a result, the value of the common memory CM is suppressed to a certain value or less, so that it is determined by the program BM-2 that the processor A is operating normally.

【0062】また、プロセッサBが正常に動作している
ときには、プログラムBM −1により周期t2 毎に
共通メモリCM の値が「1」づつインクリメントされ
るので、この共通メモリCM の値の変化がプロセッサ
A側のプログラムA−1で検出され、プロセッサBが正
常に動作していると判定される。
Furthermore, when processor B is operating normally, the value of the common memory CM is incremented by "1" every cycle t2 by the program BM-1, so changes in the value of the common memory CM are reflected in the processor. This is detected by program A-1 on the A side, and it is determined that processor B is operating normally.

【0063】次に、プロセッサBM に異常が発生した
場合の動作を、図8の動作タイムチャートを参照して説
明する。図8に示すようにプロセッサBM に異常が発
生すると、プロセッサBM 側のプログラムBM −1
が実行されなくなり、共通メモリCM の値がクリア又
はインクリメントされなくなる。その為、共通メモリC
M のデータ値は増加せず一定値となる。
Next, the operation when an abnormality occurs in the processor BM will be explained with reference to the operation time chart of FIG. As shown in FIG. 8, when an abnormality occurs in the processor BM, the program BM-1 on the processor BM side
will no longer be executed and the value in common memory CM will no longer be cleared or incremented. Therefore, common memory C
The data value of M does not increase and remains constant.

【0064】すると、プロセッサAで周期t1 毎に実
行されるプログラムA−2で読み出される共通メモリC
M の今回の読み出し値と前回の読み出し値とが一致す
る。 これによりプロセッサAは、プロセッサBM に異常が
発生したことを検出できる。
[0064] Then, the common memory C read out by the program A-2 executed by processor A every period t1
The current read value of M and the previous read value match. This allows processor A to detect that an abnormality has occurred in processor BM.

【0065】次に、プロセッサAに異常が発生した場合
の動作を、図9の動作タイムチャートを参照しながら説
明する。図9に示すようにプロセッサAに異常が発生す
ると、プロセッサA側のプログラムA−1が実行されな
くなり、共通メモリDの値が書き換えられなくなる。共
通メモリDの値が変化しなくなると、プロセッサB側の
プログラムBM −1で共通メモリCM の値が「0」
にクリアされず、その値が次第に増大する。
Next, the operation when an abnormality occurs in processor A will be explained with reference to the operation time chart of FIG. As shown in FIG. 9, when an abnormality occurs in the processor A, the program A-1 on the processor A side is no longer executed, and the values in the common memory D are no longer rewritten. When the value of the common memory D stops changing, the value of the common memory CM becomes "0" in the program BM-1 on the processor B side.
is not cleared, and its value gradually increases.

【0066】この結果、プロセッサBM で周期t3 
毎に実行されるプログラムBM −2により共通メモリ
CM の値が規定値以上となったことが検出される。こ
れによりプロセッサBM は、プロセッサAに異常が発
生したことを検出できる。
As a result, the period t3 in the processor BM
The program BM-2, which is executed every time, detects that the value in the common memory CM has exceeded the specified value. This allows processor BM to detect that an abnormality has occurred in processor A.

【0067】ここで、従来の相互監視方法でプロセッサ
異常と誤って判定してしまった原因について検討して見
る。従来の相互監視方法では、プロセッサBのプログラ
ムB−1が共通メモリCのデータを読み出した直後に、
プロセッサAのプログラムA−1が共通メモリCの値を
「0」にクリアした場合に問題が発生していた。
[0067] Here, we will examine the cause of erroneously determining that a processor is abnormal in the conventional mutual monitoring method. In the conventional mutual monitoring method, immediately after program B-1 of processor B reads data from common memory C,
A problem occurred when program A-1 of processor A cleared the value of common memory C to "0".

【0068】すなわち、従来の相互監視方法では、プロ
セッサA側のプログラムA−で共通メモリCをクリアし
、プロセッサB側のプログラムB−1で共通メモリCの
データをインクリメントしていたので、両者の起動タイ
ミングによっては共通メモリCの値が増大してしまう場
合があった。
That is, in the conventional mutual monitoring method, program A- on the processor A side clears the common memory C, and program B-1 on the processor B side increments the data in the common memory C. Depending on the startup timing, the value of the common memory C may increase.

【0069】これに対して本実施例の相互監視方法では
、プロセッサAが共通メモリDのメッセージ(この場合
、「0」又は「1」)を書き換えているか否かに基づい
て、プロセッサB側のプログラムBM −1が共通メモ
リCの内容をクリア又はインクリメント(又はディクリ
メント)するようにしている。
On the other hand, in the mutual monitoring method of this embodiment, based on whether processor A has rewritten the message (in this case, "0" or "1") in common memory D, processor B's Program BM-1 clears or increments (or decrements) the contents of common memory C.

【0070】従って、プログラムの起動タイミングによ
って共通メモリCの値が増大することが原理的に起こり
得ず、判定誤りを完全になくすことができる。なお、こ
の実施例では、プロセッサA自身が共通メモリDの値を
、例えば「0」から「1」(あるいは「1」から「0」
)に交互に書き換えるようにしているので、共通メモリ
のメッセージの書き換えをプロセッサB側のプログラム
から独立して行うことができる。
Therefore, in principle, it is impossible for the value of the common memory C to increase depending on the start timing of the program, and it is possible to completely eliminate judgment errors. In this embodiment, the processor A itself changes the value of the common memory D from "0" to "1" (or from "1" to "0").
), the messages in the common memory can be rewritten independently from the program on the processor B side.

【0071】次に、本発明の第2実施例を説明する。こ
の実施例は、基本的には図2に示した第1実施例のシス
テム構成と同じ構成を有し、各プロセッサA、BM で
実行される各プログラムも基本的な部分は第1実施例と
同じである。
Next, a second embodiment of the present invention will be described. This embodiment basically has the same system configuration as the first embodiment shown in FIG. It's the same.

【0072】以下、第2実施例の特徴となる部分につい
て説明する。この実施例では、プロセッサA側のプログ
ラムA−1が、周期t0 毎に共通メモリDに数値デー
タYを書き込んでいる。
The features of the second embodiment will be explained below. In this embodiment, the program A-1 on the processor A side writes numerical data Y to the common memory D every cycle t0.

【0073】そして、その共通メモリDの内容が数値デ
ータYであれば、プロセッサBM 側のプログラムBM
 −1が、周期t3 毎に共通メモリDと共通メモリC
M とを「0」にクリアし、共通メモリDの内容が数値
データYでなければ、共通メモリCM の値を「1」づ
つインクリメント(又はディクリメント)している。
Then, if the content of the common memory D is numerical data Y, the program BM on the processor BM side
-1 is common memory D and common memory C every period t3.
M is cleared to "0", and if the content of the common memory D is not numerical data Y, the value of the common memory CM is incremented (or decremented) by "1".

【0074】なお、プログラムA−2とプログラムBM
 ー2は第2実施例と同じである。上述したプログラム
により、例えばプロセッサAに異常が発生して共通メモ
リDに数値データYが書き込まれなくなると、プロセッ
サB側のプログラムBM −1により共通メモリCM 
の値が増大し、規定値に達した時点でプロセッサAの異
常と判定される。
[0074] Furthermore, program A-2 and program BM
-2 is the same as the second embodiment. According to the program described above, if, for example, an abnormality occurs in processor A and numerical data Y is no longer written to common memory D, program BM-1 on processor B side causes common memory CM to be written.
When the value of increases and reaches the specified value, it is determined that processor A is abnormal.

【0075】次に、本発明の第3実施例を説明する。図
10は、第3実施例のプロセッサシステムのシステム構
成図である。この実施例は、前述したプロセッサAがN
個、プロセッサBが1個存在する場合の例である。
Next, a third embodiment of the present invention will be described. FIG. 10 is a system configuration diagram of a processor system according to the third embodiment. In this embodiment, the processor A mentioned above is N
This is an example where there is one processor B.

【0076】図10において、プロセッサBが搭載され
たプロセッサカードBと、N個のプロセッサAM (M
=1、2、・・・N)がそれぞれ搭載されたN枚のプロ
セッサカードAと、共通メモリカードXとは共通バスE
に接続されている。
In FIG. 10, a processor card B equipped with a processor B and N processors AM (M
= 1, 2, ...N) and the common memory card X are connected to a common bus E.
It is connected to the.

【0077】共通メモリカードX内には、1つの共通メ
モリCとプロセッサAM からのメッセージ(例えば、
数値「1」又は「0」)が書き込まれるN個の共通メモ
リDM とが設けられている。
The common memory card X contains one common memory C and messages from the processor AM (for example,
N common memories DM are provided in which numerical values ``1'' or ``0'' are written.

【0078】また、プロセッサカードB内には、プロセ
ッサBがアクセス可能なN−1個のメモリCM (この
実施例では、プロセッサカードB内のプロセッサBがア
クセスするN−1個のメモリをメモリCM と呼ぶ)が
設けられている。
In addition, in the processor card B, there are N-1 memories CM that can be accessed by the processor B (in this embodiment, the N-1 memories that can be accessed by the processor B in the processor card B are the memory CM). ) is provided.

【0079】プロセッサAM 側で実行されるプログラ
ムAM −1は、周期t0 毎に起動され、共通メモリ
DM にメッセージとして「0」と「1」とを交互に書
き込む処理である。
The program AM-1 executed on the processor AM side is started every cycle t0, and is a process for alternately writing "0" and "1" as messages in the common memory DM.

【0080】また、プログラムAM −2は、周期t1
 毎に起動され、共通メモリCのデータを読み出し、今
回読み出したデータと前回読み出したデータと比較し、
一致すればプロセッサBは異常、不一致であればプロセ
ッサBは正常と判定する処理である。
Furthermore, the program AM-2 has a period t1
It is started every time, reads the data of common memory C, compares the data read this time with the data read last time,
If they match, processor B is determined to be abnormal; if they do not match, processor B is determined to be normal.

【0081】プロセッサB側で実行されるプログラムB
−1は、周期t2 毎に起動され、共通メモリDM の
内容を読み出し、今回読み出した値と前回読み出した値
とを比較し、一致すれば(プロセッサAM からのメッ
セージが存在しない場合)、メモリCM (共通メモリ
Cを含む、以下同じ)のデータをインクリメント(又は
ディクリメント)し、不一致であれば(プロセッサAM
 からのメッセージが存在する場合)、メモリCを「0
」にクリアする処理である。
Program B executed on processor B side
-1 is activated every cycle t2, reads the contents of the common memory DM, compares the value read this time with the value read last time, and if they match (if there is no message from the processor AM), the memory CM Increment (or decrement) the data in (including common memory C, the same applies hereinafter), and if there is a mismatch (processor AM
), memory C is set to ``0''
”.

【0082】また、プログラムB−2は、周期t3 毎
に起動され、メモリCM のデータ値と規定値とを比較
し、データ値が規定値より小さければ、プロセッサAM
 は正常と判定し、データ値が規定値以上であれば、プ
ロセッサAM は異常と判定する処理である。
Furthermore, the program B-2 is activated every cycle t3, compares the data value of the memory CM with a specified value, and if the data value is smaller than the specified value, the processor AM
is determined to be normal, and if the data value is greater than or equal to a specified value, processor AM is determined to be abnormal.

【0083】これらのプログラムにより、上述した第1
及び第2実施例と同様にして、プロセッサAM 及びプ
ロセッサBが、お互いのプロセッサの異常を検出するこ
とができる。
[0083] With these programs, the above-mentioned first
Similarly to the second embodiment, processor AM and processor B can detect abnormalities in each other's processors.

【0084】この実施例では、プロセッサBが1個であ
るので、プロセッサBの異常を検出する為にN個のプロ
セッサAM から読み出す必要のある共通メモリCは1
個で充分である。そこで、共通メモリCを1個とし、N
−1個のプロセッサAM の異常を検出する為に必要な
N−1個のメモリC(残りの1個のプロセッサAM に
付いては共通メモリCを使用する)を、プロセッサBか
らだけアクセスできるプロセッサカードB内に設けてい
る。
In this embodiment, since there is one processor B, the common memory C that needs to be read from N processors AM in order to detect an abnormality in processor B is one.
It is enough. Therefore, the common memory C is set to one, and N
- N-1 memories C necessary for detecting an abnormality in one processor AM (common memory C is used for the remaining one processor AM) can be accessed only by processor B. It is provided in card B.

【0085】これにより、N個のプロセッサAの異常を
検出する為のメモリ(第1実施例の共通メモリCM に
相当する)を、必ずしも共通メモリとする必要がなくな
り、プロセッサカードB内のメモリ領域を使用すること
ができるので、メモリ構成がより自由になる。
[0085] As a result, the memory for detecting abnormalities in N processors A (corresponding to the common memory CM in the first embodiment) does not necessarily need to be a common memory, and the memory area in the processor card B can be used as a common memory. can be used, making memory configuration more flexible.

【0086】次に、本発明の第4実施例を説明する。こ
の実施例のシステム構成は、図10に示した第3実施例
のシステム構成と同じであり、また各プロセッサAM 
、Bで実行される各プログラムも基本となる部分は、第
3実施例のプログラムと同じである。以下、第4実施例
の特徴となる部分について説明する。
Next, a fourth embodiment of the present invention will be described. The system configuration of this embodiment is the same as that of the third embodiment shown in FIG.
The basic parts of each program executed by ,B are the same as the program of the third embodiment. The features of the fourth embodiment will be described below.

【0087】この実施例は、プロセッサAM が一定周
期毎に共通メモリDM にメッセージとして数値データ
Yを書き込んでいる。そして、共通メモリDM に数値
データYが書き込まれているときには、プロセッサBが
一定周期毎にその共通メモリDM とメモリCM (共
通メモリCを含む、以下同じ)とを「0」にクリアし、
数値データYが書き込まれていないときには、メモリC
M をインクリメントするようにしている。
In this embodiment, the processor AM writes numerical data Y as a message to the common memory DM at regular intervals. Then, when the numerical data Y is written in the common memory DM, the processor B clears the common memory DM and the memory CM (including the common memory C, the same applies hereinafter) to "0" at regular intervals,
When numerical data Y is not written, memory C
I am trying to increment M.

【0088】以下、プロセッサAM 及びBで実行され
るプログラムについて説明する。プロセッサAM で実
行されるプログラムAM −1は、周期t0 毎に起動
され、共通メモリDM に数値データYを書き込む。
The programs executed by processors AM and B will be explained below. The program AM-1 executed by the processor AM is activated every cycle t0 and writes numerical data Y into the common memory DM.

【0089】プロセッサBで実行されるプログラムB−
1は、周期t2 毎に起動され、共通メモリDM の内
容を読み出し、読み出したデータが数値データYならば
、メモリCM と共通メモリDM を「0」にクリアし
、読み出したデータが数値データYでなければ、メモリ
CM を「1」インクリメントする処理である。
Program B- executed on processor B
1 is activated every cycle t2, reads the contents of the common memory DM, and if the read data is numerical data Y, clears the memory CM and the common memory DM to "0", and confirms that the read data is numerical data Y. If not, the process increments the memory CM by "1".

【0090】また、プログラムAM −2とプログラム
B−2は、第3実施例のプログラムと同一である。これ
らのプログラムにより、プロセッサAM が正常に動作
していて共通メモリDM に数値データYが書き込まれ
ている場合には、一定周期毎にメモリCM のデータが
「0」にクリアされ、メモリCM のデータが常に規定
値未満となる。一方、プロセッサAM に異常が発生す
ると、メモリCM のデータが規定値以上となるので、
N個のプロセッサAM が正常か否かを誤りなく判定す
ることができる。
Furthermore, program AM-2 and program B-2 are the same as the programs of the third embodiment. With these programs, when the processor AM is operating normally and the numerical data Y is written in the common memory DM, the data in the memory CM is cleared to "0" at regular intervals, and the data in the memory CM is cleared to "0". is always less than the specified value. On the other hand, if an abnormality occurs in the processor AM, the data in the memory CM will exceed the specified value, so
It is possible to determine without error whether the N processors AM are normal or not.

【0091】また、メモリCM の値が変化しているか
否かにより、プロセッサBが正常に動作しているか否か
を判定することができる。以上述べたように上記実施例
では、複数のプロセッサが非同期で動作するプロセッサ
システムにおいて、共通メモリ領域を少なくとも2種類
用意し(例えば、共通メモリCと共通メモリD)、一方
のプロセッサAが、一定周期毎に共通メモリDにメッセ
ージとして、例えば「0」又は「1」を交互に書き込ん
でいる。そして、プロセッサAにより共通メモリDのメ
ッセージが書き換えられているときには、他のプロセッ
サBが別の共通メモリCの値を「0」にクリアし、メッ
セージが書き換えられていないときには、共通メモリC
のデータをインクリメント(又はディクリメント)する
ようにしている。
Furthermore, it is possible to determine whether processor B is operating normally or not, depending on whether the value in memory CM has changed. As described above, in the above embodiment, in a processor system in which a plurality of processors operate asynchronously, at least two types of common memory areas are prepared (for example, common memory C and common memory D), and one processor A has a For example, "0" or "1" is alternately written as a message in the common memory D every cycle. Then, when the message in common memory D is being rewritten by processor A, another processor B clears the value in another common memory C to "0", and when the message has not been rewritten, common memory C
The data is incremented (or decremented).

【0092】これにより、プロセッサAが正常に動作し
ている場合には、共通メモリCの値が増大せず、プロセ
ッサAに異常が発生した場合にだけ共通メモリCの値が
規定値以上となる。よって、この共通メモリCの値と規
定値とを比較することで、プロセッサAの異常を正確に
検出することができる。
[0092] As a result, when processor A is operating normally, the value of common memory C does not increase, and only when an abnormality occurs in processor A, the value of common memory C exceeds the specified value. . Therefore, by comparing the value in the common memory C with the specified value, it is possible to accurately detect an abnormality in the processor A.

【0093】また、共通メモリCの値が変化しているか
否かによりプロセッサBが正常に動作しているか否かを
検出している。しかも上述した相互監視方法では、一方
のプロセッサBが、他方のプロセッサAによって共通メ
モリDに書き込まれるメッセージに基づいて、共通メモ
リCを「0」にクリア、あるいはインクリメント(又は
ディクリメント)するようにしている。
Furthermore, whether or not processor B is operating normally is detected based on whether or not the value in common memory C has changed. Moreover, in the mutual monitoring method described above, one processor B clears the common memory C to "0" or increments (or decrements) the common memory C based on a message written to the common memory D by the other processor A. ing.

【0094】従って、従来の相互監視方法のようにプロ
グラムの起動タイミングによって、共通メモリCがクリ
アされないでその値が増大してしまうという問題が発生
ぜず、プロセッサの異常の検出の誤りをなくすことがで
きる。
Therefore, unlike the conventional mutual monitoring method, the problem of the common memory C not being cleared and its value increasing depending on the program startup timing does not occur, and errors in detecting processor abnormalities can be eliminated. Can be done.

【0095】尚、上記実施例では、1個のプロセッサA
(又はB)と複数のプロセッサBM (又はAM )か
らなるプロセッサシステムについて説明したが、プロセ
ッサA、Bがそれぞれ1個でもよいし、あるいはプロセ
ッサA、Bがそれぞれ複数あっても良い。
[0095] In the above embodiment, one processor A
(or B) and a plurality of processors BM (or AM), but there may be one each of processors A and B, or there may be a plurality of processors A and B.

【0096】また、共通メモリDに書き込むメッセージ
は、実施例に述べた「0」、「1」、あるいは数値デー
タに限らずどのようなメッセージであっても良く、一方
のプロセッサが何らかの情報を書き込めば良い。
[0096] Furthermore, the message to be written to the common memory D is not limited to "0", "1", or numerical data as described in the embodiment, but may be any message, and it is possible for one processor to write some information. Good.

【0097】[0097]

【発明の効果】本発明によれば、複数のプロセッサから
なるシステムにおいて、個々のプロセッサのプログラム
の起動タイミングにより発生するプロセッサの動作状態
の検出誤りをなくすことができる。
According to the present invention, in a system consisting of a plurality of processors, it is possible to eliminate errors in detecting the operating states of the processors that occur due to the start timing of programs of individual processors.

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

【図1】本発明の原理説明図である。FIG. 1 is a diagram explaining the principle of the present invention.

【図2】本発明の第1実施例のシステム構成図である。FIG. 2 is a system configuration diagram of the first embodiment of the present invention.

【図3】実施例のプロセッサAで実行されるプログラム
A−1のフローチャートである。
FIG. 3 is a flowchart of a program A-1 executed by processor A of the embodiment.

【図4】実施例のプロセッサAで実行されるプログラム
A−2のフローチャートである。
FIG. 4 is a flowchart of a program A-2 executed by processor A of the embodiment.

【図5】実施例のプロセッサBM で実行されるプログ
ラムBM −1のフローチャートである。
FIG. 5 is a flowchart of a program BM-1 executed by the processor BM of the embodiment.

【図6】実施例のプロセッサBM で実行されるプログ
ラムB−2のフローチャートである。
FIG. 6 is a flowchart of a program B-2 executed by the processor BM of the embodiment.

【図7】実施例の相互監視方法でプロセッサA、BM 
が正常なときの動作タイムチャートである。
[Fig. 7] Processors A and BM in the mutual monitoring method of the embodiment.
is an operation time chart when is normal.

【図8】実施例の相互監視方法でプロセッサBM に異
常が発生した場合の動作タイムチャートである。
FIG. 8 is an operation time chart when an abnormality occurs in the processor BM in the mutual monitoring method of the embodiment.

【図9】実施例の相互監視方法でプロセッサAに異常が
発生した場合の動作タイムチャートである。
FIG. 9 is an operation time chart when an abnormality occurs in processor A in the mutual monitoring method of the embodiment.

【図10】第3実施例のシステム構成図である。FIG. 10 is a system configuration diagram of a third embodiment.

【図11】従来の相互監視方法におけるプロセッサAの
処理フローチャートである。
FIG. 11 is a processing flowchart of processor A in a conventional mutual monitoring method.

【図12】従来の相互監視方法におけるプロセッサAの
処理フローチャートである。
FIG. 12 is a processing flowchart of processor A in a conventional mutual monitoring method.

【図13】従来の相互監視方法におけるプロセッサBの
処理フローチャートである。
FIG. 13 is a processing flowchart of processor B in a conventional mutual monitoring method.

【図14】従来の相互監視方法におけるプロセッサBの
処理フローチャートである。
FIG. 14 is a processing flowchart of processor B in a conventional mutual monitoring method.

【図15】t3 =t2 の場合のプロセッサBの処理
フローチャートである。
FIG. 15 is a processing flowchart of processor B when t3 = t2.

【図16】従来の相互監視方法でプロセッサA、Bが正
常なときの動作タイムチャートである。
FIG. 16 is an operation time chart when processors A and B are normal in a conventional mutual monitoring method.

【図17】従来の相互監視方法でプロセッサAに異常が
発生した場合の動作タイムチャートである。
FIG. 17 is an operation time chart when an abnormality occurs in processor A using the conventional mutual monitoring method.

【図18】従来の相互監視方法でプロセッサBに異常が
発生した場合の動作タイムチャートである。
FIG. 18 is an operation time chart when an abnormality occurs in processor B using the conventional mutual monitoring method.

【図19】従来の相互監視方法の問題点の説明図である
FIG. 19 is an explanatory diagram of problems in the conventional mutual monitoring method.

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

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】複数のプロセッサと該複数のプロセッサか
らアクセス可能な共通メモリC、Dとからなるシステム
であって、前記複数のプロセッサの中で互いに動作を監
視しているプロセッサA、Bの一方のプロセッサAが、
周期t0 毎に前記共通メモリDにメッセージを書き込
み、周期t1 毎に前記共通メモリCのデータを読み出
し、今回読み出したデータと前回読み出したデータとを
比較し、データが不一致であればプロセッサBは正常と
判定し、データが一致したならプロセッサBは異常と判
定し、他方のプロセッサBが、周期t2 毎に前記共通
メモリDの内容を読み出し、プロセッサAからのメッセ
ージの有無を判断し、メッセージが存在する場合には前
記共通メモリCをクリアし、メッセージが存在しない場
合には前記共通メモリCのデータをインクリメント又は
ディクリメントし、周期t3 毎に前記共通メモリCの
データと基準値とを比較し、基準値未満であればプロセ
ッサAは正常と判定し、基準値以上であればプロセッサ
Aは異常と判定する、ことを特徴とするプロセッサ間相
互監視方法。
1. A system comprising a plurality of processors and common memories C and D that can be accessed by the plurality of processors, wherein one of the processors A and B monitors each other's operations among the plurality of processors. Processor A of
Write a message to the common memory D every cycle t0, read the data from the common memory C every cycle t1, compare the data read this time with the data read last time, and if the data do not match, processor B is normal. If the data match, processor B is determined to be abnormal, and the other processor B reads the contents of the common memory D every cycle t2, determines whether there is a message from processor A, and determines that the message exists. If the message does not exist, the common memory C is cleared, and if there is no message, the data in the common memory C is incremented or decremented, and the data in the common memory C is compared with a reference value every cycle t3, A mutual monitoring method between processors, characterized in that processor A is determined to be normal if it is less than a reference value, and processor A is determined to be abnormal if it is greater than or equal to the reference value.
【請求項2】少なくとも1個のプロセッサAとN個のプ
ロセッサBM (M=1、2・・・N)と、該プロセッ
サA、BM からアクセス可能な共通メモリDとN個の
共通メモリCM とからなるシステムであって、プロセ
ッサAが、周期t0 毎に前記共通メモリDにメッセー
ジを書き込み、周期t1 毎に前記共通メモリCM の
データを読み出し、今回読み出したデータと前回読み出
したデータとを比較し、データが不一致であれば、該共
通メモリCM に対応するプロセッサBM は正常と判
定し、データが一致したならプロセッサBM は異常と
判定し、プロセッサBM が、周期t2 毎に前記共通
メモリDの内容を読み出し、プロセッサAからのメッセ
ージの有無を判断し、メッセージが存在する場合には前
記共通メモリCM の内容をクリアし、メッセージが存
在しない場合には該共通メモリCM の内容をインクリ
メント又はディクリメントし、周期t3 毎に前記共通
メモリCM のデータと基準値とを比較し、基準値未満
であればプロセッサAは正常と判定し、基準値以上であ
ればプロセッサAは異常と判定する、ことを特徴とする
プロセッサ間相互監視方法。
2. At least one processor A, N processors BM (M=1, 2...N), a common memory D and N common memories CM that are accessible from the processors A and BM. In this system, a processor A writes a message to the common memory D every cycle t0, reads data from the common memory CM every cycle t1, and compares the data read this time with the data read last time. , if the data do not match, the processor BM corresponding to the common memory CM is determined to be normal; if the data match, the processor BM is determined to be abnormal, and the processor BM updates the contents of the common memory D every cycle t2. , and determines the presence or absence of a message from processor A. If a message exists, clears the contents of the common memory CM, and if no message exists, increments or decrements the contents of the common memory CM. , the data in the common memory CM is compared with a reference value every cycle t3, and if it is less than the reference value, the processor A is determined to be normal, and if it is equal to or greater than the reference value, the processor A is determined to be abnormal. A mutual monitoring method between processors.
【請求項3】N個のプロセッサAM (M=1、2・・
・N)と少なくとも1個のプロセッサBと、該プロセッ
サAM 、Bからアクセス可能なN個の共通メモリDM
 と少なくと1個の共通メモリCと、該プロセッサBか
らアクセス可能な複数のメモリCi とからなるシステ
ムであって、プロセッサAM が、周期t0 毎に前記
共通メモリDM にメッセージを書き込み、周期t1 
毎に前記共通メモリCのデータを読み出し、今回読み出
したデータと前回読み出したデータとを比較し、データ
が不一致であればプロセッサBは正常と判定し、データ
が一致したならプロセッサBは異常と判定し、プロセッ
サBが、周期t2 毎に前記共通メモリDM の内容を
読み出し、プロセッサAM からのメッセージの有無を
判断し、メッセージが存在する場合にはプロセッサAM
に対応する前記共通メモリC又はメモリCi の内容を
クリアし、メッセージが存在しない場合には該共通メモ
リC又はメモリCi の内容をインクリメント又はディ
クリメントし、周期t3 毎に前記共通メモリC及びメ
モリCi のデータと基準値とを比較し、基準値未満で
あれば該メモリに対応するプロセッサAM は正常と判
定し、基準値以上であればプロセッサAM は異常と判
定する、ことを特徴とするプロセッサ間相互監視方法。
Claim 3: N processors AM (M=1, 2...
・N) and at least one processor B, and N common memories DM accessible from the processors AM and B.
A system consisting of at least one common memory C and a plurality of memories Ci that can be accessed from the processor B, wherein the processor AM writes a message to the common memory DM every period t0, and the processor AM writes a message to the common memory DM every period t0.
Each time the data is read from the common memory C, the data read this time and the data read last time are compared. If the data do not match, processor B is determined to be normal, and if the data match, processor B is determined to be abnormal. Then, processor B reads the contents of the common memory DM every cycle t2, determines whether there is a message from the processor AM, and if there is a message, the processor B reads the contents of the common memory DM.
The contents of the common memory C or memory Ci corresponding to the message are cleared, and if there is no message, the contents of the common memory C or memory Ci are incremented or decremented, and the contents of the common memory C and memory Ci are cleared every period t3. data of the memory is compared with a reference value, and if the data is less than the reference value, the processor AM corresponding to the memory is determined to be normal, and if it is greater than or equal to the reference value, the processor AM is determined to be abnormal. Mutual monitoring methods.
【請求項4】複数のプロセッサと該複数のプロセッサか
らアクセス可能な共通メモリC、Dとからなるシステム
であって、前記複数のプロセッサの中で互いに動作を監
視しているプロセッサA、Bの一方のプロセッサAが、
周期t0 毎に前記共通メモリDにメッセージを書き込
み、周期t1 毎に前記共通メモリCのデータを読み出
し、今回読み出したデータと前回読み出したデータとを
比較し、データが不一致であればプロセッサBは正常と
判定し、データが一致したならプロセッサBは異常と判
定し、他方のプロセッサBが、周期t2 毎に前記共通
メモリDの内容を読み出し、プロセッサAからのメッセ
ージの有無を判断し、メッセージが存在する場合には前
記共通メモリCをクリアし、メッセージが存在しない場
合には前記共通メモリCのデータをインクリメント又は
ディクリメントし、周期t3 毎に前記共通メモリCの
データと基準値とを比較し、基準値未満であればプロセ
ッサAは正常と判定し、基準値以上であればプロセッサ
Aは異常と判定する、ことを特徴とするプロセッサ間相
互監視装置。
4. A system comprising a plurality of processors and common memories C and D that can be accessed by the plurality of processors, wherein one of the processors A and B monitors each other's operations among the plurality of processors. Processor A of
Write a message to the common memory D every cycle t0, read the data from the common memory C every cycle t1, compare the data read this time with the data read last time, and if the data do not match, processor B is normal. If the data match, processor B is determined to be abnormal, and the other processor B reads the contents of the common memory D every cycle t2, determines whether there is a message from processor A, and determines that the message exists. If the message does not exist, the common memory C is cleared, and if there is no message, the data in the common memory C is incremented or decremented, and the data in the common memory C is compared with a reference value every cycle t3, A mutual monitoring device between processors, characterized in that processor A is determined to be normal if it is less than a reference value, and processor A is determined to be abnormal if it is greater than or equal to the reference value.
JP3036275A 1991-03-01 1991-03-01 Method and apparatus for mutual monitoring between processors Expired - Fee Related JP2870202B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3036275A JP2870202B2 (en) 1991-03-01 1991-03-01 Method and apparatus for mutual monitoring between processors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3036275A JP2870202B2 (en) 1991-03-01 1991-03-01 Method and apparatus for mutual monitoring between processors

Publications (2)

Publication Number Publication Date
JPH04275664A true JPH04275664A (en) 1992-10-01
JP2870202B2 JP2870202B2 (en) 1999-03-17

Family

ID=12465225

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3036275A Expired - Fee Related JP2870202B2 (en) 1991-03-01 1991-03-01 Method and apparatus for mutual monitoring between processors

Country Status (1)

Country Link
JP (1) JP2870202B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009200A (en) * 2007-06-26 2009-01-15 Hitachi Ltd Storage system and control method for same
JP2011248390A (en) * 2010-05-21 2011-12-08 Toshiba Corp Vehicle control device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009200A (en) * 2007-06-26 2009-01-15 Hitachi Ltd Storage system and control method for same
JP2011248390A (en) * 2010-05-21 2011-12-08 Toshiba Corp Vehicle control device

Also Published As

Publication number Publication date
JP2870202B2 (en) 1999-03-17

Similar Documents

Publication Publication Date Title
JP3481737B2 (en) Dump collection device and dump collection method
US4839895A (en) Early failure detection system for multiprocessor system
EP1038224B1 (en) A method relating to processors, and processors adapted to function in accordance with the method
US5530815A (en) Apparatus and method for verifying the order and operation of a data processing device when asynchronous commands are held in a command queue
US6026504A (en) Multiprocessor system and method for error tracking
JPH04275664A (en) Mutual monitoring method and device between processors
JP3192354B2 (en) Computer system retry processor
US5872961A (en) Microcomputer allowing external monitoring of internal resources
JPH04266141A (en) Stack overflow detection system
US6185700B1 (en) Method and device for evaluating a program
JPH1115661A (en) Self-diagnosis method for cpu
JP3196094B2 (en) Memory monitoring device
JP3695078B2 (en) Programmable controller with pulse output instructions
KR0161126B1 (en) Apparatus and method for searching the signal line status on the system bus in the computer
JP2825589B2 (en) Bus control method
JP2510663B2 (en) Error control method
JP2594567B2 (en) Memory access control device
JPS63123140A (en) History information storage device
JPH0778731B2 (en) Information processing equipment
JPS60222944A (en) Memory parity error processing system
JPH02287661A (en) Data access system
JPH086864A (en) Diagnostic system for address bus for memory control
JPS62166449A (en) History storage device for logical unit
JPH03109652A (en) Data processor
JPH03182948A (en) Fault processing method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19981201

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080108

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090108

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100108

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110108

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees