[go: up one dir, main page]

JP2000137621A - Computer-readable recording medium recording event management device and program - Google Patents

Computer-readable recording medium recording event management device and program

Info

Publication number
JP2000137621A
JP2000137621A JP10311322A JP31132298A JP2000137621A JP 2000137621 A JP2000137621 A JP 2000137621A JP 10311322 A JP10311322 A JP 10311322A JP 31132298 A JP31132298 A JP 31132298A JP 2000137621 A JP2000137621 A JP 2000137621A
Authority
JP
Japan
Prior art keywords
event
queue
events
priority
management device
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
JP10311322A
Other languages
Japanese (ja)
Inventor
Atsuko Eguchi
敦子 江口
Yoshiaki Kobayashi
良彰 小林
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP10311322A priority Critical patent/JP2000137621A/en
Publication of JP2000137621A publication Critical patent/JP2000137621A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To efficiently attain the operation of a system prepared by event driving type programming. SOLUTION: This event managing device 10 is provided with plural queues 12a-12c for events, event dispatch means 11, and event schedule means 13. The event dispatch means 11 judges the priority of the generated events, and inputs the events to the queue for events corresponding to the judged priority among the plural queues 12a-12c for events. Then, the event schedule means 13 preferentially extracts the events from the queue for events whose priority is high among the plural queues 12a-12c for events.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、イベント駆動型プ
ログラミングによって構築された計算機システムの処理
効率化を図るために、発生したイベントを管理する装置
及びプログラムを記録したコンピュータ読み取り可能な
記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for managing generated events and a computer-readable recording medium on which a program is recorded in order to improve the processing efficiency of a computer system constructed by event-driven programming.

【0002】[0002]

【従来の技術】イベント駆動型プログラミングとは、イ
ベントが発生した時点で一定の処理手順を実行するよう
にプログラムを組む手法である。
2. Description of the Related Art Event-driven programming is a method of constructing a program so that a certain processing procedure is executed when an event occurs.

【0003】身近なイベントの例としては、コンピュー
タを操作する際のマウスによるクリックやキー入力、コ
マンド選択などがある。
Examples of familiar events include mouse clicks, key inputs, and command selections when operating a computer.

【0004】このようなイベント駆動型プログラミング
の手法でアプリケーション・プログラム(以下、「アプ
リケーション」という)、オペレーティング・システム
(以下、「OS」という)、制御システム等の各種ソフ
トウェアを開発する場合には、イベント単位に個別にプ
ログラムが作られ、全体として矛盾なく動作するように
組み立てられる。
When developing various kinds of software such as an application program (hereinafter, referred to as “application”), an operating system (hereinafter, referred to as “OS”), and a control system by using the event-driven programming technique, A program is created individually for each event and assembled so that it operates without contradiction as a whole.

【0005】このようなイベント駆動型プログラミング
により開発されたソフトウェアにおいては、ユーザの操
作や制御値の入力等のイベントと、実行される処理とが
密接に関連づけされている。
In software developed by such event-driven programming, events such as user operations and input of control values are closely associated with processes to be executed.

【0006】[0006]

【発明が解決しようとする課題】以上説明したように、
従来のイベント駆動型プログラミングによって開発され
たソフトウェアやコンピュータシステムでは、発生する
イベントと、このイベントに起因して実行される処理と
が密接に関連付けされている。
As described above,
In software and computer systems developed by conventional event-driven programming, an event that occurs and a process that is performed due to the event are closely associated with each other.

【0007】したがって、イベントが発生する度に、こ
のイベントに対応する処理が逐次実行されている。
Therefore, every time an event occurs, processing corresponding to the event is sequentially executed.

【0008】しかしながら、上記のようにイベントの発
生に沿って逐次その処理を逐行する場合には、緊急に実
行すべき処理の起因になるイベントが、先に発生したイ
ベントによって待たされることがある。
However, in the case where the processing is sequentially performed in accordance with the occurrence of an event as described above, an event that causes an urgent processing to be executed may be delayed by an event that has occurred earlier. .

【0009】また、イベントが同時多発的に発生した際
に、メモリ不足などの原因でシステムエラーが発生する
場合がある。
When events occur frequently, a system error may occur due to insufficient memory or the like.

【0010】さらに、所定数以上のイベントが入力され
た場合に単純にイベントの破棄を行うと重要なイベント
が破棄されることもある。
Further, when a predetermined number or more of events are input, simply discarding the events may discard important events.

【0011】また、従来のシステムでは、タスク単位で
優先度が設けられており、この優先度にしたがって処理
がなされる場合がある。
Further, in the conventional system, priorities are provided in units of tasks, and processing may be performed according to the priorities.

【0012】図5は、タスクで処理の管理がなされる監
視システムの例を示すブロック図である。
FIG. 5 is a block diagram showing an example of a monitoring system in which processing is managed by a task.

【0013】この監視システム1では、温度計2により
測定される温度データがRS−232Cを介してI/O
ドライバ3に受け付けられる。また、開閉状態検出セン
サ4により検出されるドア開閉状態がRS−232Cを
介してI/Oドライバ5に受け付けられる。
In the monitoring system 1, the temperature data measured by the thermometer 2 is transmitted to the I / O via the RS-232C.
Accepted by the driver 3. The door open / closed state detected by the open / closed state detection sensor 4 is received by the I / O driver 5 via the RS-232C.

【0014】タスク6は、温度の時々刻々の変化を監視
するタスクであり、I/Oドライバ3に温度データを要
求し、この温度データの通知を受ける。なお、タスクと
は計算機から見た作業の一単位である。
A task 6 is a task for monitoring a momentary change in temperature, requests temperature data from the I / O driver 3, and receives a notification of the temperature data. A task is a unit of work viewed from a computer.

【0015】タスク7は、ドアの開閉を監視するタスク
であり、I/Oドライバ5にドア開閉状態を要求し、こ
のドア開閉状態の通知を受ける。
Task 7 is a task for monitoring the opening / closing of the door. The task 7 requests the I / O driver 5 for the door opening / closing state, and receives a notification of the door opening / closing state.

【0016】監視プログラム8は、タスク6によって得
られる温度データ及びタスク7によって得られるドア開
閉状態に基づいて、空調を制御するプログラムである。
The monitoring program 8 is a program for controlling the air conditioning based on the temperature data obtained by the task 6 and the door open / close state obtained by the task 7.

【0017】この監視プログラム8では、温度データの
時々刻々の変化よりもドアの開閉の方が空調を大きく変
化させる要因となる点が考慮されており、タスク切り換
え処理の状況によって多少影響を受けるが、基本的には
タスク6よりもタスク7の方が優先されながら空調制御
処理が行われる。
The monitoring program 8 considers that the opening and closing of the door is a factor that greatly changes the air conditioning rather than the instantaneous change of the temperature data, and is somewhat affected by the status of the task switching process. Basically, the air conditioning control process is performed while the task 7 is given priority over the task 6.

【0018】すなわち、この監視システム1において
は、タスク6の優先度よりもタスク7の優先度の方が高
く設定されており、温度の変化を監視するタスク6より
も、ドアの開閉を監視するタスク7の方が、通常監視プ
ログラム8において優先される。
That is, in the monitoring system 1, the priority of the task 7 is set higher than the priority of the task 6, and the opening and closing of the door is monitored more than the task 6 that monitors a change in temperature. The task 7 is given priority in the normal monitoring program 8.

【0019】このように、監視システム8においては、
時々刻々の温度変化よりも影響の大きいドアの開閉の方
を優先させているが、例えば温度が35℃を超えた場合
には、ドアの開閉よりも温度変化を優先させて空調制御
処理を行った方がよいといえる。
As described above, in the monitoring system 8,
Although the door opening and closing, which has a greater influence than the instantaneous temperature change, is prioritized, for example, when the temperature exceeds 35 ° C., the air conditioning control process is performed by giving priority to the temperature change over the door opening and closing. Is better.

【0020】しかしながら、上記のようにタスク単位で
優先度を定めていると、温度データが極端な異常状態を
示してもドア開閉状態が優先されて処理が実行されると
いう問題があり、良好な制御の実行が困難である。
However, if the priorities are determined on a task basis as described above, there is a problem that even if the temperature data indicates an extremely abnormal state, the door opening / closing state is given priority and the processing is executed. It is difficult to execute control.

【0021】さらに、緊急に処理を要するイベントに、
優先度の低いタスクが含まれている場合には、他の処理
の方が優先され、緊急処理が遅延する場合もある。
In addition, events requiring urgent processing include:
When a task with a low priority is included, another process is given priority and the emergency process may be delayed.

