JP2003005983A - Timer handler managing device, timer handler managing method, program for making computer perform timer handler managing method and computer readable recording medium with the program recorded thereon - Google Patents

Timer handler managing device, timer handler managing method, program for making computer perform timer handler managing method and computer readable recording medium with the program recorded thereon

Info

Publication number
JP2003005983A
JP2003005983A JP2001192116A JP2001192116A JP2003005983A JP 2003005983 A JP2003005983 A JP 2003005983A JP 2001192116 A JP2001192116 A JP 2001192116A JP 2001192116 A JP2001192116 A JP 2001192116A JP 2003005983 A JP2003005983 A JP 2003005983A
Authority
JP
Japan
Prior art keywords
timer
time
timer handler
handler
registered
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
JP2001192116A
Other languages
Japanese (ja)
Inventor
Toshinori Watarai
俊典 渡会
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2001192116A priority Critical patent/JP2003005983A/en
Publication of JP2003005983A publication Critical patent/JP2003005983A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To solve the problem that the responsiveness of an operating system is deteriorated due to the lengthening of a time until the processing of a general program task is resumed according to the number of timer handlers to be simultaneously started when a plurality of timer handlers are simultaneously started on the operating system. SOLUTION: A maximum timer handler simultaneous start value recording part 14 records the maximum timer handler simultaneous start value indicating the maximum number of timer handlers which can be simultaneously started, and when registering a new timer handler, a timer handler registering routine processing part 15 detects the number of the already registered timer handlers having the same start time as the start time of the new timer handler, and when the number of the already registered timer handlers having the same start time exceeds the maximum timer handler simultaneous start value, the new timer handler is registered in a timer handler queue so as to be distributed and started at the time before or after the original start time.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、周期的なタイマ割
り込みを受け付けるプロセッサ上で稼動するオペレーテ
ィングシステム(以下、OSと呼ぶ)において、複数の
タイマハンドラの起動時刻を登録するタイマハンドラ時
刻管理技術に関する。なお、タイマハンドラとは、所定
の起動時刻に起動し、所定のサブルーチン処理を行うプ
ログラムである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a timer handler time management technique for registering activation times of a plurality of timer handlers in an operating system (hereinafter referred to as OS) running on a processor that receives periodic timer interrupts. . The timer handler is a program that is started at a predetermined start time and performs a predetermined subroutine process.

【0002】[0002]

【従来の技術】プロセッサへの周期的なタイマ割り込み
を利用して、タイマ割り込み周期を最小時間単位とする
任意の時間に、任意のタイマハンドラの起動時刻の登録
を行い、複数のタイマハンドラが起動できるようにする
機能は、一般のOSに求められる重要な機能の1つであ
る。ここで、従来のタイマハンドラの時刻管理方式につ
いて、以下がある。
2. Description of the Related Art A periodic timer interrupt to a processor is used to register the activation time of an arbitrary timer handler at an arbitrary time with the timer interrupt period being the minimum time unit, and a plurality of timer handlers are activated. The function that enables it is one of the important functions required for a general OS. Here, there are the following time management methods of the conventional timer handler.

【0003】従来のタイマハンドラの時刻管理方式とし
ては、図14は、タイマハンドラ待ち行列を構成する各
タイマハンドラの起動時刻と開始アドレスの情報を有す
る要素の例を示す説明図である。図14において、50
1は要素、502はタイマハンドラ待ち行列における次
の要素を指すリンクポインタ、503は当該要素501
が先頭の要素であればタイマ割り込み毎にカウントアッ
プされるシステムクロック値から起動されるまでの差分
時間、先頭以外の要素であれば直前のタイマハンドラが
起動されてからの差分時間、504はタイマハンドラの
起動アドレスである開始アドレスである。なお、システ
ムクロック値と差分時間は、タイマ割り込みの周期の整
数倍で表現される単位(以下、クロックと記述する)で
ある。
As a conventional time management system for timer handlers, FIG. 14 is an explanatory diagram showing an example of elements having information on the start time and start address of each timer handler forming a timer handler queue. In FIG. 14, 50
1 is an element, 502 is a link pointer pointing to the next element in the timer handler queue, and 503 is the element 501 concerned.
If is the first element, the time difference from the system clock value that is counted up for each timer interrupt until it is activated, if it is an element other than the first element, the time difference since the immediately previous timer handler was activated, and 504 is the timer This is the start address, which is the start address of the handler. The system clock value and the difference time are units (hereinafter, referred to as a clock) expressed by an integral multiple of the timer interrupt cycle.

【0004】図15は、各要素により構成されるタイマ
ハンドラ待ち行列を示す。図15において、506は登
録されているタイマハンドラの起動待ち行列の先頭の要
素を指すタイマハンドラ待ち行列キュー、507は先頭
の要素、508は先頭の要素507の次の要素、509
はその次の要素、510は全体のタイマハンドラ待ち行
列である。
FIG. 15 shows a timer handler queue formed by each element. In FIG. 15, 506 is a timer handler queue queue that points to the head element of the registered activation queue of the timer handler, 507 is the head element, 508 is the element next to the head element 507, and 509.
Is the next element, 510 is the entire timer handler queue.

【0005】従来の方式では、ある任意の時刻に起動す
るタイマハンドラを登録する場合、タイマハンドラ待ち
行列キュー506が指す先頭の要素507から差分時間
を加算していき、その加算値が新たに登録する要素の起
動時刻を越える直前の要素の次の要素として、指定され
たタイマハンドラの要素をタイマハンドラ待ち行列51
0内に挿入する。
In the conventional method, when registering a timer handler to be activated at an arbitrary time, the difference time is added from the first element 507 pointed to by the timer handler queue queue 506, and the added value is newly registered. The element of the specified timer handler is set as the timer handler queue 51 as the element next to the element immediately before the activation time of the element is exceeded.
Insert within 0.

【0006】一方、周期毎にタイマ割り込みが発生する
場合に、OSから起動されるタイマ割り込みハンドラ
は、タイマハンドラ待ち行列キュー506が指す先頭の
要素507の差分時間503を1つ減らし、その値が0
に等しくなった場合に、その要素507の開始アドレス
504を参照して、登録されているタイマハンドラを起
動し、その要素507をタイマハンドラ待ち行列510
から取り外す。そして、タイマハンドラ待ち行列キュー
506が、取り外した要素507の次の要素508を指
すように設定する。この時、タイマハンドラ待ち行列キ
ュー506が新しく指す要素508の差分時間503が
0に等しければ、登録されているタイマハンドラの起動
と、タイマハンドラ待ち行列510からの取り外しを逐
次行う。
On the other hand, when a timer interrupt occurs in each cycle, the timer interrupt handler activated by the OS reduces the difference time 503 of the first element 507 pointed to by the timer handler queue queue 506 by one, and the value is 0
When it becomes equal to, the registered timer handler is activated by referring to the start address 504 of the element 507, and the element 507 is set to the timer handler queue 510.
Remove from. Then, the timer handler queue queue 506 is set to point to the element 508 next to the removed element 507. At this time, if the difference time 503 of the element 508 newly pointed to by the timer handler queue queue 506 is equal to 0, the registered timer handler is activated and removed from the timer handler queue 510 sequentially.

【0007】なお、このようなタイマハンドラの時刻管
理方式は、例えば、「オペレーティングシステム」、前
川守、岩波書店、ISBN4−00−010346−
6、の図3.20、79ページに記載されている。
The time management system of such a timer handler is, for example, "operating system", Mamoru Maekawa, Iwanami Shoten, ISBN4-00-010346-.
6, FIG. 3.20, page 79.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、通常タ
イマハンドラの処理は、一般のプログラムタスクの処理
に割り込んだ状態で実行される為、このような従来の方
法では、複数の数多くのタイマハンドラが同時に起動さ
れる場合には、一般プログラムタスクの処理が再開され
るまでの時間が、同時に起動されるタイマハンドラの数
に応じて長くなり、システムの応答性が劣化する問題点
がある。
However, since the processing of the normal timer handler is executed in a state of interrupting the processing of the general program task, in such a conventional method, a plurality of timer handlers are simultaneously operated. When the program is started, the time until the processing of the general program task is restarted becomes longer depending on the number of timer handlers that are started at the same time, which causes a problem that the responsiveness of the system deteriorates.

【0009】この発明は、上記のような問題点を解消す
るためになされたもので、同時に起動できる最大タイマ
ハンドラ同時起動値を設け、その最大タイマハンドラ同
時起動値を越える同じ起動時刻への新たなタイマハンド
ラの登録は、その前或いは後の時刻に分散して起動され
るように登録することで、複数の数多くのタイマハンド
ラが同時に起動される登録が行われた場合に、一般プロ
グラムタスクの処理が再開されるまでの時間が長くなる
ことを改善し、システムの応答性を向上させることを目
的とする。
The present invention has been made in order to solve the above-mentioned problems. A maximum timer handler simultaneous activation value that can be simultaneously activated is provided, and a new activation time exceeding the maximum timer handler simultaneous activation value is set. Registering various timer handlers by registering them so that they are activated in a distributed manner at the time before or after that, and when multiple timer handlers are activated at the same time, the general program task The purpose is to improve the responsiveness of the system by improving the time until the processing is restarted.

【0010】[0010]

【課題を解決するための手段】本発明に係るタイマハン
ドラ管理装置は、所定の起動時刻に起動して所定のサブ
ルーチン処理を行うタイマハンドラを管理するタイマハ
ンドラ管理装置であって、タイマハンドラごとに起動時
刻の登録処理を行う登録処理部と、前記登録処理部によ
り登録処理された起動時刻をタイマハンドラごとに記録
する起動時刻記録部とを有し、前記登録処理部は、新規
のタイマハンドラについて起動時刻の登録処理を行う際
に、前記起動時刻記録部に記録されている既登録タイマ
ハンドラの起動時刻と新規のタイマハンドラの起動時刻
とを比較し、比較の結果、前記新規のタイマハンドラの
起動時刻と同じ起動時刻の既登録タイマハンドラを同時
起動既登録タイマハンドラとして検出した場合に、検出
した同時起動既登録タイマハンドラの起動時刻及び前記
新規のタイマハンドラの起動時刻のうち少なくともいず
れか一つを他の時刻に変更して前記新規のタイマハンド
ラについて起動時刻の登録処理を行うことを特徴とす
る。
A timer handler management device according to the present invention is a timer handler management device that manages a timer handler that is activated at a predetermined activation time to perform a predetermined subroutine process. The registration processing unit has a registration processing unit for performing registration processing of a startup time, and a startup time recording unit for recording the startup time registered by the registration processing unit for each timer handler. When performing the registration processing of the start time, the start time of the registered timer handler recorded in the start time recording unit is compared with the start time of the new timer handler, and as a result of the comparison, the new timer handler When a registered timer handler with the same start time as the start time is detected as a simultaneous start registered timer handler, the detected simultaneous start register is detected. At least one of start time and start time of the new timer handler of the timer handler is changed to another time and performs registration processing start time for the new timer handler.

【0011】前記タイマハンドラ管理装置は、更に、前
記登録処理部の登録処理について所定の基準を示す基準
値を記録する基準値記録部を有し、前記登録処理部は、
前記同時起動既登録タイマハンドラを検出した場合に、
前記同時起動既登録タイマハンドラの合計数と前記基準
値とを比較し、前記同時起動既登録タイマハンドラの合
計数が前記基準値以上である場合に、前記新規のタイマ
ハンドラの起動時刻及び前記同時起動既登録タイマハン
ドラの起動時刻のうち少なくともいずれか一つを他の時
刻に変更して前記新規のタイマハンドラについて起動時
刻の登録処理を行うことを特徴とする。
The timer handler management device further includes a reference value recording unit for recording a reference value indicating a predetermined reference for the registration processing of the registration processing unit, and the registration processing unit,
When the simultaneous activation registered timer handler is detected,
The total number of simultaneously activated registered timer handlers is compared with the reference value, and when the total number of simultaneously activated registered timer handlers is equal to or greater than the reference value, the start time of the new timer handler and the simultaneous At least one of the activation times of the activated registered timer handlers is changed to another time, and the activation time registration processing is performed for the new timer handler.

【0012】前記登録処理部は、優先度が設定されたタ
イマハンドラについて起動時刻及び優先度の登録処理を
行い、前記起動時刻記録部は、前記登録処理部により登
録処理された起動時刻及び優先度をタイマハンドラごと
に記録し、前記登録処理部は、前記同時起動既登録タイ
マハンドラの合計数が前記基準値以上である場合に、前
記新規のタイマハンドラの優先度及び前記同時起動既登
録タイマハンドラの優先度を分析し、分析結果に基づ
き、前記新規のタイマハンドラの起動時刻及び前記同時
起動既登録タイマハンドラの起動時刻のうち少なくとも
いずれか一つを他の時刻に変更して前記新規のタイマハ
ンドラについて起動時刻の登録処理を行うことを特徴と
する。
The registration processing unit performs a process of registering a start time and a priority with respect to a timer handler having a priority set, and the start time recording unit includes a start time and a priority registered by the registration processing unit. Is recorded for each timer handler, and the registration processing unit determines the priority of the new timer handler and the simultaneous activation registered timer handler when the total number of the simultaneous activation registered timer handlers is equal to or more than the reference value. The priority of the new timer is changed, and at least one of the start time of the new timer handler and the start time of the simultaneously activated registered timer handler is changed to another time based on the analysis result. The handler is characterized by performing registration processing of the start time.

【0013】前記登録処理部は、タイマハンドラが行う
サブルーチン処理の処理時間を示す処理時間情報をタイ
マハンドラごとに取得し、取得した処理時間情報及び起
動時刻の登録処理をタイマハンドラごとに行い、前記起
動時刻記録部は、前記登録処理部により登録処理された
処理時間情報及び起動時刻をタイマハンドラごとに記録
し、前記登録処理部は、前記同時起動既登録タイマハン
ドラの合計数が前記基準値以上である場合に、前記新規
のタイマハンドラの処理時間情報及び前記同時起動既登
録タイマハンドラの処理時間情報を分析し、分析結果に
基づき、前記新規のタイマハンドラの起動時刻及び前記
同時起動既登録タイマハンドラの起動時刻のうち少なく
ともいずれか一つを他の時刻に変更して前記新規のタイ
マハンドラについて起動時刻の登録処理を行うことを特
徴とする。
The registration processing unit acquires processing time information indicating processing time of subroutine processing performed by the timer handler for each timer handler, performs registration processing of the acquired processing time information and activation time for each timer handler, and The activation time recording unit records the processing time information and activation time registered by the registration processing unit for each timer handler, and the registration processing unit determines that the total number of the simultaneously activated already registered timer handlers is equal to or more than the reference value. In the case of, the processing time information of the new timer handler and the processing time information of the simultaneous start registered timer handler are analyzed, and the start time of the new timer handler and the simultaneous start registered timer are analyzed based on the analysis result. Change at least one of the handler start times to another time and change the new timer handler And carrying out the registration process of the start-up time.

