JPH02159633A - Waiting queue controller - Google Patents

Waiting queue controller

Info

Publication number
JPH02159633A
JPH02159633A JP63315862A JP31586288A JPH02159633A JP H02159633 A JPH02159633 A JP H02159633A JP 63315862 A JP63315862 A JP 63315862A JP 31586288 A JP31586288 A JP 31586288A JP H02159633 A JPH02159633 A JP H02159633A
Authority
JP
Japan
Prior art keywords
queue
value
time
terminal
soft 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
JP63315862A
Other languages
Japanese (ja)
Inventor
Haruo Tamura
田村 治男
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
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP63315862A priority Critical patent/JPH02159633A/en
Publication of JPH02159633A publication Critical patent/JPH02159633A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To curtail the overhead of a system by updating a soft timer value in accordance with the state of a waiting queue, and setting the time-out detection processing of a software which runs periodically to the running frequency of the necessary minimum. CONSTITUTION:The waiting queue controller is provided with a soft patrol control means 4 which is called whenever time designated by a soft timer value TS elapses, compares a value obtained by adding a waiting elapsed time TH to the time counted value TC of a queue element for constituting a waiting queue and a time-out value TO given to a queue terminal, and detects the time-out state of this queue terminal, based on the result of this comparison. Also, the controller is provided with a queueing control means 2 for bringing the queue element to queueing to the queue terminal, and updating the soft timer value by setting the minimum value in the time-out value of this queue terminal in accordance with the variation of the number of pieces of this queue element as a parameter, and a soft timer managing means 1. In such a manner, the soft timer value is updated in accordance with the state of a waiting queue, the number of times of running of a time-out detecting processing which runs periodically is decreased to the necessary minimum, and the overhead of a system can be curtailed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、情報処理装置に利用する。特に、タイムアウ
トの検出を行うプログラムのコール契機を決定するソフ
トタイマ値の決定手段に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Field of Application] The present invention is applied to an information processing device. In particular, the present invention relates to means for determining a soft timer value that determines the trigger for calling a program that performs timeout detection.

〔概要〕〔overview〕

本発明は、ソフトウェアのタイムアウト検出処理にかか
わるパトロールプログラム手段を走行する契機を与える
ソフトタイマ値の設定手段において、 待ちキューの状態に応じてソフトタイマ値を変更するこ
とにより、 パトロールプログラム手段の走行頻度を制限してオーバ
ーヘッドの増大を防止することができるようにしたもの
である。
The present invention provides a means for setting a soft timer value that provides an opportunity to run a patrol program means related to software timeout detection processing, by changing the soft timer value according to the state of a waiting queue, thereby increasing the running frequency of the patrol program means. This makes it possible to prevent an increase in overhead by limiting the

〔従来の技術〕[Conventional technology]

従来、この種のソフトタイマ値はシステムインストール
時に決定してシステムの運転中は固定とし、ソフトタイ
マ値の変更は運転をいったん停止して行っていた。
Conventionally, this type of soft timer value was determined at the time of system installation and remained fixed while the system was in operation, and the soft timer value was changed only after the operation was stopped.

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

このような従来例は、第3図に示すように、ソフトタイ
マ値が固定値であり、ソフトタイマ契機にコールされる
パトロールプログラムは必ず一定一時間ごとにコールさ
れて走行するので、待ちキューのタイムアウト値がソフ
トタイマ値よりも十分大きい場合でも必要以上の頻度で
ソフトタイマ契機で起動されるパトロールプログラムが
走行し、オーバーヘッドを増大する欠点がある。
In such a conventional example, as shown in Fig. 3, the soft timer value is a fixed value, and the patrol program called at the soft timer trigger is always called and run at fixed hourly intervals, so the wait queue is Even when the timeout value is sufficiently larger than the soft timer value, the patrol program activated by the soft timer runs more frequently than necessary, resulting in increased overhead.

本発明は、このような欠点を除去するもので、ソフトタ
イマ値を自動更新して不必要な頻度でパトロールプログ
ラムを走行しない手段を有する待ちキュー制御装置を提
供することを目的とする。
SUMMARY OF THE INVENTION The present invention aims to eliminate such drawbacks and to provide a queue control device having means for automatically updating a soft timer value to prevent the patrol program from running with unnecessary frequency.

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