【0022】本発明は、以上のような実状に鑑みてなさ
れたもので、発生したイベントをそれぞれに設定されて
いる優先度に基づいて管理し、これによりイベント駆動
型プログラミングにより作成されたシステムの動作の効
率化を図るイベント管理装置及びプログラムを記録した
コンピュータ読み取り可能な記録媒体を提供することを
目的とする。
The present invention has been made in view of the above situation, and manages generated events on the basis of the priorities set for the respective events, thereby enabling a system created by event-driven programming. It is an object of the present invention to provide a computer-readable recording medium on which an event management device and a program for improving operation efficiency are recorded.

【0023】[0023]

【課題を解決するための手段】本発明の骨子は、複数設
けられたイベント用キューに、優先度によってイベント
を振り分けて投入する点にある。
The gist of the present invention resides in that events are distributed to a plurality of event queues according to their priorities and input.

【0024】以下、本発明を実現するにあたって講じた
具体的手段について説明する。
Hereinafter, specific measures taken to realize the present invention will be described.

【0025】第1の発明は、複数のイベント用キュー
と、発生したイベントの優先度を判定し、複数のイベン
ト用キューのうち、当該判定された優先度に対応付けさ
れているイベント用キューにイベントを投入するイベン
トディスパッチ手段と、複数のイベント用キューのう
ち、優先度の高いイベント用キューから優先してイベン
トを取り出すイベントスケジュール手段とを具備したイ
ベント管理装置である。
According to a first aspect of the present invention, a plurality of event queues and a priority of an event that has occurred are determined, and an event queue associated with the determined priority among the plurality of event queues is determined. An event management apparatus comprising: an event dispatching unit for inputting an event; and an event scheduling unit for preferentially extracting an event from a high-priority event queue among a plurality of event queues.

【0026】この第1の発明においては、複数のイベン
トのうち、優先度の高いイベントほど先に処理すべきイ
ベントとして取り出される。
In the first invention, an event having a higher priority among a plurality of events is extracted as an event to be processed first.

【0027】したがって、優先度の低いタスクを有する
処理であってもイベント自体の優先度を高くすることで
迅速に実行される。すなわち、緊急に実行すべきイベン
ト(異常発生等)に対する処理が迅速に実行される。
Therefore, even a process having a task with a low priority is quickly executed by increasing the priority of the event itself. That is, a process for an event to be executed urgently (such as occurrence of an abnormality) is promptly executed.

【0028】ゆえに、イベントに基づいて処理を実行す
るシステムの信頼性が向上される。
Therefore, the reliability of a system that executes a process based on an event is improved.

【0029】また、イベントが同時多発的に発生して
も、優先度の高いイベントに基づく処理から順次実行さ
れ、処理の効率化が図られる。
Further, even if the events occur frequently and simultaneously, the processes based on the events having the higher priority are sequentially executed, and the efficiency of the processes is improved.

【0030】第2の発明は、第1の発明のイベント管理
装置において、イベントディスパッチ手段は、発生した
イベントの優先度を破棄可能なイベントか否かで判定
し、複数のイベント用キューのうち、少なくとも一つの
イベント用キューに破棄可能イベントを投入し、他の少
なくとも一つのイベント用キューに破棄不可能イベント
を投入するイベント管理装置である。
According to a second aspect, in the event management apparatus according to the first aspect, the event dispatching means determines whether the priority of the generated event is an event that can be discarded, and selects one of the plurality of event queues. An event management device that inputs a discardable event to at least one event queue and inputs a non-discardable event to at least one other event queue.

【0031】この第2の発明においては、イベントの優
先度が破棄可能なものか否かで判定されため、優先度と
しては破棄可能、破棄不可能の2態様が考えられる。
In the second aspect, since the priority of the event is determined based on whether the event can be discarded, two modes of discardable and non-discardable are considered as the priority.

【0032】タスクの優先度スケジュールでは、通常、
0〜255までの優先度を用いてスケジュールが行われ
るが、イベントのスケジューリングでは2、3段階の優
先度を用いることで十分なスケジューリング効果を得る
ことができる。
In the task priority schedule, usually,
Scheduling is performed using priorities from 0 to 255. In event scheduling, a sufficient scheduling effect can be obtained by using a few priorities.

【0033】したがって、この第2の発明では、第1の
発明と同様の作用効果に加えて、少ない優先度を用いて
いるため、キューへの振り分け処理やキューからの取り
出し処理等のようなスケジューリング処理を簡略化する
ことができる。
Therefore, in the second invention, in addition to the same operation and effect as in the first invention, since a small priority is used, scheduling such as distribution processing to a queue or removal processing from a queue is performed. Processing can be simplified.

【0034】なお、優先度として緊急レベル、通常レベ
ル、破棄可能レベルの3態様を適用してもよい。ここ
で、緊急レベル、通常レベルは上記の破棄不可能レベル
に含まれている。
It should be noted that three modes of priority, urgent level, normal level, and discardable level may be applied. Here, the emergency level and the normal level are included in the above-mentioned non-discardable level.

【0035】第3の発明は、第2の発明のイベント管理
装置において、イベントディスパッチ手段が、任意のイ
ベント用キューに格納されているイベントの数が最大イ
ベント数を超えたと判定した場合に、当該任意のイベン
ト用キューより下位の優先度のイベント用キューに格納
されている破棄可能イベントを破棄する破棄手段を具備
したイベント管理装置である。
According to a third aspect, in the event management apparatus according to the second aspect, when the event dispatching means determines that the number of events stored in an arbitrary event queue has exceeded the maximum number of events, An event management apparatus includes a discarding unit that discards a discardable event stored in an event queue having a lower priority than an arbitrary event queue.

【0036】この第3の発明においては、任意のイベン
ト用キューに格納されているイベントの数が最大イベン
ト数を超えた場合に、この任意のイベント用キューより
下位のイベント用キュー内の破棄可能イベントが破棄さ
れる。
According to the third aspect, when the number of events stored in an arbitrary event queue exceeds the maximum number of events, discarding in an event queue lower than the arbitrary event queue is possible. The event is discarded.

【0037】これにより、第2の発明と同様の作用効果
に加えて、イベントが同時多発的に発生してもメモリ不
足によるシステムエラーを防止することができる。
Thus, in addition to the same functions and effects as those of the second invention, it is possible to prevent a system error due to a memory shortage even when events occur frequently and simultaneously.

【0038】また、破棄可能なイベントのみが破棄され
るため、制御に重要なイベントが破棄されることを防止
でき、システムの信頼性が維持される。
Also, since only events that can be discarded are discarded, it is possible to prevent events important for control from being discarded, and maintain the reliability of the system.

【0039】さらに、破棄可能イベントが破棄されるた
め、キューからの取り出し処理等からなるスケジューリ
ング処理の効率化が図られる。
Further, since the discardable event is discarded, the efficiency of the scheduling process including the process of taking out from the queue and the like is improved.

【0040】第4の発明は、第3の発明のイベント管理
装置において、破棄手段は、破棄を行うイベント用キュ
ーにイベントが投入される間隔と、破棄を行うイベント
用キューからイベントが取り出される間隔とに基づく待
ち行列理論によって、破棄するイベントの数を決定する
イベント管理装置である。
According to a fourth aspect of the present invention, in the event management apparatus according to the third aspect, the discarding means includes an interval at which an event is put into an event queue for discarding, and an interval at which an event is taken out from the event queue for discarding. Is an event management device that determines the number of events to be discarded by a queuing theory based on.

【0041】この第4の発明においては、第3の発明と
同様の作用効果に加えて、待ち行列理論によって最適と
される破棄数が決定される。これにより、イベント用キ
ュー内のイベントの破棄数が適切に決定され、スケジュ
ーリング処理の一層の効率化が図られる。
In the fourth invention, in addition to the same operation and effect as the third invention, the optimum discard number is determined by the queuing theory. As a result, the number of events to be discarded in the event queue is appropriately determined, and the scheduling process can be made more efficient.

【0042】第5の発明は、第3又は第4のイベント管
理装置において、破棄手段は、破棄を行うイベント用キ
ューに先に投入された破棄可能イベントから破棄を行う
イベント管理装置である。
According to a fifth aspect of the present invention, in the third or fourth event management device, the discarding means is an event management device for discarding from discardable events previously input to an event queue for discarding.

【0043】システムにおける処理の内容によっては、
過去に発生したイベントよりも、新規に発生したイベン
トの方が重要な場合がある。このような処理の例として
は、測定された温度にしたがって室温を制御する処理
や、株価を表示する処理等が挙げられる。
Depending on the contents of the processing in the system,
Newly generated events may be more important than events that occurred in the past. Examples of such processing include processing for controlling room temperature according to the measured temperature, processing for displaying stock prices, and the like.

【0044】この第5の発明においては、第3又は第4
の発明と同様の作用効果に加えて、古いイベントから先
に破棄されるため、重要なイベントの破棄が一層防止さ
れる。
In the fifth aspect, the third or fourth
In addition to the same functions and effects as the invention of the first aspect, since old events are discarded first, important events are further prevented from being discarded.

【0045】したがって、システムの信頼性を一層維持
することができる。
Therefore, the reliability of the system can be further maintained.