【0014】本発明に係るタイマハンドラ管理方法は、
所定の起動時刻に起動して所定のサブルーチン処理を行
うタイマハンドラを管理するタイマハンドラ管理方法で
あって、タイマハンドラごとに起動時刻の登録処理を行
う登録処理ステップと、前記登録処理ステップにより登
録処理された起動時刻をタイマハンドラごとに記録する
起動時刻記録ステップとを有し、前記登録処理ステップ
は、新規のタイマハンドラについて起動時刻の登録処理
を行う際に、前記起動時刻記録ステップにより記録され
た既登録タイマハンドラの起動時刻と新規のタイマハン
ドラの起動時刻とを比較し、比較の結果、前記新規のタ
イマハンドラの起動時刻と同じ起動時刻の既登録タイマ
ハンドラを同時起動既登録タイマハンドラとして検出し
た場合に、検出した同時起動既登録タイマハンドラの起
動時刻及び前記新規のタイマハンドラの起動時刻のうち
少なくともいずれか一つを他の時刻に変更して前記新規
のタイマハンドラについて起動時刻の登録処理を行うこ
とを特徴とする。
The timer handler management method according to the present invention is
A timer handler management method for managing a timer handler that starts at a predetermined start time and performs a predetermined subroutine process, comprising: a registration processing step of performing a start time registration processing for each timer handler; and a registration processing by the registration processing step. A starting time recording step of recording the started starting time for each timer handler, wherein the registration processing step is recorded by the starting time recording step when the starting time registration processing is performed for a new timer handler. The start time of the registered timer handler is compared with the start time of the new timer handler, and as a result of the comparison, a registered timer handler with the same start time as the start time of the new timer handler is simultaneously started as a registered timer handler. If it does, the detected start time of the registered simultaneous timer handler and the new Characterized in that at least any one is changed to other times performs a registration process of the activation time for the new timer handler of the handler of the timer start time.

【0015】前記タイマハンドラ管理方法は、更に、前
記登録処理ステップの登録処理について所定の基準を示
す基準値を記録する基準値記録ステップを有し、前記登
録処理ステップは、前記同時起動既登録タイマハンドラ
を検出した場合に、前記同時起動既登録タイマハンドラ
の合計数と前記基準値とを比較し、前記同時起動既登録
タイマハンドラの合計数が前記基準値以上である場合
に、前記新規のタイマハンドラの起動時刻及び前記同時
起動既登録タイマハンドラの起動時刻のうち少なくとも
いずれか一つを他の時刻に変更して前記新規のタイマハ
ンドラについて起動時刻の登録処理を行うことを特徴と
する。
The timer handler management method further includes a reference value recording step of recording a reference value indicating a predetermined reference for the registration processing of the registration processing step, the registration processing step including the simultaneous activation already registered timer. When a handler is detected, the total number of simultaneously activated registered timer handlers is compared with the reference value, and when the total number of simultaneously activated registered timer handlers is equal to or more than the reference value, the new timer At least one of the activation time of the handler and the activation time of the simultaneously activated already registered timer handler is changed to another time, and the activation time is registered for the new timer handler.

【0016】前記登録処理ステップは、優先度が設定さ
れたタイマハンドラについて起動時刻及び優先度の登録
処理を行い、前記起動時刻記録ステップは、前記登録処
理ステップにより登録処理された起動時刻及び優先度を
タイマハンドラごとに記録し、前記登録処理ステップ
は、前記同時起動既登録タイマハンドラの合計数が前記
基準値以上である場合に、前記新規のタイマハンドラの
優先度及び前記同時起動既登録タイマハンドラの優先度
を分析し、分析結果に基づき、前記新規のタイマハンド
ラの起動時刻及び前記同時起動既登録タイマハンドラの
起動時刻のうち少なくともいずれか一つを他の時刻に変
更して前記新規のタイマハンドラについて起動時刻の登
録処理を行うことを特徴とする。
In the registration processing step, the activation time and the priority are registered with respect to the timer handlers having the priorities set, and the activation time recording step includes the activation time and the priority registered in the registration processing step. Is recorded for each timer handler, and in the registration processing step, the priority of the new timer handler and the simultaneous activation already registered timer handler when the total number of the simultaneously activated already registered timer handlers is equal to or more than the reference value. The priority of the new timer is changed, and at least one of the start time of the new timer handler and the start time of the simultaneously activated registered timer handler is changed to another time based on the analysis result. The handler is characterized by performing registration processing of the start time.

【0017】前記登録処理ステップは、タイマハンドラ
が行うサブルーチン処理の処理時間を示す処理時間情報
をタイマハンドラごとに取得し、取得した処理時間情報
及び起動時刻の登録処理をタイマハンドラごとに行い、
前記起動時刻記録ステップは、前記登録処理ステップに
より登録処理された処理時間情報及び起動時刻をタイマ
ハンドラごとに記録し、前記登録処理ステップは、前記
同時起動既登録タイマハンドラの合計数が前記基準値以
上である場合に、前記新規のタイマハンドラの処理時間
情報及び前記同時起動既登録タイマハンドラの処理時間
情報を分析し、分析結果に基づき、前記新規のタイマハ
ンドラの起動時刻及び前記同時起動既登録タイマハンド
ラの起動時刻のうち少なくともいずれか一つを他の時刻
に変更して前記新規のタイマハンドラについて起動時刻
の登録処理を行うことを特徴とする。
In the registration processing step, processing time information indicating processing time of subroutine processing performed by the timer handler is acquired for each timer handler, and registration processing of the acquired processing time information and start time is performed for each timer handler.
The starting time recording step records the processing time information and the starting time registered by the registration processing step for each timer handler, and the registration processing step determines the total number of the simultaneously activated already registered timer handlers as the reference value. When the above is the case, the processing time information of the new timer handler and the processing time information of the simultaneous activation registered timer handler are analyzed, and based on the analysis result, the activation time of the new timer handler and the simultaneous activation already registered. At least one of the start times of the timer handlers is changed to another time, and the start time registration processing is performed for the new timer handler.

【0018】本発明に係るタイマハンドラ管理方法をコ
ンピュータに実行させるためのプログラムは、所定の起
動時刻に起動して所定のサブルーチン処理を行うタイマ
ハンドラを管理するタイマハンドラ管理方法をコンピュ
ータに実行させるためのプログラムであって、タイマハ
ンドラごとに起動時刻の登録処理を行う登録処理ステッ
プと、前記登録処理ステップにより登録処理された起動
時刻をタイマハンドラごとに記録する起動時刻記録ステ
ップとを有し、前記登録処理ステップは、新規のタイマ
ハンドラについて起動時刻の登録処理を行う際に、前記
起動時刻記録ステップにより記録された既登録タイマハ
ンドラの起動時刻と新規のタイマハンドラの起動時刻と
を比較し、比較の結果、前記新規のタイマハンドラの起
動時刻と同じ起動時刻の既登録タイマハンドラを同時起
動既登録タイマハンドラとして検出した場合に、検出し
た同時起動既登録タイマハンドラの起動時刻及び前記新
規のタイマハンドラの起動時刻のうち少なくともいずれ
か一つを他の時刻に変更して前記新規のタイマハンドラ
について起動時刻の登録処理を行うタイマハンドラ管理
方法をコンピュータに実行させるためのプログラムであ
ることを特徴とする。
A program for causing a computer to execute the timer handler management method according to the present invention is for causing a computer to execute the timer handler management method for managing a timer handler that is started at a predetermined start time and performs a predetermined subroutine process. A registration processing step of performing registration processing of activation time for each timer handler, and an activation time recording step of recording activation time registered by the registration processing step for each timer handler, The registration processing step compares the activation time of the registered timer handler recorded by the activation time recording step with the activation time of the new timer handler when performing the activation time registration processing for the new timer handler, and compares As a result, the same start time as the start time of the new timer handler When a registered timer handler is activated at the same time as a registered timer handler, at least one of the detected simultaneous activation registered timer handler activation time and the new timer handler activation time is set to another time. And a program for causing a computer to execute a timer handler management method of changing to the above and performing the registration processing of the activation time for the new timer handler.

【0019】本発明に係るタイマハンドラ管理方法をコ
ンピュータに実行させるためのプログラムを記録したコ
ンピュータ読み取り可能な記録媒体は、所定の起動時刻
に起動して所定のサブルーチン処理を行うタイマハンド
ラを管理するタイマハンドラ管理方法をコンピュータに
実行させるためのプログラムを記録したコンピュータ読
み取り可能な記録媒体であって、タイマハンドラごとに
起動時刻の登録処理を行う登録処理ステップと、前記登
録処理ステップにより登録処理された起動時刻をタイマ
ハンドラごとに記録する起動時刻記録ステップとを有
し、前記登録処理ステップは、新規のタイマハンドラに
ついて起動時刻の登録処理を行う際に、前記起動時刻記
録ステップにより記録された既登録タイマハンドラの起
動時刻と新規のタイマハンドラの起動時刻とを比較し、
比較の結果、前記新規のタイマハンドラの起動時刻と同
じ起動時刻の既登録タイマハンドラを同時起動既登録タ
イマハンドラとして検出した場合に、検出した同時起動
既登録タイマハンドラの起動時刻及び前記新規のタイマ
ハンドラの起動時刻のうち少なくともいずれか一つを他
の時刻に変更して前記新規のタイマハンドラについて起
動時刻の登録処理を行うタイマハンドラ管理方法をコン
ピュータに実行させるためのプログラムを記録したコン
ピュータ読み取り可能な記録媒体であることを特徴とす
る。
A computer-readable recording medium in which a program for causing a computer to execute the timer handler management method according to the present invention is recorded is a timer for managing a timer handler which is started at a predetermined start time and performs a predetermined subroutine process. A computer-readable recording medium recording a program for causing a computer to execute a handler management method, the registration processing step performing registration processing of activation time for each timer handler, and the activation performed by the registration processing step. An activation time recording step of recording time for each timer handler, wherein the registration processing step, when performing the activation time registration processing for a new timer handler, registers the registered timer recorded by the activation time recording step. Handler start time and new tie Compared with the start-up time of the handler,
As a result of the comparison, when a registered timer handler having the same start time as the start time of the new timer handler is detected as the simultaneous start registered timer handler, the detected start time of the simultaneous start registered timer handler and the new timer A computer readable recording program for causing a computer to execute a timer handler management method for changing at least one of the start times of the handlers to another time and registering the start time of the new timer handler. It is a recording medium.

【0020】[0020]

【発明の実施の形態】実施の形態1.以下、この発明の
第1の実施の形態について図を用いて説明する。図1
は、この発明の実施の形態1におけるタイマハンドラ管
理装置の構成図である。図1において、100は、本発
明に係るタイマハンドラ管理装置たるコンピュータであ
る。1は、タイマハンドラの起動時刻管理を行うオペレ
ーティングシステム(以下、OSという)である。2
は、タイマ割り込みを発生し、OS1にタイマ割り込み
を通知するタイマ割り込みハードウェアである。3は、
OS1を読み込み、OS1を起動するマイクロプロセッ
サ等のCPUである。4は、OS1を格納するHDD等
の磁気ディスクである。5は、コンピュータ100の起
動時に、CPU3の制御により磁気ディスク4に格納さ
れたOS1が書き込まれる半導体メモリである。図1に
おいては、コンピュータ100が起動され、OS1が半
導体メモリ5に書き込まれている状態を示している。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiment 1. Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. Figure 1
FIG. 3 is a configuration diagram of a timer handler management device in the first embodiment of the present invention. In FIG. 1, reference numeral 100 denotes a computer which is a timer handler management device according to the present invention. Reference numeral 1 denotes an operating system (hereinafter referred to as OS) that manages the start time of the timer handler. Two
Is timer interrupt hardware that generates a timer interrupt and notifies the OS 1 of the timer interrupt. 3 is
It is a CPU such as a microprocessor that loads the OS 1 and starts the OS 1. Reference numeral 4 is a magnetic disk such as an HDD that stores the OS 1. Reference numeral 5 denotes a semiconductor memory in which the OS 1 stored in the magnetic disk 4 is written under the control of the CPU 3 when the computer 100 is activated. FIG. 1 shows a state in which the computer 100 is started and the OS 1 is written in the semiconductor memory 5.

【0021】次に、OS1の内部構成について説明す
る。11は、タイマ割り込み毎に1つずつクロック値が
増加するシステムクロックである。12は、タイマ割り
込みが発生する毎に起動され、起動時刻に達した登録さ
れているタイマハンドラを起動するタイマ割り込みハン
ドラである。13は、登録されているタイマハンドラの
起動時刻と開始アドレスの情報を管理するためのタイマ
ハンドラ待ち行列キューである。14は、タイマ割り込
みの周期に同時に起動できるタイマハンドラの最大数
(最大タイマハンドラ同時起動値)が記録された最大タ
イマハンドラ同時起動値記録部(基準値記録部)であ
る。15は、任意のタイマハンドラについて、起動時
刻、開始アドレスの登録処理を行うタイマハンドラ登録
ルーチン処理部(登録処理部)である。18は、タイマ
ハンドラ登録ルーチン処理部15により登録処理された
タイマハンドラの起動時刻、開始アドレスを記録する起
動時刻記録部である。なお、起動時刻記録部は、実際に
は、図2に示すように、起動時刻、開始アドレス等を保
持する要素の形で記録している。
Next, the internal structure of the OS 1 will be described. Reference numeral 11 is a system clock whose clock value increases by one every timer interrupt. Reference numeral 12 is a timer interrupt handler that is activated each time a timer interrupt occurs and activates a registered timer handler that has reached the activation time. Reference numeral 13 denotes a timer handler queue queue for managing information on the start time and start address of the registered timer handler. Reference numeral 14 denotes a maximum timer handler simultaneous activation value recording unit (reference value recording unit) in which the maximum number of timer handlers (maximum timer handler simultaneous activation values) that can be activated simultaneously in a timer interrupt cycle is recorded. Reference numeral 15 denotes a timer handler registration routine processing unit (registration processing unit) which performs a process of registering an activation time and a start address for an arbitrary timer handler. Reference numeral 18 denotes a start time recording unit that records the start time and start address of the timer handler registered by the timer handler registration routine processing unit 15. The start time recording unit actually records the start time, the start address, and the like in the form of an element that holds the start time and the like, as shown in FIG.

