[go: up one dir, main page]

JPH0736720A - Redundant computer equipment - Google Patents

Redundant computer equipment

Info

Publication number
JPH0736720A
JPH0736720A JP5178928A JP17892893A JPH0736720A JP H0736720 A JPH0736720 A JP H0736720A JP 5178928 A JP5178928 A JP 5178928A JP 17892893 A JP17892893 A JP 17892893A JP H0736720 A JPH0736720 A JP H0736720A
Authority
JP
Japan
Prior art keywords
processor
cpu
execution
program
devices
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
JP5178928A
Other languages
Japanese (ja)
Inventor
Riyuu Hazama
流 狭間
Jun Nishida
純 西田
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP5178928A priority Critical patent/JPH0736720A/en
Publication of JPH0736720A publication Critical patent/JPH0736720A/en
Pending legal-status Critical Current

Links

Landscapes

  • Hardware Redundancy (AREA)

Abstract

(57)【要約】 【目的】大がかりなシステムを構築しなくとも、制御側
がダウンしたような場合における待機側プロセツサ装置
への制御動作の切替えを、継続性を維持しながら即座に
行うことができるようにする。 【構成】各プロセッサ装置に、OS実行メモリ手段と、
プログラム実行メモリ手段と、CPU装置と、プログラ
ムの起動によりスタートしそのプログラムの実行ステッ
プ数をカウントすると共にCPU装置への割り込みによ
りそれまで実行したステップ数を記憶するステップカウ
ント手段と、割り込みにより中断したプログラムの再起
動時に、自身のステップカウント手段が記憶する実行ス
テップ数と相手プロセッサ装置内のステップカウント手
段が記憶する実行ステップ数とを比較し、その差が所定
の値より大きい場合一方のプロセッサ装置側のCPU装
置を先行させて動作させ、双方のプロセッサ装置のCP
U装置が同時にプログラムの実行を開始するように制御
する同期ずれ調整手段を備えて構成される。
(57) [Abstract] [Purpose] Even if a large-scale system is not constructed, the control operation can be switched to the standby side processor device immediately when the control side goes down while maintaining continuity. To do so. [Structure] Each processor device includes an OS execution memory means,
Program execution memory means, CPU device, step count means for starting the program by starting, counting the number of execution steps of the program and storing the number of steps executed up to that time by interruption to the CPU device, and interrupted by interruption When the program is restarted, the number of execution steps stored in its own step counting means is compared with the number of execution steps stored in the step counting means in the partner processor device, and if the difference is larger than a predetermined value, one processor device The CPU device on one side is operated first, and the CP of both processor devices is operated.
The U device is provided with a synchronization deviation adjusting means for controlling the U device to start executing the programs at the same time.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、プロセスの制御のため
に適用される二重化コンピュータ装置に関し、更に詳し
くは、単体で実行可能な2つのプロセッサ装置をシステ
ムバスで結合し、2つのプロセッサ装置のいずれからも
システムバスに接続された入出力装置に対してアクセス
することができるように構成した二重化コンピュータ装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a dual computer system applied for controlling a process, and more specifically, it connects two processor units that can be executed independently by a system bus. The present invention relates to a duplicated computer device configured so that any of them can access an input / output device connected to a system bus.

【0002】[0002]

【従来の技術】プロセス制御を行うプロセッサ装置にお
いては、信頼性を高めるためにプロセス制御演算を行う
プロセッサ装置を二重化構成とし、一方のプロセッサ装
置の故障に備えて他方のプロセッサ装置からも入出力装
置に対してアクセスが行えるように構成した二重化コン
ピュータ装置が広く実用化されている。
2. Description of the Related Art In a processor device for controlling a process, a processor device for performing a process control operation has a dual structure in order to improve reliability, and in preparation for a failure of one processor device, an input / output device from the other processor device is also provided. A dual computer device configured to allow access to is widely used.