【0046】第6の発明は、第3乃至第5の発明のイベ
ント管理装置において、破棄手段は、イベントの各種別
の間で、破棄される割合がほぼ同レベルとなるように制
御するイベント管理装置である。
According to a sixth aspect of the present invention, in the event management apparatus according to the third to fifth aspects, the discarding means controls the event discarding so that the rate of discarding becomes almost the same level among various types of events. Device.

【0047】この第6の発明においては、所定の種別の
イベントのみが偏って破棄破棄されることがない。
According to the sixth aspect, only predetermined types of events are not discarded and discarded.

【0048】したがって、システムの信頼性を一層維持
することができる。
Therefore, the reliability of the system can be further maintained.

【0049】第7の発明は、第1乃至第6発明のイベン
ト管理装置において、イベントディスパッチ手段は、イ
ベント用キューに格納されているイベントの数が最大イ
ベント数を超えた場合にイベントの投入を停止し、イベ
ントキューに格納されているイベントの数が投入再開イ
ベント数より少なくなった場合にイベントの投入を再開
するイベント管理装置である。
According to a seventh aspect of the present invention, in the event management apparatus according to the first to sixth aspects, the event dispatcher inputs the event when the number of events stored in the event queue exceeds the maximum number of events. An event management device that stops and restarts event input when the number of events stored in the event queue becomes smaller than the number of input restart events.

【0050】この第7の発明においては、第1乃至第6
の発明と同様の作用効果に加えて、イベント用キューに
投入されたイベントの数が所定の範囲になるように制御
されるため、安定したイベント管理が可能である。
In the seventh aspect, the first to sixth aspects
In addition to the same operation and effect as the invention of the third aspect, since the number of events input to the event queue is controlled to be within a predetermined range, stable event management is possible.

【0051】また、個々のイベント用キューにおけるイ
ベントの数が所定の数を超えることがないため、メモリ
不足によるシステムエラーが一層防止される。
Since the number of events in each event queue does not exceed a predetermined number, a system error due to a memory shortage is further prevented.

【0052】第8の発明は、第7の発明のイベント管理
装置において、イベントディスパッチ手段は、任意のイ
ベント用キューに格納されているイベントの数が最大イ
ベント数を超えた場合に、当該任意のイベント用キュー
より下位の優先度のイベント用キューへのイベントの投
入を停止し、当該任意のイベント用キューに格納されて
いるイベントの数が投入再開イベント数より少なくなっ
た場合に、当該任意のイベント用キューより下位の優先
度のイベント用キューへのイベントの投入を再開するイ
ベント管理装置である。
According to an eighth aspect, in the event management apparatus according to the seventh aspect, the event dispatching means, when the number of events stored in an arbitrary event queue exceeds the maximum number of events, Stops sending events to event queues of lower priority than the event queue, and if the number of events stored in the given event queue becomes less than the number of restarted events, An event management device that resumes inputting events to an event queue having a lower priority than the event queue.

【0053】任意のイベント用キューに格納されている
イベントの数が最大イベント数を超えた場合には、それ
より下位のイベント用キューからの取り出し処理が実行
されにくくなる。
When the number of events stored in an arbitrary event queue exceeds the maximum number of events, it becomes difficult to perform a process of taking out the event from a lower event queue.

【0054】したがって、この第8の発明においては、
第7の発明と同様の作用効果に加えて、スケジューリン
グされにくいイベントをイベント用キューに投入しない
ため、一層メモリ不足によるシステムエラーを防止する
ことができ、適切なイベント管理がなされる。
Therefore, in the eighth invention,
In addition to the same operation and effect as the seventh aspect of the present invention, since an event that is difficult to be scheduled is not put in the event queue, a system error due to a memory shortage can be further prevented, and appropriate event management can be performed.

【0055】第9の発明は、コンピュータに、複数のイ
ベント用キューを実現させるキュー実現機能と、発生し
たイベントの優先度を判定させ、複数のイベント用キュ
ーのうち、当該判定された優先度に対応付けされている
イベント用キューにイベントを投入させるイベントディ
スパッチ機能と、複数のイベント用キューのうち、優先
度の高いイベント用キューから優先してイベントを取り
出させるイベントスケジュール機能とを実現させるプロ
グラムを記録したコンピュータ読み取り可能な記録媒体
である。
According to a ninth aspect of the present invention, a computer realizes a queue realizing function for realizing a plurality of event queues and a priority of an event that has occurred. A program for realizing an event dispatch function for putting an event into an associated event queue and an event schedule function for taking out an event preferentially from a high-priority event queue among a plurality of event queues. The recorded computer-readable recording medium.

【0056】この第9の発明は、上記第1の発明と同様
の機能をコンピュータに実現させるためのプログラムを
記録したコンピュータ読み取り可能な記録媒体である。
The ninth invention is a computer-readable recording medium on which a program for causing a computer to realize the same functions as the first invention is recorded.

【0057】この第9の発明のようなプログラムを記録
した記録媒体を用いることによって、上述した機能を有
していない装置や、計算機においても、簡単に上述した
機能を付加することができる。
By using a recording medium in which a program is recorded as in the ninth aspect, the above-mentioned functions can be easily added to an apparatus or a computer which does not have the above-mentioned functions.

【0058】また、同様に第2乃至第8の発明も、プロ
グラムを記録したコンピュータ読み取り可能な記録媒体
として実現し、提供することが可能である。
Similarly, the second to eighth inventions can be realized and provided as a computer-readable recording medium on which a program is recorded.

【0059】[0059]

【発明の実施の形態】以下、図面を参照しながら本発明
の実施の形態について説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0060】(第1の実施の形態)本実施の形態におい
ては、発生するイベントの優先度にしたがって、このイ
ベントを投入するキューを切り換え、キューからイベン
トを取り出す際には優先度の高いイベントから取り出す
イベント管理装置について説明する。
(First Embodiment) In the present embodiment, the queue for inputting the event is switched according to the priority of the event to be generated, and when the event is taken out from the queue, the event having the higher priority is started. The event management device to be taken out will be described.

【0061】図1は、本実施の形態に係るイベント管理
装置を備えた監視システムの構成を示すブロック図であ
り、図5と同一の部分には同一の符号を付してその説明
を省略し、ここでは異なる部分についてのみ詳しく説明
する。
FIG. 1 is a block diagram showing a configuration of a monitoring system having an event management apparatus according to the present embodiment. The same parts as those in FIG. 5 are denoted by the same reference numerals, and description thereof will be omitted. Here, only the different parts will be described in detail.

【0062】この監視システム9に備えられるイベント
管理装置10は、I/Oドライバ3、5とタスク6、7
の間に備えられており、イベントディスパッチャ11、
イベント用キュー12a〜12c、イベントスケジュー
ラ13から構成されている。
The event management device 10 provided in the monitoring system 9 includes I / O drivers 3 and 5 and tasks 6 and 7
Between the event dispatcher 11,
It comprises event queues 12a to 12c and an event scheduler 13.

【0063】イベントディスパッチャ11は、I/Oド
ライバ3から時々刻々と変化する所定間隔毎の温度デー
タを定時温度イベントとして扱う。また、温度データが
35℃を超えた場合を異常温度イベントとして扱う。さ
らに、I/Oドライバ5からドア開閉状態が変化した場
合を開閉イベントとして扱う。
The event dispatcher 11 treats temperature data that changes from moment to moment at predetermined intervals from the I / O driver 3 as regular temperature events. A case where the temperature data exceeds 35 ° C. is treated as an abnormal temperature event. Further, a case where the door opening / closing state changes from the I / O driver 5 is treated as an opening / closing event.

【0064】また、このイベントディスパッチャ11
は、イベント優先度処理により各イベントの優先度を判
定する。なお、イベントの優先度には、優先度の高い順
に、緊急レベル、通常レベル、破棄可能レベルの3レベ
ルが設けられている。
The event dispatcher 11
Determines the priority of each event by event priority processing. Note that the event priority is provided with three levels of an emergency level, a normal level, and a discardable level in descending order of priority.

【0065】ここで、緊急レベルとは、例えば機器のエ
ラー発生等のような緊急に状況を通知する必要のあるイ
ベントの優先度であり、ここでは異常温度イベントが該
当する。
Here, the emergency level is the priority of an event that needs to be notified of the situation urgently, such as the occurrence of an error in the device, for example, an abnormal temperature event.

【0066】通常レベルとは、緊急性のない通常のイベ
ントの優先度であり、ここでは開閉イベントが該当す
る。
The normal level is the priority of a normal event having no urgency, and here corresponds to an open / close event.

【0067】破棄可能レベルとは、例えばGUI管理に
おけるブジェクトへのフォーカスの入出、マウスカーソ
ルの位置を定期的に通知する等のような破棄してもシス
テムの動作に大きく影響を与えないイベントの優先度で
あり、ここでは定時温度イベントが該当する。
The discardable level refers to a priority of an event that does not significantly affect the operation of the system even if discarded, such as input / output of a focus to a subject in GUI management and a regular notification of the position of a mouse cursor. Degrees, and here is the scheduled temperature event.