【0022】上述のように、11〜15、及び18のO
S1の各要素は、コンピュータ上で実行されるプログラ
ムであり、これらのプログラムをコンピュータで読みと
り可能な記録媒体に記録することができる。更には、こ
れらのプログラムを通信網を介して転送することも可能
である。
As mentioned above, O of 11-15 and 18
Each element of S1 is a program executed on a computer, and these programs can be recorded in a computer-readable recording medium. Further, these programs can be transferred via a communication network.

【0023】図2は、この発明のタイマハンドラの起動
時刻と開始アドレスを保持する要素の説明図である。図
2において、31は全体の要素、32は当該要素の後方
の要素を指す後方ポインタ、33は当該要素の前方の要
素を指す前方ポインタ、34は差分時間であり、35は
開始アドレスである。差分時間34は、当該要素が先頭
の要素であればタイマ割り込み毎にカウントアップされ
るシステムクロック値から対応するタイマハンドラが起
動されるまでの差分を示し、先頭以外の要素であれば直
前のタイマハンドラが起動されてから対応するタイマハ
ンドラが起動されるまでの差分を示す。また、開始アド
レス35は対応するタイマハンドラの起動アドレスであ
る。なお、本実施の形態では、システムクロック値と差
分時間は、タイマ割り込みの周期の整数倍で表現される
単位(以下、クロックと記述する)である。また、本実
施の形態では、タイマハンドラはプログラム関数として
実現され、その開始アドレスを実行することで、タイマ
ハンドラを起動できるものとする。
FIG. 2 is an explanatory diagram of elements for holding the starting time and starting address of the timer handler of the present invention. In FIG. 2, 31 is the whole element, 32 is the backward pointer that points to the element after the element, 33 is the forward pointer that points to the element before the element, 34 is the difference time, and 35 is the start address. The difference time 34 indicates the difference from the system clock value counted up for each timer interrupt until the corresponding timer handler is started if the element is the head element, and the immediately preceding timer if the element is not the head element. It shows the difference from when the handler is activated to when the corresponding timer handler is activated. The start address 35 is the starting address of the corresponding timer handler. In the present embodiment, the system clock value and the difference time are units (hereinafter, referred to as clocks) represented by an integral multiple of the timer interrupt cycle. Further, in the present embodiment, the timer handler is realized as a program function, and the timer handler can be activated by executing its start address.

【0024】図3は、この発明のタイマハンドラ待ち行
列の説明図である。図3において、13はタイマハンド
ラの起動待ち行列の先頭の要素を指すタイマハンドラ待
ち行列キュー、51は先頭の要素、52は先頭の次の要
素、53はその次の要素、54は全体のタイマハンドラ
待ち行列である。また、この図3の例において、先頭の
要素51の差分時間は2クロックであり、要素51はタ
イマ割り込みハンドラ12によって現在時刻から2クロ
ック後に起動されることを示す。この時、先頭の要素5
1の次の要素52の差分時間は0であり、要素51と要
素52は、同時に起動されることを示す。更に、要素5
3の差分時間は5クロックであり、要素51と要素52
の起動から5クロック後に起動されることを示す。な
お、このタイマハンドラ待ち行列は、起動時刻記録部1
8に記録されている各要素の関係を模式的に表したもの
である。
FIG. 3 is an explanatory diagram of the timer handler queue of the present invention. In FIG. 3, 13 is a timer handler queue queue that points to the head element of the timer handler start queue, 51 is the head element, 52 is the head next element, 53 is the next element, and 54 is the entire timer. This is the handler queue. Further, in the example of FIG. 3, the difference time of the head element 51 is 2 clocks, and the element 51 is activated by the timer interrupt handler 12 2 clocks after the current time. At this time, the first element 5
The difference time of the element 52 next to 1 is 0, indicating that the elements 51 and 52 are activated at the same time. Furthermore, element 5
The difference time of 3 is 5 clocks, and the elements 51 and 52
Is started 5 clocks after the start. Note that this timer handler queue has a startup time recording unit 1
8 schematically shows the relationship of each element recorded in FIG.

【0025】図4は、この発明のタイマハンドラ待ち行
列54に新しく要素を追加する場合の説明図である。な
お、新たな要素の追加は、タイマハンドラ登録ルーチン
処理部15により行われる。図4のタイマハンドラ待ち
行列54は図3の状態から、新しく現在時刻から3クロ
ック後に起動されるタイマハンドラの要素55が追加さ
れた状態を示す。この場合、新しい要素55を追加する
為に、タイマハンドラ待ち行列キュー13が指す先頭の
要素51から順番に、その差分時間34を加算してい
き、その加算値が新しい要素55の起動時刻を初めて超
える要素と、直前の要素を見つける。具体的には、新た
な要素55の起動時刻(3)に対して、差分時間の加算
値が7(2+0+5=7、図3参照)の要素53と、要
素53の直前の要素52とを見つける。次に、その直前
の要素52の後方ポインタ32が追加する要素55を、
上記加算値が追加する要素55の起動時刻を初めて超え
る要素53の前方ポインタ33が追加する要素55を、
追加する要素55の前方ポインタ33がその直前の要素
52を、追加する要素55の後方ポインタ32が上記加
算値が追加する要素55の起動時刻を初めて超える要素
53を、それぞれ指すように設定する。次に、追加する
要素55は現在時刻から3クロック後、即ちその直前に
起動される要素51と要素52の起動から1クロック後
に起動されるので、その追加する要素55の差分時間3
4を1クロックに設定する。また、追加する要素55の
後ろの要素53は、要素51と要素52の起動から5ク
ロック後、即ち、追加する要素55の4クロック後に起
動されるので、追加する要素55の差分時間である1ク
ロックを減じて、その要素53の差分時間34を4クロ
ックに設定する。このように、タイマハンドラ待ち行列
54に任意の新しい要素を追加する場合は、その起動時
刻の直前の要素31の次に挿入し、挿入した新しい要素
の差分時間34と、その次以降の要素の差分時間34を
適宜調整する。
FIG. 4 is an explanatory diagram for adding a new element to the timer handler queue 54 of the present invention. The addition of a new element is performed by the timer handler registration routine processing unit 15. The timer handler queue 54 of FIG. 4 shows a state in which the element 55 of the timer handler which is newly started 3 clocks after the current time is added from the state of FIG. In this case, in order to add the new element 55, the difference time 34 is added in order from the first element 51 pointed to by the timer handler queue 13, and the added value is the start time of the new element 55 for the first time. Find the element that exceeds and the previous element. Specifically, with respect to the start time (3) of the new element 55, the element 53 with the added value of the difference time being 7 (2 + 0 + 5 = 7, see FIG. 3) and the element 52 immediately before the element 53 are found. . Next, the element 55 added by the backward pointer 32 of the element 52 immediately before that is
The element 55 added by the forward pointer 33 of the element 53 which exceeds the start time of the element 55 added by the addition value for the first time,
The forward pointer 33 of the element 55 to be added is set to point to the element 52 immediately before it, and the backward pointer 32 of the element 55 to be added is set to point to the element 53 whose addition value exceeds the activation time of the element 55 to be added for the first time. Next, since the element 55 to be added is activated 3 clocks after the current time, that is, 1 clock after the activation of the element 51 and the element 52 activated immediately before that, the difference time 3 of the element 55 to be added is
Set 4 to 1 clock. Further, the element 53 after the element 55 to be added is activated 5 clocks after the activation of the elements 51 and 52, that is, 4 clocks after the element 55 to be added, and is the difference time of the element 55 to be added 1. The clock is subtracted and the difference time 34 of the element 53 is set to 4 clocks. In this way, when adding an arbitrary new element to the timer handler queue 54, it is inserted after the element 31 immediately before the activation time, and the difference time 34 of the inserted new element and the elements after that. The difference time 34 is adjusted appropriately.

【0026】次に、動作について図5、図6、及び図7
のフローチャート図に基づいて説明する。
Next, the operation will be described with reference to FIGS. 5, 6 and 7.
It will be described based on the flowchart of FIG.

【0027】図5は、タイマ割り込みハンドラ12の動
作を示すフローチャート図である。タイマ割り込みハー
ドウェア2がタイマ割り込みを発生させると、OS1は
タイマ割り込みハンドラ12を起動する。タイマ割り込
みハンドラ12は、図5のステップS111で、本処理
中に再度タイマ割り込みを発生させないために、タイマ
割り込みを禁止状態に設定する。ステップS112で、
タイマハンドラ待ち行列キュー13が、存在する有効な
要素31を指しているか否かを判断し、存在する有効な
要素31を指していない場合には、ステップS119で
タイマ割り込みを可能状態に設定し、当該タイマ割り込
みハンドラ12の処理を終了する。
FIG. 5 is a flow chart showing the operation of the timer interrupt handler 12. When the timer interrupt hardware 2 generates a timer interrupt, the OS 1 activates the timer interrupt handler 12. In step S111 of FIG. 5, the timer interrupt handler 12 sets the timer interrupt to the disabled state in order not to generate the timer interrupt again during this processing. In step S112,
It is determined whether or not the timer handler queue queue 13 points to the existing valid element 31, and if it does not point to the existing valid element 31, the timer interrupt is set to the enable state in step S119, The processing of the timer interrupt handler 12 is completed.

【0028】一方、ステップS112において、タイマ
ハンドラ待ち行列キュー13が、存在する有効な要素3
1を指している場合には、ステップS113に進み、タ
イマハンドラ待ち行列キュー13が指す先頭要素31の
差分時間34の値を1つ減少させる。ステップS114
で、その先頭要素31の差分時間34の値が0に等しい
か否かを判断し、その差分時間34の値が0に等しくな
い場合には、ステップS119でタイマ割り込みを可能
状態に設定し、当該タイマ割り込みハンドラ12の処理
を終了する。
On the other hand, in step S112, the timer handler queue queue 13 has the valid element 3 that exists.
If the value is 1, the process proceeds to step S113, and the value of the difference time 34 of the head element 31 pointed to by the timer handler queue 13 is decremented by 1. Step S114
Then, it is determined whether or not the value of the difference time 34 of the top element 31 is equal to 0, and if the value of the difference time 34 is not equal to 0, the timer interrupt is enabled in step S119, The processing of the timer interrupt handler 12 is completed.

【0029】一方、ステップS114において、先頭要
素31の差分時間34の値が0に等しい場合には、ステ
ップS115に進み、先頭要素31の開始アドレス35
が指すタイマハンドラを起動する。次に、ステップS1
16で、タイマハンドラ待ち行列54から先頭要素31
を取り除くために、先頭要素の後方ポインタ32が指す
次の要素31の前方ポインタ33を、先頭要素31の前
方ポインタ33が指す終端の要素31を指すように設定
し、かつ終端の要素31の後方ポインタ32が次の要素
31を指すように設定する。即ち、現在、行列の2番目
の要素の前方ポインタが最後尾の要素を指すようにし、
最後尾のポインタの後方ポインタが2番目の要素を指す
ように設定する。次に、ステップS117に進み、タイ
マハンドラ待ち行列キュー13が存在するならば次の新
しい先頭要素31を指すように設定し、ステップS11
8で、タイマハンドラ待ち行列キュー13が存在する有
効な要素31を指しているか否かを判断し、上記ステッ
プS116の操作によりタイマハンドラ待ち行列54か
ら全ての要素31が無くなり、存在する有効な要素31
を指していない場合には、ステップS119でタイマ割
り込みを可能状態に設定し、当該タイマ割り込みハンド
ラ12の処理を終了する。
On the other hand, in step S114, when the value of the difference time 34 of the head element 31 is equal to 0, the process proceeds to step S115, and the start address 35 of the head element 31.
Start the timer handler pointed to by. Next, step S1
16, the first element 31 from the timer handler queue 54
In order to remove the, the forward pointer 33 of the next element 31 pointed to by the backward pointer 32 of the head element is set to point to the terminal element 31 pointed by the head pointer 33 of the head element 31, and The pointer 32 is set to point to the next element 31. That is, currently, the forward pointer of the second element of the matrix points to the last element,
The rear pointer of the last pointer is set to point to the second element. Next, the process proceeds to step S117, and if the timer handler queue queue 13 exists, it is set to point to the next new head element 31, and step S11.
In step S8, it is determined whether the timer handler queue queue 13 points to the existing valid element 31, and the operation of step S116 eliminates all the elements 31 from the timer handler queue 54, and the existing valid element 31 31
If not, the timer interrupt is set to the enable state in step S119, and the processing of the timer interrupt handler 12 is ended.

【0030】一方、ステップS118でタイマハンドラ
待ち行列キュー13が存在する有効な要素31を指して
いる場合には、ステップS114に戻り、先頭要素31
の差分時間34の値が0に等しいか否かを判断すること
を繰り返す。
On the other hand, if it is determined in step S118 that the valid element 31 in which the timer handler queue 13 exists, the process returns to step S114 and the top element 31 is returned.
It is repeated to determine whether or not the value of the difference time 34 is equal to 0.

