JPH02266441A - Process end monitoring system - Google Patents

Process end monitoring system

Info

Publication number
JPH02266441A
JPH02266441A JP1086808A JP8680889A JPH02266441A JP H02266441 A JPH02266441 A JP H02266441A JP 1086808 A JP1086808 A JP 1086808A JP 8680889 A JP8680889 A JP 8680889A JP H02266441 A JPH02266441 A JP H02266441A
Authority
JP
Japan
Prior art keywords
time
task
limit
check
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.)
Pending
Application number
JP1086808A
Other languages
Japanese (ja)
Inventor
Shigeru Kanetaka
兼高 茂
Morio Kinoshita
木下 盛夫
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP1086808A priority Critical patent/JPH02266441A/en
Publication of JPH02266441A publication Critical patent/JPH02266441A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce overhead by setting up limit time generated first of all as check time, and only when the current time the check time, executing the time-over processing of a process whose limit time is less than the current time. CONSTITUTION:Without controlling time up to time-over in each process, the limit time determining time-over is controlled in each process, the first limit time out of respective limit times is set up as the check time 5213 and the current time 5212 is compared with the check time 5213 at a fixed period. When the current time 5212 exceeds the check time 5213, the time-over processing for an unended process whose limit time is smaller than the current time 5212 is executed. Since the time-over processing is executed in accordance with the limit time of the process proposed to be ended at first without executing time-over processing in each fixed period, useless time-over processing is not generated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、複数のプロセスを並行して処理する電子計算
機システムにおける。各プロセスが起動されてから終了
するまでの経過時間が、あらかしめ定めた経過時間の限
界値を越えないかを監視する方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an electronic computer system that processes a plurality of processes in parallel. The present invention relates to a method of monitoring whether the elapsed time from when each process is started to when it ends does not exceed a predetermined elapsed time limit value.

〔従来の技術〕[Conventional technology]

従来、電子計算機システムにおけるプロセスの終了時間
の監視については、特開昭58−192152号公報に
記載のように、プロセス毎に時間カウンターを持ち、プ
ロセスの起動時に時間カウンターに監視時間をセットし
ておき、一定時間々隔で発生するタイマー割込がある度
に、起動中の全てのプロセスの時間カウンターから1を
減算し、減算後の値が0か否かのチェックを行い、時間
カウンターが0となったプロセスをタイムオーバーとし
て検出する方式となっていた。
Conventionally, to monitor the end time of a process in a computer system, as described in Japanese Patent Laid-Open No. 58-192152, each process has a time counter, and the monitoring time is set in the time counter when the process is started. Every time there is a timer interrupt that occurs at regular intervals, 1 is subtracted from the time counters of all running processes, and a check is performed to see if the value after subtraction is 0. The method was to detect a process that caused a timeout as a timeout.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記の従来技術は、タイマー割込が発生する度に、その
ときに起動中の全てのプロセスに対して、時間カウンタ
ーの更新、及び時間カウンターの0チェックを行ってお
り、なんらかの異常が発生した場合などにしか、経過時
間の限界値を越えるプロセスは発生酸しないという点に
ついての配慮がされておらず、タイマ割込が発生する度
に、無駄なチェックを行うという問題点があった。
In the above conventional technology, each time a timer interrupt occurs, the time counter is updated and the time counter is checked to 0 for all processes running at that time, and if any abnormality occurs, However, no consideration was given to the fact that processes exceeding the elapsed time limit would not generate acid, and there was a problem in that wasteful checks were performed every time a timer interrupt occurred.

本発明の目的は、タイマー割込が発生する度に実行しな
ければならない処理の量を、できるだけ低減し、その結
果として、一つのプロセス当たりのプロセス経過時間監
視の為のオーバーヘッドを削減することにある。
An object of the present invention is to reduce as much as possible the amount of processing that must be performed each time a timer interrupt occurs, and as a result, reduce the overhead for monitoring process elapsed time per process. be.

〔課題を解決するための手段〕[Means to solve the problem]

従来の方式では、各プロセス毎に、経過時間の限界値を
経過する(以下、タイムオーバーと呼ぶ)までの残り時
間を管理していた。その為、一定時間間隔のタイマー割
込が発生する度に全てのプロセスの残り時間の更新が必
要であった。
In the conventional method, the remaining time until a limit value of elapsed time has passed (hereinafter referred to as time-over) has been managed for each process. Therefore, it was necessary to update the remaining time of all processes every time a timer interrupt occurred at a fixed time interval.

そこで、各プロセス毎にタイムオーバーまでの時間を管
理するのではなく、各プロセス毎にタイムオーバーとす
べき限界時刻を管理し、その中で一番早い限界時刻をチ
ェック時刻とし、一定周期で現在時刻とチェック時刻を
比較し、現在時刻がチェック時刻を越えていれば限界時
刻が、現在時刻より小さい未終了のプロセスに対しタイ
ムオーバー処理を行うようにした。またこの時限界時刻
以前に各プロセスが終了していれば、チェック時刻での
タイムオーバー処理ばから振りとなり現在実行中のプロ
セスの限界時刻の中で一番早い時刻を次のチェック時刻
とするようにしたものである。
Therefore, instead of managing the time until timeout for each process, we manage the limit time at which timeout should occur for each process, set the earliest limit time among them as the check time, and check the current time at regular intervals. The check times are compared, and if the current time exceeds the check time, time-over processing is performed for unfinished processes whose limit time is smaller than the current time. Also, if each process ends before the limit time, the timeout processing at the check time will be canceled and the next check time will be the earliest among the limit times of the currently running processes. This is what I did.

