Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0528866B2 - - Google Patents
[go: Go Back, main page]

JPH0528866B2 - - Google Patents

Info

Publication number
JPH0528866B2
JPH0528866B2 JP62273817A JP27381787A JPH0528866B2 JP H0528866 B2 JPH0528866 B2 JP H0528866B2 JP 62273817 A JP62273817 A JP 62273817A JP 27381787 A JP27381787 A JP 27381787A JP H0528866 B2 JPH0528866 B2 JP H0528866B2
Authority
JP
Japan
Prior art keywords
clock
processor
time
processors
control
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.)
Expired - Lifetime
Application number
JP62273817A
Other languages
Japanese (ja)
Other versions
JPH01114964A (en
Inventor
Satoshi Hasegawa
Shoichiro Nakai
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.)
NEC Corp
Original Assignee
Nippon 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP62273817A priority Critical patent/JPH01114964A/en
Priority to US07/253,478 priority patent/US5041966A/en
Publication of JPH01114964A publication Critical patent/JPH01114964A/en
Publication of JPH0528866B2 publication Critical patent/JPH0528866B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、それぞれのプロセツサが共通にアク
セスできる共有メモリを持たないマルチプロセツ
サシステムにおいて、各々のプロセツサが時刻を
示すために有するクロツクを互いに調整するため
のクロツク同期方式に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention provides a multiprocessor system in which processors do not have a shared memory that can be accessed in common, so that the clocks that each processor has for indicating time can be shared with each other. This invention relates to a clock synchronization method for adjustment.

(従来の技術) マルチプロセツサシステムにおいては、システ
ムを構成する各プロセツサのクロツクをシステム
全体に共通な時刻を示すように同期させることが
必要となる。例えば、分散フアイリングシステム
において、各フアイルに記録された作成および編
集時刻に基づきフアイルのバージヨンを識別する
ためには、各プロセツサ間に共通な時刻が必要と
なる。また、各プロセツサが、システムに共通な
時刻に基づき自己の履歴情報を蓄積しておけば、
障害発生時にどのような順番で障害が検出された
かを知ることができ、障害の発生箇所を特定する
ための情報を得ることができる。
(Prior Art) In a multiprocessor system, it is necessary to synchronize the clocks of each processor making 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 versions of files based on the creation and editing times recorded in each file. Also, if each processor accumulates its own history information based on the time common to the system,
It is possible to know in what order the failures were detected when they occur, and it is possible to obtain information for specifying the location where the failure has occurred.