【0068】そして、このイベントディスパッチャ11
は、判定されたイベントの優先度が緊急レベルの場合に
はイベント用キュー12aに、通常レベルの場合にはイ
ベント用キュー12bに、消化レベルの場合にはイベン
ト用キュー12cに、このイベントを投入する。
Then, the event dispatcher 11
Enters the event into the event queue 12a when the priority of the determined event is the urgent level, into the event queue 12b when the priority is the normal level, and into the event queue 12c when the priority is the digestion level. I do.

【0069】また、このイベントディスパッチャ11
は、各イベント用キュー12a〜12c毎に、格納可能
なイベントの数である最大イベント数を保持しており、
この各イベント用キュー12a〜12cの最大イベント
数と各イベント用キュー12a〜12c内に記憶されて
いるイベントの数とを比較する。そして、比較の結果、
記憶するイベントの数が最大イベント数を超えたイベン
ト用キューがあれば、このイベント用キューへの新規の
イベント投入を停止する。
The event dispatcher 11
Holds the maximum number of events, which is the number of events that can be stored, for each of the event queues 12a to 12c.
The maximum number of events in each of the event queues 12a to 12c is compared with the number of events stored in each of the event queues 12a to 12c. And, as a result of the comparison,
If there is an event queue in which the number of events to be stored exceeds the maximum number of events, entry of a new event into this event queue is stopped.

【0070】さらに、このイベントディスパッチャ11
は、各イベント用キュー12a〜12c毎に投入再開イ
ベント数を保持しており、イベント投入の停止されたイ
ベント用キューに記憶されているイベントの数と、この
イベント用キューの投入再開イベント数とを比較する。
この比較の結果、記憶されているイベント数が投入再開
イベント数よりも少なくなれば、このイベント用キュー
への新規のイベント投入を再開する。
Further, the event dispatcher 11
Holds the number of input resumption events for each of the event queues 12a to 12c, the number of events stored in the event queue for which the event input has been stopped, the number of input resumption events for this event queue, Compare.
As a result of this comparison, if the number of stored events becomes smaller than the number of input restart events, input of a new event to this event queue is restarted.

【0071】各イベント用キュー12a〜12cは、そ
れぞれ緊急レベル、通常レベル、破棄可能レベルに対応
付けされており、それぞれのレベルのイベントを蓄積す
る。
Each of the event queues 12a to 12c is associated with an emergency level, a normal level, and a discardable level, respectively, and accumulates events of each level.

【0072】イベントスケジューラ13は、複数のイベ
ント用キュー12a〜12cのうち、優先度の高いイベ
ント用キューから順にラウンドロビン方式によりイベン
トを取り出し、タスク6、7に与える。
The event scheduler 13 extracts events from the plurality of event queues 12 a to 12 c in order from the event queue with the highest priority in a round robin manner, and supplies the events to the tasks 6 and 7.

【0073】上記のような構成を有するイベント管理装
置10を備えた監視システム9で実行される動作につい
て以下に説明する。
The operation performed by the monitoring system 9 including the event management device 10 having the above configuration will be described below.

【0074】まず、温度計2や開閉状態検出センサ4等
のようなイベント発生装置によって生じたイベントが、
RS−232C、I/Oドライバ3、5を介して、イベ
ントディスパッチャ11に入力される。
First, an event generated by an event generator such as the thermometer 2 or the open / closed state detection sensor 4 is
The event is input to the event dispatcher 11 via the RS-232C and the I / O drivers 3 and 5.

【0075】入力されたイベントは、このイベントスケ
ジューラにおいて優先度が判定され、この判定された優
先度に対応するイベント用キューにキューイングされ
る。これにより、例えば、異常温度イベントは緊急レベ
ルに対応付けされているイベント用キュー12aに投入
される。また、開閉イベントは通常レベルに対応付けさ
れているイベント用キュー12bに投入される。さら
に、定時温度イベントは破棄可能レベルに対応付けされ
ているイベント用キュー12cに投入される。
The priority of the input event is determined by the event scheduler, and the event is queued in the event queue corresponding to the determined priority. Thereby, for example, the abnormal temperature event is put into the event queue 12a associated with the emergency level. The opening / closing event is put into the event queue 12b associated with the normal level. Further, the scheduled temperature event is put into the event queue 12c associated with the discardable level.

【0076】イベント用キューにキューイングされたイ
ベントは、イベントスケジューラ13によって優先度の
高い順に取り出される。上記の例にように、異常温度イ
ベント、開閉イベント、定時温度イベントのそれぞれ
が、イベント用キュー12a〜12cに格納されている
場合には、各イベントは、それぞれ異常温度イベント、
開閉イベント、定時温度イベントの順でイベントスケジ
ューラ13によって取り出される。
The events queued in the event queue are taken out by the event scheduler 13 in descending order of priority. As in the above example, when the abnormal temperature event, the opening / closing event, and the scheduled temperature event are stored in the event queues 12a to 12c, the events are respectively the abnormal temperature event,
The event is extracted by the event scheduler 13 in the order of the opening / closing event and the scheduled temperature event.

【0077】取り出されたイベントは、対応するタスク
に通知される。例えば、異常温度イベント及び定時温度
イベントは、温度計2による温度データであるため、タ
スク6に通知される。一方、開閉イベントは、開閉状態
検出センサ4によるドア開閉状態であるため、タスク7
に通知される。
The extracted event is notified to the corresponding task. For example, the abnormal temperature event and the scheduled temperature event are temperature data from the thermometer 2, and thus are notified to the task 6. On the other hand, since the open / close event is the door open / closed state by the open / closed state detection sensor 4, the task 7
Will be notified.

【0078】通常、タスク6、7の優先度は、タスク7
の方がタスク6よりも高いため、ドア開閉状態の監視の
方が、温度データ監視よりも優先される。これにより、
監視プログラム8では、温度が35℃を超えていてもド
ア開閉に関する処理が優先される。
Normally, the priority of tasks 6 and 7 is
Is higher than the task 6, and the monitoring of the door open / closed state has priority over the monitoring of the temperature data. This allows
In the monitoring program 8, even if the temperature exceeds 35 ° C., the process related to door opening and closing is prioritized.

【0079】しかしながら、上記のイベント管理装置1
0を介することで、温度が35℃を超えた場合には、ド
ア開閉状態がイベント管理装置10からタスク7に通知
されるよりも、温度が35℃である旨の温度データがイ
ベント管理装置からタスク6に通知される方が先とな
る。
However, the event management device 1
When the temperature exceeds 35 ° C. by passing through 0, temperature data indicating that the temperature is 35 ° C. is sent from the event management apparatus rather than the event that the door open / close state is notified from the event management apparatus 10 to the task 7. The task 6 is notified first.

【0080】したがって、温度が35℃である旨のデー
タが先にタスク6によって受け付けられ監視プログラム
8に提供され、次にドア開閉状態がタスク7によって受
け付けられて監視プログラム8に提供される。
Accordingly, data indicating that the temperature is 35 ° C. is first received by the task 6 and provided to the monitoring program 8, and then the door open / closed state is received by the task 7 and provided to the monitoring program 8.

【0081】また、上記と同様の動作により、先に発生
した定時温度イベント(35℃に満たない温度データ)
よりも、後に発生した異常温度イベント(35℃を超え
た温度データ)の方が、イベント用キューからイベント
スケジューラ13によって先に取り出され、タスク6に
提供される場合もある。
Further, by the same operation as described above, the previously generated scheduled temperature event (temperature data less than 35 ° C.)
In some cases, an abnormal temperature event (temperature data exceeding 35 ° C.) that has occurred later is retrieved earlier from the event queue by the event scheduler 13 and provided to the task 6.

【0082】ここで、上記の動作を継続するうちに、例
えばイベント用キュー12bに格納されているイベント
の数が、このイベント用キュー12bに設定されている
最大イベント数を超えたとする。
Here, it is assumed that, for example, the number of events stored in the event queue 12b exceeds the maximum number of events set in the event queue 12b while the above operation is continued.

【0083】すると、イベントディスパッチャ11によ
る開閉イベントの投入処理が停止される。
Then, the opening / closing event input processing by the event dispatcher 11 is stopped.

【0084】その後、イベントスケジューラ13による
取り出し処理が実行され、イベント用キュー12bに格
納されている開閉イベントの数が投入再開イベント数よ
り少なくなると、再びイベントディスパッチャ11によ
る開閉イベントの投入処理が開始される。
After that, when the event scheduler 13 executes a take-out process, and the number of open / close events stored in the event queue 12b becomes smaller than the number of closing / opening events, the event dispatcher 11 starts to open / close the open / close event again. You.