〔作用〕[Effect]

本方式では、各プロセス毎に管理するものが、タイムオ
ーバーとなるまでの残り時間ではなく、タイムオーバー
となる時刻である。この為、プロセスの開始時に当該プ
ロセスがタイムオーバーとなる時刻を設定した後は、カ
ウントダウン操作を必要としない。
In this method, what is managed for each process is not the remaining time until a timeout occurs, but the time at which a timeout occurs. Therefore, after setting the time at which the process will time out at the start of the process, there is no need to perform a countdown operation.

また、一定周期毎にタイムオーバーとなったプロセスを
タイムオーバー処理するのではなく、プロセス中の一番
早い限度時刻をチェック時刻とし一定R期毎に現在時刻
とチェック時刻とを比較するだけとなる現在時刻が、チ
ェック時刻を越えた時にはタイムオーバー処理を実施し
、同時に現在実行中のプロセス中から一番早い限度時刻
を次のチェック時刻とする6つまり、一定の周期毎にタ
イムオーバー処理するのではなく、最も早く終了が予定
されているプロセスの限界時刻に合おせて。
In addition, instead of processing a process that has timed out at regular intervals, the earliest limit time in the process is set as the check time, and the current time and check time are only compared at regular intervals. However, when the check time is exceeded, time-over processing is performed, and at the same time, the earliest limit time from among the currently executing processes is set as the next check time.6 In other words, instead of processing time-over at regular intervals, In line with the time limit of a process that is scheduled to end early.

タイムオーバー処理を行うことにより、無駄なタイムオ
ーバー処理が発生しなくなる。
By performing time-over processing, wasteful time-over processing will not occur.

〔実施例〕〔Example〕

以下1本発明の一実施例を第1図から第10図により説
明する。
An embodiment of the present invention will be described below with reference to FIGS. 1 to 10.

第1図に、本発明を実現するオンラインシステムの全体
図を示す。オンラインコントローラ1は。
FIG. 1 shows an overall diagram of an online system that implements the present invention. Online controller 1.

端末装置2から業務処理の要求を受けると、要求内容に
従いデータベース3の検索、更新等を行いその結果を端
末装置2へ返送する。オンラインコントローラ1内には
、業務処理を実行するタスク4が複数存在し、複数の業
務処理を並行して実行する。複数のタスク4でデータベ
ース3を共用するが、複数のタスク4が同時にデータベ
ース3を更新することはできない。そこで、タスク4が
データベース3の使用を開始する場合、他のタスク4に
対してデータベース3の使用を禁止してからデータベー
ス3の使用を開始し、データベース3の使用が終了した
ときに、他のタスク4に対してデータベース3の使用を
許可する。もし、タスク4がデータベース3の使用を開
始するときに、データベース3の使用が禁止されている
場合、そのタスク4は、データベース3の使用が許可さ
れるまで待たされる。
When a request for business processing is received from the terminal device 2, the database 3 is searched, updated, etc. according to the contents of the request, and the results are returned to the terminal device 2. In the online controller 1, there are a plurality of tasks 4 that execute business processes, and the plurality of business processes are executed in parallel. Although the database 3 is shared by a plurality of tasks 4, the plurality of tasks 4 cannot update the database 3 at the same time. Therefore, when task 4 starts using database 3, it prohibits other tasks 4 from using database 3 and then starts using database 3, and when task 4 finishes using database 3, Allow task 4 to use database 3. If use of database 3 is prohibited when task 4 starts using database 3, task 4 is forced to wait until use of database 3 is permitted.

この様なオンラインシステムにおいて、業務処理実行中
のタスク4に異常が発生し、タスク4が無限待ち状態に
なる可能性がある。タスク4が、他のタスク4に対して
データベース3の使用を禁止にしたままw限待ち状態に
なると、他のタスク4がデータベース3を使用できなく
なってしまう。
In such an online system, there is a possibility that an abnormality may occur in task 4 during execution of business processing, and task 4 may enter an infinite waiting state. If the task 4 enters the w-limit wait state while prohibiting other tasks 4 from using the database 3, the other tasks 4 will be unable to use the database 3.