【0031】また、OS1は、任意のタイマハンドラに
ついて起動時刻を登録する場合は、タイマハンドラ登録
ルーチン処理部15を実行する。タイマハンドラ登録ル
ーチン処理部15は、図6のステップS151で、指定
されたタイマハンドラの起動時刻と開始アドレスの情報
を取得し、ステップS152で、本処理中にタイマ割り
込みを発生させないために、タイマ割り込みを禁止状態
に設定する。ステップS153で、タイマハンドラ待ち
行列54に新規に登録する要素31の差分時間を比較計
算する値となる、指定されたタイマハンドラの起動時刻
が現在のシステムクロックの値から何クロック後である
かを計算する。次に、ステップS154で、タイマハン
ドラ待ち行列キュー13が、存在する有効な要素31を
指しているか否かを判断し、存在する有効な要素31を
指していない場合には、ステップS155で、タイマハ
ンドラ待ち行列キュー13が登録する要素31を指すよ
うに設定し、登録する要素31をタイマハンドラ待ち行
列54の先頭とし、ステップS162でタイマ割り込み
を可能状態に設定し、当該タイマハンドラ登録ルーチン
処理部15の処理を終了する。
Further, the OS 1 executes the timer handler registration routine processing unit 15 when registering the activation time for an arbitrary timer handler. The timer handler registration routine processing unit 15 acquires the information of the start time and the start address of the designated timer handler in step S151 of FIG. 6, and in step S152, the timer interrupt is generated in order not to generate a timer interrupt during this processing. Set interrupts to disabled state. In step S153, how many clocks after the current system clock value the start time of the specified timer handler becomes, which becomes a value for comparing and calculating the difference time of the element 31 newly registered in the timer handler queue 54, is determined. calculate. Next, in step S154, it is determined whether or not the timer handler queue queue 13 points to the existing valid element 31, and if it does not point to the existing valid element 31, in step S155, the timer The handler queue queue 13 is set so as to point to the element 31 to be registered, the element 31 to be registered is set to the head of the timer handler queue 54, and the timer interrupt is enabled in step S162, and the timer handler registration routine processing unit The process of 15 is completed.

【0032】一方、ステップS154において、タイマ
ハンドラ待ち行列キュー13が、存在する有効な要素3
1を指している場合には、ステップS156でタイマハ
ンドラ待ち行列キュー13が指す先頭の要素31から終
端の要素31までその差分時間34を順番に加算してい
き、その加算値がステップS153で計算した差分時間
を初めて超えるか、同じになる要素31を見つける。次
に、ステップS157において、その加算値が新たに登
録する要素31の差分時間を初めて超えるか、同じにな
る要素31が見つかったか否かを判断し、見つからなか
った場合には、ステップS158で、新たに登録する要
素31の差分時間34から加算値を減じた値に設定し、
タイマハンドラ待ち行列キュー13が指す先頭の要素3
1の前方ポインタ33が指す終端の要素31の後ろ、即
ちタイマハンドラ待ち行列54の終端に新たに登録する
要素31を挿入し(起動時刻の登録処理を行い)、ステ
ップS162でタイマ割り込みを可能状態に設定し、当
該タイマハンドラ登録ルーチン処理部15の処理を終了
する。
On the other hand, in step S154, the timer handler queue queue 13 has the valid element 3 that exists.
If it indicates 1, the difference time 34 is sequentially added from the first element 31 to the last element 31 pointed to by the timer handler queue 13 in step S156, and the added value is calculated in step S153. The element 31 that exceeds or becomes the same as the difference time for the first time is found. Next, in step S157, it is determined whether the added value exceeds the difference time of the newly registered element 31 for the first time, or whether the same element 31 is found, and if not found, in step S158, Set the value obtained by subtracting the added value from the difference time 34 of the newly registered element 31,
Top element 3 pointed to by the timer handler queue 13
The element 31 to be newly registered is inserted after the element 31 at the end pointed by the forward pointer 33 of 1, that is, at the end of the timer handler queue 54 (start time registration processing is performed), and the timer interrupt is enabled in step S162. Is set, and the processing of the timer handler registration routine processing unit 15 is completed.

【0033】一方、ステップS157において、その加
算値が新たに登録する要素31の差分時間を初めて超え
るか、同じになる要素31が見つかった場合には、ステ
ップS159でその加算値が新たに登録する要素31の
差分時間と同じになる要素31が見つかったか否かを判
断する。ステップS159で、その加算値が新たに登録
する要素31の差分時間と同じになる要素31が見つか
らなかった場合には、ステップS156で見つけた加算
値が新たに登録する要素31の差分時間を初めて超える
要素31の後方ポインタ32と前方ポインタ33を利用
して、ステップS160で、その要素の直前の要素とし
て新たに登録する要素31を、タイマハンドラ待ち行列
54に挿入し(起動時刻の登録処理を行い)、ステップ
S162でタイマ割り込みを可能状態に設定し、当該タ
イマハンドラ登録ルーチン処理部15の処理を終了す
る。
On the other hand, in step S157, if the added value exceeds the difference time of the element 31 to be newly registered for the first time or if the same element 31 is found, the added value is newly registered in step S159. It is determined whether or not the element 31 having the same difference time as the element 31 is found. In step S159, when the element 31 whose addition value is the same as the difference time of the element 31 to be newly registered is not found, the difference value of the addition value found in step S156 is set to the difference time of the element 31 to be newly registered for the first time. By using the backward pointer 32 and forward pointer 33 of the exceeding element 31, in step S160, the element 31 to be newly registered as the element immediately before the element 31 is inserted into the timer handler queue 54 (the activation time registration process is performed). (Yes), the timer interrupt is enabled in step S162, and the processing of the timer handler registration routine processing unit 15 is completed.

【0034】一方、ステップS159でその加算値が新
たに登録する要素31の差分時間と同じになる要素(同
時起動既登録タイマハンドラ)が見つかった場合には、
ステップS161で、新たに登録する要素31を、新た
に登録する要素31とその加算値が同じ要素31、即
ち、起動時刻が同じ要素31に繋げるか、或いは登録す
る要素31の差分時間を増減させて、登録する要素31
とその加算値が同じ要素(起動時刻が同じ要素)31の
前後の任意時刻に起動されるように、前後の要素31に
繋げる。次に、ステップS162でタイマ割り込みを可
能状態に設定し、当該タイマハンドラ登録ルーチン処理
部15の処理を終了する。ここで、上記タイマハンドラ
登録ルーチン処理部15のステップS161の処理詳細
については、図7のフローチャート図に基づいて説明す
る。なお、本実施の形態では、タイマハンドラは指定さ
れた起動時刻から前後の任意時刻に起動される場合があ
るが、タイマハンドラはタイマ割り込み周期を最小単位
とした時間間隔で登録され、起動されるものであり、登
録を行う時点の一般プログラムや割り込みハンドラの稼
動状況の影響もあり、少なくとも1クロックの起動時刻
の誤差は存在するものである。
On the other hand, when an element (simultaneous activation registered timer handler) whose addition value is the same as the difference time of the newly registered element 31 is found in step S159,
In step S161, the element 31 to be newly registered is connected to the element 31 having the same addition value as the newly registered element 31, that is, the element 31 having the same start time, or the difference time of the element 31 to be registered is increased or decreased. And register element 31
And the elements 31 having the same addition value (elements having the same activation time) before and after the element 31 are connected so as to be activated at arbitrary times. Next, in step S162, the timer interrupt is set to the enabled state, and the processing of the timer handler registration routine processing unit 15 is finished. Here, the details of the processing of step S161 of the timer handler registration routine processing unit 15 will be described with reference to the flowchart of FIG. In this embodiment, the timer handler may be activated at any time before or after the designated activation time, but the timer handler is registered and activated at a time interval with the timer interrupt cycle as the minimum unit. However, there is an error in the activation time of at least one clock because of the influence of the operating conditions of the general program and the interrupt handler at the time of registration.

【0035】図7のフローチャート図に基づいて、図6
のステップS161におけるタイマハンドラ登録ルーチ
ン処理部15の処理内容について説明する。なお、図6
のステップS161は、新たに登録する要素31を、同
時に起動される要素31と同じ時刻に起動されるように
繋げるか、或いは同時に起動される要素31の前後の任
意時刻に起動されるように、前後の要素31として繋げ
るかを判断する処理である。タイマハンドラ登録ルーチ
ン処理部15は、図7のステップS211で、図6のス
テップS159で見つけた、タイマハンドラ待ち行列5
4内の新たに登録する要素と起動時刻が同じ要素31に
着目する。次に、ステップS212で、上記着目する要
素31の後方ポインタ32と前方ポインタ33を辿るこ
とで、前後の要素31を見つけ、その差分時間34が0
クロックである、即ち着目する要素31と同時に起動さ
れる要素31が幾つ繋がっているか、タイマハンドラ待
ち行列54内を順次調べる。次に、ステップS213
で、ステップS212で調べた同時に起動される要素3
1の数が、最大タイマハンドラ同時起動値記録部14に
記録されている最大タイマハンドラ同時起動値より小さ
いか否かを判断し、同時に起動される要素31の数が、
最大タイマハンドラ同時起動値より小さい場合には、ス
テップS214で、新たに登録する要素31の差分時間
34を0クロックに設定し、ステップS215で、新た
に登録する要素31を着目する同時に起動する要素31
の次に挿入し、当該フローチャートの処理を終了する。
Based on the flowchart of FIG. 7, FIG.
The processing contents of the timer handler registration routine processing unit 15 in step S 161 will be described. Note that FIG.
In step S161, the newly registered element 31 is connected so as to be activated at the same time as the element 31 that is activated at the same time, or is activated at an arbitrary time before and after the element 31 that is activated at the same time. This is a process of determining whether to connect the elements 31 before and after. The timer handler registration routine processing unit 15 in step S211 of FIG. 7 finds the timer handler queue 5 found in step S159 of FIG.
Attention is paid to the element 31 having the same activation time as the newly registered element in FIG. Next, in step S212, the backward pointer 32 and the forward pointer 33 of the noted element 31 are traced to find the preceding and following elements 31, and the difference time 34 between them is 0.
The timer handler queue 54 is sequentially examined to see how many elements 31 that are clocks, that is, elements 31 that are activated at the same time as the element 31 of interest are connected. Then, step S213
Then, the element 3 which is activated at the same time as checked in step S212
It is determined whether the number of 1 is smaller than the maximum timer handler simultaneous activation value recorded in the maximum timer handler simultaneous activation value recording unit 14, and the number of elements 31 simultaneously activated is
If it is smaller than the maximum timer handler simultaneous activation value, the difference time 34 of the element 31 to be newly registered is set to 0 clock in step S214, and the element 31 to be newly registered is focused and simultaneously activated in step S215. 31
Is inserted after, and the process of the flowchart is finished.

【0036】一方、図7のステップS213において、
ステップS212で調べた同時に起動される要素31の
数が、最大タイマハンドラ同時起動値より小さくない、
即ち、等しいか大きい場合には、ステップS216で、
新たに登録する要素31の差分時間34を任意の小さい
値、例えば最小の1クロックに設定し、ステップS21
7で、タイマハンドラ待ち行列54内で着目する同時に
起動する要素31の中の最も後ろの要素31を見つけ、
その最も後ろの要素31の次に、新たに登録する要素3
1を挿入し(起動時刻の登録処理を行い)、当該フロー
チャートの処理を終了する。
On the other hand, in step S213 of FIG.
The number of simultaneously activated elements 31 checked in step S212 is not smaller than the maximum timer handler simultaneous activation value,
That is, if they are equal or larger, in step S216,
The difference time 34 of the newly registered element 31 is set to an arbitrarily small value, for example, the minimum one clock, and step S21
In step 7, find the last element 31 of the simultaneously activated elements 31 of interest in the timer handler queue 54,
Element 3 to be newly registered next to the last element 31
1 is inserted (start time registration processing is performed), and the processing of the flowchart ends.

【0037】なお、図7のフローチャート図では、ステ
ップS216において、新たに登録する要素31の差分
時間34を1クロックに設定し、ステップS217にお
いて、新たに登録する要素31を同時に起動される要素
31の直後に起動されるように繋げる処理について説明
したが、図7のステップS216とステップS217に
おいて、同時に起動される要素31より任意の時間分だ
け早く起動されるように、新たに登録する要素31の差
分時間34を調整して、同時に起動される要素31の前
の要素31として挿入することも同様に行える。
In the flowchart of FIG. 7, the difference time 34 of the element 31 to be newly registered is set to 1 clock in step S216, and the element 31 to be newly registered is simultaneously activated in step S217. Although the process of connecting so as to be activated immediately after is described, in step S216 and step S217 of FIG. 7, the newly registered element 31 is activated so as to be activated earlier than the element 31 simultaneously activated by an arbitrary time. It is also possible to adjust the difference time 34 of the above and insert it as the element 31 before the element 31 that is activated at the same time.

【0038】また、最大タイマハンドラ同時起動値を1
に設定しておけば、既に登録済の要素と新たに登録する
要素との間で起動時刻が重複するような場合でも、必ず
一方の起動時刻が変更されるため、1つの起動時刻にお
いて起動されるタイマハンドラは1つのみという運用も
可能である。
Also, the maximum timer handler simultaneous activation value is 1
If it is set to, even if the activation time overlaps between the already registered element and the element to be newly registered, one of the activation times will always be changed, so it will be activated at one activation time. It is also possible to operate with only one timer handler.

【0039】この実施の形態1によるコンピュータ(タ
イマハンドラ管理装置)によれば、同時に起動できる最
大タイマハンドラ同時起動値を設け、タイマハンドラ登
録ルーチン処理部15において、その最大タイマハンド
ラ同時起動値を越える同じ起動時刻への新たなタイマハ
ンドラの登録は、その前或いは後の時刻に分散して起動
されるように登録することで、複数の数多くのタイマハ
ンドラが同時に起動される登録が行われた場合に、一般
プログラムタスクの処理が再開されるまでの時間が長く
なることを改善し、システムの応答性を向上させること
ができる。
According to the computer (timer handler management device) according to the first embodiment, the maximum timer handler simultaneous activation value that can be simultaneously activated is provided, and the timer handler registration routine processing unit 15 exceeds the maximum timer handler simultaneous activation value. When registering new timer handlers at the same start time so that multiple timer handlers are started simultaneously by registering so that they are distributed and started before or after that time. In addition, it is possible to improve the responsiveness of the system by improving the time until the processing of the general program task is restarted.