【0085】図2は、本実施の形態においてイベント用
キューに格納されているイベントの数の変化状態の例を
示す図である。
FIG. 2 is a diagram showing an example of a change state of the number of events stored in the event queue in the present embodiment.

【0086】イベントの投入数の方がイベントの取り出
し数よりも多い場合には、イベント用キューに格納され
ているイベントの数は上昇する。
When the number of events input is greater than the number of events retrieved, the number of events stored in the event queue increases.

【0087】ここで、イベント用キューに格納されてい
るイベントの数が、最大イベント数を超えるとイベント
の投入が停止される。
Here, when the number of events stored in the event queue exceeds the maximum number of events, the event input is stopped.

【0088】これにより、イベントの取り出し処理のみ
が実行されるため、イベント用キューに格納されている
イベント数は減少する。そして、このイベント用キュー
に格納されているイベント数が投入再開イベント数より
も少なくなると、イベントの投入が再開される。
As a result, only the event fetch process is executed, so that the number of events stored in the event queue is reduced. Then, when the number of events stored in the event queue becomes smaller than the number of resumption events, the input of events is restarted.

【0089】以上説明したように、本実施の形態に係る
イベント管理装置10を適用すると、イベントの優先度
にしたがって複数のイベント用キュー12a〜12cに
イベントが割り振られ、優先度の高いイベント用キュー
から先にイベントが取り出される。
As described above, when the event management apparatus 10 according to the present embodiment is applied, an event is allocated to a plurality of event queues 12a to 12c according to the priority of the event, and the event queue having a higher priority is assigned. Event is taken out first.

【0090】これにより、タスクの優先度やこのタスク
に対する処理が定まっている場合であっても、緊急に実
行すべき処理の起因となるイベントが優先され、監視プ
ログラム8で処理がなされる。
Thus, even if the priority of a task and the processing for this task are determined, the event that causes the processing to be executed urgently has priority, and the monitoring program 8 performs the processing.

【0091】また、同じタスクで監視されるイベントで
あっても、緊急に実行すべき処理の起因となるイベント
が優先され、監視プログラム8で処理がなされる。
Also, even if the event is monitored by the same task, the event that causes the process to be executed urgently has priority, and the monitoring program 8 performs the process.

【0092】さらに、緊急に処理すべきイベントに優先
度の低いタスクが含まれていても、イベントの優先度に
よってスケジューリングされ、監視プログラム8で処理
がなされる。
Furthermore, even if an event to be processed urgently includes a task with a low priority, the task is scheduled according to the priority of the event and processed by the monitoring program 8.

【0093】したがって、異常発生等の場合にも迅速に
監視システムの復旧処理が実行されるため、システムの
信頼性を向上させることができる。
Therefore, even in the case of an abnormality or the like, the recovery processing of the monitoring system is executed quickly, so that the reliability of the system can be improved.

【0094】また、優先度の高いイベントほど先に処理
されるため、処理の効率を向上させることができる。
Further, the higher the priority of the event, the earlier the event is processed, so that the efficiency of the process can be improved.

【0095】さらに、イベントに関する優先度は3レベ
ル程あれば十分な効果を得る点に鑑み、本実施の形態に
係るイベント管理装置では優先度の段階を3レベルとし
ている。
Further, in view of the fact that a sufficient effect can be obtained if the priority regarding the event is about three levels, the event management apparatus according to the present embodiment sets the priority to three levels.

【0096】したがって、イベントディスパッチャ11
のイベント投入処理や、イベントスケジューラ13のイ
ベント取り出し処理を簡略化することができるため、ス
ケジューリングに関する処理を軽くしつつ、十分な効果
を得ることができる。
Therefore, the event dispatcher 11
Since the event input process and the event retrieval process of the event scheduler 13 can be simplified, a sufficient effect can be obtained while reducing the process related to scheduling.

【0097】さらに、本実施の形態に係るイベント管理
装置10においては、イベント用キューに確保されてい
るイベントの数が最大イベント数を超えた場合に、当該
イベント用キューへのイベント投入が停止されるため、
メモリを節約することができ、メモリ不足によるシステ
ムエラーを防止することができ、一層システムの信頼性
を向上させることができる。
Further, in the event management apparatus 10 according to the present embodiment, when the number of events secured in the event queue exceeds the maximum number of events, the event input to the event queue is stopped. Because
Memory can be saved, system errors due to insufficient memory can be prevented, and system reliability can be further improved.

【0098】また、イベント用キューに確保されている
イベントの数が投入再開イベント数よりも少なくなると
再びイベントの投入が再開されるため、柔軟にイベント
管理の再開がなされる。
When the number of events reserved in the event queue becomes smaller than the number of resuming events, the resuming of events is resumed, so that event management can be flexibly resumed.

【0099】(第2の実施の形態)本実施の形態におい
ては、イベントの投入が停止されたイベント用キューよ
り下位のイベント用キューであって、破棄可能レベルに
対応付けされているイベント用キューに保持されている
イベントを破棄するイベント管理装置について説明す
る。
(Second Embodiment) In this embodiment, an event queue lower than the event queue for which the entry of events has been stopped, and which is associated with a discardable level. An event management device that discards an event stored in the event management device will be described.

【0100】図3は、本実施の形態に係るイベント管理
装置の構成を示すブロック図であり、図1と同一の部分
については同一の符号を付してその説明を省略し、ここ
では異なる部分についてのみ詳しく説明する。
FIG. 3 is a block diagram showing the configuration of the event management apparatus according to the present embodiment. The same parts as those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted. Only will be described in detail.

【0101】このイベント管理装置14は、イベントデ
ィスパッチャ15と、イベント破棄部16を有する点
が、先に説明したイベント管理装置10と異なる。
The event management device 14 differs from the event management device 10 described above in having an event dispatcher 15 and an event discarding unit 16.

【0102】イベントディスパッチャ15は、先の第1
の実施の形態で説明したイベントディスパッチャ11と
同様の機能を有するが、イベント投入を停止したイベン
ト用キューをイベント破棄部16に通知する点のみが異
なる。
The event dispatcher 15 is the first
It has the same function as the event dispatcher 11 described in the above embodiment, except that it notifies the event discarding unit 16 of the event queue in which the event input is stopped.

【0103】イベント破棄部16は、イベント投入を停
止したイベント用キューの通知をイベントディスパッチ
ャ15から受ける。そして、この通知されたイベント用
キューよりも下位のイベント用キューであり、破棄可能
レベルに対応付けされているイベント用キューに保持さ
れているイベントを破棄する。
The event discarding unit 16 receives from the event dispatcher 15 a notification of the event queue in which the event input has been stopped. Then, it discards the event held in the event queue lower than the notified event queue and associated with the discardable level.

【0104】上記のような構成を有するイベント管理装
置の動作について以下に説明する。
The operation of the event management apparatus having the above configuration will be described below.

【0105】破棄可能レベルに対応付けされているイベ
ント用キュー12cよりも上位のイベント用キューでイ
ベント投入が停止された場合には、このイベント用キュ
ー12cに格納されるイベントはほとんどスケジューリ
ングされない状況にあるといえる。
When the event input is stopped in the event queue higher than the event queue 12c associated with the discardable level, the event stored in the event queue 12c is almost not scheduled. It can be said that there is.

【0106】したがって、イベント投入の停止された優
先度よりも下位であって、破棄可能なイベントは、イベ
ント破棄部16によって破棄される。
Therefore, an event that is lower than the priority of stopping the event input and can be discarded is discarded by the event discarding unit 16.

【0107】以上説明したように、本実施の形態に係る
イベント管理装置14においては、イベントの投入を停
止したイベント用キューよりも下位のイベント用キュー
に格納されている破棄可能イベントが破棄される。
As described above, in the event management apparatus 14 according to the present embodiment, the discardable events stored in the event queue lower than the event queue for which the input of the event is stopped are discarded. .

【0108】これにより、システム全体の処理に与える
影響を押さえつつ、メモリ不足の発生も防止する。
Thus, it is possible to prevent the memory shortage while suppressing the influence on the processing of the entire system.

【0109】また、破棄可能イベントの取り出し処理を
低減させることができるため、スケジューリング処理を
軽くすることができ、イベントの管理処理の効率化が図
られる。
Further, since the process of extracting a discardable event can be reduced, the scheduling process can be lightened, and the efficiency of the event management process can be improved.

【0110】また、破棄されるイベントは、破棄可能イ
ベントであるため、重要なイベントの破棄を防止するこ
とができ、システムの信頼性を維持することができる。
Further, since the events to be discarded are discardable events, important events can be prevented from being discarded, and the reliability of the system can be maintained.

【0111】(第3の実施の形態)本実施の形態におい
ては、第2の実施の形態に係るイベント管理装置14の
変形例について説明する。本実施の形態においては、イ
ベントディスパッチャ15及びイベント破棄部16が変
更されている。
(Third Embodiment) In the present embodiment, a modification of the event management device 14 according to the second embodiment will be described. In the present embodiment, the event dispatcher 15 and the event discarding unit 16 are changed.