そこで、無限待ち状態になったタスク4を、強制的に終
了させ、もしそのタスク4がデータベース3の使用を禁
止にしている場合は、他のタスク4がデータベース3を
使用できる状態にしなければならない。この為、業務処
理の種別毎に、タスク4が業務処理の実行を開始してか
ら終了するまでの経過時間の最大値(以下、限界経過時
間と呼ぶ)を定め、限界経過時間を経過しても業務処理
を終了しない(以下、タイムオーバーと呼ぶ)タスク4
がある場合、異常が発生したと見なし、そのタスク4を
強制的に終了させる。このタイムオーバーとなったタス
ク4を検出する制御を、オンラインコントローラ1のタ
イマ管理5で行う。タイマ管理5は、オペレーティング
システム6(以下、単にO8と呼ぶ)から一定時間々隔
のトリガー(以下、単にタイマ割込と呼ぶ)を受は取り
ながら、タイムオーバーとなったタスクがないかを監視
する。
Therefore, task 4 that is in an infinite wait state must be forcibly terminated, and if task 4 is prohibited from using database 3, other tasks 4 must be able to use database 3. . Therefore, for each type of business process, the maximum elapsed time (hereinafter referred to as the limit elapsed time) from when Task 4 starts executing the business process until it finishes is determined, and when the limit elapsed time has elapsed. Task 4 that does not finish the business process even after the completion of the task (hereinafter referred to as time-over)
If so, it is assumed that an abnormality has occurred, and the task 4 is forcibly terminated. The timer management 5 of the online controller 1 performs control to detect the task 4 that has timed out. The timer management 5 receives and receives triggers (hereinafter simply referred to as timer interrupts) at regular intervals from the operating system 6 (hereinafter simply referred to as O8) and monitors whether there are any tasks that have timed out. .

第2図にタイマ管理の構成を示す、タイマ管理は、タイ
マ管理を専門に行うタスク51 (以下、単にタイマタ
スクと呼ぶ)と、タイマ管理に必要なデータ52(以下
、単にタイマデータと呼ぶ)から成る。タイマタスク5
1は、オンラインコントローラ1内に唯一存在する。
Figure 2 shows the configuration of timer management. Timer management consists of a task 51 that specializes in timer management (hereinafter simply referred to as timer task) and data 52 necessary for timer management (hereinafter simply referred to as timer data). Consists of. Timer task 5
1 exists only in the online controller 1.

タイマタスク51は、タイマデータ52を参照し、オン
ラインコントローラ1内の全タスクに対してタイムオー
バーとなったタスク4がないかをチェックし、タイムオ
ーバーとなったタスク4が有る場合は、そのタスク4を
強制的に終了させる。しかし、タイマタスク51は、い
つもタイムオーバーとなったタスクがないかを監視して
いるのではなく、ある時刻を定め、その時刻にのみタイ
ムオーバーとなったタスクがないかをチェックする。タ
イマタスクが、タイムオーバーとなったタスクがないか
をチェックする時刻をチェック時刻と呼ぶ。
The timer task 51 refers to the timer data 52 and checks whether there is any task 4 that has timed out among all the tasks in the online controller 1. If there is a task 4 that has timed out, the timer task 51 executes that task 4. Force termination. However, the timer task 51 does not always monitor whether there are any tasks that have timed out, but rather determines a certain time and checks whether there are any tasks that have timed out only at that time. The time at which the timer task checks whether there are any tasks that have timed out is called the check time.

チェック時刻の決定には2つのタイミングがあり、次に
その方法を示す。
There are two timings for determining the check time, and the methods will be described below.

一つめのタイミングは、前回に定めたチェック時刻に、
タイマタスク51が起動したときであり、そのときに業
務処理を実行中でかつタイムオーバーでないタスク4の
中で、最も早くタイムオーバーとなる可能性のあるタス
ク4の、タイムオーバーとなる予定の時刻をチェック時
刻とする。
The first timing is at the previously set check time,
This is when the timer task 51 is started, and among the tasks 4 that are executing business processing at that time and are not timed out, check the time at which the timeout is scheduled for the task 4 that is most likely to timeout the earliest. shall be.

二つめのタイミングは、タスク4が業務処理の実行を開
始するときであり、業務処理を開始するタスク4が現在
時刻に限界経過時間を加え、タイムオーバーとなる時刻
(以下、限界時刻と呼ぶ)を求め、当該タスク4の限界
時刻がチェック時刻よりも遅い場合は、チェック時刻の
変更を行わないが、もし当該タスク4の限界時刻がチェ
ック時刻よりも早い場合は、当該タスク4の限界時刻を
チェック時刻とする。
The second timing is when task 4 starts executing the business process, and task 4, which starts the business process, adds the limit elapsed time to the current time and determines the time when the time will expire (hereinafter referred to as the limit time). If the limit time of the task 4 is later than the check time, the check time is not changed, but if the limit time of the task 4 is earlier than the check time, the limit time of the task 4 is checked. Time.

タイマタスク51は、O8からのタイマ割込により一定
間隔で起動する。タイマ割込により起動したタイマタス
ク51は、チェック時刻に達したかをチェックし、チェ
ック時刻に達した場合のみタイムオーバーとなったタス
ク4がないかをチェックし、チェックが終了するとチェ
ック時刻の再設定を行い、次のタイマ割込まで処理を停
止する。タイマタスク51がO8のタイマ割込により起
動されたときに、まだチェック時刻に達していない場合
は、何も処理せずに次のタイマ割込まで処理を停止する
The timer task 51 is activated at regular intervals by a timer interrupt from O8. The timer task 51 started by a timer interrupt checks whether the check time has been reached, and only when the check time has been reached, checks whether there is any task 4 that has timed out, and when the check is finished, resets the check time. and stops processing at the next timer interrupt. When the timer task 51 is activated by the timer interrupt of O8, if the check time has not yet been reached, the process is stopped at the next timer interrupt without processing anything.