【0003】この様な二重化コンピュータ装置を構成す
る場合、2つのプロセッサ装置をどの様に結合して動作
させるかが課題となるが、従来考えられている結合方式
として、以下のものがある。 (a)2つのプロセッサ装置を、互いに同期をとりなが
ら同一のソフトウェアにより動作させると共に、これら
のプロセッサ装置につながる入出力装置(I/O)も二
重化構成とし、双方で常に同期をとるように構成する。 (b)2つのプロセッサ装置で、同一のソフトウェアを
制御側と待機側とで分けて動作させる。2つのプロセッ
サ装置内の各CPUは、独立して動作する。入出力装置
は、プロセッサ装置の外部に信号を出力する場合は制御
側が動作し、それ以外の内部で動作が完結する処理は、
各プロセッサ装置で独立してその処理を実行する。制御
側にあるプロセッサ装置による処理は、システムの任意
のタイミングで待機側となっているプロセッサ装置へ等
値化する。待機側のプロセッサ装置は、常にこの等値化
による処理を実行しながら、制御側のプロセッサ装置の
ダウンに備える。 (c)2つのプロセッサ装置で、同一のソフトウェアを
制御側と待機側とで分けて動作させる。2つのプロセッ
サ装置内の各CPU装置は、独立して動作する。入出力
装置は、制御側でのみ動作し、もう片方は実行可能な状
態で待機しておく。制御側にあるプロセッサ装置による
処理で操作したデータに関しては、制御側にあるプロセ
ッサ装置のアプリケーションソフトウェアが、任意のタ
イミングで待機側となっているプロセッサ装置へ等値化
する。待機側のプロセッサ装置は、常にこの等値化によ
る処理を実行しながら、制御側のプロセッサ装置のダウ
ンに備える。制御側のプロセッサ装置がダウンした場合
は、等値化した内容に従って処理を継続する。 (d)2つのプロセッサ装置で、同一もしくは独自のソ
フトウェアを独立して動作させる。2つのプロセッサ装
置は、お互いの装置のアプリケーションソフトウェア間
で、任意のタイミングで同期通信を行い、制御側のプロ
セッサ装置がダウンした場合は、それまで待機側にあっ
たプロセッサ装置が代行する。
When constructing such a duplicated computer device, how to connect and operate two processor devices becomes an issue. The following connection systems have been considered in the past. (A) The two processor devices are operated by the same software while synchronizing with each other, and the input / output devices (I / O) connected to these processor devices are also configured to be duplicated so that both are always synchronized. To do. (B) Two processor devices operate the same software separately on the control side and the standby side. Each CPU in the two processor units operates independently. The input / output device is operated by the control side when outputting a signal to the outside of the processor device, and the process of completing the operation inside the other parts is
The processing is executed independently by each processor device. The processing by the processor device on the control side is equalized to the processor device on the standby side at an arbitrary timing of the system. The processor device on the standby side prepares for the down of the processor device on the control side while always executing the processing by the equalization. (C) Two processor devices operate the same software separately on the control side and the standby side. Each CPU device in the two processor devices operates independently. The I / O device operates only on the control side, and the other one stands by in an executable state. Regarding the data operated by the processing by the processor device on the control side, the application software of the processor device on the control side equalizes the processor device on the standby side at an arbitrary timing. The processor device on the standby side prepares for the down of the processor device on the control side while always executing the processing by the equalization. When the processor device on the control side goes down, the process is continued according to the contents of the equalization. (D) Two processor devices operate the same or unique software independently. The two processor devices perform synchronous communication between the application software of the respective devices at arbitrary timings, and when the processor device on the control side goes down, the processor device on the stand-by side substitutes for it.

【0004】[0004]

【発明が解決しようとする課題】2つのプロセッサ装置
を、前述したように結合する従来方式において、(a)
の方式は、プロセッサ装置内の各CPU間でインストラ
クションの度に同期をとる必要があり、CPUの処理ス
ピードが著しく低下するという問題がある。(b)の方
式は、実行状態にあるプロセッサ装置から待機側となっ
ていたプロセッサ装置に実行権が切り替えられた際、そ
れまで待機側となっていたプロセッサ装置は、すでに実
行済みの処理を再び実行することになる。この時、待機
実行のための時間を必要とするため、リアルタイム性を
要求されるようなプロセス制御システムとしては不向き
である。
In the conventional system in which the two processor units are combined as described above, (a)
The method of (2) has a problem in that it is necessary to synchronize each CPU in the processor device every time an instruction is performed, and the processing speed of the CPU is significantly reduced. In the method of (b), when the execution right is switched from the processor device in the execution state to the processor device on the standby side, the processor device on the standby side until then re-executes the already executed processing. Will be executed. At this time, it takes time for standby execution, which is not suitable for a process control system that requires real-time processing.

【0005】(c)の方式は、等値化するデータの設計
が複雑となり、特に高級言語を使用して作成されたアプ
リケーションソフトウェアでは、データエリアをどのよ
うにとるかはコンパイラが決定することであるために、
対応が困難になるという問題がある。(d)の方式は、
お互いの装置のアプリケーションソフトウェアによって
のみ二重化の切替えを実現することになるために、汎用
的な二重化構成のシステムとは言えない。
The method (c) complicates the design of data to be equalized, and in particular, in application software created using a high-level language, the compiler determines how to take the data area. To be
There is a problem that it becomes difficult to handle. The method of (d) is
Since the switching of the duplex is realized only by the application software of the mutual devices, it cannot be said that the system has a general duplex configuration.

【0006】本発明は、これらの点に鑑みてなされたも
ので、二重化構成としたプロセッサ装置において、オペ
レーションシステム(OS)の管理下で動作するアプリ
ケーションソフトウェアに、二重化の意識をさせること
なく、従って、二重化切替え制御のための構成が簡単
で、信頼性の高い二重化プロセッサ装置を提供すること
を目的とする。
The present invention has been made in view of these points, and in a processor device having a duplex configuration, application software operating under the control of an operating system (OS) does not have to be aware of the duplication, and accordingly, An object of the present invention is to provide a highly reliable dual processor device with a simple configuration for duplex switching control.

【0007】また、本発明の他の目的は、前述した目的
を達成するために本願発明者らが先に、特願平5−26
581号にて提案した二重化コンピュータ装置に改良を
加えたものであって、OSの機能をあまり使用しないで
動作するようなアプリケーションソフトウェアの場合で
も、2つのプロセッサ装置で同期実行が行えるようにし
た二重化コンピュータ装置を提供することを目的とす
る。
Another object of the present invention is to obtain the above-mentioned object by the inventors of the present invention.
No. 581 is an improvement of the duplex computer system, and is a duplex system in which two processor units can perform synchronous execution even in the case of application software that operates without using much of the OS function. An object is to provide a computer device.

【0008】[0008]

