JPS63137314A - Timer control system - Google Patents

Timer control system

Info

Publication number
JPS63137314A
JPS63137314A JP61284683A JP28468386A JPS63137314A JP S63137314 A JPS63137314 A JP S63137314A JP 61284683 A JP61284683 A JP 61284683A JP 28468386 A JP28468386 A JP 28468386A JP S63137314 A JPS63137314 A JP S63137314A
Authority
JP
Japan
Prior art keywords
timer
event
time
value
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP61284683A
Other languages
Japanese (ja)
Other versions
JPH0447326B2 (en
Inventor
Yoshiyuki Sugimoto
杉本 美幸
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
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP61284683A priority Critical patent/JPS63137314A/en
Publication of JPS63137314A publication Critical patent/JPS63137314A/en
Publication of JPH0447326B2 publication Critical patent/JPH0447326B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To improve processing efficiency by comparing the value of a timer table with the value of a self-timer table at the time of processing a time-out event, when the result is dissident, inhibiting said processing. CONSTITUTION:A computer system 2 provided with a timer 1 has a timer control program 3, a body program 4 and each is provided with timer tables 5, 6, respectively. At the time of processing an event requiring time monitoring, the body program 3 adds '1' to the value of the timer table 6, then generates a time monitoring request to the timer control program 3. The program 3 adds '1' to the value of the timer table 5 on the basis of said request, and after the N times of interruption generated every fixed time, adds the value of the timer table 5 to N and forms time-out to the body program 4. The value of the timer table 5 is compared with the value of the timer table 6 and whether both the values are the same or not is checked to decide whether time-out event is generated or not.

Description

【発明の詳細な説明】 〔概要〕 タイマからの割込みにより時間監視を行うタイマ制御プ
ログラムと、このタイマ制御プログラムに時間監視要求
を発行する本体プログラムとが非同期で動作するため、
夫々タイマテーブルを設けて、最新の事象処理の時間監
視であるか否かを照合可能とし、タイムアウト発生時の
処理に不都合が生じないように、本体プログラムが余分
な処理を行うことを不要とする。
[Detailed Description of the Invention] [Summary] Since the timer control program that monitors time using interrupts from the timer and the main program that issues time monitoring requests to this timer control program operate asynchronously,
A timer table is provided for each to enable checking whether the time of the latest event processing is being monitored or not, so that the main program does not need to perform extra processing so that there is no inconvenience in processing when a timeout occurs. .

〔産業上の利用分野〕[Industrial application field]

本発明はタイマからの割込みによって時間監視を行う計
算機システムに係り、特に該タイマを制御するタイマ制
御プログラムと、該タイマ制御プログラムからタイムア
ウトの発生を通知される本体プログラムが、非同期で動
作することによる余分な処理を不要とするタイマ管理方
式に関する。
The present invention relates to a computer system that monitors time using interrupts from a timer, and in particular, a timer control program that controls the timer and a main body program that is notified of the occurrence of a timeout from the timer control program operate asynchronously. This invention relates to a timer management method that eliminates the need for extra processing.

計算機システムにおいては、タイマを使用して成る事象
を処理する時間を管理しており、この事象が所定の時間
内に処理が完了しない場合、タイマからの割込みにより
タイムアウト処理を行っている。例えば入出力装置の正
常終了までの時間をタイマにより監視し、所定時間内に
終了しなければ、異常と判定してタイムアウト処理を行
う。
In computer systems, a timer is used to manage the time for processing an event, and if the processing of the event is not completed within a predetermined time, timeout processing is performed by an interrupt from the timer. For example, a timer monitors the time until normal termination of the input/output device, and if the input/output device does not terminate within a predetermined time, it is determined to be abnormal and timeout processing is performed.

ところで、このタイマを制御するタイマ制御プログラム
は、タイマから単位時間毎に割込まれる回数によって、
時間の管理を行っており、N回の割込みがあると、タイ
ムアウトと判定し、タイムアウト発生の事象として本体
プログラムに通知する。
By the way, the timer control program that controls this timer depends on the number of times the timer interrupts each unit time.
It manages time, and if there are N interruptions, it is determined that a timeout has occurred, and the main program is notified as a timeout occurrence event.

本体プログラムは各種の発生した事象を通知された順に
処理して行くため、タイムアウトの発生した時刻と、こ
のタイムアウトによる事象を処理する時刻とで、時間差
が発生するが、この時間差により本体プログラムに余分
な処理が発生し、ないことが必要である。
Since the main program processes various events that occur in the order in which they are notified, there is a time difference between the time when a timeout occurs and the time when the event due to this timeout is processed. processing occurs, and it is necessary that there be no such processing.

〔従来の技術〕[Conventional technology]

第3図は従来のタイマ管理方式を説明するブロック図で
ある。
FIG. 3 is a block diagram illustrating a conventional timer management system.

計算機システム2の動作を制御する本体プログラム4は
、状態とその状態の遷移をうながす要因とを事象とし、
これを処理することにより状態を遷移させて行く。本体
プログラム4は時間監視を必要とする事象を処理する時
、タイマ制御プログラム3に対し、時間監視要求を発行
する。
The main program 4 that controls the operation of the computer system 2 defines a state and a factor that prompts the transition of the state as an event,
By processing this, the state will be transitioned. When the main program 4 processes an event requiring time monitoring, it issues a time monitoring request to the timer control program 3.

タイマ1からは一定時間毎にタイマ制御プログラム3に
割込みが入り、タイマ制御プログラム3はN回この割込
みがあると、タイムアウトを本体プログラム4に通知す
る。
The timer 1 issues an interrupt to the timer control program 3 at regular intervals, and the timer control program 3 notifies the main program 4 of a timeout when this interrupt occurs N times.

第4図は第3図の動作を説明するタイムチャートである
FIG. 4 is a time chart explaining the operation of FIG. 3.

本体プログラム4は事象処理待ち行列に示す如く、事象
A1事象B、事象C1事象りと処理すべき事象の処理待
ち行列がある場合、この行列の先頭から順次処理して行
く。事象Aを処理する時、時間監視を必要とする場合、
本体プログラム4は、事象Aの処理中に■で示す如くタ
イマ制御プロ、グラム3に時間監視要求を送出する。
If there is a processing queue of events to be processed, such as event A, event B, and event C1, as shown in the event processing queue, the main program 4 processes the events sequentially from the head of this queue. When processing event A, if time monitoring is required,
During the processing of event A, main program 4 sends a time monitoring request to timer control program program 3, as shown by ■.

タイマ制御プログラム3は本体プログラム4とは非同期
で動作し、この時間監視要求により時刻T1でタイマ1
から入る割込み回数の蓄積を開始する。そして、N回蓄
積された時刻T2で■に示す如くタイムアウト事象を作
成し、事象処理待ち行列に事象Eとしてつなぐ。
The timer control program 3 operates asynchronously with the main body program 4, and due to this time monitoring request, timer 1 is activated at time T1.
Starts accumulating the number of interrupts that occur. Then, at time T2 when the event has been accumulated N times, a timeout event is created as shown in (3) and connected as event E to the event processing queue.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記の如く、事象Aで時間監視を要求した結果のタイム
アウトは、事象Eとして事象処理待ち行列につなげられ
るが、本体プログラム4は事象B。
As mentioned above, the timeout as a result of requesting time monitoring in event A is connected to the event processing queue as event E, but main program 4 processes it as event B.

事象C1事象りと順次各事象を処理し、その後事象Eの
処理を行うため、事象Eを処理する時刻T4は、時刻T
2より遅く時間差が住する。
Since event C1 is processed sequentially and event E is processed thereafter, time T4 at which event E is processed is time T4.
There is a time difference later than 2.

本体プログラム4が事象Cを処理する際、時間監視を必
要とすると、タイマ制御プログラム3に■で示す如く、
事象Cの処理中に時間監視要求を送出する。この時刻が
T、であるとすると、この時刻はT4より早いため、事
象Eで処理するタイムアウトは、事象Aで要求した時間
監視の結果か、事象Cで要求した時間監視の結果かが判
別出来なくなる。従って、本体プログラム4は下記の処
理を行っている。
When the main program 4 processes event C, if time monitoring is required, the timer control program 3 will have the following information as shown by ■.
A time monitoring request is sent during the processing of event C. Assuming that this time is T, this time is earlier than T4, so it cannot be determined whether the timeout processed by event E is the result of time monitoring requested by event A or time monitoring requested by event C. It disappears. Therefore, the main program 4 performs the following processing.

第5図は時間監視要求時の処理を説明するフローチャー
トである。
FIG. 5 is a flowchart illustrating processing when time monitoring is requested.

本体プログラム4はタイマ制御プログラム3に時間監視
を要求する際、現在タイマが動作中か否かを調べ、タイ
マが動作中ならばタイマの停止処理をタイマ制御プログ
ラム3に要求する。タイマが動作中でなければ、事象処
理待ち行列から前記事象Eの如きタイムアウト事象を検
索し、タイムアウト事象が存在したら、この事象を消去
する。
When the main program 4 requests time monitoring to the timer control program 3, it checks whether the timer is currently operating or not, and if the timer is operating, requests the timer control program 3 to stop the timer. If the timer is not running, the event processing queue is searched for a timeout event, such as event E, and if a timeout event exists, it is deleted.

しかる後、本体プログラム4はタイマ制御プログラム3
に時間監視要求を発行する。
After that, the main program 4 becomes the timer control program 3.
Issue a time monitoring request to.

本体プログラム4はタイマ制御プログラム3に時間監視
要求を発行する度に、第5図のフローチャートに示す処
理を繰り返すため、余分な処理を必要とし、計算機シス
テムの処理効率を低下させるという問題がある。
Each time the main program 4 issues a time monitoring request to the timer control program 3, it repeats the process shown in the flowchart of FIG. 5, which requires extra processing and reduces the processing efficiency of the computer system.

〔問題点を解決するための手段〕[Means for solving problems]

第1図は本発明の一実施例を説明するブロック図である
FIG. 1 is a block diagram illustrating one embodiment of the present invention.

1〜4は第3図と同様である。5はタイマ制御プログラ
ム3内に設けたタイマテーブルで、6は本体プログラム
4内に設けたタイマテーブルである。
1 to 4 are the same as in FIG. 5 is a timer table provided in the timer control program 3, and 6 is a timer table provided in the main program 4.

本体プログラム4はタイマ制御プログラム3に時間監視
要求を送出する時、タイマテーブル6の値を+1し、タ
イマ制御プログラム3はこの時間監視要求によりタイマ
テーブル5を+1する。そして、タイムアウトが発生し
た時、タイマ制御プログラム3は本体プログラム4に対
するタイムアウト事象を作成する際、このタイマテーブ
ル5にセットされた値を通知する。
When the main program 4 sends a time monitoring request to the timer control program 3, it increments the value in the timer table 6 by 1, and the timer control program 3 increments the value in the timer table 5 by 1 in response to this time monitoring request. Then, when a timeout occurs, the timer control program 3 notifies the value set in the timer table 5 when creating a timeout event for the main program 4.

本体プログラム4はこのタイムアウト事象を処理する際
、このタイマテーブル5の値と、自己のタイマテーブル
6の値とを比較し、同一でない場合は、このタイムアウ
ト事象の処理を行わない構成とする。
When processing this timeout event, the main program 4 compares the value of this timer table 5 with the value of its own timer table 6, and if they are not the same, it is configured not to process this timeout event.

〔作用〕[Effect]

上記構成とすることにより、本体プロタラム4はタイム
アウト事象を処理する際、タイマテーブル6、の値と、
タイムアウト事象に付加されたタイマテーブル5の値を
比較し、同一であるか否かにより、タイムアウト処理が
必要な事象に対するタイムアウト事象か否かを判定する
ことが可能となるため、既に処理する必要の無いタイム
アウト事象の消去を行う第5図のフローチャートに示す
処理を不要とすることが出来る。
With the above configuration, when processing a timeout event, the main programmer 4 uses the value of the timer table 6,
By comparing the values in the timer table 5 added to timeout events and checking whether they are the same, it is possible to determine whether the timeout event corresponds to an event that requires timeout processing. The process shown in the flowchart of FIG. 5 for erasing missing timeout events can be made unnecessary.

〔実施例〕〔Example〕

第1図において、本体プログラムtは時間監視を必要と
する事象を処理する時、タイマテーブル6の値を+1し
てから、タイマ制御プログラム3に対し、時間監視要求
を発行する。タイマ制御プログラム3はこの時間監視要
求により、タイマテーブル5の値を+1する。
In FIG. 1, when the main program t processes an event requiring time monitoring, it increments the value of the timer table 6 by 1 and then issues a time monitoring request to the timer control program 3. The timer control program 3 increments the value of the timer table 5 by 1 in response to this time monitoring request.

タイマーからは一定時間毎にタイマ制御プログラム3に
割込みが入り、タイマ制御プログラム3は8回この割込
みがあると、タイマテーブル5の値を付加してタイムア
ウトを本体プログラム4に通知する。
The timer issues an interrupt to the timer control program 3 at regular intervals, and when the timer control program 3 receives this interrupt eight times, it adds the value of the timer table 5 and notifies the main program 4 of the timeout.

第2図は第1図の動作を説明するタイムチャートである
FIG. 2 is a time chart explaining the operation of FIG. 1.

本体プログラム4は事象処理待ち行列に示す如く、事象
A、事象B、事象C1事象りと処理すべき事象の処理待
ち行列がある場合、この行列の先頭から順次処理して行
く。事象Aを処理する時、時間監視を必要とする場合、
本体プログラム4は、事象への処理中にタイマテーブル
6の値を「1」として、■で示す如くタイマ制御プログ
ラム3に時間監視要求を送出する。
As shown in the event processing queue, if there is a processing queue of events to be processed, such as event A, event B, and event C1, the main program 4 processes the events sequentially from the head of the queue. When processing event A, if time monitoring is required,
The main program 4 sets the value of the timer table 6 to "1" during processing for an event, and sends a time monitoring request to the timer control program 3 as shown by ■.

タイマ制御プログラム3は本体プログラム4とは非同期
で動作し、この時間監視要求によりタイマテーブル5の
値を「1」とした後、時刻T1でタイマ1から入る割込
み回数の蓄積を開始する。
The timer control program 3 operates asynchronously with the main program 4, and after setting the value of the timer table 5 to "1" in response to this time monitoring request, it starts accumulating the number of interrupts received from the timer 1 at time T1.

そして、N回蓄積された時刻T2で■に示す如くタイム
アウト事象を作成し、タイマテーブル5の値rlJを付
加して、事象処理待ち行列に事象Eとしてつなぐ。
Then, at time T2, which has been accumulated N times, a timeout event is created as shown in ■, the value rlJ of the timer table 5 is added, and the event is connected as event E to the event processing queue.

本体プログラム4は事象B、事象C1事象りと順次各事
象を処理するが、事象Cを処理する際、時間監視を必要
とすると、事象Cの処理中にタイマテーブル6の値を「
2」として、■に示す如くタイマ制御プログラム3に時
間監視要求を送出する。
The main program 4 processes each event sequentially, such as event B and event C1, but if time monitoring is required when processing event C, the value of the timer table 6 is changed to "
2'', a time monitoring request is sent to the timer control program 3 as shown in ■.

タイマ制御プログラム3はこの時間監視要求によりタイ
マテーブル5の値を「2」とした後、時刻T3でタイマ
1から入る割込み回数の蓄積を開始する。
The timer control program 3 sets the value of the timer table 5 to "2" in response to this time monitoring request, and then starts accumulating the number of interrupts received from the timer 1 at time T3.

本体プログラム4は事象Eの処理を行う時、タイマテー
ブル6の値「2」と、事象已に付加されているタイマテ
ーブル5の値「1」とを比較する。
When the main program 4 processes event E, it compares the value "2" in the timer table 6 with the value "1" in the timer table 5 added to the event value.

この場合比較値が不一致であることから、事象Eは既に
処理する必要の無いタイムアウトであると判定し、事象
Eの処理は行わない。
In this case, since the comparison values do not match, it is determined that event E has already timed out and does not need to be processed, and event E is not processed.

〔発明の効果〕〔Effect of the invention〕

以上説明した如く、本発明はタイマテーブルの値を比較
することで、タイムアウト処理を必要とする事象である
か否かを本体プログラムが認識し得るため、タイマ制御
プログラムに時間監視要求を発行する度に、現在タイマ
が動作中か否かを調べ、動作していなければ、事象処理
待ち行列にタイムアウト事象がつながれていないかどう
かのチェックと、つながれていた場合はその事象の消去
を行う処理が不要となり、計算機システムの処理効率を
高めることが出来る。
As explained above, in the present invention, by comparing the values in the timer table, the main program can recognize whether or not the event requires timeout processing, so each time a time monitoring request is issued to the timer control program. There is no need to check whether the timer is currently running, and if it is not running, check whether a timeout event is connected to the event processing queue, and if so, delete that event. Therefore, the processing efficiency of the computer system can be improved.

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

第1図は本発明の一実施例を説明するブロック図、第2
図は第1図の動作を説明するタイムチャート、第3図は
従来のタイマ管理方式を説明するブロック図、 第4図は第3図の動作を説明するタイムチャート、第5
図は時間監視要求時の処理を説明するフローチャートで
ある。 図において、 1はタイマ、     2は計算機システム、3はタイ
マ制御プログラム、 4は本体プログラム、 5.6はタイマテーブルである。 憂 2 口 蜘タイマ含理方弐1故馴するブローン20茅 3  図 烹300)幇ガト乏ざ色貝耳する2イ乙子ヤード壬 4
− ロ
FIG. 1 is a block diagram explaining one embodiment of the present invention, and FIG.
The figures are a time chart explaining the operation of Fig. 1, Fig. 3 is a block diagram explaining the conventional timer management method, Fig. 4 is a time chart explaining the operation of Fig. 3, and Fig. 5 is a time chart explaining the operation of Fig. 3.
The figure is a flowchart illustrating processing when a time monitoring request is made. In the figure, 1 is a timer, 2 is a computer system, 3 is a timer control program, 4 is a main program, and 5.6 is a timer table. Sorrow 2 Mouth Spider Timer Contains Method 2 1 Late familiar Blown 20 茅 3 Guo 300) 2 I Otoko Yard 4
− B