第3図にタイマデータ52の構成を示す。タイマデータ
52は、オンラインシステム全体に関する情報を管理す
るシステムテーブル521、及び各タスクに関する情報
を管理するタスクテーブル522から成る。タスクテー
ブル522は、タスク4毎に作成する。各タスク4は、
当該タスク4のタスクテーブル522のアドレスを汎用
レジスタで持っており、いつでもタスクテーブル522
を参照することができる。
FIG. 3 shows the structure of the timer data 52. The timer data 52 includes a system table 521 that manages information regarding the entire online system, and a task table 522 that manages information regarding each task. The task table 522 is created for each task 4. Each task 4 is
The address of the task table 522 of the task 4 is held in a general-purpose register, and the task table 522 is stored at any time.
can be referred to.

第4図にシステムテーブル521の構成を示す。FIG. 4 shows the configuration of the system table 521.

システムテーブル521は、タスクテーブル522をチ
エインでつなぐ為の先頭タスクテーブルアドレス521
1、 l在の時刻を表示する現在時刻5212、及び次
にタイマタスク51が、タイムオーバーとなったタスク
がないかをチェックするチェック時刻5213から成る
。現在時刻5212は、タイマタスク51によって一定
時間々隔で更新されるものである。
The system table 521 has a first task table address 521 for connecting task tables 522 in a chain.
1, a current time 5212 that displays the current time, and a check time 5213 that checks whether the timer task 51 has timed out any task. The current time 5212 is updated by the timer task 51 at regular intervals.

第5図にタスクテーブル522の構成を示す。タスクテ
ーブル522は、タスクテーブル522同士をチエイン
でつなぐ為の、次タスクテーブルアドレス5221 、
システム−プル521をポイントするシステムテーブル
アドレス5222、及び当該タスクが限界経過時間を経
過し、タイムオーバーとなる限界時刻5223から成る
。ただし、業務処理を実行中でないタスクの限界時刻5
223には、0をセットする。
FIG. 5 shows the configuration of the task table 522. The task table 522 has a next task table address 5221 for connecting the task tables 522 together in a chain.
It consists of a system table address 5222 pointing to the system-pull 521, and a limit time 5223 at which the task has passed its limit elapsed time and is timed out. However, the limit time 5 for tasks that are not executing business processing
223 is set to 0.

次に、タスク4による業務処理の実行開始時の処理の流
れ、タスク4による業務処理の実行終了時の処理の流れ
、及びタイマタスク751の処理の流れを説明する。
Next, the flow of processing when the execution of business processing by task 4 starts, the flow of processing when execution of business processing by task 4 ends, and the flow of processing of timer task 751 will be described.

第6図に業務処理実行開始時の処理の流れを示す。6o
−では、汎用レジスタに持っている当該タスクテーブル
のアドレスを元に、タスクテーブル522を参照し、シ
ステムテーブルアドレス5222を求める。6bでは、
当該タスクがこれから実行する業務処理の限界経過時間
の指定値を受は取る。
FIG. 6 shows the flow of processing at the start of business processing execution. 6o
-, the system table address 5222 is obtained by referring to the task table 522 based on the address of the task table held in the general-purpose register. In 6b,
Receives the specified value of the limit elapsed time for the business process that the task will execute from now on.

6cでシステムテーブルから現在時刻5212を求める
。6dでは、6cで得た現在時刻と6bで受は取った限
界経過時間を加えて当該タスクの限界時刻を求め、当該
タスクテーブル522の限界時刻5223にセットする
。6eでは、システムテーブル521上のチェック時刻
5213と、6dで求めた限界時刻5223を比較し、
限界時刻5223の方が小さい場合のみ、6fのシステ
ムテーブル521上のチェック時刻5213に6dで求
めた限界時刻5223をセットする処理を行う。
In step 6c, the current time 5212 is obtained from the system table. At step 6d, the limit time of the task is obtained by adding the current time obtained at step 6c and the limit elapsed time obtained at step 6b, and is set in the limit time 5223 of the task table 522. In 6e, the check time 5213 on the system table 521 is compared with the limit time 5223 obtained in 6d,
Only when the limit time 5223 is smaller, processing is performed to set the limit time 5223 obtained in 6d to the check time 5213 on the system table 521 in 6f.

第7図に業務処理実行終了時の処理の流れを示す。FIG. 7 shows the flow of processing at the end of business processing execution.

7山では、汎用レジスタに持っている当該タスクのタス
クテーブルアドレスを元に、当該タスクのタスクテーブ
ル522上の限界時刻5223を0クリアする。
At Mt. 7, the limit time 5223 on the task table 522 of the task is cleared to 0 based on the task table address of the task held in the general-purpose register.

第8図にタイマタスク51の処理の流れを示す。FIG. 8 shows the flow of processing of the timer task 51.

タイマタスクは、8山でO8からの一定時間々隔のトリ
ガーを待っており、一定時間毎に起動する。
The timer task waits for a trigger from O8 at regular time intervals and is activated at regular time intervals.