【課題を解決するための手段】この様な目的を達成する
本発明は、単体で実行可能な2つのプロセッサ装置をシ
ステムバスで結合した二重化コンピュータ装置であっ
て、各プロセッサ装置に、オペレーティングシステムを
格納したOS実行メモリ手段と、オペレーティングシス
テムの機能を使用(システムコール)しながら動作する
アプリケーションプログラムを格納したプログラム実行
メモリ手段と、前記各メモリに格納されているプログラ
ムに従って動作するCPU装置と、このCPU装置が実
行するプログラムの起動によりスタートし当該プログラ
ムの実行ステップ数をカウントすると共にCPU装置へ
の割り込みによりそれまで実行したステップ数を記憶す
るステップカウント手段と、前記割り込みにより中断し
たプログラムの再起動時に、自身のステップカウント手
段が記憶する実行ステップ数と相手プロセッサ装置内の
ステップカウント手段が記憶する実行ステップ数とを比
較し、その差が所定の値より大きい場合実行ステップ数
が少ないプロセッサ装置側のCPU装置に対して前記差
のステップ数だけ先に動作を開始させ、双方のプロセッ
サ装置のCPU装置が同期して動作するように制御する
同期ずれ調整手段と、自身のCPU装置が受けた割り込
みを相手側プロセッサ装置内のCPU装置に伝えるプロ
セス装置間割り込み発生手段とを備えたことを特徴とす
る二重化コンピュータ装置である。
SUMMARY OF THE INVENTION The present invention which achieves such an object is a dual computer device in which two processor devices that can be executed independently are connected by a system bus, and an operating system is provided in each processor device. A stored OS execution memory means, a program execution memory means that stores an application program that operates while using the functions of the operating system (system call), a CPU device that operates according to the programs stored in the memories, and A step count means for starting the program executed by the CPU device, counting the number of execution steps of the program, and storing the number of steps executed up to now by an interrupt to the CPU device, and a restart of the program interrupted by the interrupt At times, the number of execution steps stored in its own step counting means is compared with the number of execution steps stored in the step counting means in the partner processor device, and if the difference is larger than a predetermined value, the processor device side with less execution steps number Synchronization start adjusting means for starting the CPU device of the above-mentioned CPU device by the number of steps of the above difference so that the CPU devices of both processor devices operate in synchronization with each other, and an interrupt received by its own CPU device. And an inter-process-device interrupt generating means for transmitting the information to the CPU device in the partner processor device.

【0009】[0009]

【作用】各プロセッサ装置において、通常の動作はプロ
グラム実行メモリ手段に格納されているアプリケーショ
ンプログラムが、OSの機能を使用しながら動作してい
る。ステップカウント手段は、CPU装置が実行するア
プリケーションプログラムの実行ステップをカウントし
ていて、CPU装置への割り込みにより処理が中断され
た時に、それまで動作した実行ステップ数を記憶する。
In each processor unit, the normal operation is that the application program stored in the program execution memory means operates while using the function of the OS. The step counting means counts the execution steps of the application program executed by the CPU device, and when the processing is interrupted by an interrupt to the CPU device, stores the number of execution steps that has been operated until then.

【0010】同期ずれ調整手段は、割り込みにより実行
プログラムの処理が中断した後、再びそれが起動された
時に、各ステップカウント装置が記憶している実行ステ
ップ数を読みだして比較し、双方のCPU装置で実行さ
れているアプリケーションプログラムの実行ステップ数
に許容される以上の差がある場合、遅れている片方のC
PU装置を先に起動させて双方のCPU装置が同期動作
するように制御する。
The synchronization deviation adjusting means reads out the number of execution steps stored in each step counting device and compares them when the processing of the execution program is restarted after the processing of the execution program is interrupted by the interruption, and both CPUs If there is a difference more than the allowable number of execution steps of the application program executed on the device, one of the delayed C
The PU device is activated first, and both CPU devices are controlled to operate synchronously.

【0011】これにより、2つのプロセッサ装置は、常
に同期がとられて同様の処理を実行することとなり、一
方のプロセッサ装置がダウンした場合に他方のプロセッ
サ装置がその動作を継続して引き継ぐことができる。
As a result, the two processor units are always synchronized and execute the same processing, and when one processor unit goes down, the other processor unit can take over the operation continuously. it can.

【0012】[0012]

【実施例】以下図面を用いて本発明の一実施例を詳細に
説明する。図1は、本発明に係わる装置の基本的な機能
を示す機能ブロック図である。図において、MD1,M
D2はそれぞれ単体で実行可能な2つのプロセッサ装置
で、互いにシステムバスSBにより結合しており、実際
に制御に関与しているI/O装置をどちらがアクセスす
るかにより制御側と待機側とに分けられる構成となって
いて、ここでは、例えばプロセッサ装置MD1側が実作
業(制御)につき、他方のプロセッサ装置MD2側が待
機する側となっていることを想定する。
An embodiment of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a functional block diagram showing the basic functions of the device according to the present invention. In the figure, MD1, M
D2 is two processor devices that can be executed independently, and are connected to each other by a system bus SB. The I / O devices that are actually involved in control are divided into a control side and a standby side depending on who accesses. It is assumed that the processor device MD1 side is for the actual work (control), and the other processor device MD2 side is the standby side.

【0013】各プロセッサ装置MD1,MD2は、オペ
レーションシステム(OS)の管理下で動作する汎用化
された言語(例えばC言語)で記述されたアプリケーシ
ョンソフトウェアに従って、データの処理や制御を行う
ように構成されている。また、各プロセッサ装置は、外
部からの割り込み処理以外に、OSによる多重実行の発
生はなく、アプリケーションプログラムが連続に実行す
る処理を中断するのは、そのアプリケーションプログラ
ムがOSをコールするか、又は、OSが動作するような
処理を実行した場合のみであり、また、各プログラム間
でのデータの授受および通信は、全てOSを経由して行
われるように構成されている。
Each of the processor units MD1 and MD2 is configured to perform data processing and control according to application software written in a generalized language (for example, C language) that operates under the control of an operating system (OS). Has been done. In addition, each processor device does not cause multiple execution by the OS other than the external interrupt process, and interrupts the process executed by the application program continuously because the application program calls the OS, or It is configured only so that processing for operating the OS is executed, and data transmission and reception and communication between programs are all performed via the OS.