Claims (1)

【特許請求の範囲】 タイマ(1)からの割込みにより所定の時間を監視する
タイマ制御プログラム(3)と、該タイマ制御プログラ
ム(3)に時間監視要求を送出し、該所定の時間経過し
てタイムアウトとなった時該タイマ制御プログラム(3
)から、事象処理待ち行列にタイムアウト事象をつなが
れて、タイムアウト処理を行う本体プログラム(4)に
より制御される計算機システム(2)において、 該本体プログラム(4)に第1のタイマテーブル(6)
と、 前記タイマ制御プログラム(3)に第2のタイマテーブ
ル(5)を設け、 本体プログラム(4)が時間監視要求をタイマ制御プロ
グラム(3)に送出する時、該第1のタイマテーブル(
6)の値を+1し、この時間監視要求を受けたタイマ制
御プログラム(3)も該第2のタイマテーブル(5)の
値を+1した後、前記タイマ(1)からの割込みにより
、時間の監視を開始して、前記所定時間の経過を検出し
た時、該第2のタイマテーブル(5)の値を付加したタ
イムアウト事象を本体プログラム(4)の事象処理待ち
行列につなぐことにより、該本体プログラム(4)がこ
の付加された第2のタイマテーブル(5)の値と、第1
のタイマテーブル(6)の値を比較し、処理すべきタイ
ムアウト事象を選択することを特徴とするタイマ管理方
式。
[Claims] A timer control program (3) that monitors a predetermined time using an interrupt from the timer (1), and a time monitoring request that is sent to the timer control program (3) so that the predetermined time elapses. When a timeout occurs, the timer control program (3
), in a computer system (2) controlled by a main program (4) that connects a timeout event to an event processing queue and performs timeout processing, the main program (4) has a first timer table (6).
A second timer table (5) is provided in the timer control program (3), and when the main program (4) sends a time monitoring request to the timer control program (3), the first timer table (5) is
After receiving this time monitoring request, the timer control program (3) also increases the value of the second timer table (5) by 1, and then changes the time by an interrupt from the timer (1). When monitoring is started and the elapse of the predetermined time is detected, the timeout event to which the value of the second timer table (5) has been added is connected to the event processing queue of the main body program (4). Program (4) uses the value of this added second timer table (5) and the first timer table.
A timer management method characterized in that a timeout event to be processed is selected by comparing values of a timer table (6).
JP61284683A 1986-11-28 1986-11-28 Timer control system Granted JPS63137314A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61284683A JPS63137314A (en) 1986-11-28 1986-11-28 Timer control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61284683A JPS63137314A (en) 1986-11-28 1986-11-28 Timer control system