【0040】実施の形態2.以下、この発明の第2の実
施の形態について図を用いて説明する。図8は、この発
明の実施の形態2におけるコンピュータ(タイマハンド
ラ管理装置)の構成図である。本実施の形態では、実施
の形態1のOS1に優先度指定付きタイマハンドラ登録
ルーチン処理部16を備える。図9は、この発明の実施
の形態2におけるタイマハンドラの情報を保持する要素
の説明図である。本実施の形態では、実施の形態1の要
素31に、タイマハンドラの起動時刻を正確に守る必要
性の高さを示す優先度36の情報を備える。従って起動
時刻記録部18は、タイマハンドラごとに優先度の情報
も記録している。なお、図中、同一符号は同一構成要素
を示している。また、タイマ割り込みハンドラ12の動
作は、実施の形態1の図5のフローチャート図の動作と
同じであり説明は省略する。更に、優先度指定付きタイ
マハンドラ登録ルーチン処理部16の動作において、要
素31が優先度36の情報を含めて登録されること、及
び登録する要素31を同時に起動される要素31と同じ
時刻に起動されるように繋げるか、或いはその前後の要
素に繋げる処理の詳細以外は、実施の形態1の図6のフ
ローチャート図の動作と同じであり説明は省略する。
Embodiment 2. Hereinafter, a second embodiment of the present invention will be described with reference to the drawings. FIG. 8 is a configuration diagram of a computer (timer handler management device) according to the second embodiment of the present invention. In this embodiment, the OS 1 of the first embodiment is provided with a timer handler registration routine processing unit 16 with a priority designation. FIG. 9 is an explanatory diagram of elements holding information of the timer handler according to the second embodiment of the present invention. In the present embodiment, the element 31 of the first embodiment is provided with the information of the priority 36 indicating the high necessity of exactly keeping the activation time of the timer handler. Therefore, the activation time recording unit 18 also records priority information for each timer handler. In the drawings, the same reference numerals indicate the same constituent elements. Further, the operation of the timer interrupt handler 12 is the same as the operation of the flowchart of FIG. 5 of the first embodiment, and the description thereof will be omitted. Furthermore, in the operation of the timer handler registration routine processing unit 16 with priority designation, the element 31 is registered including the information of the priority 36, and the element 31 to be registered is activated at the same time as the element 31 which is activated at the same time. The operation is the same as the operation of the flowchart of FIG. 6 according to the first embodiment except for the details of the processing of connecting as described above, or the processing of connecting the elements before and after the same, and the description thereof will be omitted.

【0041】本実施の形態では、優先度指定付きタイマ
ハンドラ登録ルーチン処理部16の動作を、図10のフ
ローチャート図に基づいて説明する。ここでは、実施の
形態1示した図7の処理に相当する処理、即ち、図6の
ステップS161の処理の詳細について説明する。優先
度指定タイマハンドラ登録ルーチン処理部16は、図1
0のステップS251で、図6のフローチャート図のス
テップS159で見つけた、タイマハンドラ待ち行列5
4内の新たに登録する要素と起動時刻が同じ要素31に
着目する。次に、ステップS252で、上記着目する要
素31の後方ポインタ32と前方ポインタ33を辿るこ
とで、前後の要素31を見つけ、その差分時間34が0
クロックである、即ち着目する要素31と同時に起動さ
れる要素31が幾つ繋がっているか、タイマハンドラ待
ち行列54内を順次調べる。次に、ステップS253
で、ステップS252で調べた同時に起動される要素3
1の数が、最大タイマハンドラ同時起動値記録部14に
記録された最大タイマハンドラ同時起動値より小さいか
否かを判断し、その同時に起動される要素31の数が、
最大タイマハンドラ同時起動値より小さい場合には、ス
テップS254で、新たに登録する要素31の差分時間
34を0クロックに設定し、ステップS255で、新た
に登録する要素31を着目する同時に起動する要素31
の次に挿入し(起動時刻の登録処理を行い)、当該フロ
ーチャートの処理を終了する。
In the present embodiment, the operation of the timer handler registration routine processing unit 16 with priority designation will be described with reference to the flowchart of FIG. Here, details of the process corresponding to the process of FIG. 7 described in the first embodiment, that is, the process of step S161 of FIG. 6 will be described. The priority designation timer handler registration routine processing unit 16 is shown in FIG.
0 in step S251, the timer handler queue 5 found in step S159 in the flowchart of FIG.
Attention is paid to the element 31 having the same activation time as the newly registered element in FIG. Next, in step S252, the backward pointer 32 and the forward pointer 33 of the noted element 31 are traced to find the preceding and following elements 31, and the difference time 34 between them is 0.
The timer handler queue 54 is sequentially examined to see how many elements 31 that are clocks, that is, elements 31 that are activated at the same time as the element 31 of interest are connected. Next, step S253.
Then, the element 3 that is activated at the same time as checked in step S252
It is determined whether the number of 1 is smaller than the maximum timer handler simultaneous activation value recorded in the maximum timer handler simultaneous activation value recording unit 14, and the number of the elements 31 that are simultaneously activated is
If it is smaller than the maximum timer handler simultaneous activation value, the difference time 34 of the element 31 to be newly registered is set to 0 clock in step S254, and the element 31 to be newly registered is simultaneously activated in step S255. 31
Is inserted next (the activation time registration process is performed), and the process of the flowchart is ended.

【0042】一方、図10のステップS253におい
て、ステップS252で調べた同時に起動される要素3
1の数が、最大タイマハンドラ同時起動値より小さくな
い、即ち、等しいか大きい場合には、ステップS256
で、新たに登録する要素31を含め、ステップS252
で調べた同時に起動される要素31の中で、最も優先度
36の低い要素31を見つける。次に、ステップS25
7で、ステップS256で見つけた最も優先度36の低
い要素31の差分時間34を任意の小さい値、例えば最
小の1クロックに設定し、ステップS258で、タイマ
ハンドラ待ち行列54内で着目する同時に起動する要素
31の中の最も後ろの要素31を見つけ、その最も後ろ
の要素31の次に、最も優先度36の低い要素31を挿
入し(最も優先度36の低い要素31の起動時刻を変更
し)、当該フローチャートの処理を終了する。
On the other hand, in step S253 of FIG. 10, the element 3 which is activated at the same time as checked in step S252.
If the number of 1's is not smaller than the maximum timer handler simultaneous activation value, that is, equal to or larger than the maximum timer handler simultaneous activation value, step S256.
In step S252, including the newly registered element 31.
Among the elements 31 that are activated at the same time, the element 31 having the lowest priority 36 is found. Next, step S25.
In step S7, the difference time 34 of the element 31 with the lowest priority 36 found in step S256 is set to an arbitrarily small value, for example, the minimum one clock, and in step S258, attention is simultaneously started in the timer handler queue 54. The element 31 having the lowest priority 36 is found next to the element 31 having the lowest priority 36 (the start time of the element 31 having the lowest priority 36 is changed). ), The process of the said flowchart is complete | finished.

【0043】なお、図10のフローチャート図では、ス
テップS257において、最も優先度の低い要素31の
差分時間34を1クロックに設定し、ステップS258
において、同時に起動される要素31の直後の要素31
として繋げる処理について説明したが、図10のステッ
プS257とステップS258において、同時に起動さ
れる要素31より任意の時間分だけ早く起動されるよう
に、最も優先度の低い要素31の差分時間34を調整し
て、同時に起動される要素31の前の要素31として挿
入することも同様に行える。
In the flowchart of FIG. 10, in step S257, the difference time 34 of the element 31 having the lowest priority is set to 1 clock, and step S258 is executed.
In, the element 31 immediately after the element 31 that is activated at the same time
As described above, in step S257 and step S258 of FIG. 10, the difference time 34 of the element 31 having the lowest priority is adjusted so that it is activated earlier than the element 31 activated at the same time by an arbitrary time. Then, it can be similarly inserted as the element 31 before the element 31 that is activated at the same time.

【0044】この実施の形態2によるコンピュータ(タ
イマハンドラ管理装置)によれば、同時に起動できる最
大タイマハンドラ同時起動値を設け、優先度指定付きタ
イマハンドラ登録ルーチン処理部16において、タイマ
ハンドラの起動時刻を正確に守る必要性の高さを示す優
先度を指定できるようにし、また、その最大タイマハン
ドラ同時起動値を越える同じ起動時刻への新たなタイマ
ハンドラの登録は、同時に起動されるタイマハンドラの
中で、最も優先度の低いタイマハンドラを、その前或い
は後の時刻に分散して起動されるように登録すること
で、起動時刻を正確に守る必要性の高いタイマハンドラ
の起動時刻を変更すること無しに、一般プログラムタス
クの処理が再開されるまでの時間が長くなることを改善
し、システムの応答性を向上させることができる。
According to the computer (timer handler management apparatus) according to the second embodiment, the maximum timer handler simultaneous activation value that can be activated at the same time is set, and the timer handler registration routine processing unit 16 with priority designation activates the timer handler activation time. It is possible to specify a priority that indicates the necessity of observing correctly, and to register a new timer handler at the same activation time that exceeds the maximum timer handler simultaneous activation value, register the timer handlers that are activated simultaneously. Among them, the timer handler with the lowest priority is registered so that it is activated in a distributed manner at the time before or after it, so that the activation time of the timer handler that has a high necessity to keep the activation time accurately is changed. Without delay, it improves the time until the processing of general program task is resumed, and the system response is improved. It is possible to improve the.

【0045】実施の形態3.以下、この発明の第3の実
施の形態について図を用いて説明する。図11は、この
発明の実施の形態3におけるコンピュータ(タイマハン
ドラ管理装置)の構成図である。本実施の形態では、実
施の形態1のOS1にタイマハンドラ処理時間指定付き
タイマハンドラ登録ルーチン処理部17を備える。図1
2は、この発明の実施の形態3におけるタイマハンドラ
の情報を保持する要素の説明図である。本実施の形態で
は、実施の形態1の要素31にそのタイマハンドラが行
うサブルーチン処理の処理時間37の情報を備える。従
って、起動時刻記録部18は、タイマハンドラごとに処
理時間の情報も記録している。なお、図中、同一符号は
同一構成要素を示している。また、タイマ割り込みハン
ドラ12の動作は、実施の形態1の図5のフローチャー
ト図の動作と同じであり説明は省略する。更に、タイマ
ハンドラ処理時間指定付きタイマハンドラ登録ルーチン
処理部17の動作において、要素31が処理時間37の
情報を含めて登録されること、及び新たに登録する要素
31を同時に起動される要素31と同じ時刻に起動され
るように繋げるか、或いはその前後の要素31に繋げる
処理の詳細以外は、実施の形態1の図6のフローチャー
ト図の動作と同じであり説明は省略する。
Embodiment 3. Hereinafter, a third embodiment of the present invention will be described with reference to the drawings. FIG. 11 is a configuration diagram of a computer (timer handler management device) according to the third embodiment of the present invention. In this embodiment, the OS 1 of the first embodiment includes a timer handler registration routine processing unit 17 with a timer handler processing time designation. Figure 1
FIG. 2 is an explanatory diagram of elements holding information of a timer handler according to the third embodiment of the present invention. In this embodiment, the element 31 of the first embodiment is provided with information on the processing time 37 of the subroutine processing performed by the timer handler. Therefore, the activation time recording unit 18 also records the processing time information for each timer handler. In the drawings, the same reference numerals indicate the same constituent elements. Further, the operation of the timer interrupt handler 12 is the same as the operation of the flowchart of FIG. 5 of the first embodiment, and the description thereof will be omitted. Furthermore, in the operation of the timer handler registration routine processing unit 17 with the timer handler processing time designation, the element 31 is registered including the information of the processing time 37, and the newly registered element 31 is simultaneously activated. Except for the details of the process of connecting so as to be activated at the same time or connecting to the elements 31 before and after the same, the operation is the same as the operation of the flowchart of FIG.

【0046】本実施の形態では、タイマハンドラ処理時
間指定付きタイマハンドラ登録ルーチン処理部17の動
作を、図13のフローチャート図に基づいて説明する。
ここでは、実施の形態1で示した図7の処理に相当する
処理、即ち、図6のステップS161の処理の詳細につ
いて説明する。タイマハンドラ処理時間指定付きタイマ
ハンドラ登録ルーチン処理部17は、図13のステップ
S271で、図6のフローチャート図のステップS15
9で見つけた、タイマハンドラ待ち行列54内の新たに
登録する要素と起動時刻が同じ要素31に着目する。次
に、ステップS272で、上記着目する要素31の後方
ポインタ32と前方ポインタ33を辿ることで、前後の
要素31を見つけ、その差分時間34が0クロックであ
る、即ち着目する要素31と同時に起動される要素31
が幾つ繋がっているか、タイマハンドラ待ち行列54内
を順次調べる。次に、ステップS273で、ステップS
272で調べた同時に起動される要素31の数が、最大
タイマハンドラ同時起動値より小さいか否かを判断し、
同時に起動される要素31の数が、最大タイマハンドラ
同時起動値より小さい場合には、ステップS274で、
新たに登録する要素31の差分時間34を0クロックに
設定し、ステップS275で、新たに登録する要素31
を着目する同時に起動する要素31の次に挿入し(起動
時刻の登録処理を行い)、当該フローチャートの処理を
終了する。
In the present embodiment, the operation of the timer handler registration routine processing unit 17 with timer handler processing time designation will be described with reference to the flowchart of FIG.
Here, details of the process corresponding to the process of FIG. 7 described in the first embodiment, that is, the process of step S161 of FIG. 6 will be described. The timer handler registration routine processing unit 17 with timer handler processing time designation is step S271 in FIG. 13 and step S15 in the flowchart of FIG.
Attention is paid to the element 31 having the same activation time as the element to be newly registered in the timer handler queue 54 found in 9. Next, in step S272, the backward and forward pointers 32 and 33 of the target element 31 are traced to find the front and rear elements 31, and the difference time 34 between them is 0 clock, that is, the target element 31 is activated at the same time. Element 31
Are sequentially checked in the timer handler queue 54. Next, in step S273, step S
It is determined whether the number of simultaneously activated elements 31 checked in 272 is smaller than the maximum timer handler simultaneous activation value,
If the number of elements 31 activated at the same time is smaller than the maximum timer handler simultaneous activation value, in step S274,
The difference time 34 of the newly registered element 31 is set to 0 clock, and in step S275, the newly registered element 31
Is inserted next to the element 31 which is activated at the same time and is activated (registration processing of activation time is performed), and the processing of the flowchart is ended.

