JPH02114359A - Clock synchronizing method for multiprocessor system - Google Patents
Clock synchronizing method for multiprocessor systemInfo
- Publication number
- JPH02114359A JPH02114359A JP63268620A JP26862088A JPH02114359A JP H02114359 A JPH02114359 A JP H02114359A JP 63268620 A JP63268620 A JP 63268620A JP 26862088 A JP26862088 A JP 26862088A JP H02114359 A JPH02114359 A JP H02114359A
- Authority
- JP
- Japan
- Prior art keywords
- time
- clock
- processors
- processor
- timer
- 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
Links
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、それぞれのプロセッサが共通にアクセスでき
る共有メモリを持たないマルチプロセッサシステムにお
いて、各々のプロセッサが時刻を示すために有するクロ
ックを互いに調整するためのクロック同期方式に関する
。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention is a multiprocessor system in which each processor does not have a shared memory that can be accessed in common, and in which each processor mutually adjusts the clocks that each processor has to indicate time. This paper relates to a clock synchronization method for
マルチプロセッサシステムにおいては、システムを構成
する各プロセッサのクロックをシステム全体に共通な時
刻を示すように同期させることが必要となる0例えば、
分散ファイリングシステムにおいて、各ファイルに記録
された作成および編集時刻に基づきファイルのバージョ
ンを識別するなめには、各プロセッサ間に共通な時刻が
必要となる。また、各プロセッサが、システムに共通な
時刻に基づき自己の履歴情報を蓄積しておけば、障害発
生時にどのような順番で障害が検出されたかを知ること
ができ、障害の発生箇所を特定するための有力な情報を
得ることができる。In a multiprocessor system, it is necessary to synchronize the clocks of each processor that makes up the system so that they indicate a common time for the entire system.For example,
In a distributed filing system, a common time between processors is required to identify file versions based on the creation and editing times recorded in each file. In addition, if each processor accumulates its own history information based on a time common to the system, it will be possible to know the order in which failures were detected when they occur, and to identify the location of the failure. You can obtain useful information for this purpose.
共有メモリを持たないマルチプロセッサシステムの一例
である通信ネットワークシステムにおいても、各通信ノ
ードのクロックが共通な時刻を示すようにする同期方式
が必要である。例えば、1986年5月に開催された第
6回インターナショナル・コンファランス・オン・デイ
ストリビューテッド・コンピユーテイング・システムズ
(International Conferenc
e on D I STRI B UTE D CO
MPUTING SYSTEMS)の予稿集2゜36
4−371に記載されている論文「アン・エレクション
・アルゴリズム・フォー・デイストリビューテッド・ク
ロック・シンクロナイゼーション・プログラム(An
Election Algorithm for a
Distributed C1ock 5yncron
izati’on Program) J (文献1
)で紹介されているクロック同期方式TEMPOは、U
NIXオペレーティングシステム4.3BSDで動作す
るネットワークにインプリメントされているものである
。上述のシステムにおいては、マスクとなる1つのノー
ドが定められた時間毎に、すべてのノードに時刻の問い
合せを行い、求められた各ノードの時刻をもとに平均時
刻を計算する。Even in a communication network system, which is an example of a multiprocessor system that does not have a shared memory, a synchronization method is required so that the clocks of each communication node indicate a common time. For example, at the 6th International Conference on Distributed Computing Systems held in May 1986,
e on DI STRI B UTE D CO
MPUTING SYSTEMS) Proceedings 2゜36
4-371, the paper “An Election Algorithm for Distributed Clock Synchronization Programs (An
Election Algorithm for a
Distributed C1ock 5syncron
izati'on Program) J (Reference 1
) The clock synchronization method TEMPO introduced in
It is implemented in a network running on the NIX operating system 4.3BSD. In the above-described system, one node serving as a mask queries all nodes for time at predetermined time intervals, and calculates an average time based on the determined times of each node.
この後、すべてのノードに対してクロックの調整指示を
行い、各ノードはこの指示に従いクロックの調整を行う
。Thereafter, a clock adjustment instruction is given to all nodes, and each node adjusts its clock according to this instruction.
また、1986年に開催された第16回アニュアル・イ
ンターナショナル・シンポジウム・オン・フォールトト
レラント・コンピユーテイング(AnnualInte
rnational Symposium on
F A U L T −T 0LERANT C
OMPUTING)のダイジェストペーパーP、218
−223に記載されている論文「クロック・シンクロナ
イゼーション・イン・ザ・プレゼンス・オン・オミッシ
ョン・アンド・パフォーマンス・フォール゛ソ・アンド
・プロセッサ・ジョインズ(CLOCK 5YNCHR
ONIZATION IN THE PRESENCE
OF O旧5SION AND PERFORMAN
CE FAULTS、ANDPROCESSORJOI
NS)J (文献2)で紹介されているタロツク同期
方式は、上で説明した“TEMPO”のようにマスク・
スレーブ型の制御ではなく分散型の制御を用いている。In addition, the 16th Annual International Symposium on Fault-Tolerant Computing (Annual Intel) was held in 1986.
National Symposium on
F A U L T -T 0LERANT C
OMPUTING) Digest Paper P, 218
-223, the paper “Clock Synchronization in the Presence on Omission and Performance Faults and Processor Joins” (CLOCK 5YNCHR)
ONIZATION IN THE PRESENCE
OFO Former 5SION AND PERFORMAN
CE FAULTS, AND PROCESSOR JOI
The tarock synchronization method introduced in NS)J (Reference 2) uses a mask and a
It uses distributed control rather than slave-type control.
同方式において、プロセッサは、システム内で定期的に
同報される同期メツセージの中で、最も速い時刻を示す
同期メツセージに従いクロックの時刻合せを行なう、こ
のため、結果として最も速く進むクロックがシステム内
の時刻を支配することになる。In this method, the processor adjusts its clock according to the synchronization message that indicates the fastest time among the synchronization messages that are periodically broadcast within the system. It will control the time of the day.
さらに、ジャーナル・オン・アソシエーション・フォー
・コンピユーテイング・マシナリー(J。In addition, the Journal on Association for Computing Machinery (J.
urnal of As5ociation for
Computing Machinery)、Vol、
32.No、1.January 1985.p、52
−78に記載されている論文「シンクロナイジング・ク
ロツクス・イン・ザ・プレゼンス・オン・フォールツ(
SynchronizingClocks in th
e Presence of Faults)」(文献
3)で紹介されているクロック同期方式は、すべてのプ
ロセッサが定期的に互いのプロセ・ソサの時刻を通信し
あう完全分散制御による同期方式〔発明が解決しようと
する課題〕
上述したUNIXオペレーティングシステム4.3BS
DのTEMPOの同期方法においては、マスタノードが
必要不可欠である。このため、マスタノードの障害時に
は、他のノードがマスタノードの機能を果すように、マ
スタノードの代行の方法が必要となる。また、すべての
ノードのクロックの問い合せ等を1つのマスタノードが
行うために、ノードの数が増えると、マスタノードへの
通信量が増加するとともに、すべてのノードの時刻の平
均を求める作業が増大する。Urnal of As5ocation for
Computing Machinery), Vol.
32. No, 1. January 1985. p.52
-78, the paper “Synchronizing Clocks in the Presence on Faults”
Synchronizing Clocks in th
The clock synchronization method introduced in "Presence of Faults" (Reference 3) is a synchronization method based on completely distributed control in which all processors periodically communicate the time of each other's processors. Issues to be solved] UNIX operating system 4.3BS mentioned above
In D's TEMPO synchronization method, a master node is essential. Therefore, in the event of a failure of the master node, a method of acting as a master node is required so that another node can perform the function of the master node. In addition, since one master node queries the clocks of all nodes, as the number of nodes increases, the amount of communication to the master node increases, and the task of calculating the average time of all nodes increases. do.
これに対し、分散型の制御を採用している文献2記載の
方式では、分散型ではあるものの、最も速いクロックを
持つ1つのプロセッサがシステム内の時刻を支配する結
果となる。また、文献3の方式は、すべてのプロセッサ
が互いにすべてのプロセッサと通信を行なうために、実
際のシステムに適用する場合に通信オーバヘッドが問題
となる。On the other hand, in the method described in Document 2 that employs distributed control, although it is distributed, one processor with the fastest clock controls the time within the system. Further, in the method of Document 3, since all processors communicate with each other, communication overhead becomes a problem when applied to an actual system.
本発明においては、集中制御を行なうプロセッサを設け
る必要がなく、よって一つのプロセッサがシステム内の
時刻を支配することがなく、システム内のプロセッサ数
が増大した場合にも、通信のメツセージ数が極端に増加
して処理オーバヘッドが増加することがなく、システム
内の総メツセージ数を従来方式より削減することが可能
な分散制御型のマルチプロセッサシステムにおけるクロ
ック同期方式を提供することにある。In the present invention, there is no need to provide a processor for centralized control, so one processor does not control the time in the system, and even when the number of processors in the system increases, the number of communication messages becomes extremely large. An object of the present invention is to provide a clock synchronization method in a distributed control multiprocessor system, which can reduce the total number of messages in the system compared to conventional methods without increasing processing overhead.
本発明によれば、n個のプロセッサからなるマルチプロ
セッサシステムのクロック同期方式において、前記各プ
ロセッサは時刻を示すクロックとランダム時間を計測す
るタイマと予め定められた間隔で時刻割込みを発生する
手段とを具備し、該タイマは前記時刻割込みの間隔内で
のランダムな時間を計測後タイムアウトし、各プロセッ
サでは、前記時刻割込みが生起すると前記タイマ起動し
、タイムアウトが発生した時刻に前記n個のプロセッサ
の中からm個のプロセッサをランダムに選択して、該m
個のプロセッサに対して自己のクロックを送出し、さら
に、各プロセッサは、前記時刻割込みが生起する毎に到
着した全てのクロック情報に基づき各自のクロックを制
御することを特徴とするマルチプロセッサシステムにお
けるクロック同期方式が得られる。According to the present invention, in a clock synchronization method for a multiprocessor system consisting of n processors, each processor has a clock indicating the time, a timer measuring random time, and means for generating time interrupts at predetermined intervals. The timer times out after measuring a random time within the interval of the time interrupt, and in each processor, when the time interrupt occurs, the timer starts, and at the time when the time out occurs, the n processors start the timer. Randomly select m processors from
In a multiprocessor system, the clock is transmitted to each processor, and each processor controls its own clock based on all the clock information that arrives each time the time interrupt occurs. A clock synchronization method is obtained.
互いのプロセッサが共通にアクセスできる共有メモリを
持たないマルチプロセッサシステムにおいては、システ
ムが初期状態の時に、各プロセッサのクロックは同一の
時刻を示してはいない、しかも同じ値からスタートした
クロックも、凡そ同じ割合で時刻を測定するものの、時
刻の経過にともない徐々にずれて行く、従って、各プロ
セッサは、以下に説明する本同期方式に従い、メツセー
ジ通信により互いにクロックの調整を行う必要がある。In a multiprocessor system that does not have a shared memory that can be commonly accessed by each processor, when the system is in its initial state, the clocks of each processor do not indicate the same time, and even if the clocks start from the same value, Although the time is measured at the same rate, it gradually deviates as the time passes.Therefore, each processor needs to adjust its clocks with each other through message communication according to this synchronization method described below.
この結果、すべてのプロセッサのクロックがある同期精
度の範囲内で同一の時刻を指すように制御される。As a result, the clocks of all processors are controlled to point to the same time within a certain synchronization accuracy.
本発明の原理について、第2図、第3図を参照して説明
する。第3図は、マルチプロセッサシステムの具体例を
示す。各プロセッサ301,302.303,304.
305は、自己の時刻を示すクロックを備えており、各
自のクロックに基づき時刻割り込みを発生する。さらに
、各プロセッサは任意のプロセッサのクロック情報を読
み出せるよう、相互に論理的な通信路により接続されて
いる0例えば、プロセッサ303とプロセッサ304の
間は通信路306により接続されている。The principle of the present invention will be explained with reference to FIGS. 2 and 3. FIG. 3 shows a specific example of a multiprocessor system. Each processor 301, 302. 303, 304.
305 is provided with a clock that indicates its own time, and generates a time interrupt based on its own clock. Furthermore, each processor is connected to each other by a logical communication path so that clock information of any processor can be read out.For example, processor 303 and processor 304 are connected by a communication path 306.
また、各プロセッサにはランダム時間を計測できるタイ
マが具備されており、予め定められた時間範囲内でラン
ダムな時間を計測することができる。Furthermore, each processor is equipped with a timer capable of measuring random time, and can measure random time within a predetermined time range.
第2図は、あるプロセッサiでのタイミングチャートを
示し、上記時刻割込みおよびランダムタイマの動作を説
明しながら本発明のクロック同期方式の原理を述べる。FIG. 2 shows a timing chart for a certain processor i, and describes the principle of the clock synchronization method of the present invention while explaining the operations of the above-mentioned time interrupt and random timer.
第2図において、ある割込みから次の割込みまでの時間
がクロック同期の制御期間であり、例えばこの例では1
時間となっている。いま、図に示すように、k番目のク
ロック同期制御期間の開始を示す時刻割込みをO:00
、k番地のクロック同期期間の終わりを示すとともに(
k+1)番目のクロック同期期間の開始を示す第2の時
刻割込みをに00とする。プロセッサiでは、O:00
の時刻割込みを検出すると、タイマの起動をかける。タ
イマは前記同期制御期間である1時間の間のランダムな
時刻にタイムアウトが発生するように設定しておくもの
とする。In Figure 2, the time from one interrupt to the next is the clock synchronization control period, and for example, in this example, 1
It's time. Now, as shown in the figure, the time interrupt indicating the start of the k-th clock synchronization control period is set to O:00.
, indicates the end of the clock synchronization period at address k, and (
The second time interrupt indicating the start of the (k+1)th clock synchronization period is set to 00. On processor i, O:00
When a time interrupt is detected, the timer is activated. The timer is set so that a timeout occurs at a random time during the one hour synchronization control period.
ネットワーク内の全てのプロセッサが独立に同じタイマ
起動およびランダムタイムアウトの発生処理を行うので
、ネットワーク中の全プロセッサ数をnとすると、これ
らn個のプロセッサは、各同期制御期間の間にタイムア
ウトを起こすことになる、第2図においてタイムアウト
例で示しているのが同期制御期間にタイムアウトを起こ
した例である。Since all processors in the network independently perform the same timer activation and random timeout generation processing, if the total number of processors in the network is n, these n processors will cause a timeout during each synchronization control period. In particular, the timeout example shown in FIG. 2 is an example in which a timeout occurs during the synchronous control period.
本発明の方式では、タイムアウトを起こした時刻にシス
テム内のn個のプロセッサからランダムにm個のプロセ
ッサを選択し、該m個のプロセッサに対し、自プロセッ
サのクロック情報を送出するものである。一方、各プロ
セッサでは、自分宛に到着したクロック情報を受信し、
各同期制御期間の終了時において、すでに受信されたク
ロック情報をもとに処理がなされる。In the method of the present invention, m processors are randomly selected from n processors in the system at the time when a timeout occurs, and clock information of the own processor is sent to the m processors. On the other hand, each processor receives the clock information addressed to it,
At the end of each synchronization control period, processing is performed based on the clock information that has already been received.
本同期方式を、第3図のネットワーク例を用いて説明す
る。説明において、各プロセッサでの時刻割込みは1:
00とする。各プロセッサは、自プロセッサの時刻割込
みを検出するとタイマを起動し、タイムアウト時には、
m個のプロセッサをランダムに選択し、該プロセッサに
対して、タイムアウトを起こした時刻を刻印したクロッ
ク情報を通知する。また、クロックを受信したプロセッ
サでは、受信した全てのクロック値とクロック値を受信
した自プロセッサの時刻との差分をとり、その差分の平
均値Δによりクロックの調整を行なうものである。即ち
、Δが正ならば自クロック値にΔを加算し、Δが負なら
ば自クロックをΔだけ停止させる。先程述べたタイムア
ウト分布に従って各プロセッサがタイムアウトを生起さ
せるものとすると、各プロセッサ1回の制御あたり、平
均m個のプロセッサからクロック情報を受信することに
なる。This synchronization method will be explained using the network example shown in FIG. In the explanation, the number of time interrupts in each processor is 1:
Set to 00. Each processor starts a timer when it detects its own time interrupt, and when it times out,
m processors are selected at random, and clock information stamped with the time at which the timeout occurred is notified to the processors. Furthermore, the processor that receives the clock calculates the differences between all the received clock values and the time of its own processor that received the clock value, and adjusts the clock based on the average value Δ of the differences. That is, if Δ is positive, Δ is added to the own clock value, and if Δ is negative, the own clock is stopped by Δ. Assuming that each processor causes a timeout according to the timeout distribution described earlier, clock information will be received from an average of m processors per control of each processor.
各プロセッサでは、この平均m個のプロセッサからのク
ロック値の平均値に自分のクロック値をあわせることに
なる。Each processor adjusts its own clock value to the average value of the clock values from the m processors.
例えば、本発明によるクロック制御がかけられる前に、
第3図(a)に示すようなりロック値を各プロセッサが
とっているものとする。例えばプロセッサ301のタイ
ムアウト時刻をプロセッサ301のクロックで見てO:
58、プロセッサ302のタイムアウト時刻をプロセッ
サ302のクロックで見て0:56とする。通信遅延お
よび各プロセッサのクロックの傾きに起因するクロック
ずれを無視すると、まずプロセッサ301のクロック値
がO:58に到達し、5つのプロセッサの中から、例え
ば3つのプロセッサをランダムに選択するものとし、プ
ロセッサ302,303,305を選択し、そのクロッ
ク値(0:5g>を該3つのプロセッサに送出する。For example, before the clock control according to the present invention is applied,
It is assumed that each processor has a lock value as shown in FIG. 3(a). For example, check the timeout time of the processor 301 using the clock of the processor 301:
58. The timeout time of the processor 302 is set to 0:56 based on the clock of the processor 302. Ignoring communication delays and clock deviations caused by the clock inclination of each processor, it is assumed that the clock value of the processor 301 reaches O:58 and, for example, three processors are randomly selected from among the five processors. , processors 302, 303, and 305, and sends the clock value (0:5g>) to the three processors.
プロセッサ301がそのクロック値を送出したときの各
プロセッサの示す時刻を第3図(b)に示す。The time indicated by each processor when the processor 301 sends out its clock value is shown in FIG. 3(b).
各プロセッサでは、プロセッサ301のクロック値を受
信すると、自己のクロック値との差分をとる。差分値は
、プロセッサ302では+6、プロセッサ303では+
4、プロセッサ305では+3となる。続いて、プロセ
ッサ302のクロック値がO:56に達したときに、同
機にして、3つのプロセッサをランダムに選択する0例
えば、プロセッサ301,303,304を選択したと
すると、該3つのプロセッサに自己のクロック値O:5
6を通知する。When each processor receives the clock value of the processor 301, it calculates the difference between it and its own clock value. The difference value is +6 for processor 302 and +6 for processor 303.
4, the processor 305 has +3. Next, when the clock value of processor 302 reaches O:56, three processors are randomly selected on the same machine.0 For example, if processors 301, 303, and 304 are selected, Own clock value O: 5
Notify 6.
この時の各プロセッサの時刻を第3図(c)に示してお
く、各プロセッサでの差分値は、プロセッサ301では
−6、プロセッサ303では−2、プロセッサ304で
は+2となる。各プロセッサは得られた差分値の平均値
に基づき、先に示したクロック値の調整を行なう。The time of each processor at this time is shown in FIG. 3(c). The difference value for each processor is -6 for the processor 301, -2 for the processor 303, and +2 for the processor 304. Each processor adjusts the clock value described above based on the average value of the obtained difference values.
以上の説明では、プロセッサ301と302がタイムア
ウトした場合についてのみ詳細に各プロセッサのクロッ
クを示したが、他のプロセッサも同じようにタイムアウ
ト発生時に同期制御を行う。In the above description, the clocks of each processor were shown in detail only when the processors 301 and 302 timed out, but the other processors similarly perform synchronous control when a timeout occurs.
従って、同時制御期間の終了までには、各プロセッサは
平均3つのプロセッサからのクロック情報を受信する。Thus, by the end of the concurrent control period, each processor receives clock information from an average of three processors.
以上の制御を各プロセッサが周期的に繰り返えすことに
より、全てのプロセッサのクロック値が同一の値となる
ように調整されることがわがる。It can be seen that by periodically repeating the above control for each processor, the clock values of all processors are adjusted to the same value.
以上の制御はすべてのプロセッサが、自分のもつクロッ
クに基づく時刻割込みに従って繰り返し行われるもので
ある。勿論、タイムアウト時刻に各プロセッサが選択す
るm個のプロセッサはランダムに選択されるので、クロ
ック同期期間毎に受信されるクロック情報の数は結果と
してランダムとなる。The above control is repeatedly performed by all processors according to time interrupts based on their own clocks. Of course, since the m processors selected by each processor at the time-out time are randomly selected, the number of clock information received each clock synchronization period is random as a result.
このようにすべてのプロセッサは、完全対等な立場にあ
り、全く同一のアルゴリズムを実施する。In this way, all processors are on a completely equal footing and implement exactly the same algorithms.
この時、ランダムに選択されたプロセッサに対してのみ
クロック値を送出するので、従来に比べて通信量を削減
することができる。また、1つのプロセッサのみがシス
テムの時刻を制御するのではなく、複数のプロセッサの
平均時刻でシステム時刻を制御することにより、耐障害
性のある時刻制御が可能となる。さらに、耐障害性の度
合いは、ランダムに選択するプロセッサ数を変えること
で柔軟に制御することができる。また、クロック情報を
送出する時刻がある範囲内(クロック同期制御期間の間
)でランダムであるから、複数のプロセッサが送出する
クロック情報にてネットワークが幅そう状態となる可能
性を軽減できる。At this time, since the clock value is sent only to randomly selected processors, the amount of communication can be reduced compared to the conventional method. Further, by controlling the system time using the average time of a plurality of processors instead of only one processor controlling the system time, fault-tolerant time control becomes possible. Furthermore, the degree of fault tolerance can be flexibly controlled by changing the number of randomly selected processors. Furthermore, since the time at which the clock information is sent out is random within a certain range (during the clock synchronization control period), it is possible to reduce the possibility that the network will become overwhelmed by the clock information sent out by a plurality of processors.
第1図(a)、(b)に、本発明の方式を実現するため
に各プロセッサにて実行される制御の一フローチャート
例を示す、第1図(a)はクロック情報の送信制御を示
すフローチャート例であり、第1図(b)はクロック情
報の受信制御を示すフローチャート例である。FIGS. 1(a) and 1(b) show an example of a flowchart of control executed by each processor to implement the method of the present invention. FIG. 1(a) shows clock information transmission control. This is an example of a flowchart, and FIG. 1(b) is an example of a flowchart showing reception control of clock information.
まず、第1図(a)の送信制御フローチャートの説明を
行なう、各プロセッサでは、ブロック100にて時刻割
込みを検出すると、ブロック101にてタイマを起動す
る。102のブロックでは前記タイマのタイムアウトの
発生を検出し、もし、タイムアウトを検出すれば、ブロ
ック103に進み、システム内のn個のプロセッサの中
から、m個のプロセッサをランダムに選択する。First, the transmission control flowchart of FIG. 1(a) will be explained. In each processor, when a time interrupt is detected in block 100, a timer is activated in block 101. Block 102 detects the occurrence of a timeout of the timer, and if a timeout is detected, the process proceeds to block 103, where m processors are randomly selected from among the n processors in the system.
この後、ブロック104にてタイムアウトが発生した時
刻を刻印したクロック情報が前記ランダムに選択された
m個のプロセッサに送出され、この同期制御期間での送
信制御を終了し、ブロック100に戻り、次の同期制御
期間での時刻割込みを待つ、第1図(b)の受信制御で
は、ブロック111にて、他のプロセッサから送られて
くるクロック情報の受信を行なう、続くブロック112
にて、受信したクロック値の自クロック値との差分を算
出し格納する。ブロック113では、次の同期制御周期
の開始を示す時刻割込みの検出を行ない、時刻割込みを
検出していなければ、再びクロック情報の受信を行なう
。ブロック113にて時刻割込みを検出すると、ブロッ
ク114に行き、受信した全てのクロック情報と自己の
クロック値との差分(ブロック112にて求まっている
)の平均値を算出する。続くブロック115では、算出
されたΔの正負により制御のスイッチを行ない、もし、
Δが正ならばブロック116にて、自クロック値にΔを
加算して自クロックの調整を行なう、もし、Δが負なら
ば、ブロック117にて、自クロックをΔだけ停止させ
て自クロックの調整を行なう、ブロック116あるいは
117の処理が終了すると、この周期制御期間での受信
処理が終了し、ブロック111に戻り次のクロック周期
制御期間での受信制御の開始を示す時刻割込みを待つ。After that, in block 104, clock information stamped with the time when the timeout occurred is sent to the randomly selected m processors, and the transmission control in this synchronization control period is ended, and the process returns to block 100 and the next step is to In the reception control shown in FIG. 1(b), in which a time interrupt is waited for during the synchronization control period, block 111 receives the clock information sent from another processor, followed by block 112.
, the difference between the received clock value and its own clock value is calculated and stored. In block 113, a time interrupt indicating the start of the next synchronous control cycle is detected, and if no time interrupt is detected, clock information is received again. When a time interrupt is detected in block 113, the process goes to block 114 and calculates the average value of the differences (calculated in block 112) between all the received clock information and its own clock value. In the subsequent block 115, control is switched depending on the sign or negative of the calculated Δ, and if
If Δ is positive, the own clock is adjusted by adding Δ to the own clock value in block 116. If Δ is negative, the own clock is stopped by Δ and the own clock is adjusted in block 117. When the adjustment processing in block 116 or 117 is completed, the reception processing in this periodic control period is completed, and the process returns to block 111 to wait for a time interrupt indicating the start of reception control in the next clock periodic control period.
このように、本発明のクロック同期方式を用いることに
より、マルチプロセッサシステムにおいて、気中制御を
行なうプロセッサを設けることなく、すべてのプロセッ
サを対等に動作させて、各プロセッサのクロックを共通
な時刻を指すように制御することができる。各プロセッ
サは、同期制御期間ごとにランダムに選択したプロセッ
サにクロック情報を通知するため、特定のプロセッサの
障害がシステムの致命的な障害を与えることがなく、高
い信頼性が確保できる。また、この信頼性の度合いは、
ランダムに選択するプロセッサ数mを制御することで柔
軟に変えることが可能である。また、全てのプロセッサ
のクロック値を用いて同期制御を行なうものではなく、
部分プロセッサ集合のクロック値を用いて制御がなされ
るので、プロセッサ数が増えた場合にも、同期制御に要
する処理時間が極端に増大することはない、さらには、
クロック情報を送出するタイミングが同期制御期間の間
でランダムに分布することになるので、クロック情報送
出にともなうネットワークの輻そう状態を避けることが
可能となる。As described above, by using the clock synchronization method of the present invention, in a multiprocessor system, all processors can be operated equally without providing a processor that performs airborne control, and the clocks of each processor can be set to a common time. Can be controlled to point. Since each processor notifies clock information to a randomly selected processor every synchronization control period, a failure of a particular processor will not cause a fatal failure of the system, and high reliability can be ensured. Also, the degree of reliability is
It is possible to flexibly change the number m of processors to be randomly selected by controlling it. Also, it does not perform synchronous control using the clock values of all processors,
Since control is performed using the clock values of the partial processor set, even when the number of processors increases, the processing time required for synchronization control does not increase significantly.
Since the timing of transmitting clock information is randomly distributed during the synchronization control period, it is possible to avoid network congestion caused by transmitting clock information.
以上のように本発明により得られる効果は大きい。As described above, the effects obtained by the present invention are significant.
第1図(a)、(b)は本発明によるクロック同期方式
の一実施例を示すフローチャート、第2図は本発明によ
るクロック同期方式の制御タイミングチャート、第3図
(a)、(b)、(c)は本発明の詳細な説明するため
のマルチプロセッサシステムの一例および各プロセッサ
の時刻例を示す図である。
100〜104.111〜117・・・制御ブロック、
301〜305・・・プロセッサ、306・・・プロセ
ッサ303とプロセッサ304間の論理的な通≧ し
プロ゛ビッサ36/
手
面(EL)
フなH3ンサ31)1
茅
回(b)FIGS. 1(a) and (b) are flowcharts showing an embodiment of the clock synchronization method according to the present invention, FIG. 2 is a control timing chart of the clock synchronization method according to the present invention, and FIGS. 3(a) and (b). , (c) are diagrams showing an example of a multiprocessor system and an example of time of each processor for detailed explanation of the present invention. 100-104.111-117... control block,
301 to 305...Processor, 306...Logical communication between processor 303 and processor 304≧Processor 36/List (EL) Free H3 sensor 31) 1 Mawari (b)
Claims (1)
ムのクロック同期方式において、前記各プロセッサは時
刻を示すクロックとランダム時間を計測するタイマと予
め定められた間隔で時刻割込みを発生する手段とを具備
し、該タイマは前記時刻割込みの間隔内でのランダムな
時間を計測後タイムアウトし、前記各プロセッサでは、
前記時刻割込みが生起すると前記タイマを起動し、タイ
ムアウトが発生した時刻に前記n個のプロセッサの中か
らm個のプロセッサをランダムに選択して、該m個のプ
ロセッサに対して自己のクロックを送出し、さらに、各
プロセッサは、前記時刻割込みが生起する毎に到着した
全てのクロック情報に基づき各自のクロックを制御する
ことを特徴とするマルチプロセッサシステムにおけるク
ロック同期方式。 2、前記各プロセッサのクロック制御において、前記受
信した全てのクロック情報の平均時刻が、自分のクロッ
クの示す時刻よりもΔ進んでいる場合は自分のクロック
にΔを加算し、前記平均時刻が自分のクロックの示す時
刻よりもΔ遅れている場合は、前記タイマが時間Δの経
過を通知するまで自分のクロックを停止させることを特
徴とする特許請求の範囲第1項記載のマルチプロセッサ
システムにおけるクロック同期方式。[Claims] 1. In a clock synchronization system for a multiprocessor system consisting of n processors, each processor generates time interrupts at predetermined intervals using a clock indicating time and a timer measuring random time. means, the timer times out after measuring a random time within the interval of the time interrupt, and in each of the processors,
When the time interrupt occurs, the timer is started, and at the time when a timeout occurs, m processors are randomly selected from the n processors, and the own clock is sent to the m processors. Furthermore, each processor controls its own clock based on all the clock information that arrives each time the time interrupt occurs. 2. In the clock control of each processor, if the average time of all the received clock information is Δ ahead of the time indicated by its own clock, add Δ to its own clock, and set the average time to its own clock. In the multiprocessor system according to claim 1, the clock in the multiprocessor system according to claim 1 is characterized in that when the timer is delayed by Δ from the time indicated by the clock, the clock stops its own clock until the timer notifies that the time Δ has elapsed. Synchronous method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63268620A JPH07117939B2 (en) | 1988-10-24 | 1988-10-24 | Clock synchronization method in multiprocessor system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63268620A JPH07117939B2 (en) | 1988-10-24 | 1988-10-24 | Clock synchronization method in multiprocessor system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH02114359A true JPH02114359A (en) | 1990-04-26 |
| JPH07117939B2 JPH07117939B2 (en) | 1995-12-18 |
Family
ID=17461078
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63268620A Expired - Lifetime JPH07117939B2 (en) | 1988-10-24 | 1988-10-24 | Clock synchronization method in multiprocessor system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH07117939B2 (en) |
-
1988
- 1988-10-24 JP JP63268620A patent/JPH07117939B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH07117939B2 (en) | 1995-12-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6199169B1 (en) | System and method for synchronizing time across a computer cluster | |
| US8601165B2 (en) | Method for synchronization in networks | |
| Verissimo et al. | Cesiumspray: a precise and accurate global time service for large-scale systems | |
| AU2006200299B2 (en) | Synchronization of multiple operational flight programs | |
| US4531185A (en) | Centralized synchronization of clocks | |
| EP0135764B1 (en) | Synchronization of clocks in a distributed computing network | |
| Stanton | Distributing deterministic, accurate time for tightly coordinated network and software applications: IEEE 802.1 AS, the TSN profile of PTP | |
| US7334014B2 (en) | Consistent time service for fault-tolerant distributed systems | |
| CN114448769A (en) | A node election voting method and device based on consensus system | |
| US6363496B1 (en) | Apparatus and method for reducing duration of timeout periods in fault-tolerant distributed computer systems | |
| JPH02114359A (en) | Clock synchronizing method for multiprocessor system | |
| JPH02114360A (en) | Clock synchronizing method for multiprocessor system | |
| JPH01116862A (en) | Clock synchronizing system for multiprocessor system | |
| JPH0528866B2 (en) | ||
| Li et al. | A high-accuracy clock synchronization method in distributed real-time system | |
| de Azevedo et al. | Fault-tolerant clock synchronization for distributed systems with high message delay variation | |
| Lonn et al. | Synchronisation in safety-critical distributed control Systems | |
| Zhao et al. | Self-adaptive clock synchronization for computational grid | |
| Martins et al. | An Approach to the Synchronization of Backup Masters in Dynamic Master-Slave Systems | |
| Jones | Experiments in high precision clock synchronisation. | |
| Wu et al. | Guaranteed intrusion removal from monitored distributed applications | |
| Wedde et al. | Harmonious internal clock synchronization | |
| JPH0528864B2 (en) | ||
| Rusetskiy et al. | Architecture for time synchronization in an onboard SpaceWire network of ARINC 653 nodes | |
| Fetzer et al. | Integrating External and Internal Clock Synchronization |