タイマタスクが起動すると、先ず8bでO8から現在時
刻を受は取り、システムテーブル上の現在時刻5212
ヘセツトする。ここで行う現在時刻の更新処理は、毎回
OSから現在時刻を受は取る方式の他に、単に現在時刻
5212に1を加算するという方式も考えられる。この
場合、タイマ管理で扱う時刻や時間の単位が変わるだけ
で、他の方式に変更はない。
When the timer task starts, first, 8b receives the current time from O8, and stores the current time 5212 on the system table.
to set. In addition to receiving and receiving the current time from the OS each time, the current time update process performed here may also include a method of simply adding 1 to the current time 5212. In this case, the only change is the time and time unit used in timer management, and other methods remain unchanged.

次に80では、8bで求めた現在時刻と、システムテー
ブル上のチェック時刻5213とを比較し、チェック時
刻に達していない場合は、何も処理せずに8山で処理停
止する。チェック時刻に達している場合は、8dでシス
テムテーブル上のチェック時刻5213に、起こり得な
い最大の時刻をセットしておく。次に88でシステムテ
ーブルから先頭タスクテーブルアドレス5211を求め
、タスクテーブル522のチエインを辿りながら、全タ
スクテーブル522に対して次の処理を行う、タスクテ
ーブル522のアドレスを求めたら、82で、そのタス
クテーブル522に限界時刻5223がセットされてい
るかをチェックし、セットされていない場合は。
Next, in 80, the current time obtained in 8b is compared with the check time 5213 on the system table, and if the check time has not been reached, the process is stopped at peak 8 without processing anything. If the check time has been reached, the maximum possible time is set in the check time 5213 on the system table in step 8d. Next, in 88, the first task table address 5211 is obtained from the system table, and while tracing the chain of task tables 522, the address of the task table 522 that performs the next process on all task tables 522 is obtained. Check whether the limit time 5223 is set in the task table 522, and if it is not set.

何も処理を行わずに、912で次のタスクテーブル52
2のアドレスを求め次のタスクテーブルのチェックに移
る。限界時刻5223がセットされている場合は、8h
へ移る。8hでは、8bで求めた現在時刻と限界時刻5
223を比較し、限界時刻5223に達している場合は
、81でタスクテーブル上の限界時刻5223をクリア
し、O8に連絡して当該タスクを強制的に終了させる。
In 912, the next task table 52 is executed without performing any processing.
Find address 2 and move on to checking the next task table. If the limit time 5223 is set, 8h
Move to. In 8h, the current time obtained in 8b and the limit time 5
223, and if the limit time 5223 has been reached, the limit time 5223 on the task table is cleared in 81, and the O8 is contacted to forcibly terminate the task.

限界時刻に達していない場合は、8jで当該タスクの限
界時刻5223と、システムテーブル上のチェック時刻
5213を比較し、限界時刻がチェック時刻より早く発
生する場合は、8にで当該タスクの限界時刻5223を
システムテーブル上のチェック時刻5213ヘセツトす
る。タスクテーブルに対して以上の処理が終了したら8
Qで、全処理したタスクテーブルから次タスクテーブル
アドレス5221を求め、次のタスクテーブルの処理へ
移る。全タスクテーブルに対する処理が終了し、8fで
次のタスクテーブルアドレスがないと判定したら、次の
○Sからの一定時間々隔のトリガーを受は取るまで、8
山で処理停止する。
If the limit time has not been reached, the limit time 5223 of the task in question is compared with the check time 5213 on the system table in 8j, and if the limit time occurs earlier than the check time, the limit time of the task in 8j is compared. 5223 is set to check time 5213 on the system table. When the above processing is completed for the task table, 8
In Q, the next task table address 5221 is obtained from the fully processed task table, and the process moves to the next task table. When the processing for all task tables is completed and it is determined that there is no next task table address at 8f, the process continues until the trigger is received at fixed time intervals from the next ○S.
Processing stops at the mountain.

本方式では、タイマタスクが起動したときにしか、シス
テムテーブル上の現在時刻5212の更新。
In this method, the current time 5212 on the system table is updated only when the timer task is activated.

及びチェック時刻5213に達したかのチェックを行わ
ない。従って、タイマ管理で扱う時間や時刻には、プラ
ス・マイナス・タイマタスクの起動間隔だけの誤差が生
じる可能性がある。もし、誤差を小さくする必要があれ
ば、タイマタスクの起動間隔を短くすれば良いが、その
分、タイマ管理の為のオーバーヘッドが増えてしまう。
and does not check whether the check time 5213 has been reached. Therefore, there is a possibility that an error equal to plus or minus the activation interval of the timer task may occur in the time handled by timer management. If it is necessary to reduce the error, the activation interval of the timer task can be shortened, but the overhead for timer management increases accordingly.

従って、タイマタスクの起動間隔は、タイマ管理に要求
される精度を満足する内で、最も長い値を設定する必要
がある。
Therefore, the activation interval of the timer task needs to be set to the longest value that satisfies the accuracy required for timer management.

本実施例の効果を次に示す。The effects of this embodiment are shown below.

先ず、平均業務処理発生間隔、業務処理実行時間、及び
限界経過時間によって5タイマタスクによるチェックの
間隔がどのように変化するかを。
First, let's look at how the check interval by the 5-timer task changes depending on the average business process occurrence interval, business process execution time, and limit elapsed time.