共有メモリを持たないマルチプロセツサシステ
ムの一例である、通信ネツトワークシステムにお
いても、各通信ノードのクロツクが共通な時刻を
示すようにする同期方式が必要である。例えば、
1986年5月に開催された第6回インターナシヨナ
ル・コンフアランス・オン・デイストリビユ−テ
ツド・コンピユーテイング・システムズ
(International Conference on DISTRIBUTED
COMPUTING SYSTEMS)の予稿集p.364−
371に記載されている論文アン・エレクシヨン・
アルゴリズム・フオー・デイストリビユーテツ
ド・クロツク・シンクロナイゼーシヨン・プログ
ラム(An Election Algorithm for a
Distributed Clock Synchronization Program)
(文献1)で紹介されているクロツク同期方式
TEMPOは、UNIXオペレーテイングシステム
4.3BSDで動作するネツトワークに設けられてい
るものである。上述のシステムにおいては、マス
タとなる1つのノードが、定められた時間毎にす
べてのノードに時刻の問い合せを行い、求められ
た各ノードの時刻をもとに平均時刻を計算する。
この後すべてのノードに対してクロツクの調整指
示を行い、各ノードはこの指示に従いクロツクの
調整を行う。
Even in a communication network system, which is an example of a multiprocessor system without a shared memory, a synchronization method is required so that the clocks of each communication node indicate a common time. for example,
The 6th International Conference on DISTRIBUTED was held in May 1986.
COMPUTING SYSTEMS) Proceedings p.364−
371 of the papers en élección
An Election Algorithm for a
Distributed Clock Synchronization Program)
Clock synchronization method introduced in (Reference 1)
TEMPO is a UNIX operating system
It is installed in a network running on 4.3BSD. In the above-mentioned system, one node serving as a master queries all nodes about the time at predetermined 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回アニユアル・インターナシ
ヨナル・シンポジウム・オン・フオールトトレラ
ント・コンピユーテイング(Annual
International Symposium on FAULT−
TOLERANT COMPUTING)のダイジエスト
ペーパーp.218−223に記載されている論文クロツ
ク・シンクロナイゼーシヨン・イン・ザ・プレゼ
ンス・オブ・オミツシヨン・アンド・パフオーマ
ンス・フオールツ・アンド・プロセツサ・ジヨイ
ンズ(CLOCK SYNCHRONIZATION IN
THE PRESENCE OF OMISSION AND
PERFORMANCE FAULTS,AND
PROCESSOR JOINS)(文献2)で紹介されて
いるクロツク同期方式は、上で説明した
“TEMPO”のようにマスタ・スレーブ型の制御
ではなく分散型の制御を用いている。同方式にお
いて、プロセツサはシステム内で定期的に同報さ
れる同期メツセージの中で、最も速い時刻を示す
同期メツセージに従いクロツクの時刻合せを行な
う。このため、結果として最も速く進むクロツク
がシステム内の時刻を支配することになる。
Also, in 1986, the 16th Annual International Symposium on Fault Tolerant Computing (Annual
International Symposium on FAULT−
The paper CLOCK SYNCHRONIZATION IN THE PRESENCE OF OMISSION AND PERFORMANCE FOULTS AND PROCESSOR SYNCHRONIZATION IN
THE PRESENCE OF OMISSION AND
PERFORMANCE FAULTS, AND
The clock synchronization method introduced in ``PROCESSOR JOINS'' (Reference 2) uses distributed control rather than master-slave type control like ``TEMPO'' explained above. In this system, the processor adjusts the clock according to the synchronization message indicating the earliest time among the synchronization messages broadcast periodically within the system. As a result, the fastest running clock will control the time in the system.

さらに、ジヤーナル・オブ・アソシエーシヨ
ン・フオー・コンピユーテイング・マシナリー
(Journal of Association for Computing
Machinery),Vol.32,No.1,January 1985,
p.52−78に記載されている論文シンクロナイジン
グ・クロツクス・イン・ザ・プレゼンス・オブ・
フオールツ(Synchronizing Clocks in the
Presence of Faults)(文献3)で紹介されいる
クロツク同期方式は、すべてのプロセツサが定期
的に互いにプロセツサの時刻を通信しあう完全分
散制御による同期方式である。
In addition, the Journal of Association for Computing Machinery
Machinery), Vol.32, No.1, January 1985,
The article Synchronizing Clocks in the Presence of...
Faults (Synchronizing Clocks in the
The clock synchronization method introduced in Presence of Faults (Reference 3) is a synchronization method using completely distributed control in which all processors periodically communicate their processor times with each other.

(発明が解決しようとする問題点) 上述のUNIXオペレーテイングシステム
4.3BSDのTENPOの同期方法においては、マス
タノードが必要不可欠である。このため、マスタ
ノードの障害時には、他のノードがマスタノード
の機能を果すように、マスタノードの代行の方法
が必要となる。また、すべてのノードのクロツク
の問い合せを1つのマスタノードが行うために、
ノードの数が増えると、マスタノードへの通信量
が増加するとともに、すべてのノードの時刻の平
均を求める作業が増大する。
(Problem to be solved by the invention) The UNIX operating system mentioned above
A master node is essential for the 4.3BSD TENPO synchronization method. 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. Also, 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 finding the average time of all nodes increases.

これに対し、分散型の制御を採用している文献
2記載の方式では、分散型ではあるものの、最も
速いクロツクをもつ1つのプロセツサがシステム
内の時刻を支配する結果となる。また、文献3の
方法は、すべてのプロセツサが互いにすべてのプ
ロセツサと通信を行なうために、実際のシステム
に適用する場合に通信のオーバヘツドが問題とな
る。
On the other hand, in the method described in Reference 2 which employs distributed control, although it is distributed, one processor with the fastest clock controls the time within the system. Further, in the method of Reference 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 can be reduced. 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 the conventional method without causing an excessive increase in processing overhead.

(問題を解決するための手段) 本発明によれば、n個のプロセツサからなるマ
ルチプロセツサシステムのクロツク同期方式にお
いて、前記プロセツサは時刻を示すクロツクとラ
ンダム変数を生成する手段を具備し、該ランダム
変数生成手段m/n(mはnより小さい正数)の
確率で1を、(1−m/n)の確率で0を選択す
るようになつており、各プロセツサはあらかじめ
定められた周期毎にランダム変数を選択し、該選
択されたランダム変数が1の場合にはクロツクが
あらかじめ定められた時刻を示すときに全てのプ
ロセツサにクロツク情報を送出し、クロツク情報
を受信した全てのプロセツサでは受信した全ての
クロツク情報に基づき各自のクロツクを制御する
ことを特徴とするマルチプロセツサシステムにお
けるクロツク同期方式が得られる。
(Means for Solving the Problem) According to the present invention, in a clock synchronization method for a multiprocessor system consisting of n processors, the processor is provided with a clock indicating time and means for generating a random variable; The random variable generation means selects 1 with a probability of m/n (m is a positive number smaller than n) and 0 with a probability of (1-m/n), and each processor selects a predetermined period. If the selected random variable is 1, clock information is sent to all processors when the clock indicates a predetermined time, and all processors that received the clock information A clock synchronization method in a multiprocessor system is obtained, which is characterized in that each clock is controlled based on all received clock information.

(発明の原理) 本発明の原理について、第3図を参照して説明
する。第3図は、マルチプロセツサシステムの具
体例を示す。各プロセツサ301,302,30
3,304,305は、自己の時刻を示すクロツ
クを備えている。また、各プロセツサはランダム
変数vを生成する手段を備えており、あらかじめ
与えられた確率pでv=1を、確率(1−p)で
v=0が選択されるようになつている。さらに各
プロセツサは任意のプロセツサのクロツク情報を
読み出せるよう、相互に論理的な通信路により結
合されており、例えばプロセツサ303とプロセ
ツサ304の間は通信路306により接続されて
いる。互いにプロセツサが共通にアクセスできる
共有メモリを持たないマルチプロセツサシステム
においては、システムが初期状態の時に、各プロ
セツサのクロツクは同一の時刻を示してはいな
い。しかも同じ値からスタートしたクロツクも、
凡そ同じ割合で時刻を測定するものの、時刻の経
過にともない徐々にずれて行く。従つて、各プロ
セツサは以下に説明する本同期方式に従い、メツ
セージ通信により互いにクロツクの調整を行う必
要がある。この結果、すべてのプロセツサのクロ
ツクがある同期精度の範囲内で同一の時刻を指す
ように制御される。
(Principle of the invention) The principle of the invention will be explained with reference to FIG. FIG. 3 shows a specific example of a multiprocessor system. Each processor 301, 302, 30
3, 304, and 305 are equipped with clocks that indicate their own time. Furthermore, each processor is equipped with means for generating a random variable v, so that v=1 is selected with a predetermined probability p, and v=0 is selected with a probability (1-p). Further, 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, processors 303 and 304 are connected by a communication path 306. In a multiprocessor system that does not have a shared memory that can be commonly accessed by processors, the clocks of each processor do not indicate the same time when the system is in its initial state. Moreover, the clock started from the same value,
Although the time is measured at roughly the same rate, the time gradually deviates as time passes. Therefore, it is necessary for each processor to mutually adjust their clocks 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.

本同期方式では、各プロセツサは、自プロセツ
サのクロツクが予め決められた時刻になる毎に
(例えば、1:00,2:00,3:00というように
定められた時刻になる毎に)、変数vの値を選択
し、もしv=1ならば自己のクロツク値を全ての
プロセツサに送出する。またクロツクを受信した
プロセツサでは受信した全てのクロツク値とクロ
ツク値を受信した自プロセツサの時刻との差分を
とり、その差分の平均値Δによりクロツクの調整
を行なうものである。即ち、Δが正ならば自クロ
ツク値にΔを加算し、Δが負ならば自クロツクを
Δだけ停止させる。ここで、全プロセツサ数をn
とし、v=1をとる確率をm/nとなるようにセ
ツトすると、1回の制御あたり平均m個のプロセ
ツサが自己のクロツクを全プロセツサに送出する
ことになる。各プロセツサではこの平均m個のプ
ロセツサからのクロツク値の平均値に自分のクロ
ツク値をあわせることになる。
In this synchronization method, each processor clocks its own processor at a predetermined time (for example, at a predetermined time such as 1:00, 2:00, or 3:00). Select the value of the variable v, and if v=1, send the own clock value to all processors. 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 using 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 Δ. Here, the total number of processors is n
If we set the probability of v=1 to be m/n, on average m processors will send their own clocks to all processors per control. Each processor adjusts its own clock value to this average value of the clock values from m processors.

例えば各プロセツサのクロツク値が第3図に示
すような値をとつている場合について本発明の動
作を説明する。このとき、各プロセツサは各自の
時計が1:00を指すときに変数vの値を選択し制
御を開始するものとする。また、確率2/5でv=
1を、確率3/5でv=0を選ぶものとする。いま、
プロセツサ301とプロセツサ302がv=1を
選択し、他のプロセツサはv=0を選択したもの
とする。通信遅延を無視すると、まずプロセツサ
301が最初に1:00に到達し、そのクロツク値
(1:00)をすべてのプロセツサに送出する。各
プロセツサではプロセツサ301のクロツク値を
受信すると自己のクロツク値との差分をとる。差
分値は、プロセツサ301では0、プロセツサ3
02では+6、プロセツサ303では+4、プロ
セツサ304では+8、プロセツサ305では+
2となる。
For example, the operation of the present invention will be described in the case where the clock values of each processor take values as shown in FIG. At this time, each processor selects the value of the variable v and starts control when its own clock indicates 1:00. Also, v= with probability 2/5
1, choose v=0 with probability 3/5. now,
It is assumed that processors 301 and 302 select v=1, and the other processors select v=0. Ignoring communication delays, processor 301 reaches 1:00 first and sends its clock value (1:00) to all processors. When each processor receives the clock value of processor 301, it calculates the difference between it and its own clock value. The difference value is 0 for processor 301 and 0 for processor 3.
+6 for processor 02, +4 for processor 303, +8 for processor 304, and +6 for processor 305.
It becomes 2.

続いてプロセツサ302が1:00に達したとき
にクロツク値を送出し、そのクロツク値を全ての
プロセツサが受信するわけである。各プロセツサ
での差分値は、プロセツサ301では−6、プロ
セツサ302では0、プロセツサ303では−
2、プロセツサ304では+2、プロセツサ30
5では−4となる。よつて、各プロセツサは上記
の差分値の平均値をとり、その値をプロセツサ3
01では−3、プロセツサ302では+3、プロ
セツサ303では+1、プロセツサ304では+
5、プロセツサ305では−1となる。この差分
値の平均値に基づき、先に示したクロツク値の調
整を行なうこととすると、プロセツサ301のク
ロツクは3分遅らされ、プロセツサ302のクロ
ツクは3分進められ、プロセツサ303のクロツ
クは1分進められ、プロセツサ304のクロツク
は5分進められ、プロセツサ305のクロツクは
1分遅らされ、全てのプロセツサのクロツク値が
同一の値となるように調整されることがわかる。
この例では、説明の容易さのため各プロセツサの
クロツクドリフトおよび伝送路遅延は十分小さい
として無視している。以上の制御はすべてのプロ
セツサが、自分のもつクロツクが予め定められた
時刻になる毎に繰り返し行う。勿論、選択される
変数vの値は各時刻にてランダムであるので、各
時刻毎に自己のクロツクを送出するプロセツサお
よびプロセツサ数は結果としてランダムとなる。
Subsequently, when processor 302 reaches 1:00, it sends out a clock value, which is received by all processors. The difference values for each processor are -6 for processor 301, 0 for processor 302, and -6 for processor 303.
2.+2 for processor 304, processor 30
5 becomes -4. Therefore, each processor takes the average value of the above-mentioned difference values and sends that value to processor 3.
-3 for processor 01, +3 for processor 302, +1 for processor 303, and + for processor 304.
5. The processor 305 becomes -1. If the clock values shown above are adjusted based on the average value of the difference values, the clock of processor 301 will be delayed by 3 minutes, the clock of processor 302 will be advanced by 3 minutes, and the clock of processor 303 will be delayed by 1 minute. It can be seen that the clock of processor 304 is advanced by 5 minutes, the clock of processor 305 is delayed by 1 minute, and the clock values of all processors are adjusted to the same value.
In this example, for ease of explanation, the clock drift and transmission path delay of each processor are ignored as they are sufficiently small. The above control is repeatedly performed by all processors each time their own clock reaches a predetermined time. Of course, since the value of the variable v selected is random at each time, the processors that send their own clocks and the number of processors at each time are random as a result.

このようにすべてのプロセツサは、完全対等な
立場にあり全く同一のアルゴリズムを実施する。
このランダムに選択されたプロセツサのみがその
クロツク値を送出するので、従来に比べ通信量を
削減することができる。また、1つのプロセツサ
のみがシステムの時刻を制御するのではなく、複
数のプロセツサの平均時刻でシステム時刻を制御
することにより、耐障害性のある時刻制御が可能
となる。さらに、耐障害性の度合いは、変数vが
1をとる確率を変えることで柔軟に制御すること
ができる。
In this way, all processors are on completely equal footing and execute exactly the same algorithm.
Since only this randomly selected processor sends out its clock value, the amount of communication can be reduced compared to the conventional method. Moreover, by controlling the system time based on the average time of a plurality of processors, rather than using only one processor to control the system time, fault-tolerant time control becomes possible. Furthermore, the degree of fault tolerance can be flexibly controlled by changing the probability that the variable v takes 1.

(発明の詳細な説明) 第1図a,b,cに本発明の方式を実現するた
めに各プロセツサにて実行される制御の一フロー
チヤート例を示す。第1図aはクロツク情報の送
信制御を示すフローチヤート例であり、第1図b
はクロツク情報の受信制御を示すフローチヤート
例であり、第1図cはクロツク受信処理の詳細を
示すフローチヤート例である。まず第1図aの送
信制御フローチヤートの説明を行なう。各プロセ
ツサでは、ブロツク101にてクロツク割込み1
を検出すると、ブロツク102にてランダム変数
vを選択する。この変数vは1と0とをそれぞれ
確率pおよび(1−p)でとるものである。10
3のブロツクでは選択されたvの値により制御の
スイツチが行なわれ、もしv=1ならばブロツク
104でクロツク割込み2を待ち、クロツク割込
み2が検出されるとブロツク105にて自己のク
ロツク値を全プロセツサに送出し、送出後に送信
制御処理を終了してブロツク101に戻る。ま
た、v=0ならばブロツク101に戻り、次の周
期のクロツク割込み1を待つ。第1図bの受信制
御では、各プロセツサにてブロツク101でクロ
ツク割込み1を検出すると、ブロツク110のク
ロツク受信処理を実行する。なお、ブロツク11
0のクロツク受信処理の詳細を示す一フローチヤ
ート例は第1図cに示しており、後で説明を加え
る。ブロツク110の受信処理が終了すると、受
信した全てのクロツク値と自クロツク値との差分
の平均値Δを、ブロツク111にて算出する。ブ
ロツク112では算出されたΔの正負により制御
のスイツチを行ない。もしΔが正ならばブロツク
113にて自クロツク値にΔを加算して自クロツ
クの調整を行なう。もしΔが負ならば、ブロツク
114にて自クロツクをΔだけ停止させて自クロ
ツクの調整を行なう。ブロツク113あるいは1
14の処理が終了すると、ブロツク101に戻
り、次の周期でのクロツク制御を開始するための
クロツク割込み1を待つ。
(Detailed Description of the Invention) FIGS. 1a, 1b, and 1c show an example of a flowchart of control executed by each processor to implement the method of the present invention. FIG. 1a is an example of a flowchart showing clock information transmission control, and FIG.
1 is an example of a flowchart showing control of reception of clock information, and FIG. 1c is an example of a flowchart showing details of clock reception processing. First, the transmission control flowchart shown in FIG. 1a will be explained. In each processor, block 101 handles clock interrupt 1.
When detected, a random variable v is selected in block 102. This variable v takes 1 and 0 with probabilities p and (1-p), respectively. 10
In block 3, control is switched according to the selected value of v. If v=1, block 104 waits for clock interrupt 2, and when clock interrupt 2 is detected, block 105 sets its own clock value. The data is sent to all processors, and after the data is sent, the transmission control process ends and the process returns to block 101. If v=0, the process returns to block 101 and waits for the next cycle of clock interrupt 1. In the reception control shown in FIG. 1B, when clock interrupt 1 is detected in block 101 in each processor, clock reception processing in block 110 is executed. In addition, block 11
An example flowchart illustrating the details of the 0 clock reception process is shown in FIG. 1c, and will be explained later. When the reception process in block 110 is completed, block 111 calculates the average value Δ of the differences between all the received clock values and the own clock value. In block 112, control is switched depending on whether the calculated Δ is positive or negative. If Δ is positive, in block 113 Δ is added to the own clock value to adjust the own clock. If Δ is negative, in block 114 the own clock is stopped by Δ and the own clock is adjusted. Block 113 or 1
When the process in step 14 is completed, the process returns to block 101 and waits for clock interrupt 1 to start clock control in the next cycle.

第1図cのフローチヤート例を用いて、第1図
bのブロツク110に示したクロツク受信処理を
次に説明する。クロツク受信処理に入ると、ブロ
ツク120にてタイマがセツトされる。続いてブ
ロツク121にて送出されてくるクロツクの受信
待ちになる。ブロツク122ではセツトしたタイ
マがタイムアウトしたかどうかの判定を行ない、
もしタイムアウトしたならば受信処理を抜ける。
またタイムアウトしていなければ、クロツクが到
着したときにブロツク123にてクロツクの受信
がなされる。続くブロツク124では受信された
クロツクと自クロツク値との差分を求め、格納し
ておく。さらに続くブロツク125にてタイムア
ウト判定がなされ、もしタイムアウトならば受信
処理を終了し、タイムアウトでなければブロツク
121に戻つて新たなクロツク受信待ちの状態に
なる。
The clock reception process shown in block 110 of FIG. 1b will now be described using the example flowchart of FIG. 1c. Upon entering the clock reception process, a timer is set in block 120. Next, in block 121, the device waits for reception of the clock sent out. Block 122 determines whether the set timer has timed out.
If a timeout occurs, the reception process is exited.
If the clock has not timed out, the clock is received at block 123 when the clock arrives. In the following block 124, the difference between the received clock and the own clock value is calculated and stored. Further, in the subsequent block 125, a timeout determination is made, and if the timeout occurs, the reception processing is terminated, and if the timeout does not occur, the process returns to the block 121 and enters the state of waiting for new clock reception.

第2図に本発明のクロツク同期方式のタイミン
グチヤートの一例を示す。横軸は時間の推移を示
し、クロツク割込み1検出で各ブロセツサのクロ
ツク制御周期が開始される。図に示すように、ク
ロツク受信時間領域の窓が設けられ、その間に到
着したクロツク情報によつて各プロセツサのクロ
ツク値が調整されるわけである。なお、図におい
て、時間軸の上側はクロツク受信処理を示してお
り、下側はクロツク送信処理を示している。
FIG. 2 shows an example of a timing chart of the clock synchronization method of the present invention. The horizontal axis shows the change in time, and the clock control cycle of each processor is started when clock interrupt 1 is detected. As shown in the figure, a window is provided in the clock reception time domain, and the clock value of each processor is adjusted according to the clock information that arrives during that window. In the figure, the upper part of the time axis shows clock reception processing, and the lower part shows clock transmission processing.

(発明の効果) このように、本発明のクロツク同期方式を用い
ることにより、マルチプロセツサシステムにおい
て、集中制御を行なうプロセツサを設けることな
く、すべてのプロセツサを対等に動作させて、各
プロセツサのクロツクを共通な時刻を指すように
制御することができる。クロツク同期制御を行な
うプロセツサは、同期周期ごとにランダムに選択
されることになり、特定のプロセツサの障害がシ
ステムに致命的な障害を与えることがなく高い信
頼性が確保できる。また、この信頼性の度合いは
ランダム変数vが1をとる確率を制御することで
柔軟に変えることが可能である。さらに、固定の
数のプロセツサが各同期周期毎に選択されるので
はなく、同期制御用にクロツクを送出するプロセ
ツサ数もランダムであり、各周期毎に平均値とし
て与えられるので、制御にともなうデツドロツク
状態を回避することが容易である。また、全ての
プロセツサのクロツク値を用いて同期制御を行な
うものではなく、部分プロセツサ集合のクロツク
値を用いて制御がなされるので、プロセツサ数が
増えた場合にも同期制御に要する処理時間が極端
に増大することはない。
(Effects of the Invention) As described above, by using the clock synchronization method of the present invention, in a multiprocessor system, all processors can be operated equally, and each processor's clock can be synchronized. can be controlled to point to a common time. The processor that performs clock synchronization control is randomly selected for each synchronization cycle, and a failure in a particular processor will not cause a fatal failure to the system, ensuring high reliability. Further, the degree of reliability can be flexibly changed by controlling the probability that the random variable v takes 1. Furthermore, instead of a fixed number of processors being selected for each synchronization period, the number of processors that send out clocks for synchronization control is also random and given as an average value for each period, so the deadlock caused by control is The situation is easy to avoid. Furthermore, since synchronous control is not performed using the clock values of all processors, but is performed using the clock values of a partial set of processors, the processing time required for synchronous control becomes extremely large even when the number of processors increases. It will not increase.

以上のように本発明により得られる効果は大き
い。
As described above, the effects obtained by the present invention are significant.

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

第1図a,b,cは、本発明によるクロツク同
期方式の一実施例を示すフローチヤート、第2図
は、本発明によるクロツク同期方式の制御タイミ
ングチヤート、第3図は本発明の原理を説明する
ためのマルチプロセツサシステムの一例を示す図
である。 図において、101〜105,110〜114
および120〜125は制御ブロツク、301〜
305はプロセツサ、306はプロセツサ303
とプロセツサ304間の論理的な通信路を示す。
1a, b, and c 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 FIG. 3 is a flow chart showing the principle of the present invention. 1 is a diagram showing an example of a multiprocessor system for explanation. FIG. In the figure, 101-105, 110-114
and 120 to 125 are control blocks, 301 to 125 are control blocks;
305 is a processor, 306 is a processor 303
3 shows a logical communication path between the processor 304 and the processor 304.

Claims (1)

【特許請求の範囲】 1 n個のプロセツサからなるマルチプロセツサ
システムのクロツク同期方式において、前記プロ
セツサは時刻を示すクロツクとランダム変数を生
成する手段を具備し、該ランダム変数生成手段は
m/n(mはnより小さい整数)の確率で1を、
(1−m/n)の確率で0を選択するようになつ
ており、各プロセツサはあらかじめ定められた周
期毎にランダム変数を選択し、該選択されたラン
ダム変数が1の場合にはクロツクがあらかじめ定
められた時刻を示すときに全てのプロセツサにク
ロツク情報を送出し、クロツク情報を受信した全
てのプロセツサでは受信した全てのクロツク情報
に基づき各自のクロツクを制御することを特徴と
するマルチプロセツサシステムにおけるクロツク
同期方式。 2 前記各プロセツサは任意時間の経過を測定で
きるタイマを具備し、前記受信した全てのクロツ
ク情報の平均時刻が、自分のクロツクの示す時刻
よりもΔ進んでいる場合は自分のクロツクにΔを
加算し、前記平均時刻が自分のクロツクの示す時
刻よりもΔ遅れている場合は、前記タイマが時間
Δの経過を通知するまで自分のクロツクを停止さ
せることを特徴とする特許請求の範囲第1項記載
のマルチプロセツサシステムにおけるクロツク同
期方式。
[Claims] 1. In a clock synchronization method for a multiprocessor system consisting of n processors, the processor is equipped with a clock indicating time and means for generating a random variable, and the random variable generating means is m/n. 1 with probability (m is an integer smaller than n),
0 is selected with a probability of (1-m/n), and each processor selects a random variable at predetermined intervals, and if the selected random variable is 1, the clock is A multiprocessor characterized in that clock information is sent to all processors when a predetermined time is indicated, and all processors that receive the clock information control their own clocks based on all the received clock information. Clock synchronization method in the system. 2. Each of the processors is equipped with a timer that can measure the passage of arbitrary time, and if the average time of all the received clock information is ahead of the time indicated by its own clock by Δ, it adds Δ to its own clock. However, if the average time is behind the time indicated by the own clock by Δ, the own clock is stopped until the timer notifies that the time Δ has elapsed. Clock synchronization method in the described multiprocessor system.
JP62273817A 1987-10-06 1987-10-28 Clock synchronizing system in multiprocessor system Granted JPH01114964A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP62273817A JPH01114964A (en) 1987-10-28 1987-10-28 Clock synchronizing system in multiprocessor system
US07/253,478 US5041966A (en) 1987-10-06 1988-10-05 Partially distributed method for clock synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62273817A JPH01114964A (en) 1987-10-28 1987-10-28 Clock synchronizing system in multiprocessor system

Publications (2)

Publication Number Publication Date
JPH01114964A JPH01114964A (en) 1989-05-08
JPH0528866B2 true JPH0528866B2 (en) 1993-04-27

Family

ID=17532972

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62273817A Granted JPH01114964A (en) 1987-10-06 1987-10-28 Clock synchronizing system in multiprocessor system

Country Status (1)

Country Link
JP (1) JPH01114964A (en)

Also Published As

Publication number Publication date
JPH01114964A (en) 1989-05-08

Similar Documents

Publication Publication Date Title
US8601165B2 (en) Method for synchronization in networks
Dolev et al. Dynamic fault-tolerant clock synchronization
Halpern et al. Fault-tolerant clock synchronization
JP3748204B2 (en) Periodic control synchronization system
US4531185A (en) Centralized synchronization of clocks
US7334014B2 (en) Consistent time service for fault-tolerant distributed systems
Arvind Probabilistic clock synchronization in distributed systems
US6351821B1 (en) System and method for synchronizing time across a computer cluster
JPH0432940A (en) Decentralized data base system
CN110138489A (en) RTC clock synchronization adjustment method and device
JPH0528866B2 (en)
JPH02114360A (en) Clock synchronizing method for multiprocessor system
JPH0528867B2 (en)
de Azevedo et al. Multistep interactive convergence: An efficient approach to the fault-tolerant clock synchronization of large multicomputers
JPH02114359A (en) Clock synchronizing method for multiprocessor system
CN101601251A (en) Layer-1 configuration in the definition coordinated timing network
EP0223031A2 (en) Clock synchronisation in a distributed processing system
JPH0528864B2 (en)
JPH01270119A (en) Clock synchronizing system in multiprocessor system
JPH0528863B2 (en)
CN115373904B (en) Lease dynamic continuation method, device and equipment in distributed system
CN117354202B (en) Synchronous delay detection method and device
Jones Experiments in high precision clock synchronisation.
Beck et al. Implementation issues in clock synchronization
JPH0528865B2 (en)