【0047】一方、図13のステップS273におい
て、ステップS272で調べた同時に起動される要素3
1の数が、最大タイマハンドラ同時起動値より小さくな
い、即ち等しいか大きい場合には、ステップS276
で、新たに登録する要素31を含め、ステップS272
で調べた同時に起動される要素31の中で、最も処理時
間37の長い要素31を見つける。次に、ステップS2
77で、ステップS276で見つけた最も処理時間37
の長い要素31の差分時間34を任意の小さい値、例え
ば最小の1クロックに設定し、ステップS278で、タ
イマハンドラ待ち行列54内で着目する同時に起動する
要素31の中の最も後ろの要素31を見つけ、その最も
後ろの要素31の次に、最も処理時間37の長い要素3
1を挿入し(最も処理時間37の長い要素31の起動時
刻を変更し)、当該フローチャートの処理を終了する。
On the other hand, in step S273 of FIG. 13, the element 3 which is activated at the same time as checked in step S272.
If the number of 1's is not less than the maximum timer handler simultaneous activation value, that is, equal to or greater than the maximum timer handler simultaneous activation value, step S276.
In step S272, including the newly registered element 31.
Among the elements 31 that are activated at the same time, the element 31 having the longest processing time 37 is found. Next, step S2
In 77, the most processing time 37 found in step S276
The difference time 34 of the long element 31 is set to an arbitrarily small value, for example, the minimum one clock, and in step S278, the rearmost element 31 of the simultaneously activated elements 31 in the timer handler queue 54 is set. The element 3 with the longest processing time 37 is found next to the element 31 at the rearmost position.
1 is inserted (the activation time of the element 31 having the longest processing time 37 is changed), and the processing of the flowchart is finished.

【0048】なお、図13のフローチャート図では、ス
テップS277において、最も処理時間37の長い要素
31の差分時間34を1クロックに設定し、ステップS
278において、同時に起動される要素31の直後の要
素31として繋げる処理について説明したが、図13の
ステップS277とステップS278において、同時に
起動される要素31より任意の時間分だけ早く起動され
るように、最も処理時間37の長い要素31の差分時間
34を調整し、同時に起動される要素31の前の要素3
1として挿入することも同様に行える。
In the flowchart of FIG. 13, in step S277, the difference time 34 of the element 31 having the longest processing time 37 is set to 1 clock, and step S27 is executed.
In 278, the process of connecting as the element 31 immediately after the element 31 that is activated at the same time has been described. However, in step S277 and step S278 of FIG. 13, the element 31 may be activated earlier by an arbitrary time than the element 31 that is activated simultaneously. , The element 3 before the element 31 that is activated at the same time by adjusting the difference time 34 of the element 31 with the longest processing time 37
Insertion as 1 can be performed similarly.

【0049】この実施の形態3によるコンピュータ(タ
イマハンドラ管理装置)によれば、同時に起動できる最
大タイマハンドラ同時起動値を設け、タイマハンドラ処
理時間指定付きタイマハンドラ登録ルーチン処理部17
において、タイマハンドラの処理時間を指定できるよう
にし、また、その最大タイマハンドラ同時起動値を越え
る同じ起動時刻への新たなタイマハンドラの登録は、同
時に起動されるタイマハンドラの中で、最も処理時間の
長いタイマハンドラを、その前或いは後の時刻に分散し
て起動されるように登録することで、同時に起動するタ
イマハンドラ全体の処理時間が出来るだけ短い時間とな
り、一般プログラムタスクの処理が再開されるまでの時
間が長くなることを改善し、システムの応答性を向上さ
せることができる。
According to the computer (timer handler management device) according to the third embodiment, the maximum timer handler simultaneous activation value that can be activated simultaneously is provided, and the timer handler registration routine processing unit 17 with the timer handler processing time designation is provided.
In, the processing time of the timer handler can be specified, and the registration of a new timer handler at the same activation time that exceeds the maximum timer handler simultaneous activation value is the most processing time among the timer handlers activated simultaneously. By registering the long timer handlers of the above to be distributed and activated at the time before or after that, the processing time of the entire timer handlers that are activated simultaneously becomes as short as possible, and the processing of general program tasks is restarted. It is possible to improve the responsiveness of the system by improving the increase in the time taken to wait.

【0050】以上の実施の形態1〜3では、本発明に係
るタイマハンドラ管理装置について説明したが、実施の
形態1〜3に示した処理手順で本発明に係るタイマハン
ドラ管理方法も実現することができる。
In the above first to third embodiments, the timer handler management device according to the present invention has been described, but the timer handler management method according to the present invention can also be realized by the processing procedure shown in the first to third embodiments. You can

【0051】ここで、本発明の特徴をまとめると以下の
ようになる。
Here, the features of the present invention are summarized as follows.

【0052】本発明による時刻管理方式は、周期的なタ
イマ割り込みを用いて、そのタイマ割り込みの周期を最
小の単位とする任意の時刻に起動するタイマハンドラを
管理する時刻管理方式において、タイマ割り込み毎に1
つずつクロック値が増加するシステムクロックと、タイ
マハンドラの起動時刻と開始アドレスの情報を管理する
ための、最も早く起動される先頭のタイマハンドラであ
ればシステムクロック値と起動されるまでの差分のクロ
ック値で示される差分時間、先頭以外のタイマハンドラ
であれば直前のタイマハンドラが起動されてからの差分
のクロック値で示される差分時間と、タイマハンドラの
開始アドレスと、前方と後方を指すポインタから成る要
素と、要素が起動される時刻の順番に前方ポインタと後
方ポインタによって互いに繋がるタイマハンドラ待ち行
列と、タイマハンドラ待ち行列の先頭の要素へのポイン
タを有するタイマハンドラ待ち行列キューと、タイマ割
り込みが発生する毎に起動され、タイマハンドラ待ち行
列キューがポイントする先頭の要素の差分時間を1つ減
じ、差分時間が0に等しくなった場合には、その要素の
タイマハンドラの開始アドレスを参照してタイマハンド
ラを起動し、その要素をタイマハンドラ待ち行列から取
り除き、かつ次の要素の差分時間が0である限り、その
要素の取り除きとタイマハンドラの起動を逐次行うタイ
マ割り込みハンドラと、タイマ割り込みの周期に同時起
動できる最大タイマハンドラ総数の任意の値に設定され
た最大タイマハンドラ同時起動値と、任意のタイマハン
ドラを登録する場合に、タイマハンドラの起動時刻と開
始アドレスの情報を取得し、タイマハンドラ待ち行列キ
ューがポイントする先頭の要素から繋がる各要素の差分
時間を加算していき、その加算値が登録するタイマハン
ドラの起動時刻を超える直前の要素、或いはその加算値
が登録するタイマハンドラの起動時刻に等しい要素を見
つけ、その加算値が起動時刻を超える場合には、その加
算値が登録するタイマハンドラの起動時刻を超える直前
の要素の次の要素として、指定されたタイマハンドラの
要素をタイマハンドラ待ち行列に追加し、その加算値が
登録するタイマハンドラの起動時刻に等しい場合には、
その加算値が登録するタイマハンドラの起動時刻に等し
い要素を含めて、その次の要素の差分時間が0であるこ
とが続く同時に起動されるタイマハンドラの合計の値を
求め、その同時に起動されるタイマハンドラの合計値が
最大タイマハンドラ同時起動値を超えていなければ、そ
の加算値が登録するタイマハンドラの起動時刻に等しい
要素の、次の要素として、指定されたタイマハンドラの
要素をタイマハンドラ待ち行列に追加し、その同時に起
動されるタイマハンドラの合計値が最大タイマハンドラ
同時起動値を超えていれば、その加算値が登録するタイ
マハンドラの起動時刻に等しい要素の前後に起動される
要素となるように、指定されたタイマハンドラの起動時
刻を任意の時間だけ増減させて、指定されたタイマハン
ドラの要素をタイマハンドラ待ち行列に追加するタイマ
ハンドラ登録ルーチンとを備えたことを特徴とする。
The time management system according to the present invention uses a periodic timer interrupt to manage a timer handler activated at an arbitrary time with the cycle of the timer interrupt as a minimum unit. To 1
The system clock, which increases in clock value each time, and the difference between the system clock value and the time until it is started, if it is the first timer handler that is started earliest for managing the information of the start time and start address of the timer handler. Difference time indicated by the clock value, if it is a timer handler other than the beginning, the difference time indicated by the clock value of the difference since the immediately previous timer handler was started, the start address of the timer handler, and pointers pointing to the front and back Element, a timer handler queue connected to each other by a forward pointer and a backward pointer in the order of the time when the element is activated, a timer handler queue queue having a pointer to the first element of the timer handler queue, and a timer interrupt. The timer handler queue queue is pointed If the difference time of the first element is decreased by 1 and the difference time becomes equal to 0, the timer handler is started by referring to the start address of the timer handler of that element, and the element is removed from the timer handler queue. Set to an arbitrary value of the timer interrupt handler that sequentially removes the element and starts the timer handler, and the maximum total number of timer handlers that can be activated simultaneously in the cycle of the timer interrupt, as long as the element is removed and the difference time of the next element is 0 The maximum timer handler simultaneous activation value and the information of the timer handler's activation time and start address when registering an arbitrary timer handler are acquired, and each element connected from the first element pointed to by the timer handler queue queue is acquired. The element immediately before the start time of the timer handler for which the added value is registered is added Alternatively, if an element whose addition value is equal to the activation time of the registered timer handler is found and the addition value exceeds the activation time, the element next to the element immediately before the addition value exceeds the activation time of the timer handler to be registered , If the element of the specified timer handler is added to the timer handler queue and the added value is equal to the activation time of the registered timer handler,
Including the element whose addition value is equal to the activation time of the registered timer handler, the difference time of the next element is 0, and the total value of the timer handlers that are activated at the same time is obtained, and the timer handlers are activated at the same time. If the total value of timer handlers does not exceed the maximum timer handler simultaneous activation value, the element of the specified timer handler is waited for by the timer handler as the next element of the element whose addition value is equal to the activation time of the registered timer handler. If the total value of the timer handlers that are added to the matrix and are activated at the same time exceeds the maximum timer handler simultaneous activation value, the element that is activated before and after the element whose addition value is equal to the activation time of the registered timer handler To increase or decrease the start time of the specified timer handler for any time, and Characterized by comprising a timer handler registration routine that adds a handler queue.

【0053】前記時刻管理方式において、タイマハンド
ラ待ち行列に繋がる要素は、タイマハンドラの登録時に
指定される、起動時刻が正確に守られることの依頼の高
さを示す優先度の情報を有し、任意のタイマハンドラを
登録する場合には、前記優先度の情報を参照し、同時に
起動されるタイマハンドラの合計値が最大タイマハンド
ラ同時起動値を超えていれば、指定されたタイマハンド
ラを含め、同時に起動されるタイマハンドラの中から最
も優先度の低いタイマハンドラの要素を、同時に起動さ
れるタイマハンドラの要素の、前後に起動される要素と
なるようにタイマハンドラ待ち行列に登録する優先度指
定付きタイマハンドラ登録ルーチンとを備えたことを特
徴とする。
In the time management method, the element linked to the timer handler queue has priority information designated at the time of registration of the timer handler, which indicates the height of the request for exactly keeping the activation time, When registering any timer handler, refer to the priority information, and if the total value of the timer handlers that are activated at the same time exceeds the maximum timer handler simultaneous activation value, include the specified timer handler, A priority specification that registers the element of the timer handler with the lowest priority among the timer handlers that are activated at the same time in the timer handler queue so that it becomes the element that is activated before and after the element of the timer handler that is activated at the same time. And an associated timer handler registration routine.

【0054】前記時刻管理方式において、タイマハンド
ラ待ち行列に繋がる要素は、タイマハンドラの登録時に
指定される、そのタイマハンドラ処理時間の情報を有
し、任意のタイマハンドラを登録する場合、前記タイマ
ハンドラ処理時間の情報を参照し、同時に起動されるタ
イマハンドラの合計値が最大タイマハンドラ同時起動値
を超えていれば、指定されたタイマハンドラを含め、同
時に起動されるタイマハンドラの中から最もタイマハン
ドラ処理時間の長いタイマハンドラの要素を、同時に起
動されるタイマハンドラの要素の、前後に起動される要
素となるように、タイマハンドラ待ち行列に登録するタ
イマハンドラ処理時間指定付きタイマハンドラ登録ルー
チンとを備えたことを特徴とする。
In the time management method, the elements linked to the timer handler queue have information on the timer handler processing time designated when the timer handler is registered. When registering an arbitrary timer handler, the timer handler Refer to the processing time information, and if the total value of the timer handlers that are started at the same time exceeds the maximum timer handler simultaneous start value, the most timer handler among the timer handlers that are started at the same time including the specified timer handler. A timer handler registration routine with a timer handler processing time specification that registers a timer handler element with a long processing time in the timer handler queue so that it becomes an element that is activated before and after the element of the timer handler that is activated at the same time. It is characterized by having.

【0055】[0055]

【発明の効果】本発明によれば、同時刻の起動時刻とし
て登録できるタイマハンドラの最大数である最大タイマ
ハンドラ同時起動値を設け、同時刻の起動時刻を持つタ
イマハンドラの数が最大タイマハンドラ同時起動値を超
える場合には、新たなタイマハンドラについては、本来
の起動時刻の前或いは後の時刻を起動時刻として登録
し、複数のタイマハンドラについて起動時刻を分散して
登録することができる。このため、複数の数多くのタイ
マハンドラについて起動時刻が同時刻に集中する事態を
回避することができ、従って、一般プログラムタスクの
処理が再開されるまでの時間が長くなる事態を回避で
き、システムの応答性を向上させることができる。
According to the present invention, the maximum timer handler simultaneous activation value, which is the maximum number of timer handlers that can be registered as the activation time at the same time, is provided, and the maximum number of timer handlers having the activation time at the same time is the maximum. When the simultaneous activation value is exceeded, the time before or after the original activation time can be registered as the activation time for the new timer handler, and the activation times can be distributed and registered for a plurality of timer handlers. Therefore, it is possible to avoid a situation in which the start times of a plurality of many timer handlers are concentrated at the same time, and thus it is possible to avoid a situation in which it takes a long time until the processing of the general program task is restarted. The responsiveness can be improved.