第9図、第10図に示す。It is shown in FIGS. 9 and 10.

限界経過時間と実際の業務処理実行時間の差が平均業務
処理発生間隔よりも小さいか等しい場合の例を第9図に
示す。この場合、タスクルの限界時刻にはタスクル+1
の業務処理が実行中である。
FIG. 9 shows an example where the difference between the limit elapsed time and the actual business process execution time is smaller than or equal to the average business process occurrence interval. In this case, at the limit time of Taskle, Taskle +1
Business processing is being executed.

従って、タイマタスクによるチェックは、各タスクの限
界時刻にのみ行えば良いことになる。つまり、チェック
間隔=平均業務処理発生間隔となる。
Therefore, the check by the timer task only needs to be performed at the limit time of each task. In other words, the check interval = average business processing occurrence interval.

次に、限界経過時間と実際の業務処理実行時間の差が、
平均業務処理発生間隔よりも大きい場合の例を第10図
に示す、この場合、タスクルの限界時刻には、タスクル
以降に開始した幾つかのタスクの業務処理実行は既に終
了している。従って、そのときに業務処理実行中のタス
クの限界時刻の中で、最も早いものが次のチェック時刻
となる。
Next, the difference between the limit elapsed time and the actual business processing execution time is
FIG. 10 shows an example of a case where the interval is larger than the average business process occurrence interval. In this case, at the limit time of the task, the business processes of some tasks started after the task have already finished. Therefore, the earliest among the limit times of the tasks being executed at that time becomes the next check time.

つまり、チェック間隔=限界経過時間−実際の業務処理
実行時間となる0以上から、チェック間隔を一般式で表
すと、チェック間隔=MAX (平均業務処理発生間隔
、限界経過時間−実際の業務処理実行時間)となる。
In other words, from 0 or more, which is the check interval = limit elapsed time - actual business process execution time, the check interval is expressed in a general formula as follows: check interval = MAX (average business process occurrence interval, limit elapsed time - actual business process execution time) time).

本実施例では、異常が発生しない限り、限界経過時間=
実際の業務処理実行時間とならないように、限界経過時
間には、実際の業務処理実行に要すると思われる時間よ
り十分に大きな値を指定する。従って本実施例では、タ
イマタスクによるチェック処理は、限界経過時間−実際
の業務処理実行時間で求められる時間々隔で行えば良く
、この間隔は単位時間に発生する業務処理の数が如何に
増加しても変わらない。
In this embodiment, unless an abnormality occurs, the limit elapsed time =
Specify a value that is sufficiently larger than the time expected to be required to execute the actual business process as the limit elapsed time so that it does not take the actual business process execution time. Therefore, in this embodiment, the check processing by the timer task can be performed at the time interval determined by the limit elapsed time - the actual business process execution time, and this interval is determined by the increase in the number of business processes occurring per unit time. Even if you do, it won't change.

次に、従来の技術の項で示したように、業務処理を実行
するタスク毎に時間カウンターを設け。
Next, as shown in the section on conventional technology, a time counter is provided for each task that executes business processing.

業務処理の実行を開始するときに、当該タスクの時間カ
ウンターに限界経過時間をセットしておき、タイマー割
込が発生する度に、業務処理実行中の全てのタスクの時
間カウンターが1を減算して時間カウンターがOとなっ
たものをタイムオーバーとして検出する方式(以下、従
来の方式と呼ぶ)と、本実施例のタイマ管理のオーバー
ヘッドを比較する。
When starting the execution of a business process, set the limit elapsed time to the time counter of the task in question, and each time a timer interrupt occurs, the time counters of all tasks running the business process will be decremented by 1. The timer management overhead of this embodiment will be compared with a method (hereinafter referred to as a conventional method) in which a time counter that reaches O is detected as a time over.

先ず、変数を次の様に定義する。First, define variables as follows.

S:業務処理開始時のオーバーヘッド E:業務処理終了時のオーバーヘッド C:タイマタスク起動毎に必ず発生するオーバーヘッド
(O8のオーバーヘッドを含む)A:業務処理実行中の
1つのタスクに対して、タイムオーバーか否かをチェッ
クする為のオーバーヘッド B:業務処理を実行していないタスクのチェックをスキ
ップする為のオーバーヘッド M:オンラインコントローラ内の全タスク数D=タイマ
タスク起動間隔 N:単位時間当たりの業務処理発生数 T:1つの業務処理の実行時間平均値 L:限界経過時間 タイマ割込が発生し、タイマタスクが起動したときに、
業務処理を実行しているタスクの数PはP=T−N  
 ただしT −N<M 従って、業務処理を実行していないタスク数QはQ=M
−P =M−T−N となる。先ず、従来の方式による。単位時間当たりのタ
イマ管理オーバーヘッドXを求めるとX= (S十E)
 ・N+ (A−P+C)/D= (S+E)  ・N