【0014】各プロセッサ装置MD1,MD2におい
て、11はOSを格納したOS実行メモリ手段、12は
アプリケーションプログラムを格納したプログラム実行
メモリ手段である。ここに格納されているアプリケーシ
ョンプログラムは、OSの機能を使用しながら(システ
ムコールを行いながら)動作するもので、各種のアプリ
ケーションに応じて用意されるが、その設計あるいは作
成は、二重化処理を意識することなく行われる。13は
各メモリ手段11,12に格納されている各プログラム
に従って動作するCPU装置で、データの演算処理,各
種の制御や通信処理などを行う機能を有している。
In each of the processor units MD1 and MD2, 11 is an OS execution memory means storing an OS, and 12 is a program execution memory means storing an application program. The application programs stored here operate while using the functions of the OS (while making system calls), and are prepared according to various applications. However, the design or creation of them is conscious of duplication processing. Done without doing. A CPU device 13 operates according to each program stored in each of the memory means 11 and 12, and has a function of performing data arithmetic processing, various controls, communication processing, and the like.

【0015】14は各プロセッサ装置MD1,MD2に
対応して設けられている入出力装置(I/O装置)であ
る。ここでは、2つのプロセッサ装置を結ぶシステムバ
スSBに接続され、各プロセッサ装置内に設けている例
を示すが、プロセッサ装置の外部に設けられるものでも
よく、また、各プロセッサ装置にそれぞれ独立して結合
し、独自に動作するものでもよい。
Reference numeral 14 is an input / output device (I / O device) provided corresponding to each of the processor devices MD1 and MD2. Here, an example is shown in which each processor device is connected to the system bus SB connecting the two processor devices and provided inside each processor device. However, it may be provided outside the processor device, or each processor device independently. They may be combined and operate independently.

【0016】15は自身のプロセッサ装置が実作業に関
与しているとき、I/O装置14から割り込みを受けた
場合、待機状態にある相手のプロセッサ装置側に対し
て、同様の割り込みを行うプロセス装置間割り込み発生
手段である。待機側プロセッサ装置は、制御側のプロセ
ス装置間割り込み発生手段15による割り込みを受ける
と、自身のCPU装置に対して、疑似的な割り込みを発
生させ、制御側と同様の割り込み処理を行う。この場合
の割り込み処理は、通常はアプリケーションの動作とは
全く非同期に行われることになる。
Reference numeral 15 is a process for making a similar interrupt to the partner processor device in the standby state when an interrupt is received from the I / O device 14 when its own processor device is involved in the actual work. It is an inter-device interrupt generation means. When the processor device on the standby side receives an interrupt from the inter-process device interrupt generation means 15 on the control side, it generates a pseudo interrupt to its own CPU device and performs the same interrupt processing as on the control side. The interrupt processing in this case is normally performed completely asynchronously with the operation of the application.

【0017】16はステップカウント手段で、CPU装
置13が実行するアプリケーションプログラムの起動に
よりスタートし、ラン(RUN)サイクル信号を受けて
そのプログラムの実行ステップ数をカウントすると共
に、CPU装置13へ割り込みがあるまで実行したステ
ップ数を記憶するように構成されている。17は同期ず
れ調整手段で、CPU装置13への割り込みにより中断
したプログラムの再起動時に、自身のステップカウント
手段16が記憶する実行ステップ数と相手プロセッサ装
置内のステップカウント手段が記憶する実行ステップ数
とを読みだして比較する機能、ステップ数の差が所定の
値より大きい場合実行ステップ数が少ないプロセッサ装
置側のCPU装置に対して差のステップ数だけ先に動作
を開始させ、双方のプロセッサ装置のCPU装置が同期
して動作するように制御する機能、同期動作が開始され
た時点でステップカウント手段16を再びスタートさせ
る機能を備えて構成されている。
Reference numeral 16 denotes a step counting means, which is started by starting an application program executed by the CPU device 13, receives a run cycle signal to count the number of execution steps of the program, and interrupts the CPU device 13. It is configured to store the number of steps executed up to a certain time. Reference numeral 17 denotes a synchronization deviation adjusting means, which is the number of execution steps stored in its own step count means 16 and the number of execution steps stored in the step count means in the partner processor when the program interrupted by the CPU device 13 is restarted. And a function for reading and comparing, and when the difference in the number of steps is larger than a predetermined value, the CPU device on the side of the processor device having the smaller number of execution steps is caused to start the operation earlier by the difference number of steps, and both processor devices The CPU device has a function of controlling the CPU device to operate synchronously, and a function of restarting the step counting means 16 when the synchronous operation is started.

【0018】2つのプロセッサ装置MD1,MD2は、
制御側も待機側もそれぞれのCPU装置13によって独
自に動作しているが、各プロセッサ装置は、いずれも1
つのCPU装置で動作しているために、それらの動作が
正常に行われていれば、互いの動作は同期したものとな
る。しかしながら、一方のプロセッサ装置において、割
り込み処理などが継続して発生すると、双方のプロセッ
サ装置の同期動作が少しづつずれてくる。
The two processor devices MD1 and MD2 are
Both the control side and the standby side operate independently by their respective CPU devices 13, but each processor device has
Since the two CPU devices are operating, if the operations are normally performed, the operations are synchronized with each other. However, if interrupt processing or the like continues to occur in one of the processor devices, the synchronous operation of the two processor devices will slightly shift.