【0112】イベントには、例えば空調を制御するため
に定期的に測定される温度データや、現在の株価を表示
する場合の株価等のように、新しいほど重要とされるも
のがある。
Some events are more important the more recent, such as temperature data that is periodically measured for controlling air conditioning, or a stock price when the current stock price is displayed.

【0113】したがって、本実施の形態におけるイベン
ト破棄部は、イベント用キューに格納されていうイベン
トを破棄する際に、古いイベント(先に発生したイベン
ト)から破棄を行うとする。
Therefore, it is assumed that the event discarding unit in the present embodiment discards an event stored in the event queue from an old event (an event that has occurred first).

【0114】また、このイベント破棄部は、各イベント
用キューへのイベントの投入間隔と、各イベント用キュ
ーからのイベント取り出し間隔を監視しており、この監
視結果と待ち行列理論を用いてイベント用キュー内に待
機されるイベントの数が予測し、この予測に基づいて破
棄するイベントの個数を決定する。
The event discarding unit monitors an interval of inputting an event to each event queue and an interval of taking out an event from each event queue. The monitoring result and the queue theory are used for the event discarding unit. The number of events waiting in the queue is predicted, and the number of events to be discarded is determined based on the prediction.

【0115】図4は、本実施の形態に係るイベント管理
装置に備えられているイベントディスパッチャ及びイベ
ント破棄部の処理を示すフローチャートである。
FIG. 4 is a flowchart showing the processing of the event dispatcher and the event discarding unit provided in the event management apparatus according to the present embodiment.

【0116】最新イベントが発生すると、まず、この最
新イベントの優先度がイベントディスパッチャによって
判定される(s1)。
When the latest event occurs, first, the priority of the latest event is determined by the event dispatcher (s1).

【0117】次に、この優先度に対応付けされているイ
ベント用キューに格納されているイベントの数が確認さ
れ、最新イベントの投入が停止される可能性の有無が判
定される(s2)。
Next, the number of events stored in the event queue associated with the priority is confirmed, and it is determined whether there is a possibility that the entry of the latest event may be stopped (s2).

【0118】判定の結果、最新イベントの投入が停止さ
れる可能性のない場合には、判定された優先度に対応付
けられているイベント用キューに最新イベントが格納さ
れる(s3)。
As a result of the determination, when there is no possibility that the input of the latest event is stopped, the latest event is stored in the event queue associated with the determined priority (s3).

【0119】一方、最新イベントの投入が停止される可
能性のある場合には、判定された優先度がイベント破棄
部に通知される。そして、この通知された優先度のイベ
ント用キューへのイベント投入間隔、及びイベント取り
出し間隔に基づく待ち行列演算により、イベントの破棄
数がイベント破棄部において決定される(s4)。
On the other hand, when there is a possibility that the input of the latest event may be stopped, the determined priority is notified to the event discarding unit. Then, the number of discarded events is determined by the event discarding unit by the queue calculation based on the event input interval to the event queue of the notified priority and the event take-out interval (s4).

【0120】そして、この決定されたイベントの破棄数
にしたがって、通知された優先度のイベント用キューに
記憶されている古いイベントが、イベント破棄部によっ
て破棄される(s5)。
The old event stored in the event queue of the notified priority is discarded by the event discarding unit according to the determined event discard number (s5).

【0121】その後、最新のイベントがイベントディス
パッチャからイベント用キューに投入され(s3)、上
記の処理終了まで繰り返される(s6)。
Thereafter, the latest event is put into the event queue from the event dispatcher (s3), and is repeated until the above processing is completed (s6).

【0122】以上説明したように、本実施の形態に係る
イベント管理装置においては、古いイベントから先に破
棄されるため、システムにおける処理に与える影響を抑
えつつ、メモリ不足によるシステムエラーを防止するこ
とができる。
As described above, in the event management apparatus according to the present embodiment, since old events are discarded first, it is possible to prevent a system error due to a memory shortage while suppressing the effect on processing in the system. Can be.

【0123】また、破棄するイベントの数は、待ち行列
理論を適用して動的に決定されるため、イベント用キュ
ーに格納されるイベント数を適切に管理することができ
る。
The number of events to be discarded is dynamically determined by applying the queue theory, so that the number of events stored in the event queue can be appropriately managed.

【0124】これにより、イベントの管理の効率化を一
層図ることができる。
As a result, the efficiency of event management can be further improved.

【0125】(第4の実施の形態)本実施の形態に係る
イベント管理装置においては、第2の実施の形態に係る
イベント管理装置14の変形例について説明する。本実
施の形態においては、イベント破棄部16の動作につい
て変形がなされている。
(Fourth Embodiment) In the event management device according to the present embodiment, a modification of the event management device 14 according to the second embodiment will be described. In the present embodiment, the operation of the event discarding unit 16 is modified.

【0126】本実施の形態に係るイベント管理装置は、
イベント用キューのイベントを破棄する際に、イベント
の種別毎に破棄される割合がほぼ均一になるように制御
する。
The event management device according to the present embodiment
When discarding events in the event queue, control is performed so that the rate of discarding for each event type is substantially uniform.

【0127】イベントの破棄を行う際に、例えばイベン
ト用キューに格納されているイベントを所定間隔毎に間
引きすると、同種類のイベントばかりが間引きされる場
合がある。すなわち、イベントA、Bがイベント用キュ
ーに順に「ABABABABABA」と格納されている
状態で、1つおきにイベントを間引きするとイベント
A、Bのいずれか一方のみが極端に破棄されることにな
る。
When discarding events, for example, if events stored in the event queue are thinned out at predetermined intervals, only events of the same type may be thinned out. In other words, if the events A and B are sequentially stored in the event queue as “ABABABABABA”, if every other event is thinned out, only one of the events A and B will be extremely discarded.

【0128】本実施の形態においては、破棄されるイベ
ントの種別の割合がほぼ均一になるようにイベント破棄
が制御を行うため、特定種別のイベントのみが偏って破
棄されることを防止し、効率のよいイベントの管理が可
能となる。
In the present embodiment, since the event discarding is controlled so that the ratio of the types of the discarded events is substantially uniform, it is possible to prevent only the events of the specific type from being discarded unevenly, and to improve the efficiency. Good event management becomes possible.

【0129】(第5の実施の形態)本実施の形態におい
ては、上記各実施の形態に係るイベント管理装置の変形
例について説明する。
(Fifth Embodiment) In the present embodiment, a modification of the event management apparatus according to each of the above embodiments will be described.

【0130】本実施の形態に係るイベント管理装置に備
えられるイベントディスパッチャには、任意のイベント
用キューへのイベント投入が停止された場合に、この任
意のイベント用キューよりも下位のイベント用キューへ
のイベント投入も停止する機能が備えられている。
The event dispatcher provided in the event management apparatus according to the present embodiment, when the event input to an arbitrary event queue is stopped, to an event queue lower than the arbitrary event queue. There is a function to stop the event input.

【0131】そして、任意のイベント用キューへのイベ
ント投入が再開された場合には、この任意のイベント用
キューよりも下位のイベント用キューへのイベント投入
も再開される。
When the event input to an arbitrary event queue is restarted, the event input to an event queue lower than the arbitrary event queue is also restarted.

【0132】先にも述べたように、投入停止されたイベ
ントよりも下位のイベントに対しては、ほとんどスケジ
ューリングがされない状態となる。
As described above, scheduling is hardly performed for events lower than the event for which input has been stopped.

【0133】したがって、投入停止されたイベントより
も下位のイベントに対するスケジューリング処理を停止
することで、スケジューリング処理の効率化、メモリの
使用効率化が一層図られる。
Therefore, by stopping the scheduling process for events lower than the input stopped event, the scheduling process efficiency and the memory use efficiency can be further improved.

【0134】なお、上記において説明した各イベント管
理装置の機能は、コンピュータに実行させることのでき
るプログラムとして、例えば磁気ディスク(フロッピー
(登録商標)ディスク、ハードディスク等)、光ディス
ク(CD−ROM、DVD等)、半導体メモリなどの記
録媒体に書き込んで適用したり、通信媒体により伝送し
て各種装置に適用することも可能である。このイベント
管理装置の機能を実現するコンピュータは、記録媒体に
記録されたプログラムを読み込み、プログラムによって
動作が制御されることにより、上述した処理を実行す
る。
The functions of the event management devices described above are, for example, magnetic disks (floppy (registered trademark) disks, hard disks, etc.), optical disks (CD-ROMs, DVDs, etc.) as programs that can be executed by a computer. ), It is also possible to apply it by writing it on a recording medium such as a semiconductor memory, or to apply it to various devices by transmitting it via a communication medium. A computer that realizes the function of the event management device reads the program recorded on the recording medium, and executes the above-described processing by controlling the operation of the program.

【0135】[0135]