+ (A−T−N十〇)/Dとなる0次に、本実施例に
よる、単位時間当たりのタイマ管理オーバーヘッドを求
める。タイマタスクのチェック間隔Uは U=L−T となる。チェック時刻にのみ発生するオーバーヘッドR
は R=A−P+B−Q =A−T−N+B・ (M−T−N) となる。従って、単位時間当たりのタイマ管理オーバー
ヘッドYは Y=  (S+E)  ・N+C/D+R/U=  (
S+E)  ・N+C/D +(A−T−N+B・ (M−T −N))/  (L
=T) となる。
S: Overhead at the start of business processing E: Overhead at the end of business processing C: Overhead that always occurs every time a timer task is started (including O8 overhead) A: Is there a timeout for one task during execution of business processing? Overhead for checking whether or not business processing is being executed B: Overhead for skipping checking for tasks that are not executing business processing M: Total number of tasks in the online controller D = Timer task activation interval N: Business processing occurrence per unit time Number T: Average execution time for one business process L: Limit elapsed time When a timer interrupt occurs and the timer task starts,
The number of tasks P that is executing business processing is P=T−N
However, T −N<M Therefore, the number of tasks Q that is not executing business processing is Q=M
-P=M-T-N. First, the conventional method is used. Calculating timer management overhead X per unit time: X = (S + E)
・N+ (A-P+C)/D= (S+E) ・N
+ (A-T-N 〇)/D, which is 0th order. Next, find the timer management overhead per unit time according to this embodiment. The check interval U of the timer task is U=LT. Overhead R that occurs only at check time
is R=A-P+B-Q =A-T-N+B・(M-T-N). Therefore, the timer management overhead Y per unit time is Y= (S+E) ・N+C/D+R/U= (
S+E) ・N+C/D +(A-T-N+B・(M-T-N))/(L
=T).

ここで、各変数に次の様な値を代入し、オーバーヘッド
を算出してみる。
Now, calculate the overhead by assigning the following values to each variable.

5=20     (ステップ) E=5     (ステップ) C=1000    (ステップ) A=10(ステップ) B=5     (ステップ) M=300     (タスク) D=1    (秒) N=50    (トランザクシン) T=5    (秒) L=50     (秒) 従来の方式によるタイマ管理オーバーヘッドはx=47
50(ステップ) 本実亭閑によるタイマ管理オーバーヘッドはY=230
0    (ステップ) となり、本実施例によれば、タイマ管理オーバーヘッド
が半分以下になるという効果がある。
5=20 (step) E=5 (step) C=1000 (step) A=10 (step) B=5 (step) M=300 (task) D=1 (second) N=50 (transaction) T =5 (seconds) L=50 (seconds) The timer management overhead using the conventional method is x=47
50 (steps) The timer management overhead by Honjiteikan is Y = 230
0 (steps), and according to this embodiment, the timer management overhead is reduced to less than half.

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

本発明によれば、タイマ割込が発生する度に更新するカ
ウンターは1時刻カウンターだけになり。
According to the present invention, only one time counter is updated every time a timer interrupt occurs.

実行中のプロセスの数だけのカウンターを更新する必要
がなくなる。また、経過時間の限界値を越えたプロセス
があるか否かのチェックは、タイマ割込が発生したとき
に、先ずチェック時刻に達したか否かをチェックし、チ
ェック時刻に達したときのみ、全てのプロセスに対して
、経過時間の限界値を越えていないかをチ呈ツクすれば
よく、タイマ割込が発生する度に、全てのプロセスをチ
ェックする必要がなくなる。つまり、タイマ割込が発生
する度に更新するカウンターの数の減少、及び全てのプ
ロセスに対して経過時間の限界値を越えていないかをチ
ェックする回数の減少により、プロセスの終了時間監視
の為のオーバーヘッドが減少する。
There is no need to update a counter for the number of running processes. Also, to check whether there is a process that has exceeded the elapsed time limit, when a timer interrupt occurs, first check whether the check time has been reached, and only when the check time has been reached. All processes need to be checked to see if the elapsed time limit has been exceeded, and there is no need to check all processes every time a timer interrupt occurs. In other words, the number of counters that are updated each time a timer interrupt occurs is reduced, and the number of times that all processes are checked to see if they have exceeded the elapsed time limit is reduced, making it easier to monitor process completion times. overhead is reduced.

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