【0019】本願発明者らが先に、特願平5−2658
1号にて提案した二重化コンピュータ装置は、この点の
解決策として、同期をとる動作を、アプリケーションプ
ログラムがシステムコールを実行した時(OSがコール
されるたびに)、双方のプロセッサ装置で待ち合わせを
行うように構成してある。なお、待ち合わせが行われる
場合としては、CPU装置13から割り込みが発生した
場合、プロセッサ装置が自身のI/O装置14に対して
アクセスを行った(この場合、制御側から待機側にデー
タ転送が行われる)場合、プログラム実行メモリ手段1
2で動作するプログラムからのI/O装置14に対して
アクセス要求を行った場合等である。
The inventors of the present invention first disclosed in Japanese Patent Application No. 5-2658.
As a solution to this point, the dual computer apparatus proposed in No. 1 waits for the synchronization operation at both processor apparatuses when the application program executes a system call (every time the OS is called). It is configured to do. When the CPU device 13 generates an interrupt, the processor device accesses its own I / O device 14 (in this case, the control side transfers data to the standby side). If done), the program execution memory means 1
This is the case, for example, when an access request is made to the I / O device 14 from a program operating in 2.

【0020】ここで、アプリケーションプログラムがシ
ステムコールを長時間行わない場合には、双方のプロセ
ッサ装置でのアプリケーションプログラムの実行処理が
徐々にずれていく(双方のプロセッサ装置での同期ずれ
が生ずる)可能性がある。本発明の装置においては、ス
テップカウント手段16と同期ずれ調整手段17とを設
けた構成により、アプリケーションプログラムがシステ
ムコールを長時間行わない場合であっても、同期ずれが
生じないようにしている。
Here, when the application program does not make a system call for a long time, the execution processing of the application program in both processor devices may gradually shift (a synchronization shift occurs in both processor devices). There is a nature. In the apparatus of the present invention, the step count means 16 and the synchronization deviation adjusting means 17 are provided so that the synchronization deviation does not occur even when the application program does not make a system call for a long time.

【0021】図2は、本発明の一実施装置の主要な構成
ブロック図である。各プロセッサMD1,MD2は、い
ずれも、マイクロプロセッサMPと主記憶手段MEとか
らなり、これらはいずれも共通のシステムバスSBを介
して互いに結合している。各マイクロプロセッサMP内
には、アプリケーションプログラムに従ってデータの演
算処理,各種の制御や通信処理などを行う機能を備えた
CPU実行制御手段13、プロセッサ間割り込み発生手
段15、ステップカウント手段16、同期ずれ調整手段
17が設けられている。主記憶手段ME内には、OS実
行メモリ手段11とプログラム実行メモリ手段12とし
て機能する領域が用意されている。
FIG. 2 is a main structural block diagram of an apparatus for implementing the present invention. Each of the processors MD1 and MD2 is composed of a microprocessor MP and a main memory ME, which are coupled to each other via a common system bus SB. In each microprocessor MP, CPU execution control means 13 having a function of performing arithmetic processing of data, various controls and communication processing according to an application program, inter-processor interrupt generating means 15, step counting means 16, synchronization deviation adjustment Means 17 are provided. Areas functioning as the OS execution memory means 11 and the program execution memory means 12 are prepared in the main storage means ME.

【0022】なお、システムバスSBは二重化構成と
し、システムバスのいずれかが故障した場合には、他方
のシステムバスを用いて各プロセッサ装置から各I/O
装置へアクセスできるような構成としてもよい。図3
は、2つのプロセッサ装置が同期して動作するためのソ
フトウェア構成を示す概念図である。
It should be noted that the system bus SB has a dual structure, and when one of the system buses fails, the other system bus is used to send I / O from each processor unit.
The configuration may be such that the device can be accessed. Figure 3
FIG. 3 is a conceptual diagram showing a software configuration for two processor devices to operate in synchronization.

【0023】この図において、120はプログラム実行
メモリ手段12に格納されているアプリケーションソフ
トウェアを総括的に示したブロックであり、121はア
プリケーションソフトウェア120の実行をコントロー
ルするディスパッチャーである。このディスパッチャー
121はOSの制御のもとで動作している。2つのプロ
セッサ装置は、一方が制御側、他方が待機側とに分かれ
ていて、それぞれで同一のアプリケーションソフトウェ
ア(プログラム)が同期しながら実行されるように、ス
テップカウント手段16,同期ずれ調整手段17の機能
により制御される。なお、18はステップカウント手段
16のカウント数を各アプリケーションソフトウェア毎
に格納するステップセーブエリアを示していて、同期ず
れ調整手段17から読みだすことができるようになって
いる。
In the figure, reference numeral 120 is a block generally showing the application software stored in the program execution memory means 12, and 121 is a dispatcher for controlling the execution of the application software 120. The dispatcher 121 operates under the control of the OS. One of the two processor devices is divided into a control side and the other is on a standby side, so that the same application software (program) is executed in synchronization with each other, the step counting means 16 and the synchronization deviation adjusting means 17 Controlled by the function of. Reference numeral 18 denotes a step save area for storing the count number of the step counting means 16 for each application software, which can be read out from the synchronization deviation adjusting means 17.