【0056】本発明によれば、同時刻の起動時刻として
登録できるタイマハンドラの最大数である最大タイマハ
ンドラ同時起動値を設けるとともに、タイマハンドラの
起動時刻が正確に守られる必要性の高さを示す優先度を
指定できるようにしているため、同時刻の起動時刻を持
つタイマハンドラの数が最大タイマハンドラ同時起動値
を超える場合には、同時刻の起動時刻を持つタイマハン
ドラの中で最も優先度の低いタイマハンドラについて、
本来の起動時刻の前或いは後の時刻を起動時刻として登
録し、複数のタイマハンドラについて起動時刻を分散し
て登録することができる。このため、起動時刻を正確に
守る必要性の高いタイマハンドラの起動時刻を変更する
こと無しに、一般プログラムタスクの処理が再開される
までの時間が長くなる事態を回避でき、システムの応答
性を向上させることができる。
According to the present invention, the maximum number of timer handler simultaneous activation values, which is the maximum number of timer handlers that can be registered as the activation time at the same time, is set, and the necessity of accurately keeping the activation time of the timer handlers is increased. Since the priority shown can be specified, if the number of timer handlers with the same time start time exceeds the maximum timer handler simultaneous start value, the highest priority is given to the timer handlers with the same time start time. About the low frequency timer handler,
The time before or after the original start time can be registered as the start time, and the start times can be distributed and registered for a plurality of timer handlers. Therefore, without changing the start time of the timer handler, which has a high necessity of accurately protecting the start time, it is possible to avoid the situation where the time until the processing of the general program task is restarted is increased, and the responsiveness of the system is improved. Can be improved.

【0057】本発明によれば、同時刻の起動時刻として
登録できるタイマハンドラの最大数である最大タイマハ
ンドラ同時起動値を設けるとともに、タイマハンドラの
処理時間を指定できるようにしているため、同時刻の起
動時刻を持つタイマハンドラの数が最大タイマハンドラ
同時起動値を超える場合には、同時刻の起動時刻を持つ
タイマハンドラの中で最も処理時間の長いタイマハンド
ラについて、本来の起動時刻の前或いは後の時刻を起動
時刻として登録し、複数のタイマハンドラについて起動
時刻を分散して登録することができる。このため、同時
に起動するタイマハンドラ全体の処理時間を短くするこ
とができ、一般プログラムタスクの処理が再開されるま
での時間が長くなる事態を回避することができ、システ
ムの応答性を向上させることができる。
According to the present invention, the maximum timer handler simultaneous activation value, which is the maximum number of timer handlers that can be registered as the activation time at the same time, is set, and the processing time of the timer handler can be specified. If the number of timer handlers with the startup time exceeds the maximum timer handler simultaneous startup value, the timer handler with the longest processing time among the timer handlers with the startup time of the same time will be displayed before the original startup time or The later time can be registered as the start time, and the start times can be distributed and registered for a plurality of timer handlers. Therefore, it is possible to shorten the processing time of the timer handlers that are activated at the same time, avoid the situation where the time until the processing of the general program task is restarted is increased, and improve the responsiveness of the system. You can

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

【図1】 この発明の実施の形態1に係るコンピュータ
の構成を示す図である。
FIG. 1 is a diagram showing a configuration of a computer according to a first embodiment of the present invention.

【図2】 この発明の実施の形態1に示すタイマハンド
ラの情報を保持する要素の説明図である。
FIG. 2 is an explanatory diagram of elements that hold information of a timer handler shown in the first embodiment of the present invention.

【図3】 この発明の実施の形態1に示すタイマハンド
ラ待ち行列の説明図である。
FIG. 3 is an explanatory diagram of a timer handler queue according to the first embodiment of the present invention.

【図4】 この発明の実施の形態1に示すタイマハンド
ラ待ち行列への要素挿入の説明図である。
FIG. 4 is an explanatory diagram of element insertion into the timer handler queue shown in the first embodiment of the present invention.

【図5】 この発明の実施の形態1に示すタイマ割り込
みハンドラの動作を示すフローチャート図である。
FIG. 5 is a flowchart showing the operation of the timer interrupt handler shown in the first embodiment of the present invention.

【図6】 この発明の実施の形態1に示すタイマハンド
ラ登録ルーチン処理部の動作を示すフローチャート図で
ある。
FIG. 6 is a flowchart showing the operation of the timer handler registration routine processing unit shown in the first embodiment of the present invention.

【図7】 この発明の実施の形態1に示すタイマハンド
ラ登録ルーチン処理部の動作を示すフローチャート図で
ある。
FIG. 7 is a flow chart showing the operation of the timer handler registration routine processing unit shown in the first embodiment of the present invention.

【図8】 この発明の実施の形態2に係るコンピュータ
の構成を示す図である。
FIG. 8 is a diagram showing a configuration of a computer according to a second embodiment of the present invention.

【図9】 この発明の実施の形態2に示すタイマハンド
ラの情報を保持する要素の説明図である。
FIG. 9 is an explanatory diagram of elements holding information of a timer handler according to the second embodiment of the present invention.

【図10】 この発明の実施の形態2に示す優先度指定
付きタイマハンドラ登録ルーチン処理部の動作を示すフ
ローチャート図である。
FIG. 10 is a flowchart showing an operation of a priority-specified timer handler registration routine processing section according to the second embodiment of the present invention.

【図11】 この発明の実施の形態3に係るコンピュー
タの構成を示す図である。
FIG. 11 is a diagram showing a configuration of a computer according to a third embodiment of the present invention.

【図12】 この発明の実施の形態3に示すタイマハン
ドラの情報を保持する要素の説明図である。
FIG. 12 is an explanatory diagram of elements holding information of a timer handler shown in the third embodiment of the present invention.

【図13】 この発明の実施の形態3に示す優先度指定
付きタイマハンドラ登録ルーチン処理部の動作を示すフ
ローチャート図である。
FIG. 13 is a flowchart showing the operation of a timer handler registration routine processing unit with priority designation according to the third embodiment of the present invention.

【図14】 従来の技術におけるタイマハンドラの情報
を保持する要素の説明図である。
FIG. 14 is an explanatory diagram of elements that hold information of a timer handler in the related art.

【図15】 従来の技術におけるタイマハンドラ待ち行
列の説明図である。
FIG. 15 is an explanatory diagram of a timer handler queue according to the related art.

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

1 オペレーティングシステム、2 タイマ割り込みハ
ードウェア、3 CPU、4 磁気ディスク、5 半導
体メモリ、11 システムクロック、12 タイマ割り
込みハンドラ、13 タイマハンドラ待ち行列キュー、
14 最大タイマハンドラ同時起動値記録部、15 タ
イマハンドラ登録ルーチン処理部、16優先度指定付き
タイマハンドラ登録ルーチン処理部、17 タイマハン
ドラ処理時間指定付きタイマハンドラ登録ルーチン処理
部、18 起動時刻記録部、100 コンピュータ。
1 operating system, 2 timer interrupt hardware, 3 CPU, 4 magnetic disk, 5 semiconductor memory, 11 system clock, 12 timer interrupt handler, 13 timer handler queue queue,
14 maximum timer handler simultaneous activation value recording unit, 15 timer handler registration routine processing unit, 16 priority handler timer handler registration routine processing unit, 17 timer handler processing time designation timer handler registration routine processing unit, 18 activation time recording unit, 100 computers.