Publications (2)

Publication Number Publication Date
JPS63137314A true JPS63137314A (en) 1988-06-09
JPH0447326B2 JPH0447326B2 (en) 1992-08-03

Family

ID=17681628

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61284683A Granted JPS63137314A (en) 1986-11-28 1986-11-28 Timer control system

Country Status (1)

Country Link
JP (1) JPS63137314A (en)

Also Published As

Publication number Publication date
JPH0447326B2 (en) 1992-08-03

Similar Documents

Publication Publication Date Title
US5542076A (en) Method and apparatus for adaptive interrupt servicing in data processing system
US5835765A (en) Computer operation management system for a computer operating system capable of simultaneously executing plural application programs
US20010010052A1 (en) Method for controlling multithreading
US20030021228A1 (en) Process execution method and apparatus
CA2339783A1 (en) Fault tolerant computer system
JPH0799502B2 (en) Computer system
US7925922B2 (en) Failover method and system for a computer system having clustering configuration
US7116635B2 (en) Process execution method and apparatus
JPH06274354A (en) Method and system for control of operation of destructive hardware
JPS63137314A (en) Timer control system
JP2002207691A (en) Data transfer controller
JPH10116261A (en) Check point restarting method for parallel computer system
JPS6146543A (en) Fault processing system of transfer device
JPH10269110A (en) Method for avoiding hang-up of computer system, and computer system using the same method
JPS60238938A (en) Operating method of computer system
JPH0721063A (en) Computer system monitoring device
JP2002244885A (en) Computer system monitoring system
JPS62145336A (en) Program loop detection system for computer system
JP2658683B2 (en) System stall monitoring and control method for mutual standby system
JP2000267923A (en) Method for exclusively controlling shared file processing by plural devices connected to network
JP3105025B2 (en) Redundant controller
JPH0619858A (en) Automatic return system for common resources
JPH02310755A (en) Health check system
JPH0236971B2 (en)
JPS62245456A (en) Time monitor and control system