【0024】122は割り込み処理部で、CPU装置1
3,I/O装置14,プロセッサ装置間割り込み発生手
段15からの割り込みを受付けて、それらの割り込み処
理を行うブロックを示している。この様に構成した装置
の同期化のための動作を次に説明する。通常の動作にお
いて、アプリケーションソフトウェア120は、OSの
機能を使用しながら所定のアプリケーションソフトウェ
アを実行している。この様な動作の中で、アプリケーシ
ョンソフトウェア120がシステムコールを行うと、2
つのプロセッサ装置MD1,MD2の動作が同期するよ
うな待ち合わせ処理が行われる。
Reference numeral 122 denotes an interrupt processing unit, which is the CPU device 1
3, a block that receives interrupts from the I / O device 14 and the inter-processor interrupt generating means 15 and performs the interrupt processing. The operation for synchronizing the apparatus thus configured will be described below. In normal operation, the application software 120 executes a predetermined application software while using the function of the OS. In such an operation, if the application software 120 makes a system call, 2
Waiting processing is performed such that the operations of the one processor device MD1 and MD2 are synchronized.

【0025】この間、各プロセッサ装置内の各ステップ
カウント手段16は、ディスパッチャー121からの起
動信号によりスタートし、CPUのラン信号を受けてC
PUの実行ステップ数をカウントしている。ここで、C
PUが実行しているアプリケーションソフトウェアが中
断するのは、割り込みが発生する場合である。また、そ
の後再び実行を継続させるのは、OSの制御のもとで動
作するディスパッチャー121,同期ずれ調整手段17
の実行制御による。
In the meantime, each step counting means 16 in each processor unit is started by a start signal from the dispatcher 121, and receives a run signal from the CPU to C.
The number of PU execution steps is counted. Where C
The application software executed by the PU is interrupted when an interrupt occurs. Further, after that, the execution is resumed again by the dispatcher 121 operating under the control of the OS and the synchronization deviation adjusting means 17.
By execution control of.

【0026】図4は、前述した割り込みがあった場合の
動作を示すフローチャートである。割り込み処理手段1
22は、外部から割り込みを受け付けると、CPU装置
がアプリケーションソフトウェア120を実行中か判断
し、実行中でなければ通常の割り込み処理を実行する。
これに対して、アプリケーションソフトウェアを実行中
である場合、ステップカウント手段16からそのアプリ
ケーションソフトウェアのそれまでの実行ステップ数を
読みだして、その値をステップセーブエリア18に、各
アプリケーションソフトウェア毎に現在の値に加算して
格納する。その後に、通常の割り込み処理を実行する。
FIG. 4 is a flow chart showing the operation when the above-mentioned interrupt occurs. Interrupt processing means 1
Upon receiving an interrupt from the outside, the CPU 22 determines whether the CPU device is executing the application software 120, and if not, executes a normal interrupt process.
On the other hand, when the application software is being executed, the number of execution steps of the application software up to that time is read from the step counting means 16, and the value is stored in the step save area 18 for each application software. Add to value and store. After that, normal interrupt processing is executed.

【0027】なお、割り込み処理手段122が受け付け
る割り込みは、通常、一方のプロセッサ装置においての
み受け付けられために、プロセス装置間割り込み発生手
段15が、システムバスSBを経由して、他方のプロセ
ッサ装置に対しても疑似的な割り込みを行う。他方のプ
ロセッサ装置は、この疑似的な割り込みを受けて、同様
に、自身の側のステップカウント手段16からそれまで
の実行ステップ数を読みだして、その値をステップセー
ブエリア18に、各アプリケーションソフトウェア毎に
現在の値に加算して格納する。
Since the interrupt accepted by the interrupt processing means 122 is normally accepted only by one of the processor devices, the inter-process device interrupt generating means 15 sends the interrupt to the other processor device via the system bus SB. However, a pseudo interrupt is performed. In response to this pseudo interrupt, the other processor device similarly reads the number of execution steps up to that time from the step count means 16 on its own side, and stores the value in the step save area 18 for each application software. Each time it is added to the current value and stored.

【0028】図5は、ディスパッチャー121および同
期ずれ調整手段17の動作を示すフローチャートであ
る。割り込み処理が終了すると、ディスパッチャー12
1は、中断したアプリケーションソフトウェアを再起動
することになるが、それに先立って、同期ずれ調整手段
17は、ステップセーブエリア18に格納されている再
起動するアプリケーションソフトウェアの実行ステップ
数を読み出すと共に、その実行ステップ数と、相手のプ
ロセッサ装置における同様のアプリケーションソフトウ
ェアの実行ステップ数とを比較する。そして、その差が
所定の許容値より大きいか、即ち、2つのプロセッサ装
置の同期動作のずれが許容される範囲を越えているか判
断する。
FIG. 5 is a flow chart showing the operation of the dispatcher 121 and the synchronization deviation adjusting means 17. When the interrupt processing is completed, the dispatcher 12
In No. 1, the interrupted application software is restarted. Prior to that, the synchronization deviation adjusting means 17 reads the number of execution steps of the restarted application software stored in the step save area 18, and The number of execution steps is compared with the number of execution steps of similar application software in the partner processor device. Then, it is determined whether the difference is larger than a predetermined allowable value, that is, whether the deviation of the synchronous operation between the two processor devices exceeds the allowable range.