───────────────────────────────────────────────────── フロントページの続き (54)【発明の名称】 タイマハンドラ管理装置、タイマハンドラ管理方法、タイマハンドラ管理方法をコンピュータに 実行させるためのプログラム及びタイマハンドラ管理方法をコンピュータに実行させるためのプ ログラムを記録したコンピュータ読み取り可能な記録媒体   ─────────────────────────────────────────────────── ─── Continued front page    (54) [Title of Invention] Timer handler management device, timer handler management method, timer handler management method for computer                     A program for causing a computer to execute the program for executing and the timer handler management method.                     Computer-readable recording medium on which a program is recorded

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 所定の起動時刻に起動して所定のサブル
ーチン処理を行うタイマハンドラを管理するタイマハン
ドラ管理装置であって、 タイマハンドラごとに起動時刻の登録処理を行う登録処
理部と、 前記登録処理部により登録処理された起動時刻をタイマ
ハンドラごとに記録する起動時刻記録部とを有し、 前記登録処理部は、新規のタイマハンドラについて起動
時刻の登録処理を行う際に、前記起動時刻記録部に記録
されている既登録タイマハンドラの起動時刻と新規のタ
イマハンドラの起動時刻とを比較し、比較の結果、前記
新規のタイマハンドラの起動時刻と同じ起動時刻の既登
録タイマハンドラを同時起動既登録タイマハンドラとし
て検出した場合に、検出した同時起動既登録タイマハン
ドラの起動時刻及び前記新規のタイマハンドラの起動時
刻のうち少なくともいずれか一つを他の時刻に変更して
前記新規のタイマハンドラについて起動時刻の登録処理
を行うことを特徴とするタイマハンドラ管理装置。
1. A timer handler management device that manages a timer handler that starts at a predetermined start time and performs a predetermined subroutine process, and a registration processing unit that performs a start time registration process for each timer handler; A startup time recording unit that records the startup time registered by the processing unit for each timer handler, and the registration processing unit records the startup time when performing the registration process of the startup time for a new timer handler. The start time of the registered timer handler recorded in the section is compared with the start time of the new timer handler, and as a result of the comparison, the registered timer handler with the same start time as the start time of the new timer handler is started simultaneously. When detected as a registered timer handler, the detected simultaneous activation start time of the registered timer handler and the new timer hand A timer handler management device, characterized in that at least one of the activation times of the timer is changed to another time, and the activation time registration processing is performed for the new timer handler.
【請求項2】 前記タイマハンドラ管理装置は、更に、
前記登録処理部の登録処理について所定の基準を示す基
準値を記録する基準値記録部を有し、 前記登録処理部は、前記同時起動既登録タイマハンドラ
を検出した場合に、前記同時起動既登録タイマハンドラ
の合計数と前記基準値とを比較し、前記同時起動既登録
タイマハンドラの合計数が前記基準値以上である場合
に、前記新規のタイマハンドラの起動時刻及び前記同時
起動既登録タイマハンドラの起動時刻のうち少なくとも
いずれか一つを他の時刻に変更して前記新規のタイマハ
ンドラについて起動時刻の登録処理を行うことを特徴と
する請求項1に記載のタイマハンドラ管理装置。
2. The timer handler management device further comprises:
The registration processing unit includes a reference value recording unit that records a reference value indicating a predetermined reference for the registration process, and the registration processing unit, when detecting the simultaneous activation already registered timer handler, performs the simultaneous activation already registered. Comparing the total number of timer handlers with the reference value, and when the total number of simultaneously activated registered timer handlers is equal to or greater than the reference value, the start time of the new timer handler and the simultaneously activated registered timer handler. 2. The timer handler management apparatus according to claim 1, wherein at least one of the startup times of the above is changed to another time and the startup time registration processing is performed for the new timer handler.
【請求項3】 前記登録処理部は、優先度が設定された
タイマハンドラについて起動時刻及び優先度の登録処理
を行い、 前記起動時刻記録部は、前記登録処理部により登録処理
された起動時刻及び優先度をタイマハンドラごとに記録
し、 前記登録処理部は、前記同時起動既登録タイマハンドラ
の合計数が前記基準値以上である場合に、前記新規のタ
イマハンドラの優先度及び前記同時起動既登録タイマハ
ンドラの優先度を分析し、分析結果に基づき、前記新規
のタイマハンドラの起動時刻及び前記同時起動既登録タ
イマハンドラの起動時刻のうち少なくともいずれか一つ
を他の時刻に変更して前記新規のタイマハンドラについ
て起動時刻の登録処理を行うことを特徴とする請求項2
に記載のタイマハンドラ管理装置。
3. The registration processing unit performs a process of registering a start time and a priority of a timer handler for which a priority is set, and the start time recording unit includes a start time and a registration time of the timer processed by the registration processing unit. The priority is recorded for each timer handler, and the registration processing unit, when the total number of simultaneously activated already registered timer handlers is equal to or more than the reference value, the priority of the new timer handler and the simultaneously activated already registered. The priority of the timer handler is analyzed, and based on the analysis result, at least one of the start time of the new timer handler and the start time of the simultaneously activated registered timer handler is changed to another time, and the new time is changed. 3. The registration processing of the start time is performed for the timer handler of FIG.
Timer handler management device described in.
【請求項4】 前記登録処理部は、タイマハンドラが行
うサブルーチン処理の処理時間を示す処理時間情報をタ
イマハンドラごとに取得し、取得した処理時間情報及び
起動時刻の登録処理をタイマハンドラごとに行い、 前記起動時刻記録部は、前記登録処理部により登録処理
された処理時間情報及び起動時刻をタイマハンドラごと
に記録し、 前記登録処理部は、前記同時起動既登録タイマハンドラ
の合計数が前記基準値以上である場合に、前記新規のタ
イマハンドラの処理時間情報及び前記同時起動既登録タ
イマハンドラの処理時間情報を分析し、分析結果に基づ
き、前記新規のタイマハンドラの起動時刻及び前記同時
起動既登録タイマハンドラの起動時刻のうち少なくとも
いずれか一つを他の時刻に変更して前記新規のタイマハ
ンドラについて起動時刻の登録処理を行うことを特徴と
する請求項2に記載のタイマハンドラ管理装置。
4. The registration processing unit acquires, for each timer handler, processing time information indicating a processing time of a subroutine process performed by the timer handler, and performs registration processing of the acquired processing time information and the start time for each timer handler. The start time recording unit records the processing time information and the start time registered by the registration processing unit for each timer handler, and the registration processing unit determines the total number of the simultaneously activated registered timer handlers as the reference. When the value is equal to or more than the value, the processing time information of the new timer handler and the processing time information of the simultaneous activation already registered are analyzed, and the starting time of the new timer handler and the simultaneous activation already performed are analyzed based on the analysis result. Change at least one of the start times of the registered timer handlers to other times, and connect to the new timer handler. Performing the registration processing start time Te timer handler management apparatus according to claim 2, wherein.
【請求項5】 所定の起動時刻に起動して所定のサブル
ーチン処理を行うタイマハンドラを管理するタイマハン
ドラ管理方法であって、 タイマハンドラごとに起動時刻の登録処理を行う登録処
理ステップと、 前記登録処理ステップにより登録処理された起動時刻を
タイマハンドラごとに記録する起動時刻記録ステップと
を有し、 前記登録処理ステップは、新規のタイマハンドラについ
て起動時刻の登録処理を行う際に、前記起動時刻記録ス
テップにより記録された既登録タイマハンドラの起動時
刻と新規のタイマハンドラの起動時刻とを比較し、比較
の結果、前記新規のタイマハンドラの起動時刻と同じ起
動時刻の既登録タイマハンドラを同時起動既登録タイマ
ハンドラとして検出した場合に、検出した同時起動既登
録タイマハンドラの起動時刻及び前記新規のタイマハン
ドラの起動時刻のうち少なくともいずれか一つを他の時
刻に変更して前記新規のタイマハンドラについて起動時
刻の登録処理を行うことを特徴とするタイマハンドラ管
理方法。
5. A timer handler management method for managing a timer handler which is started at a predetermined start time and performs a predetermined subroutine process, the registration processing step performing a start time registration process for each timer handler, said registration An activation time recording step of recording the activation time registered by the processing step for each timer handler, wherein the registration processing step records the activation time when performing the activation time registration processing for a new timer handler. The start time of the registered timer handler recorded in step is compared with the start time of the new timer handler, and as a result of the comparison, the registered timer handler with the same start time as the start time of the new timer handler is simultaneously started. When detected as a registered timer handler, the detected simultaneous activation starts the registered timer handler. A timer handler management method, characterized in that at least one of a time and an activation time of the new timer handler is changed to another time, and the activation time is registered for the new timer handler.
【請求項6】 前記タイマハンドラ管理方法は、更に、
前記登録処理ステップの登録処理について所定の基準を
示す基準値を記録する基準値記録ステップを有し、 前記登録処理ステップは、前記同時起動既登録タイマハ
ンドラを検出した場合に、前記同時起動既登録タイマハ
ンドラの合計数と前記基準値とを比較し、前記同時起動
既登録タイマハンドラの合計数が前記基準値以上である
場合に、前記新規のタイマハンドラの起動時刻及び前記
同時起動既登録タイマハンドラの起動時刻のうち少なく
ともいずれか一つを他の時刻に変更して前記新規のタイ
マハンドラについて起動時刻の登録処理を行うことを特
徴とする請求項5に記載のタイマハンドラ管理方法。
6. The timer handler management method further comprises:
There is a reference value recording step of recording a reference value indicating a predetermined reference for the registration processing of the registration processing step, and the registration processing step includes the simultaneous activation already registered when the simultaneous activation already registered timer handler is detected. Comparing the total number of timer handlers with the reference value, and when the total number of simultaneously activated registered timer handlers is equal to or greater than the reference value, the start time of the new timer handler and the simultaneously activated registered timer handler. 6. The timer handler management method according to claim 5, wherein at least one of the startup times of the above is changed to another time, and the startup time registration processing is performed for the new timer handler.
【請求項7】 前記登録処理ステップは、優先度が設定
されたタイマハンドラについて起動時刻及び優先度の登
録処理を行い、 前記起動時刻記録ステップは、前記登録処理ステップに
より登録処理された起動時刻及び優先度をタイマハンド
ラごとに記録し、 前記登録処理ステップは、前記同時起動既登録タイマハ
ンドラの合計数が前記基準値以上である場合に、前記新
規のタイマハンドラの優先度及び前記同時起動既登録タ
イマハンドラの優先度を分析し、分析結果に基づき、前
記新規のタイマハンドラの起動時刻及び前記同時起動既
登録タイマハンドラの起動時刻のうち少なくともいずれ
か一つを他の時刻に変更して前記新規のタイマハンドラ
について起動時刻の登録処理を行うことを特徴とする請
求項6に記載のタイマハンドラ管理方法。
7. The registration processing step performs a registration processing of a start time and a priority of a timer handler having a priority set, and the start time recording step includes a start time and a registration time of the registration processing performed by the registration processing step. The priority is recorded for each timer handler, and the registration processing step includes the priority of the new timer handler and the simultaneous activation already registered when the total number of the simultaneous activation already registered timer handlers is equal to or more than the reference value. The priority of the timer handler is analyzed, and based on the analysis result, at least one of the start time of the new timer handler and the start time of the simultaneously activated registered timer handler is changed to another time, and the new time is changed. 7. The timer handler management method according to claim 6, wherein the activation time registration process is performed for the timer handler of FIG.
【請求項8】 前記登録処理ステップは、タイマハンド
ラが行うサブルーチン処理の処理時間を示す処理時間情
報をタイマハンドラごとに取得し、取得した処理時間情
報及び起動時刻の登録処理をタイマハンドラごとに行
い、 前記起動時刻記録ステップは、前記登録処理ステップに
より登録処理された処理時間情報及び起動時刻をタイマ
ハンドラごとに記録し、 前記登録処理ステップは、前記同時起動既登録タイマハ
ンドラの合計数が前記基準値以上である場合に、前記新
規のタイマハンドラの処理時間情報及び前記同時起動既
登録タイマハンドラの処理時間情報を分析し、分析結果
に基づき、前記新規のタイマハンドラの起動時刻及び前
記同時起動既登録タイマハンドラの起動時刻のうち少な
くともいずれか一つを他の時刻に変更して前記新規のタ
イマハンドラについて起動時刻の登録処理を行うことを
特徴とする請求項6に記載のタイマハンドラ管理方法。
8. The registration processing step acquires, for each timer handler, processing time information indicating processing time of subroutine processing performed by the timer handler, and performs registration processing of the acquired processing time information and start time for each timer handler. The starting time recording step records the processing time information and the starting time registered by the registration processing step for each timer handler, and the registration processing step uses the total number of the simultaneously activated registered timer handlers as the reference. When the value is equal to or more than the value, the processing time information of the new timer handler and the processing time information of the simultaneous activation already registered are analyzed, and the starting time of the new timer handler and the simultaneous activation already performed are analyzed based on the analysis result. Change at least one of the registered timer handler startup times to another time Timer handler management method according to claim 6, which comprises carrying out the registration processing start time for the regulations of the timer handler.
【請求項9】 所定の起動時刻に起動して所定のサブル
ーチン処理を行うタイマハンドラを管理するタイマハン
ドラ管理方法をコンピュータに実行させるためのプログ
ラムであって、 タイマハンドラごとに起動時刻の登録処理を行う登録処
理ステップと、 前記登録処理ステップにより登録処理された起動時刻を
タイマハンドラごとに記録する起動時刻記録ステップと
を有し、 前記登録処理ステップは、新規のタイマハンドラについ
て起動時刻の登録処理を行う際に、前記起動時刻記録ス
テップにより記録された既登録タイマハンドラの起動時
刻と新規のタイマハンドラの起動時刻とを比較し、比較
の結果、前記新規のタイマハンドラの起動時刻と同じ起
動時刻の既登録タイマハンドラを同時起動既登録タイマ
ハンドラとして検出した場合に、検出した同時起動既登
録タイマハンドラの起動時刻及び前記新規のタイマハン
ドラの起動時刻のうち少なくともいずれか一つを他の時
刻に変更して前記新規のタイマハンドラについて起動時
刻の登録処理を行うタイマハンドラ管理方法をコンピュ
ータに実行させるためのプログラム。
9. A program for causing a computer to execute a timer handler management method for managing a timer handler that starts at a predetermined start time and performs a predetermined subroutine process, wherein the start time registration processing is performed for each timer handler. There is a registration processing step to perform, and an activation time recording step of recording the activation time registered by the registration processing step for each timer handler, wherein the registration processing step performs activation time registration processing for a new timer handler. When performing, the activation time of the registered timer handler recorded by the activation time recording step is compared with the activation time of the new timer handler, and as a result of the comparison, the activation time of the new timer handler is the same as the activation time of the new timer handler. Simultaneous activation of registered timer handlers When detected as a registered timer handler, A timer handler that changes at least one of the detected start time of the registered timer handler and the start time of the new timer handler to another time, and registers the start time of the new timer handler. A program that causes a computer to execute a management method.
【請求項10】 所定の起動時刻に起動して所定のサブ
ルーチン処理を行うタイマハンドラを管理するタイマハ
ンドラ管理方法をコンピュータに実行させるためのプロ
グラムを記録したコンピュータ読み取り可能な記録媒体
であって、 タイマハンドラごとに起動時刻の登録処理を行う登録処
理ステップと、 前記登録処理ステップにより登録処理された起動時刻を
タイマハンドラごとに記録する起動時刻記録ステップと
を有し、 前記登録処理ステップは、新規のタイマハンドラについ
て起動時刻の登録処理を行う際に、前記起動時刻記録ス
テップにより記録された既登録タイマハンドラの起動時
刻と新規のタイマハンドラの起動時刻とを比較し、比較
の結果、前記新規のタイマハンドラの起動時刻と同じ起
動時刻の既登録タイマハンドラを同時起動既登録タイマ
ハンドラとして検出した場合に、検出した同時起動既登
録タイマハンドラの起動時刻及び前記新規のタイマハン
ドラの起動時刻のうち少なくともいずれか一つを他の時
刻に変更して前記新規のタイマハンドラについて起動時
刻の登録処理を行うタイマハンドラ管理方法をコンピュ
ータに実行させるためのプログラムを記録したコンピュ
ータ読み取り可能な記録媒体。
10. A computer-readable recording medium having a program recorded thereon for causing a computer to execute a timer handler management method for managing a timer handler that starts at a predetermined start time and performs a predetermined subroutine process. There is a registration processing step that performs registration processing of the activation time for each handler, and an activation time recording step that records the activation time registered by the registration processing step for each timer handler, and the registration processing step is a new When registering the start time of the timer handler, the start time of the registered timer handler recorded in the start time recording step is compared with the start time of the new timer handler, and as a result of the comparison, the new timer Registered timer handlers with the same start time as the handler start time When detected as an activated registered timer handler, at least one of the detected simultaneous activation registered timer handler activation time and the activation time of the new timer handler is changed to another time, and the new timer is changed. Handler A computer-readable recording medium in which a program for causing a computer to execute a timer handler management method for registering a start time is recorded.
JP2001192116A 2001-06-26 2001-06-26 Timer handler managing device, timer handler managing method, program for making computer perform timer handler managing method and computer readable recording medium with the program recorded thereon Pending JP2003005983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001192116A JP2003005983A (en) 2001-06-26 2001-06-26 Timer handler managing device, timer handler managing method, program for making computer perform timer handler managing method and computer readable recording medium with the program recorded thereon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001192116A JP2003005983A (en) 2001-06-26 2001-06-26 Timer handler managing device, timer handler managing method, program for making computer perform timer handler managing method and computer readable recording medium with the program recorded thereon

Publications (1)

Publication Number Publication Date
JP2003005983A true JP2003005983A (en) 2003-01-10

Family

ID=19030614

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001192116A Pending JP2003005983A (en) 2001-06-26 2001-06-26 Timer handler managing device, timer handler managing method, program for making computer perform timer handler managing method and computer readable recording medium with the program recorded thereon

Country Status (1)

Country Link
JP (1) JP2003005983A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007213486A (en) * 2006-02-13 2007-08-23 Fujitsu Ltd Timer management device and timer management method
JP2013229671A (en) * 2012-04-24 2013-11-07 Nec Access Technica Ltd Multi-interval timer and control device, control method, and control program therefor
WO2014002968A1 (en) * 2012-06-25 2014-01-03 京セラ株式会社 Communication terminal and communication control method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007213486A (en) * 2006-02-13 2007-08-23 Fujitsu Ltd Timer management device and timer management method
JP2013229671A (en) * 2012-04-24 2013-11-07 Nec Access Technica Ltd Multi-interval timer and control device, control method, and control program therefor
WO2014002968A1 (en) * 2012-06-25 2014-01-03 京セラ株式会社 Communication terminal and communication control method
US9424069B2 (en) 2012-06-25 2016-08-23 Kyocera Corporation Communication terminal and communication control method
US10102044B2 (en) 2012-06-25 2018-10-16 Kyocera Corporation Enabling concurrent communications based on registered application start time

Similar Documents

Publication Publication Date Title
US9177027B2 (en) Database management system and method
US7360218B2 (en) System and method for scheduling compatible threads in a simultaneous multi-threading processor using cycle per instruction value occurred during identified time interval
US7676808B2 (en) System and method for CPI load balancing in SMT processors
US20080307418A1 (en) Enabling and Disabling Byte Code Inserted Probes Based on Transaction Monitoring Tokens
US7398518B2 (en) Method and apparatus for measuring thread wait time
JPH0823837B2 (en) Sampling performance analysis method and device
US20170228195A1 (en) Managing a collection of data
US20130163740A1 (en) Asynchronous calls using intermittent callback for delay sensitive applications
US10613895B2 (en) Virtualization of storage buffers used by asynchronous processes
US20040199732A1 (en) System and method for processing high priority data elements
EP3244314A1 (en) Temporal relationship extension of state machine observer
JP4879782B2 (en) Program profiling method and program
JP2003005983A (en) Timer handler managing device, timer handler managing method, program for making computer perform timer handler managing method and computer readable recording medium with the program recorded thereon
US9390090B2 (en) Concurrent long spanning edit sessions using change lists with explicit assumptions
US8803900B2 (en) Synchronization with semaphores in a multi-engine GPU
US20040128654A1 (en) Method and apparatus for measuring variation in thread wait time
JP2004078683A (en) Computer system and shared memory controlling method
CN114020813A (en) Data comparison method, device and equipment based on Hash algorithm and storage medium
CN112860529B (en) Universal analysis device and method
JP2002073354A (en) Task control device and task contol method
JP2715904B2 (en) Computer system performance evaluation device
CN117238368B (en) Molecular genetic marking method and device, and biological individual identification method and device
JP2012164006A (en) Clock frequency control program and clock frequency controller
JP2950249B2 (en) Data processing device and sort operation device
JP5233817B2 (en) Driver program, device management method, and computer apparatus

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040518

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20041019