【発明の効果】以上詳記したように本発明では、イベン
ト毎の優先度が判定され、発生したイベントが各優先度
に対応するイベント用キューに割り振られる。そして、
優先度の高いイベントを先に取り出すことでイベントの
スケジューリングがなされる。
As described above, according to the present invention, the priority of each event is determined, and the generated event is allocated to the event queue corresponding to each priority. And
The event is scheduled by taking out the event with the higher priority first.

【0136】これにより、優先度の低いタスクに基づく
処理であっても、イベントの優先度を高く設定すること
により迅速に処理可能となり、緊急性を要するイベント
に対する処理が迅速に実行される。
As a result, even if the processing is based on a task with a low priority, the processing can be promptly performed by setting the priority of the event to be high, and the processing for an event requiring urgency is quickly executed.

【0137】ゆえに、システムの信頼性、制御動作の安
定性、イベント管理の効率性が向上される。
Therefore, system reliability, control operation stability, and event management efficiency are improved.

【0138】また、本発明では、破棄可能なイベントを
格納するイベント用キューと、破棄不可能なイベントを
格納するイベント用キューとを用意している。すなわ
ち、この発明では、例えば、破棄可能レベル、破棄不可
能レベル、そのどちらでもない他のレベルのように、2
又は3段階の優先度が設定可能である。
In the present invention, an event queue for storing events that can be discarded and an event queue for storing events that cannot be discarded are provided. That is, according to the present invention, for example, two levels, such as a discardable level and a non-discardable level,
Alternatively, three levels of priority can be set.

【0139】イベントのスケジューリングでは2又は3
段階の優先度への割り振りによって十分なスケジューリ
ング効果を得ることができる。
In event scheduling, 2 or 3
Sufficient scheduling effects can be obtained by allocating stages to priorities.

【0140】したがって、優先度の段階を2,3段階と
することで、十分なスケジューリング効果を得ながら、
キューへのイベント投入処理、キューからのイベント取
り出し処理等の軽減に伴うスケジューリング処理の簡易
化が可能となる。
Therefore, by setting the priority level to two or three levels, while obtaining a sufficient scheduling effect,
It is possible to simplify the scheduling process accompanying the reduction of the process of putting an event into a queue and the process of taking an event out of a queue.

【0141】また、本発明では、最大イベント数を超え
たイベント用キューよりも下位のイベント用キューに記
憶されているイベントのうち、破棄可能なイベントが破
棄される。
In the present invention, among the events stored in the event queue lower than the event queue exceeding the maximum number of events, discardable events are discarded.

【0142】したがって、重要なイベントの破棄を防止
しつつ、メモリ不足によるシステムエラーを防止するこ
とができ、一層システムの信頼性を向上させることがで
きる。
Therefore, it is possible to prevent a system error due to a memory shortage while preventing important events from being discarded, thereby further improving the reliability of the system.

【0143】また、本発明では、待ち行列理論に基づい
て、破棄するイベント数を変化させる。これにより、イ
ベント用キューに待機されるイベントの数を予測しなが
ら破棄処理を行うことができ、システム資源との兼ね合
いを考慮しながら高レベルにイベントを管理することが
でき、一層の効率化が図られる。
In the present invention, the number of events to be discarded is changed based on the queuing theory. As a result, the discard processing can be performed while predicting the number of events waiting in the event queue, and events can be managed at a high level in consideration of the balance with system resources, thereby further improving efficiency. It is planned.

【0144】また、本発明では、新しいほど重要なイベ
ントの場合には、古いイベントから破棄を行う。これに
より、重要なイベントが破棄されることを防止でき、一
層システムの動作の効率化が図られ、システムの信頼性
を向上させることができる。
In the present invention, in the case of an event that is more important as it is newer, the oldest event is discarded. As a result, important events can be prevented from being discarded, the operation of the system can be made more efficient, and the reliability of the system can be improved.

【0145】また、本発明では、イベントの種別毎に、
破棄される割合がほぼ同レベルになるように破棄がなさ
れるため、特定のイベントばかりが破棄されるのを防止
する。
Further, according to the present invention, for each event type,
Since the discarding is performed so that the discarding rate is almost the same level, only a specific event is prevented from being discarded.

【0146】また、本発明では、イベント用キューに所
定数以上のイベントが格納された場合には、このイベン
ト用キューへのイベント投入が停止されるため、メモリ
不足を防止する。
In the present invention, when a predetermined number or more of events are stored in the event queue, the event input to the event queue is stopped, thereby preventing a memory shortage.

【0147】また、本発明では、任意のイベント用キュ
ーに所定数以上のイベントが投入されて投入が停止され
ると、この任意のイベント用キューより下位のイベント
の投入も停止される。これにより、一層メモリ不足が防
止され、不要なイベント投入処理、イベント取り出し処
理を削減できる。
In the present invention, when a predetermined number or more of events are input to an arbitrary event queue and the input is stopped, the input of events lower than the arbitrary event queue is also stopped. Thereby, memory shortage is further prevented, and unnecessary event input processing and event retrieval processing can be reduced.

【0148】したがって、システムの信頼性を向上さ
せ、スケジューリング処理の効率化が図られる。
Therefore, the reliability of the system is improved, and the efficiency of the scheduling process is improved.

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

【図1】本発明の第1の実施の形態に係るイベント管理
装置を備えた監視システムの構成を示すブロック図。
FIG. 1 is a block diagram showing a configuration of a monitoring system including an event management device according to a first embodiment of the present invention.

【図2】同実施の形態においてイベント用キューに格納
されているイベント数の変化状態の例を示す図。
FIG. 2 is a diagram showing an example of a change state of the number of events stored in an event queue in the embodiment.

【図3】本発明の第2の実施の形態に係るイベント管理
装置の構成を示すブロック図。
FIG. 3 is a block diagram showing a configuration of an event management device according to a second embodiment of the present invention.

【図4】本発明の第3の実施の形態に係るイベント管理
装置に備えられているイベントスケジューラ及びイベン
ト破棄部による処理を示すフローチャート。
FIG. 4 is a flowchart showing processing by an event scheduler and an event discarding unit provided in an event management device according to a third embodiment of the present invention.

【図5】タスクで処理の管理がなされる監視システムの
例を示すブロック図。
FIG. 5 is a block diagram showing an example of a monitoring system in which processing is managed by a task.

【符号の説明】[Explanation of symbols]