【0029】ここで、同期ずれが大きいと判断される
と、一方のプロセッサ装置の動作に対して、遅れて動作
しているプロセッサ装置のCPU装置を、遅れているス
テップ数分だけ先行して起動する。これにより、先行し
て起動したプロセッサ装置側が同じステップ数まで追い
つく。続いて、ステップカウント手段16をクリアして
再スタートすると共に、2つのプロセッサ装置でのアプ
リケーションソフトウェアを共に起動して、同期動作に
移行する。
When it is determined that the synchronization deviation is large, the CPU device of the processor device operating later than the operation of the one processor device is activated in advance by the number of delayed steps. To do. As a result, the processor device side activated earlier catches up to the same number of steps. Then, the step counting means 16 is cleared and restarted, and at the same time, the application software in the two processor devices are both activated to shift to the synchronous operation.

【0030】なお、以上の説明では、2つのプロセッサ
装置は、OSの管理下で動作しているアプリケーション
ソフトウェアがシステムコールを行うときに基本的に同
期をとるための動作をすることを想定しているが、この
様な同期をとるための動作を省略した構成でもよい。こ
の場合、例えば、同期ずれ調整手段は、所定の周期でス
テップカウント手段のカウント値を参照・比較し、その
差に応じて同期ずれを調整するような構成とすること
で、割り込み処理が長時間ない場合でも、同期ずれが次
第に大きくなることはない。
In the above description, it is assumed that the two processor units basically operate for synchronization when the application software operating under the control of the OS makes a system call. However, the configuration for omitting the operation for establishing such synchronization may be adopted. In this case, for example, the synchronization deviation adjusting unit refers to and compares the count value of the step counting unit in a predetermined cycle, and adjusts the synchronization deviation according to the difference, so that the interrupt processing is performed for a long time. Even if it does not exist, the synchronization shift does not increase gradually.

【0031】[0031]

【発明の効果】以上、詳細に説明したように、本発明
は、実際に制御に関与しているI/O装置をどちらがア
クセスするかにより制御側と待機側とに分けられる2つ
のプロセツサ装置で構成される二重化コンピュータ装置
において、各プロセッサ装置に、アプリケーションソフ
トウェアの実行ステップ数をカウントする手段と、同期
ずれ調整手段とを設け、割り込み処理の機会を捕らえて
自動的に同期がとられるように構成したものである。
As described above in detail, according to the present invention, two processor devices can be divided into a control side and a standby side depending on who accesses the I / O device actually involved in control. In the duplicated computer device to be configured, each processor device is provided with means for counting the number of execution steps of application software and synchronization deviation adjusting means, and configured to automatically take synchronization by catching an opportunity of interrupt processing. It was done.

【0032】従って、本発明によれば、制御側のプロセ
ッサ装置と待機側プロセッサ装置とは、同様の処理を同
期して常に実行することとなり、大がかりなシステムを
構築しなくとも、制御側がダウンしたような場合におけ
る待機側プロセッサ装置への制御動作の切替えを、継続
性を維持しながら即座に行うことができる。また、2つ
のプロセッサ装置が同期をとる動作をシステムコールに
基づいて行う場合であって、システムコールが長時間行
われないような場合でも、同期動作のずれを回避するこ
とができ、アプリケーションプログラムは、その設計時
において二重化処理(同期化のための処理)を意識しな
くともよく、アプリケーションプログラムの作成を容易
に行うことができる。
Therefore, according to the present invention, the processor unit on the control side and the processor unit on the standby side always execute the same processing in synchronization with each other, and the control side goes down without constructing a large-scale system. In such a case, it is possible to immediately switch the control operation to the standby side processor device while maintaining continuity. Further, when the two processor devices perform the synchronization operation based on the system call and the system call is not performed for a long time, the deviation of the synchronization operation can be avoided and the application program At the time of designing, it is not necessary to consider the duplication processing (processing for synchronization), and the application program can be easily created.

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

【図1】本発明に係わる装置の基本的な機能を示す機能
ブロック図である。
FIG. 1 is a functional block diagram showing basic functions of an apparatus according to the present invention.

【図2】本発明の一実施装置の主要な構成ブロック図で
ある。
FIG. 2 is a main configuration block diagram of an embodiment of the present invention.

【図3】2つのプロセッサ装置が同期して動作するため
のソフトウェア構成を示す概念図である。
FIG. 3 is a conceptual diagram showing a software configuration for two processor devices to operate in synchronization with each other.

【図4】割り込みがあった場合の動作を示すフローチャ
ートである。
FIG. 4 is a flowchart showing an operation when there is an interrupt.

【図5】ディスパッチャー121および同期ずれ調整手
段17の動作を示すフローチャートである。
FIG. 5 is a flowchart showing the operations of a dispatcher 121 and a synchronization deviation adjusting means 17.

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