本発明は、ソフトタイマ値で指定される時間を経るごと
にコールされ、待ちキューを構成するキュー要素のタイ
ムカウント値に待ち経過時間を加算した値とこのキュー
要素に対応するキューターミナルに付されたタイムアウ
ト値とを比較し、この比較結果に基づきこのキューター
ミナルのタイムアウト状態を検出するパトロールプログ
ラム手段を備えた待ちキュー制御装置において、キュー
要素をキューターミナルにキューイングし、このキュー
イングされたキュー要素の個数の変化に応じてこのキュ
ーターミナルのタイムアウト値のうちの最小値をパラメ
ータとしてソフトタイマ値の更新を行う制御手段を備え
たことを特徴とする。
The present invention is called every time the time specified by the soft timer value elapses, and a value obtained by adding the elapsed waiting time to the time count value of the queue element constituting the waiting queue is attached to the queue terminal corresponding to this queue element. A waiting queue control device is provided with a patrol program means for comparing the timeout value of the queue terminal with a timeout value and detecting the timeout condition of this queue terminal based on the comparison result. The present invention is characterized by comprising a control means for updating the soft timer value using the minimum value of the timeout values of the queue terminal as a parameter in response to a change in the number of elements.

〔作用〕[Effect]

ソフトタイマ値を待ちキューの状態に応じて更新し、周
期的に走行するタイムアウト検出処理の走行回数を必要
最小限に減少させる。
The soft timer value is updated according to the state of the waiting queue, and the number of runs of the periodic timeout detection process is reduced to the necessary minimum.

〔実施例〕〔Example〕

以下、本発明の一実施例を図面に基づき説明する。第1
図はこの実施例の構成を示すブロック構成図である。第
2図はソフトタイマ管理手段の動作を示す流れ図である
Hereinafter, one embodiment of the present invention will be described based on the drawings. 1st
The figure is a block configuration diagram showing the configuration of this embodiment. FIG. 2 is a flowchart showing the operation of the soft timer management means.

この実施例は、第1図に示すように、ソフトタイマ値T
Sで指定される時間を経るごとにコールされ、待ちキュ
ーを構成する十ニー要素のタイムカウント値TCに待ち
経過時間THを加算した値とこのキュー要素に対応する
キューターミナルに付されたタイムアウト値TOとを比
較し、この比較結果に基づきこのキューターミナルのタ
イムアウト状態を検出するパトロールプログラム手段で
あるソフトパトロール制御手段4を備え、さらに、本発
明の特徴とする手段として、キュー要素をキューターミ
ナルにキューイングし、このキューイングされたキュー
要素の個数の変化に応じてこのキューターミナルのタイ
ムアウト値のうちの最小値をパラメータとしてソフトタ
イマ値の更新を行う制御手段であるキューイング制御手
段2およびソフトタイマ管理手段1を備える。
In this embodiment, as shown in FIG.
Called every time the time specified by S elapses, the value is the sum of the elapsed waiting time TH to the time count value TC of the tenny elements that make up the waiting queue, and the timeout value attached to the queue terminal corresponding to this queue element. It is equipped with soft patrol control means 4 which is a patrol program means for comparing the TO and TO and detecting the timeout state of this queue terminal based on the comparison result. A queuing control means 2 which is a control means for queuing and updating a soft timer value using the minimum value of the timeout values of this queue terminal as a parameter according to a change in the number of queued queue elements; A timer management means 1 is provided.

次に、待ちキューにキュー要素をキューイングする際の
処理の流れを説明する。
Next, the flow of processing when queuing queue elements in the waiting queue will be explained.