第1図は本発明の一実施例のプロセスの状態とデープル
の状態の関係を示す構成図、第2図は実施例のオンライ
ンシステムの構成図、第3図はタイマ管理の構成図、第
4図はタイマデータの構成図、第5@はシステムテーブ
ルの構成図、第6図はタスクテーブルの構成図、第7図
は業務処理開始時のタイマ管理処理の流れ図、第8図は
業務処理終了時のタイマ管理処理の流れ図、第9図はタ
イマタスクの処理の流れ図、第10図は限界経過時間と
実際の処理時間の差が平均処理発生間隔により小さい場
合のタイムチャートである。 1・・・オンラインコントローラ、 2・・・端末装置、     3・・データベース、4
・・・タスク、      5・・・タイマ管理。 6・・・オペレーティングシステム。 51・・・タイマタスク、52・・・タイマデータ、5
21・・・システムテーブル、 522・・・タスクテーブル。 5211・・・先頭タスクテーブルアドレス。 5212・・・現在時刻、   5213・・・チェッ
ク時刻、5221・・・次タスクテーブルアドレス、5
222・・システムテーブルアドレス、5223・・・
限界時刻。 葛 ! 図 ネ 図 、5゛ 嵩 図 纂 図 集 図 稟 杢 図 纂 図 纂 図
FIG. 1 is a block diagram showing the relationship between the process state and the table state according to an embodiment of the present invention, FIG. 2 is a block diagram of the online system of the embodiment, FIG. 3 is a block diagram of timer management, and FIG. Figure 5 shows the configuration of timer data, Figure 5 @ shows the configuration of the system table, Figure 6 shows the configuration of the task table, Figure 7 shows the flow of timer management processing at the start of business processing, and Figure 8 shows the end of business processing. FIG. 9 is a flow chart of timer task processing, and FIG. 10 is a time chart when the difference between the limit elapsed time and the actual processing time is smaller than the average processing occurrence interval. 1... Online controller, 2... Terminal device, 3... Database, 4
...Task, 5...Timer management. 6...Operating system. 51...Timer task, 52...Timer data, 5
21...System table, 522...Task table. 5211...Start task table address. 5212... Current time, 5213... Check time, 5221... Next task table address, 5
222...System table address, 5223...
Limit time. Kudzu! Figure map, 5゛volume map collection map, maple map collection map

Claims (1)

【特許請求の範囲】[Claims] 1、複数プロセスを並行処理する電子計算機システムの
各プロセスの起動から終了までの経過時間が、予め定め
た限界値を越えないか監視する処理に於て、各プロセス
毎にタイムオーバーとすべき限界時刻を持ち、一番早く
発生する限界時刻をチェック時刻とし、一定周期で該チ
ェック時刻と現在時刻との比較を行い現在時刻がチェッ
ク時刻を越えた時のみ限度時刻が現在時刻以下のプロセ
スのタイムオーバー処置を行うことによってオーバーヘ
ッドを削減することを特徴とするプロセス終了監視方式
1. In the process of monitoring whether the elapsed time from startup to termination of each process of a computer system that processes multiple processes in parallel does not exceed a predetermined limit value, the limit time at which each process should be considered time-out , the earliest occurring limit time is set as the check time, the check time is compared with the current time at regular intervals, and only when the current time exceeds the check time, time-over treatment is performed for processes whose limit time is less than or equal to the current time. A process termination monitoring method characterized by reducing overhead by performing the following steps.
JP1086808A 1989-04-07 1989-04-07 Process end monitoring system Pending JPH02266441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1086808A JPH02266441A (en) 1989-04-07 1989-04-07 Process end monitoring system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1086808A JPH02266441A (en) 1989-04-07 1989-04-07 Process end monitoring system

Publications (1)

Publication Number Publication Date
JPH02266441A true JPH02266441A (en) 1990-10-31

Family

ID=13897111

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1086808A Pending JPH02266441A (en) 1989-04-07 1989-04-07 Process end monitoring system

Country Status (1)

Country Link
JP (1) JPH02266441A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08339317A (en) * 1995-04-06 1996-12-24 Bull Sa Periodic polling management apparatus for monitoring of information processing resource in network and method executed by said apparatus
US8839206B2 (en) 2002-08-26 2014-09-16 International Business Machines Corporation Time-based breakpoints in debuggers

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08339317A (en) * 1995-04-06 1996-12-24 Bull Sa Periodic polling management apparatus for monitoring of information processing resource in network and method executed by said apparatus
US8839206B2 (en) 2002-08-26 2014-09-16 International Business Machines Corporation Time-based breakpoints in debuggers

Similar Documents

Publication Publication Date Title
US5630124A (en) System and method for assuring atomicity of distributed update requests in a parallel database
CN111488255A (en) Multithreading concurrent monitoring method, device, equipment and storage medium
US7185339B2 (en) Victim selection for deadlock detection
US5908470A (en) Method for contention-free access and management of timers in multiprocessing environments
CN1147112A (en) Method of controlling message overload of unit program in multi processor controlling system
JPH02266441A (en) Process end monitoring system
JP2654612B2 (en) Exclusive weight reduction control method
EP0481458A2 (en) High speed synchronous processing system for executing parallel processing of programs
JP2665380B2 (en) System error detection processing method
JPS63300326A (en) Transaction execution schedule system
JPS6368934A (en) Task scheduing system
CN117076091B (en) Multi-engine interface scheduling method and device, electronic equipment and storage medium
JP3005397B2 (en) Deadlock frequent automatic avoidance method
JP2002259143A (en) Device and method for automatically controlling number of task, on-like transaction processing system and program
JPH03174633A (en) Multi-task control system
JPH03131935A (en) Timer managing system
US5287509A (en) Multitasking system for in-procedure loops
CN115309530A (en) Delayed task processing method and device in safety arrangement script
JPH0497474A (en) Job managing system for computer network
CN115268565A (en) Timer control method and device and electronic equipment
JPH03260838A (en) Limiting system for cpu using time
US9195498B2 (en) Supply capability engine weekly poller
JPH04236632A (en) Batch job processor
JPS63184137A (en) Analyzing system for abnormally completion information in information processing system
JPS62113260A (en) Timer monitor control system for multi-cpu system