MD1,MD2 プロセッサ装置 SB システムバス 11 OS実行メモリ手段 12 プログラム実行メモリ手段 13 CPU装置 14 入出力装置(I/O装置) 15 プロセス装置間割り込み発生手段 16 ステップカウント手段 17 同期ずれ調整手段 MD1, MD2 Processor device SB system bus 11 OS execution memory device 12 Program execution memory device 13 CPU device 14 Input / output device (I / O device) 15 Inter-process device interrupt generation device 16 Step count device 17 Synchronization deviation adjustment device

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】単体で実行可能な2つのプロセッサ装置を
システムバスで結合した二重化コンピュータ装置であっ
て、 各プロセッサ装置に、 オペレーティングシステムを格納したOS実行メモリ手
段と、 オペレーティングシステムの機能を使用(システムコー
ル)しながら動作するアプリケーションプログラムを格
納したプログラム実行メモリ手段と、 前記各メモリに格納されているプログラムに従って動作
するCPU装置と、 このCPU装置が実行するプログラムの起動によりスタ
ートし当該プログラムの実行ステップ数をカウントする
と共にCPU装置への割り込みによりそれまで実行した
ステップ数を記憶するステップカウント手段と、 前記割り込みにより中断したプログラムの再起動時に、
自身のステップカウント手段が記憶する実行ステップ数
と相手プロセッサ装置内のステップカウント手段が記憶
する実行ステップ数とを比較し、その差が所定の値より
大きい場合実行ステップ数が少ないプロセッサ装置側の
CPU装置に対して前記差のステップ数だけ先に動作を
開始させ、双方のプロセッサ装置のCPU装置が同期し
て動作するように制御する同期ずれ調整手段と、 自身のCPU装置が受けた割り込みを相手側プロセッサ
装置内のCPU装置に伝えるプロセス装置間割り込み発
生手段とを備えたことを特徴とする二重化コンピュータ
装置。
1. A dual computer device in which two processor devices that can be executed independently are connected by a system bus, and each processor device uses an OS execution memory means for storing an operating system and a function of the operating system ( Program execution memory means for storing application programs that operate while making system calls, CPU devices that operate according to the programs stored in the memories, and execution of the programs that are started by the start of the programs executed by the CPU devices. Step counting means for counting the number of steps and storing the number of steps executed up to now by interruption to the CPU device, and at the time of restarting the program interrupted by the interruption,
The number of execution steps stored in its own step counting means is compared with the number of execution steps stored in the step counting means in the partner processor device, and if the difference is greater than a predetermined value, the CPU on the processor device side having the smaller number of execution steps A synchronization deviation adjusting means for starting the operation of the device by the number of steps of the difference and controlling the CPU devices of both processor devices to operate in synchronization, and an interrupt received by the own CPU device. A dual computer device comprising inter-process device interrupt generation means for transmitting to a CPU device in a side processor device.
JP5178928A 1993-07-20 1993-07-20 Redundant computer equipment Pending JPH0736720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5178928A JPH0736720A (en) 1993-07-20 1993-07-20 Redundant computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5178928A JPH0736720A (en) 1993-07-20 1993-07-20 Redundant computer equipment

Publications (1)

Publication Number Publication Date
JPH0736720A true JPH0736720A (en) 1995-02-07

Family

ID=16057097

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5178928A Pending JPH0736720A (en) 1993-07-20 1993-07-20 Redundant computer equipment

Country Status (1)

Country Link
JP (1) JPH0736720A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004227566A (en) * 2003-01-02 2004-08-12 Fisher Rosemount Syst Inc Application station(as) used in process control system, redundant manager used in as, method and system for establishing/maintaining redundant context in process control system(pcs) having first and second as, machine-accessible media with data stored inside, redundant as system, and configuration change method of as
US7478274B2 (en) 2005-03-31 2009-01-13 Yokogawa Electric Corporation Duplex system
JP2015146116A (en) * 2014-02-03 2015-08-13 富士通株式会社 Control program, control method, and information processing apparatus
JP2016018291A (en) * 2014-07-07 2016-02-01 株式会社日立製作所 Control device and control method thereof
JP2019125350A (en) * 2017-11-21 2019-07-25 ザ・ボーイング・カンパニーThe Boeing Company Instruction command processing adjustment system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004227566A (en) * 2003-01-02 2004-08-12 Fisher Rosemount Syst Inc Application station(as) used in process control system, redundant manager used in as, method and system for establishing/maintaining redundant context in process control system(pcs) having first and second as, machine-accessible media with data stored inside, redundant as system, and configuration change method of as
US7478274B2 (en) 2005-03-31 2009-01-13 Yokogawa Electric Corporation Duplex system
JP2015146116A (en) * 2014-02-03 2015-08-13 富士通株式会社 Control program, control method, and information processing apparatus
JP2016018291A (en) * 2014-07-07 2016-02-01 株式会社日立製作所 Control device and control method thereof
JP2019125350A (en) * 2017-11-21 2019-07-25 ザ・ボーイング・カンパニーThe Boeing Company Instruction command processing adjustment system

Similar Documents

Publication Publication Date Title
US4941087A (en) System for bumpless changeover between active units and backup units by establishing rollback points and logging write and read operations
JP3606281B2 (en) Programmable controller, CPU unit, special function module, and duplex processing method
JP3636871B2 (en) Parallel processor system
US7493517B2 (en) Fault tolerant computer system and a synchronization method for the same
JP2003036101A (en) Redundant controller
JPH0736720A (en) Redundant computer equipment
JPH0973436A (en) Operation mode switching method in multiple computers
US7428660B2 (en) Starting control method, duplex platform system, and information processor
JP3332098B2 (en) Redundant processor unit
JPH06242979A (en) Redundant computer equipment
JPH086800A (en) Data processing device and microprocessor
JP3282205B2 (en) Received data processing method and communication control device
JPH0462081B2 (en)
JP3422401B2 (en) Redundant controller
JPH07200334A (en) Duplicate synchronization operation system
JPS58217056A (en) Task control system of multiprocessor system
JPH05341803A (en) Redundant switching device for programmable controller
JPH10289196A (en) Computer and method for transferring peripheral device control data in computer
JP3903688B2 (en) Bank switching system
JP2526835B2 (en) Duplex synchronous control system of programmable controller
JP3033722B2 (en) TOD matching controller in multiprocessor system
JPH07261814A (en) Interrupt synchronization method in dual system of PC
JPH06187184A (en) Input / output control device for dual system
JPH10326199A (en) Interrupt Synchronizer in Dual System
JPH05233576A (en) Duplex system