待ちキューのターミナルに要素をキューイングするプロ
グラムを有するキューイング制御手段2は、キューイン
グに先立ち、当該キュー要素のタイマカウント値に初期
値としてタイマカウント値TCの値の符号を反転した値
(すなわちマイナスの値)を設定する。キューイング制
御手段2はキュー要素を待ちキューターミナルにキュー
イングする。その際に対象になる待ちキューターミナル
にキューイングされている要素の数が「0」から「1」
に変わったならば、当該ターミナルのタイムアウト値T
Oをパラメータとしてソフトタイマ管理プログラムを有
するソフトタイマ管理手段1をコールし、ソフトタイマ
値TSの更新を行う。
The queuing control means 2 having a program for queuing an element to a terminal of a waiting queue sets the timer count value of the queue element as an initial value to a value obtained by inverting the sign of the timer count value TC (i.e., (negative value). The queuing control means 2 queues the queue elements to the waiting queue terminal. At that time, the number of elements queued in the target waiting queue terminal is from "0" to "1"
, the timeout value T of the terminal
The soft timer management means 1 having a soft timer management program is called using O as a parameter to update the soft timer value TS.

ソフトタイマ管理手段1は、第2図に示すように、パラ
メータで指定されたタイムアウト値Toが従来のソフト
タイマ値TSよりも小である(すなわち、もっと頻繁に
タイムアウトの検出を行う必要がある)ならば、ソフト
タイマ値TSを更新する。
As shown in FIG. 2, the soft timer management means 1 determines that the timeout value To specified by the parameter is smaller than the conventional soft timer value TS (that is, it is necessary to detect timeouts more frequently). If so, update the soft timer value TS.

第2図で、ソフトタイマ値TSはシステムインストール
時にその初期値が定められる。また、タイムアウト許容
遅延率はタイムアウト値TOと実際にタイムアウトが検
出される時間TODとの遅れの許容範囲をαとすれば、
タイム許容遅延率はT。
In FIG. 2, the initial value of the soft timer value TS is determined at the time of system installation. In addition, the timeout allowable delay rate is given by α, which is the allowable range of delay between the timeout value TO and the time TOD at which timeout is actually detected.
The time allowable delay rate is T.

で表わされ、この値はシステムインストール時に定めら
れる。
This value is determined during system installation.

次に、ハードタイマおよびソフトタイマを契機にタイム
アウトを検出する際の処理の流れを説明する。
Next, the flow of processing when detecting timeout using the hard timer and soft timer will be described.

ハードウェアタイマ手段5により一定時間(ハードタイ
マ値TH)ごとにハードタイマ契機に起動されるパトロ
ールプログラムを有するハードパトロール制御手段3が
起動されて走行する。ハードハトロール制御手段3はタ
イマカウント値TCに経過時間THを加算する。ハード
パトロール制御手段3は第2図で示すソフトタイマ管理
手段1をコールして得たソフトタイマ値TSとタイマカ
ウント値TCとを比較し、TC≧TSならばソフトパト
ロール制御手段4をコールし、リターンした後にTCの
値をゼロとする。また、TC<TSならばソフトパトロ
ール制御手段4のコールおよびタイマカウント値TCの
ゼロクリアはともに行わない。ソフトパトロール制御手
段4は待ちキューの各キュー要素QEII11、QEK
2のタイムカウント値に経過時間TCを加算し、対応す
る各キューターミナルQT1、 、QTKのタイムアウ
ト値T01、 、TOKと比較し、タイムカウント値≧
タイムアウト値であればタイムアウト状態を検出する。
The hardware timer means 5 starts the hard patrol control means 3, which has a patrol program triggered by the hard timer, at regular intervals (hard timer value TH) and runs. The hard hat roll control means 3 adds the elapsed time TH to the timer count value TC. The hard patrol control means 3 compares the soft timer value TS obtained by calling the soft timer management means 1 shown in FIG. 2 with the timer count value TC, and if TC≧TS, calls the soft patrol control means 4, After returning, the value of TC is set to zero. Further, if TC<TS, neither the calling of the soft patrol control means 4 nor the zero clearing of the timer count value TC is performed. The soft patrol control means 4 controls each queue element QEII11, QEK of the waiting queue.
Add the elapsed time TC to the time count value of 2 and compare it with the timeout value T01, , TOK of each corresponding queue terminal QT1, , QTK, and find that the time count value ≧
If it is a timeout value, a timeout condition is detected.

ソフトパトロール制御手段4はタイムアウト検出処理の
後に、待ちキューにキュー要素が存在するキューターミ
ナルのタイムアウト値TO110、TOKの内の最小値
をパラメータとしてソフトタイマ管理プログラムをコー
ルしてソフトタイマ値の更新を行う。ソフトタイマ管理
手段1はソフトタイマ値を更新する。
After the timeout detection process, the soft patrol control means 4 calls the soft timer management program using the minimum value of the timeout values TO110 and TOK of the queue terminal whose queue element exists in the waiting queue as a parameter to update the soft timer value. conduct. The soft timer management means 1 updates the soft timer value.

このようにソフトタイマ値をキューターミナルの状態に
応じて更新するので、ソフトパトロール制御手段4がコ
ールされる回数を必要最小限とすることが可能になる。
Since the soft timer value is updated in accordance with the state of the queue terminal in this way, it is possible to minimize the number of times the soft patrol control means 4 is called.

したがって、第3図で示す従来例のように、キューター
ミナルの状態にかかわらず一定の周期でソフトパトロー
ル制御手段4が走行するのに比してオーバーヘッドが減
少する。
Therefore, the overhead is reduced compared to the conventional example shown in FIG. 3, in which the soft patrol control means 4 runs at a constant cycle regardless of the state of the queue terminal.

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

本発明は、以上説明したように、ソフトタイマ値を待ち
キューの状態に応じて更新し、周期的に走行するソフト
のタイムアウト検出処理を必要最低限の走行頻度とする
ので、システムのオーバヘッドを削減する効果がある。
As explained above, the present invention updates the software timer value according to the state of the waiting queue, and reduces the system overhead by reducing the frequency of the periodic software timeout detection process to the minimum necessary. It has the effect of

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

第1図は、本発明実施例の構成を示すブロック構成図。 第2図は、ソフトタイマ管理プログラム手段の動作を示
す流れ図。 第3図は、従来例の構成を示すブロック構成図。 l・・・ソフトタイマ管理手段(STMP) 、2・・
・キューイング制御手段(QINP) 、3・・・ハー
ドパトロール制御手段(HPP) 、4・・・ソフトパ
トロール制御手段(SPP) 、5・・・ハードウェア
タイマ手段。
FIG. 1 is a block configuration diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a flowchart showing the operation of the soft timer management program means. FIG. 3 is a block configuration diagram showing the configuration of a conventional example. l... Soft timer management means (STMP), 2...
- Queuing control means (QINP), 3... Hard patrol control means (HPP), 4... Soft patrol control means (SPP), 5... Hardware timer means.

Claims (1)

【特許請求の範囲】 1、ソフトタイマ値で指定される時間を経るごとにコー
ルされ、待ちキューを構成するキュー要素のタイムカウ
ント値に待ち経過時間を加算した値とこのキュー要素に
対応するキューターミナルに付されたタイムアウト値と
を比較し、この比較結果に基づきこのキューターミナル
のタイムアウト状態を検出するパトロールプログラム手
段を備えた待ちキュー制御装置において、 キュー要素をキューターミナルにキューイングし、この
キューイングされたキュー要素の個数の変化に応じてこ
のキューターミナルのタイムアウト値のうちの最小値を
パラメータとしてソフトタイマ値の更新を行う制御手段 を備えたことを特徴とする待ちキュー制御装置。
[Claims] 1. Called every time the time specified by the soft timer value elapses, the value obtained by adding the elapsed waiting time to the time count value of the queue element forming the waiting queue and the queue corresponding to this queue element. In a waiting queue control device equipped with a patrol program means for comparing a timeout value attached to a terminal and detecting a timeout state of this queue terminal based on the comparison result, a queue element is queued to a queue terminal, and a queue element is queued to a queue terminal, 1. A waiting queue control device comprising: control means for updating a soft timer value using the minimum value of timeout values of this queue terminal as a parameter in accordance with a change in the number of queue elements that have been read.
JP63315862A 1988-12-13 1988-12-13 Waiting queue controller Pending JPH02159633A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63315862A JPH02159633A (en) 1988-12-13 1988-12-13 Waiting queue controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63315862A JPH02159633A (en) 1988-12-13 1988-12-13 Waiting queue controller

Publications (1)

Publication Number Publication Date
JPH02159633A true JPH02159633A (en) 1990-06-19

Family

ID=18070486

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63315862A Pending JPH02159633A (en) 1988-12-13 1988-12-13 Waiting queue controller

Country Status (1)

Country Link
JP (1) JPH02159633A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02220118A (en) * 1989-02-21 1990-09-03 Nippon Telegr & Teleph Corp <Ntt> Timer control system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02220118A (en) * 1989-02-21 1990-09-03 Nippon Telegr & Teleph Corp <Ntt> Timer control system

Similar Documents

Publication Publication Date Title
US6988156B2 (en) System and method for dynamically tuning interrupt coalescing parameters
US8504753B2 (en) Suspendable interrupts for processor idle management
US5542076A (en) Method and apparatus for adaptive interrupt servicing in data processing system
EP2227727B1 (en) Data processor performance prediction
US7120911B1 (en) Processor power-saving control method, storage medium, and processor power-saving control device
US20080307248A1 (en) Cpu Clock Control Device, Cpu Clock Control Method, Cpu Clock Control Program, Recording Medium, and Transmission Medium
US7536689B2 (en) Method and system for optimizing thread scheduling using quality objectives
WO2002025414A3 (en) Methods and apparatus for clock management based on environmental conditions
JPH086891A (en) Method for efficient support of adaptive polling system and peripheral equipment
US6542940B1 (en) Method and apparatus for controlling task execution in a direct memory access controller
KR0147509B1 (en) Timeout process circuit and receiver including this timeout process circuit
JP2003337713A (en) Method for controlling processor
JPH02159633A (en) Waiting queue controller
EP2490100B1 (en) Suspendable interrupts for processor idle management
JP2006172229A (en) Operation control method for task, operation control system for task and program
JPH10177489A (en) Task scheduling method
JPH06309180A (en) Interrupt controller for computer system
JPH05197574A (en) Task time waiting controller
JP2002182930A (en) Interruption controller
JPH05204867A (en) Timer interruption control system in symmetric multiprocessor system
JP2508277B2 (en) Method for determining the number of buffers that can be held
JPH064320A (en) Timer control system
JPH09185515A (en) Timer management system
JPS62152044A (en) Control method for hardware timer
CN117667342A (en) Flexible scheduling method, device and storage medium of embedded RTOS