JPS6315607B2 - - Google Patents

Info

Publication number
JPS6315607B2
JPS6315607B2 JP18218980A JP18218980A JPS6315607B2 JP S6315607 B2 JPS6315607 B2 JP S6315607B2 JP 18218980 A JP18218980 A JP 18218980A JP 18218980 A JP18218980 A JP 18218980A JP S6315607 B2 JPS6315607 B2 JP S6315607B2
Authority
JP
Japan
Prior art keywords
time
clock
processing device
information processing
value
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
Application number
JP18218980A
Other languages
Japanese (ja)
Other versions
JPS57104883A (en
Inventor
Koichi Ono
Hirohisa Fujiki
Ryozo Sakai
Yasuo Ito
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
KDDI Corp
Original Assignee
Fujitsu Ltd
Kokusai Denshin Denwa KK
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd, Kokusai Denshin Denwa KK filed Critical Fujitsu Ltd
Priority to JP18218980A priority Critical patent/JPS57104883A/en
Publication of JPS57104883A publication Critical patent/JPS57104883A/en
Publication of JPS6315607B2 publication Critical patent/JPS6315607B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G7/00Synchronisation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Electric Clocks (AREA)
  • Electromechanical Clocks (AREA)

Description

【発明の詳細な説明】 本発明は、外部の精密時計から一定時間毎に時
刻情報を読出し、読出し時刻情報に基づいて自己
のソフトウエアの持つているソフトウエア時計を
補正するようにした時刻制御方式に関するもので
ある。
DETAILED DESCRIPTION OF THE INVENTION The present invention provides a time control system that reads time information from an external precision clock at regular intervals and corrects the software clock of its own software based on the read time information. It is related to the method.

従来から外部の精密時計(以下、単に外部時計
という)を使用したソフトウエア時計の補正方式
としては、適当なタイミングでソフトウエアが外
部時計の時刻を読み、この読取つた時刻情報に基
づいてソフトウエア時計を修正する方法が一般的
であつた。しかし、この従来方式であると、より
詳細な時刻、例えばミリ秒オーダの時計を必要と
する場合、ソフトウエア走行時間などの原因によ
つて誤差が生じて来る。また、外部時計に障害が
発生した場合、次に外部時計の時刻情報を読込む
までは、外部時計の障害を検出できず、従来方式
はRAS機能が劣るという欠点がある。
Traditionally, the correction method for software clocks that uses an external precision clock (hereinafter simply referred to as an external clock) involves the software reading the time on the external clock at an appropriate timing, and then adjusting the software clock based on the read time information. A common method was to correct the clock. However, with this conventional method, when a clock with more detailed time, for example on the order of milliseconds, is required, errors occur due to causes such as software running time. Furthermore, if a failure occurs in the external clock, the failure of the external clock cannot be detected until the time information of the external clock is read in next time, and the conventional method has the disadvantage that the RAS function is inferior.

本発明は、上記の考察に基づくものであつて、
外部時計の時刻情報を読出して自己の時計の値を
定める時刻制御方式において、自己の時計の値を
正確に定め得ると共に、外部時計の障害をいちは
やく検出できるようにすることを目的としてい
る。そしてそのため、本発明の時刻制御方式は、
主時計を有する情報処理装置Mと、情報処理装置
Sとを備え、該情報処理装置Sが上記主時計の時
刻情報を読出し、この読出し時刻情報に基づいて
自己のソフトウエア時計の値を設定する時刻制御
方式において、上記情報処理装置Mは、一定時間
毎に上記情報処理装置Sに対して割込みを上げる
と共に上記情報処理装置Sからの時刻読出し要求
を受信したとき上記主時計の示す時刻情報を上記
要求元の情報処理装置Sに送出し、上記情報処理
装置Sは、一定時間が経過したことを示す上記割
込みに対して内蔵されるタイマを同期させ、上記
時刻読出し要求に対応して時刻情報が送られてき
たとき所定の処理を開始すると同時に時刻情報受
信時点における上記タイマの値aを記録し、上記
処理を終了して自己のソフトウエア時計に時刻を
設定するとき、終了時点の上記タイマの値bと上
記タイマの値aの差を求め、この差に受信した時
刻情報を加算したものを自己のソフトウエア時計
に設定することを特徴とするものである。以下、
本発明を図面を参照しつつ説明する。
The present invention is based on the above considerations, and includes:
In a time control method that reads time information from an external clock to determine the value of the own clock, the purpose is to be able to accurately determine the value of the own clock and to quickly detect a failure in the external clock. Therefore, the time control method of the present invention is
An information processing device M having a master clock and an information processing device S are provided, and the information processing device S reads time information of the master clock and sets the value of its own software clock based on the read time information. In the time control method, the information processing device M issues an interrupt to the information processing device S at regular intervals, and upon receiving a time read request from the information processing device S, reads the time information indicated by the master clock. The information processing device S synchronizes the built-in timer in response to the interrupt indicating that a certain period of time has elapsed, and responds to the time read request by transmitting the time information to the requesting information processing device S. When a predetermined process is sent, the value a of the above-mentioned timer at the time of receiving the time information is recorded. The difference between the value b of the timer and the value a of the timer is determined, and the received time information is added to this difference and the result is set in the own software clock. below,
The present invention will be explained with reference to the drawings.

第1図は本発明が適用されるシステムの構成を
示す図、第2図は本発明によるソフトウエア時計
の補正を説明する図、第3図は二重化された外部
時計を有する本発明の実施例を説明する図であ
る。
FIG. 1 is a diagram showing the configuration of a system to which the present invention is applied, FIG. 2 is a diagram explaining correction of a software clock according to the present invention, and FIG. 3 is an embodiment of the present invention having a dual external clock. FIG.

第1図において、Mは主時計を有する情報処理
装置、S1ないしSoは情報処理装置、MCLKは主
時計をそれぞれ示している。情報処理装置S1ない
しSoは、良く知られているようにCPU時計と、
ソフトウエア時計とを有している。情報処理装置
Mは、一定時間、例えば0.5秒毎に情報処理装置
S1ないしSoに対して割込みを上げる機能と、各情
報処理装置Siからの主時計読出し要求を受付けた
とき主時計の時刻情報を要求元へ送出する機能と
を有している。なお、添付iは1ないしnであ
る。各情報処理装置Siは、一定時間、例えば1分
毎に主時計読出し要求を情報処理装置Mに対して
送出する。
In FIG. 1, M indicates an information processing device having a main clock, S 1 to S o indicate information processing devices, and MCLK indicates a main clock. As is well known, the information processing devices S 1 to S o have a CPU clock,
It has a software clock. The information processing device M executes the information processing device
It has a function of raising an interrupt for S 1 to S o , and a function of sending time information of the master clock to the request source when it receives a master clock read request from each information processing device S i . Note that attachment i is 1 to n. Each information processing device S i sends a master clock read request to the information processing device M at fixed intervals, for example, every minute.

第2図は本発明によるソフトウエア時計の補正
を説明するものである。情報処理装置SiのCPU時
計はタイマであつて、例えば1ミリ秒毎にその内
容が+1されるものであり、このCPU時計は情
報処理装置Mからの0.5秒毎の割込みと同期が取
られる。即ち、10回の割込みを受けたとき、
CPU時計が例えば4.990秒を示していたとすると、
これは5.000秒と補正される。情報処理装置Siは、
ソフトウエア時計の補正のため、主時計読出し要
求を1分毎に送出する。情報処理装置Mはこの主
時計読出し要求を受付けると、主時計MCLKの
時刻情報xを情報処理装置Si側に送出する。情報
処理装置Si側は、この時計情報xを受信すると、
ソフトウエア時計補正のためのプログラムPの走
行を開始する。そして、プログラム走行開始時に
はCPU時計の値aが記録される。上記のプログ
ラムPの処理が終了し、ソフトウエア時計の値を
補正しようとするとき、そのときのCPU時計の
値bを求める。そして、送られて来た時刻情報x
に(b−a)の値を加算したものをソフトウエア
時計にセツトする。これにより、ソフトウエア時
計は、ミリ秒オーダまでの正確な値を示す。
FIG. 2 explains the correction of the software clock according to the present invention. The CPU clock of the information processing device S i is a timer, and its contents are incremented by 1 every millisecond, for example, and this CPU clock is synchronized with interrupts from the information processing device M every 0.5 seconds. . That is, when receiving 10 interrupts,
For example, if the CPU clock shows 4.990 seconds,
This is corrected to 5.000 seconds. The information processing device S i is
To correct the software clock, a master clock read request is sent every minute. When the information processing device M receives this master clock read request, it sends time information x of the master clock MCLK to the information processing device S i side. When the information processing device S i side receives this clock information x,
Program P for software clock correction starts running. Then, when the program starts running, the value a of the CPU clock is recorded. When the processing of the above program P is completed and the value of the software clock is to be corrected, the value b of the CPU clock at that time is determined. And the time information sent x
The value obtained by adding the value (ba) to the value (ba) is set in the software clock. This allows the software clock to show accurate values down to the millisecond order.

さきに述べたように、情報処理装置Mから0.5
秒間に割込みが送出される。この割込みが1秒間
にわたつて存在しないと主時計MCLKの側に障
害があつたと判断する。このように、本発明によ
れば、主時計の障害を早期に検出できる効果があ
る。
As mentioned earlier, 0.5 from information processing device M
Interrupts are sent every second. If this interrupt does not exist for one second, it is determined that there is a failure on the main clock MCLK side. As described above, according to the present invention, there is an effect that a failure of the master clock can be detected at an early stage.

第3図は主時計を二重化した本発明の実施例を
示すものである。第3図において、MCLK―0
は現用の主時計、MCLK―1は予備の主時計、
HCLKはハードウエア時計を示している。ハー
ドウエア時計HCLKは主時計MCLK―0,
MCLK―1と同じ時刻を示すように構成されて
いるものである。ハードウエア時計は、ソフトウ
エアが情報処理装置Mから送られて来る時刻情報
およびCPU時計の値を参照して作り出すもので
ある。なお、現用主時計MCLK―0の置かれて
いる情報処理装置M0と、予備の主時計の置かれ
ている情報処理装置M1は、同一の装置であつて
も良く、また異つた装置であつても良い。
FIG. 3 shows an embodiment of the present invention in which the main clock is duplicated. In Figure 3, MCLK-0
is the current main clock, MCLK-1 is the backup main clock,
HCLK indicates the hardware clock. The hardware clock HCLK is the main clock MCLK-0,
It is configured to indicate the same time as MCLK-1. The hardware clock is created by software by referring to the time information sent from the information processing device M and the value of the CPU clock. Note that the information processing device M 0 in which the current master clock MCLK-0 is located and the information processing device M 1 in which the backup master clock is located may be the same device, or they may be different devices. It's okay if it's hot.

いま、現用主時計MCLK―0から0.5秒毎の割
込みが来なくなつたとすると、直ちに予備の主時
計MCLK―1が現用とされる。また、一定時間、
例えば1時間毎に、現用の主時計MCLK―0、
予備の主時計MCLK―1およびハードウエア
HCLKの値を比較し、この結果によつて、主時
計MCLK―0またはMCLK―1の時刻機構に異
常があるかどうかを検出することが可能となる。
Now, if the current main clock MCLK-0 no longer receives interrupts every 0.5 seconds, the backup main clock MCLK-1 is immediately made active. Also, for a certain period of time,
For example, every hour, the current master clock MCLK-0,
Spare main clock MCLK-1 and hardware
The values of HCLK are compared, and based on this result, it is possible to detect whether there is an abnormality in the time mechanism of the main clock MCLK-0 or MCLK-1.

以上の説明から明らかなように、本発明によれ
ば、各情報処理装置の有しているソフトウエア時
計の値を正確に定め得ると共に、外部時計の障害
を早期に検出することが可能となる。
As is clear from the above description, according to the present invention, it is possible to accurately determine the value of the software clock possessed by each information processing device, and it is also possible to detect failures in the external clock at an early stage. .

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

第1図は本発明が適用されるシステムの構成を
示す図、第2図は本発明によるソフトウエア時計
の補正を説明する図、第3図は二重化された外部
時計を有する本発明の1実施例を説明する図であ
る。 M……主時計を有する情報処理装置、S1ないし
So……情報処理装置、MCLK……主時計、P…
…ソフトウエア時計補正のためのプログラム、
HCLK……ハードウエア時計。
FIG. 1 is a diagram showing the configuration of a system to which the present invention is applied, FIG. 2 is a diagram explaining correction of a software clock according to the present invention, and FIG. 3 is an embodiment of the present invention having a dual external clock. It is a figure explaining an example. M... Information processing device with a master clock, S 1 or
S o ...Information processing device, MCLK...Main clock, P...
...Program for software clock correction,
HCLK...Hardware clock.

Claims (1)

【特許請求の範囲】[Claims] 1 主時計を有する情報処理装置Mと、情報処理
装置Sとを備え、該情報処理装置Sが上記主時計
の時刻情報を読出し、この読出し時刻情報に基づ
いて自己のソフトウエア時計の値を設定する時刻
制御方式において、上記情報処理装置Mは、一定
時間毎に上記情報処理装置Sに対して割込みを上
げると共に上記情報処理装置Sからの時刻読出し
要求を受信したとき上記主時計の示す時刻情報を
上記要求元の情報処理装置Sに送出し、上記情報
処理装置Sは、一定時間が経過したことを示す上
記割込みに対して内蔵されるタイマを同期させ、
上記時刻読出し要求に対応して時刻情報が送られ
てきたとき所定の処理を開始すると同時に時刻情
報受信時点における上記タイマの値aを記録し、
上記処理を終了して自己のソフトウエア時計に時
刻を設定するとき、終了時点の上記タイマの値b
と上記タイマの値aの差を求め、この差に受信し
た時刻情報を加算したものを自己のソフトウエア
時計に設定することを特徴とする時刻制御方式。
1 An information processing device M having a master clock and an information processing device S are provided, and the information processing device S reads time information of the master clock and sets the value of its own software clock based on the read time information. In the time control method, the information processing device M generates an interrupt to the information processing device S at regular intervals, and upon receiving a time read request from the information processing device S, reads the time information indicated by the master clock. is sent to the requesting information processing device S, and the information processing device S synchronizes a built-in timer with the interrupt indicating that a certain period of time has passed;
When time information is sent in response to the time read request, a predetermined process is started and at the same time the value a of the timer at the time of receiving the time information is recorded;
When the above process is finished and the time is set in its own software clock, the value of the above timer at the time of completion b
A time control method characterized in that the difference between the value a and the value a of the timer is determined, and the value obtained by adding received time information to this difference is set in the own software clock.
JP18218980A 1980-12-22 1980-12-22 Time controlling system Granted JPS57104883A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18218980A JPS57104883A (en) 1980-12-22 1980-12-22 Time controlling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18218980A JPS57104883A (en) 1980-12-22 1980-12-22 Time controlling system

Publications (2)

Publication Number Publication Date
JPS57104883A JPS57104883A (en) 1982-06-30
JPS6315607B2 true JPS6315607B2 (en) 1988-04-05

Family

ID=16113888

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18218980A Granted JPS57104883A (en) 1980-12-22 1980-12-22 Time controlling system

Country Status (1)

Country Link
JP (1) JPS57104883A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4530091A (en) * 1983-07-08 1985-07-16 At&T Bell Laboratories Synchronization of real-time clocks in a packet switching system
JP5444910B2 (en) * 2009-07-22 2014-03-19 三菱電機株式会社 Synchronization system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5599630U (en) * 1978-12-29 1980-07-11

Also Published As

Publication number Publication date
JPS57104883A (en) 1982-06-30

Similar Documents

Publication Publication Date Title
EP1095332B1 (en) Synchronization of processors in a fault tolerant multi-processor system
JPS6315607B2 (en)
US7194648B2 (en) Process for time synchronization of at least two clocks in a microprocessor system
JPH0458049B2 (en)
JP2850637B2 (en) Time synchronization device for supervisory control system
JPS6352089A (en) Time synchronizing system for network
JP2924154B2 (en) Time measurement method
JP2018106513A (en) Detection device
JPH0133864B2 (en)
JPH11101883A (en) Automatic time correction method
JP3478609B2 (en) Timing system
JPH04359187A (en) Computer clock system
JPS5855535B2 (en) Multi-computer device for vehicles
JPS61145619A (en) Time correction system of electronic computer system
JPH11282569A (en) Time correcting device for information processor
JPH0748781B2 (en) Clock information processing system for electronic exchange system
JPS59176863A (en) Timer synchronizing system
JPH0282336A (en) Time holding system for communication control processing device
JP3775115B2 (en) Standard time setting method and apparatus
JPS60236088A (en) Synchronizing system of network
JPS63108292A (en) Method for controlling reference timepiece
JPS59165116A (en) Timer mechanism of electronic computer
JPH07318669A (en) Dual clock system for information machine
JPH04195408A (en) Servo motor control method
JPS6033654A (en) Inter-microprocessor data transferring system