1、9…監視システム 2…温度計 3、5…I/Oドライバ 4…開閉状態検出センサ 6、7…タスク 8…監視プログラム 10、14…イベント管理装置 11、15…イベントディスパッチャ 12a〜12c…イベント用キュー 13…イベントスケジューラ 16…イベント破棄部 1, 9 monitoring system 2 thermometer 3, 5 I / O driver 4 open / closed state detection sensor 6, 7 task 8 monitoring program 10, 14 event management device 11, 15 event dispatcher 12a to 12c Event queue 13: Event scheduler 16: Event discard unit

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 複数のイベント用キューと、 発生したイベントの優先度を判定し、複数のイベント用
キューのうち、当該判定された優先度に対応付けされて
いるイベント用キューにイベントを投入するイベントデ
ィスパッチ手段と、 前記複数のイベント用キューのうち、優先度の高いイベ
ント用キューから優先してイベントを取り出すイベント
スケジュール手段とを具備したことを特徴とするイベン
ト管理装置。
1. A plurality of event queues and a priority of an event that has occurred are determined, and an event is input to an event queue associated with the determined priority among the plurality of event queues. An event management device, comprising: an event dispatcher; and an event scheduler that preferentially extracts an event from a higher priority event queue among the plurality of event queues.
【請求項2】 請求項1記載のイベント管理装置におい
て、 前記イベントディスパッチ手段は、発生したイベントの
優先度を破棄可能なイベントか否かで判定し、前記複数
のイベント用キューのうち、少なくとも一つのイベント
用キューに破棄可能イベントを投入し、他の少なくとも
一つのイベント用キューに破棄不可能イベントを投入す
ることを特徴とするイベント管理装置。
2. The event management device according to claim 1, wherein the event dispatcher determines whether the priority of the generated event is an event that can be discarded, and determines at least one of the plurality of event queues. An event management device, wherein a discardable event is input to one event queue, and a non-discardable event is input to at least one other event queue.
【請求項3】 請求項2記載のイベント管理装置におい
て、 前記イベントディスパッチ手段が、任意のイベント用キ
ューに格納されているイベントの数が最大イベント数を
超えたと判定した場合に、当該任意のイベント用キュー
より下位の優先度のイベント用キューに格納されている
破棄可能イベントを破棄する破棄手段を具備したことを
特徴とするイベント管理装置。
3. The event management device according to claim 2, wherein when the event dispatching unit determines that the number of events stored in an event queue exceeds a maximum number of events, the event management unit determines that the event has occurred. An event management device, comprising: a discarding unit that discards a discardable event stored in an event queue having a lower priority than the event queue.
【請求項4】 請求項3記載のイベント管理装置におい
て、 前記破棄手段は、破棄を行うイベント用キューにイベン
トが投入される間隔と、破棄を行うイベント用キューか
らイベントが取り出される間隔とに基づく待ち行列理論
によって、破棄するイベントの数を決定することを特徴
とするイベント管理装置。
4. The event management device according to claim 3, wherein the discarding unit is based on an interval at which an event is input to an event queue to be discarded and an interval at which an event is taken out from the event queue to be discarded. An event management device for determining the number of events to be discarded by queuing theory.
【請求項5】 請求項3又は請求項4記載のイベント管
理装置において、 前記破棄手段は、破棄を行うイベント用キューに先に投
入された破棄可能イベントから破棄を行うことを特徴と
するイベント管理装置。
5. The event management apparatus according to claim 3, wherein said discarding means performs discarding from a discardable event previously input to an event queue to be discarded. apparatus.
【請求項6】 請求項3乃至請求項5のいずれか1項に
記載のイベント管理装置において、 前記破棄手段は、イベントの各種別の間で、破棄される
割合がほぼ同レベルとなるように制御することを特徴と
するイベント管理装置。
6. The event management apparatus according to claim 3, wherein the discarding means is configured to make the rate of discarding between various types of events substantially the same level. An event management device characterized by controlling.
【請求項7】 請求項1乃至請求項6のいずれか1項に
記載のイベント管理装置において、 前記イベントディスパッチ手段は、イベント用キューに
格納されているイベントの数が最大イベント数を超えた
場合にイベントの投入を停止し、イベントキューに格納
されているイベントの数が投入再開イベント数より少な
くなった場合にイベントの投入を再開することを特徴と
するイベント管理装置。
7. The event management device according to claim 1, wherein the event dispatching unit determines that the number of events stored in an event queue exceeds a maximum number of events. An event management apparatus characterized in that event input is stopped, and event input is restarted when the number of events stored in the event queue becomes smaller than the input restart event number.
【請求項8】 請求項7記載のイベント管理装置におい
て、 前記イベントディスパッチ手段は、任意のイベント用キ
ューに格納されているイベントの数が最大イベント数を
超えた場合に、当該任意のイベント用キューより下位の
優先度のイベント用キューへのイベントの投入を停止
し、当該任意のイベント用キューに格納されているイベ
ントの数が投入再開イベント数より少なくなった場合
に、当該任意のイベント用キューより下位の優先度のイ
ベント用キューへのイベントの投入を再開することを特
徴とするイベント管理装置。
8. The event management device according to claim 7, wherein the event dispatching means is configured to, when the number of events stored in an arbitrary event queue exceeds a maximum number of events, change the event queue of the arbitrary event. When the event queue to the lower priority event queue is stopped, and the number of events stored in the queue for the arbitrary event becomes smaller than the number of events for resuming the event, the queue for the arbitrary event is stopped. An event management apparatus for resuming input of an event to an event queue of lower priority.
【請求項9】 コンピュータに、 複数のイベント用キューを実現させるキュー実現機能
と、 発生したイベントの優先度を判定させ、前記複数のイベ
ント用キューのうち、当該判定された優先度に対応付け
されているイベント用キューにイベントを投入させるイ
ベントディスパッチ機能と、 前記複数のイベント用キューのうち、優先度の高いイベ
ント用キューから優先してイベントを取り出させるイベ
ントスケジュール機能とを実現させるためのプログラム
を記録したコンピュータ読み取り可能な記録媒体。
9. A queue realizing function for realizing a plurality of event queues by a computer, and a priority of an event that has occurred is determined, and the plurality of event queues are associated with the determined priority among the plurality of event queues. A program for realizing an event dispatching function for putting an event into an event queue that has an event queue function and an event scheduling function for taking out an event preferentially from a high-priority event queue among the plurality of event queues. A computer-readable recording medium that has been recorded.
JP10311322A 1998-10-30 1998-10-30 Computer-readable recording medium recording event management device and program Pending JP2000137621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10311322A JP2000137621A (en) 1998-10-30 1998-10-30 Computer-readable recording medium recording event management device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10311322A JP2000137621A (en) 1998-10-30 1998-10-30 Computer-readable recording medium recording event management device and program

Publications (1)

Publication Number Publication Date
JP2000137621A true JP2000137621A (en) 2000-05-16

Family

ID=18015750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10311322A Pending JP2000137621A (en) 1998-10-30 1998-10-30 Computer-readable recording medium recording event management device and program

Country Status (1)

Country Link
JP (1) JP2000137621A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007141140A (en) * 2005-11-22 2007-06-07 Hitachi Ltd Priority control method, apparatus and program
JP2011192281A (en) * 2010-03-12 2011-09-29 Samsung Electronics Co Ltd Virtual machine monitor and scheduling method for the same
KR101153886B1 (en) 2005-09-07 2012-06-18 삼성전자주식회사 Method for priority scheduling in portable terminal
US8356301B2 (en) 2007-09-20 2013-01-15 Kddi Corporation Optimization of queued events by deletion/integration based on CPU load calculation
US8865072B2 (en) 2008-03-07 2014-10-21 Sysmex Corporation Analysis apparatus and analysis method
JPWO2021100324A1 (en) * 2019-11-19 2021-05-27
US11221878B2 (en) 2019-02-15 2022-01-11 Denso Corporation Task management apparatus
CN119484497A (en) * 2024-10-28 2025-02-18 北京天融信网络安全技术有限公司 Method, computer device, medium, and product for scheduling events in a reverse proxy system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101153886B1 (en) 2005-09-07 2012-06-18 삼성전자주식회사 Method for priority scheduling in portable terminal
JP2007141140A (en) * 2005-11-22 2007-06-07 Hitachi Ltd Priority control method, apparatus and program
US8356301B2 (en) 2007-09-20 2013-01-15 Kddi Corporation Optimization of queued events by deletion/integration based on CPU load calculation
US8865072B2 (en) 2008-03-07 2014-10-21 Sysmex Corporation Analysis apparatus and analysis method
US9417254B2 (en) 2008-03-07 2016-08-16 Sysmex Corporation Analysis apparatus and measurement unit
US9638709B2 (en) 2008-03-07 2017-05-02 Sysmex Corporation Analysis apparatus and analysis method
JP2011192281A (en) * 2010-03-12 2011-09-29 Samsung Electronics Co Ltd Virtual machine monitor and scheduling method for the same
US9417912B2 (en) 2010-03-12 2016-08-16 Samsung Electronics Co., Ltd. Ordering tasks scheduled for execution based on priority and event type triggering the task, selecting schedulers for tasks using a weight table and scheduler priority
US11221878B2 (en) 2019-02-15 2022-01-11 Denso Corporation Task management apparatus
JPWO2021100324A1 (en) * 2019-11-19 2021-05-27
JP7374210B2 (en) 2019-11-19 2023-11-06 株式会社ソニー・インタラクティブエンタテインメント information processing equipment
CN119484497A (en) * 2024-10-28 2025-02-18 北京天融信网络安全技术有限公司 Method, computer device, medium, and product for scheduling events in a reverse proxy system

Similar Documents

Publication Publication Date Title
US6591262B1 (en) Collaborative workload management incorporating work unit attributes in resource allocation
US7962913B2 (en) Scheduling threads in a multiprocessor computer
US8959515B2 (en) Task scheduling policy for limited memory systems
US7137117B2 (en) Dynamically variable idle time thread scheduling
US20080016508A1 (en) Distributed processing management apparatus, distributed processing management method and distributed processing management program
CN104252390B (en) Resource regulating method, device and system
JP2003298599A (en) Method and apparatus for distribution control
US20080086734A1 (en) Resource-based scheduler
JP2013232207A (en) Method, system, and apparatus for scheduling computer micro-jobs for execution without disruption
US20080235695A1 (en) Resource allocation system for jobs, resource allocation method and resource allocation program for jobs
AU2007261607B2 (en) Resource-based scheduler
US7849463B2 (en) Dynamically variable idle time thread scheduling
JP2000137621A (en) Computer-readable recording medium recording event management device and program
JP4387970B2 (en) Data input/output program, device, and method
JP2000056992A (en) Task scheduling system, its method and recording medium
JPWO2007072544A1 (en) Information processing apparatus, computer, resource allocation method, and resource allocation program
US20120124268A1 (en) Control apparatus for process input-output device
RU2450330C2 (en) Hardware-implemented method of executing programs
JPH10240548A (en) Task scheduling apparatus and method
JP2000181853A (en) Command queue controller
JP4048638B2 (en) Scheduling apparatus and method, and recording medium
CN119225929A (en) An optimization method, system, device and medium for ETL task scheduling
JP2636722B2 (en) Multitask execution management method
JPH1031592A (en) Method and system for managing memory
JP4877317B2 (en) Information processing apparatus and interrupt control method