JPH0659915A - Method and device for controlling execution order of transaction - Google Patents

Method and device for controlling execution order of transaction

Info

Publication number
JPH0659915A
JPH0659915A JP4212604A JP21260492A JPH0659915A JP H0659915 A JPH0659915 A JP H0659915A JP 4212604 A JP4212604 A JP 4212604A JP 21260492 A JP21260492 A JP 21260492A JP H0659915 A JPH0659915 A JP H0659915A
Authority
JP
Japan
Prior art keywords
time
transaction
real
execution
priority
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
JP4212604A
Other languages
Japanese (ja)
Inventor
Ryoji Kataoka
良治 片岡
Ushio Inoue
潮 井上
Tetsuji Sato
哲司 佐藤
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP4212604A priority Critical patent/JPH0659915A/en
Publication of JPH0659915A publication Critical patent/JPH0659915A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute the parallel processing of non-real time transaction without deteriorating the processing performance of a real time transaction being a main operation by applying time faster from completion time only by an estimated time and time later than current time only by the estimated time respectively to the real time transaction and the non-real time transaction as the execution priority of the transactions concerned. CONSTITUTION:A real time or non-real time transaction arriving at a system 11 is sent to a priority allocating part 12. On the other hand, a processing time estimating part 13 estimates processing time El based upon the reference or updating information of transactions. The allocating part 12 applies time (D1-E1) to the real time transaction 16 as its execution priority when the completion time of the transaction 16 is time D1. When the transaction arriving time of the non-real time transaction 17 is S1, the allocating part 12 applies time (S1+E1) to the transaction 17 as its execution priority.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、トランザクションの実
行順序制御方法および装置に関し、特に、指定された完
了期限までに処理を完了しなければ処理の価値が低下も
しくは処理が無効となる実時間トランザクションと、完
了期限はないが出来る限り短時間で処理を完了すること
が望ましい非実時間トランザクションが並行処理される
システムにおいて、完了期限までに終了できない実時間
トランザクションを増やすことなく、非実時間トランザ
クションの応答時間を短縮できるトランザクションの実
行順序制御方法および装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a transaction execution order control method and apparatus, and more particularly to a real-time transaction in which the value of processing is reduced or the processing becomes invalid unless the processing is completed by a designated completion deadline. In a system where non-real-time transactions that have no completion deadline but are completed in the shortest possible time are processed in parallel, without increasing the number of real-time transactions that cannot be completed before the completion deadline, The present invention relates to a transaction execution order control method and apparatus capable of shortening response time.

【0002】[0002]

【従来の技術】指定された完了期限までに処理を完了し
なければ処理の価値が低下もしくは処理が無効となるト
ランザクションがあり、実時間トランザクションと呼ば
れている。この実時間トランザクションを処理するシス
テムの性能は、完了期限を満たせないトランザクション
が少ないほど良好と考えられる。このようなシステムで
は、一般に、実時間トランザクションの実行優先度を完
了期限に基づいて決定し、実行優先度の順序に従ってト
ランザクション処理を進めることで完了期限を満たせな
いトランザクション数を出来る限り少なくしている。実
行優先度の決定方法としては、完了期限の早い実時間ト
ランザクションに、より高い実行優先度を付与するED
法や、トランザクション処理に要する時間を見積もり、
完了期限と見積時間の関係から処理の余裕時間を求め、
余裕時間の短い実時間トランザクションに、より高い実
行優先度を付与するLS法が、例えば、「Abbott,R.,Gar
cia-Molina,H.:"Scheduling Real-Time Transactions:a
Performance Evaluation",Proceedings of the 14th V
LDB Conference,pp1-12(1988)」に示されている。一方、
実時間トランザクションを主業務とするシステムにおい
て、完了期限のない非実時間トランザクションを並行し
て実行したいという要求があり、実時間トランザクショ
ンの処理性能を劣化させることなく、非実時間トランザ
クションを並行処理できることが望まれている。前述の
ED法やLS法は、実時間トランザクションの完了期限
に基づいて実行優先度を決定するため、完了期限のない
非実時間トランザクションには適用できない。従って、
上述の要求を満たすためには、実時間トランザクション
と非実時間トランザクションの実行順序を制御する機構
が必要となる。ここで、実時間トランザクションの処理
性能を劣化させることなく、非実時間トランザクション
を並行処理するためのトランザクションの実行順序制御
の従来方式を図2を用いて説明する。図2において、シ
ステム71に入力された実時間トランザクション76は
優先度割当部72に送られる。優先度割当部72は、例
えば、前述したED法やLS法により実時間トランザク
ション76の実行順優先度を決定する。このとき、優先
度割当部72は、LS法を用いるならば、実時間トラン
ザクション76に要する処理時間の見積もりを処理時間
見積部73に依頼する。処理時間見積部73は、優先度
割当部72から送られる実時間トランザクション76で
参照あるいは更新するデータ数に関する情報や、トラン
ザクション実行部75から送られる一つのデータの参照
あるいは更新に要する平均時間等の統計情報を利用し
て、実時間トランザクション76に要する処理時間を見
積もり、優先度割当部72に通知する。優先度割当部7
2で実行優先度を付与された実時間トランザクション7
6は実行順序制御部74へ送られる。一方、システム7
1に入力された非時間トランザクション77は実行順序
制御部74へ直接送られる。実行順序制御部74へ到着
したトランザクションは次の規則でトランザクション実
行部75へ送られて処理される。このトランザクション
実行部75が実時間トランザクションR1を処理してい
る最中に実行順序制御部74へ他の実時間トランザクシ
ョンR2が到着したとき、実行順序制御部74はR2の
実行優先度がR1の実行優先度よりも高いならば、R1
を中断してR2を先行処理するようにトランザクション
実行部75へ依頼する。このとき、中断されたR1は、
優先度割当部72で実行優先度を再評価された後にR2
の完了を実行順序制御部74で待つ。また、実行順序制
御部74は、R2の優先度がR1の優先度よりも低いな
らば、R1の完了を待ってR2の処理をトランザクショ
ン実行部75へ依頼する。また、トランザクション実行
部75が実時間トランザクションR1を処理している最
中に、実行順序制御部74へ非実時間トランザクション
N1が到着したとき、実行順序制御部74は、R1の完
了を待ってN1の処理をトランザクション実行部75へ
依頼する。また、トランザクション実行部75が非実時
間トランザクションN1を処理している最中に、実行順
序制御部74へ他の非実時間トランザクションN2が到
着したとき、実行順序制御部74はN1の完了を待って
N2の処理をトランザクション処理部75へ依頼する。
以上の規則に従ってトランザクションの実行順序を制御
すれば、実時間トランザクションは非実時間トランザク
ションより常に優先的に処理され、実時間トランザクシ
ョン間の実行順序は実時間トランザクションのみをシス
テムで処理するときと同様となるので、実時間トランザ
クションの処理性能に影響を与えずに非実時間トランザ
クションを並行処理できる。
2. Description of the Related Art There is a transaction in which the value of the processing is reduced or the processing becomes invalid unless the processing is completed by a designated completion deadline, and it is called a real-time transaction. The performance of the system that processes this real-time transaction is considered to be better as the number of transactions that do not meet the completion deadline decreases. In such a system, generally, the execution priority of a real-time transaction is determined based on the completion deadline, and the number of transactions that cannot meet the completion deadline is reduced as much as possible by advancing transaction processing in the order of execution priority. . As a method of determining the execution priority, an ED that gives a higher execution priority to a real-time transaction with a faster completion deadline
Method, estimate the time required to process a transaction,
Calculate the processing margin from the relationship between the completion deadline and the estimated time,
An LS method that gives higher execution priority to a real-time transaction with a short margin time is, for example, “Abbott, R., Gar.
cia-Molina, H.:"Scheduling Real-Time Transactions: a
Performance Evaluation ", Proceedings of the 14th V
LDB Conference, pp 1-12 (1988) ”. on the other hand,
In a system where real-time transactions are the main business, there is a demand for parallel execution of non-real-time transactions with no deadline, and non-real-time transactions can be processed in parallel without degrading the processing performance of real-time transactions. Is desired. Since the ED method and the LS method described above determine the execution priority based on the completion deadline of the real-time transaction, they cannot be applied to the non-real-time transaction having no completion deadline. Therefore,
To meet the above requirements, a mechanism for controlling the execution order of real-time transactions and non-real-time transactions is required. Here, a conventional method of transaction execution order control for parallel processing of non-real-time transactions without degrading the processing performance of real-time transactions will be described with reference to FIG. In FIG. 2, the real-time transaction 76 input to the system 71 is sent to the priority assigning unit 72. The priority assigning unit 72 determines the execution order priority of the real-time transaction 76 by the above-mentioned ED method or LS method, for example. At this time, if the LS method is used, the priority assignment unit 72 requests the processing time estimation unit 73 to estimate the processing time required for the real-time transaction 76. The processing time estimation unit 73 stores information about the number of data items to be referred to or updated by the real-time transaction 76 sent from the priority assignment unit 72, the average time required to refer to or update one data item sent from the transaction execution unit 75, and the like. Using the statistical information, the processing time required for the real-time transaction 76 is estimated and notified to the priority assigning unit 72. Priority allocation unit 7
Real-time transaction 7 given execution priority in 2
6 is sent to the execution order controller 74. On the other hand, system 7
The non-time transaction 77 input to 1 is directly sent to the execution order control unit 74. The transaction arriving at the execution order control unit 74 is sent to the transaction execution unit 75 and processed according to the following rules. When another real-time transaction R2 arrives at the execution order control unit 74 while the transaction execution unit 75 is processing the real-time transaction R1, the execution order control unit 74 executes the execution priority R1 of R2. R1 if higher than priority
The transaction execution unit 75 is requested to interrupt the processing and preprocess R2. At this time, the interrupted R1 is
After the execution priority is re-evaluated by the priority assigning unit 72, R2
The execution order control unit 74 waits for the completion of. If the priority of R2 is lower than the priority of R1, the execution order control unit 74 waits for the completion of R1 and requests the transaction execution unit 75 to process R2. When the non-real-time transaction N1 arrives at the execution order control unit 74 while the transaction execution unit 75 is processing the real-time transaction R1, the execution order control unit 74 waits for completion of R1 and waits for N1. The transaction execution unit 75 is requested to perform the above process. When another non-real time transaction N2 arrives at the execution order control unit 74 while the transaction execution unit 75 is processing the non-real time transaction N1, the execution order control unit 74 waits for the completion of N1. Request the transaction processing unit 75 to process N2.
If the execution order of transactions is controlled according to the above rules, real-time transactions are always prioritized over non-real-time transactions, and the execution order between real-time transactions is the same as when only real-time transactions are processed by the system. Therefore, non-real-time transactions can be processed in parallel without affecting the processing performance of real-time transactions.

【0003】[0003]

【発明が解決しようとする課題】上記従来技術では、非
実時間トランザクションの完了を待った後に実時間トラ
ンザクションを実行してもその完了期限が満たされる場
合でも、実時間トランザクションを非実時間トランザク
ションより先行処理してしまうため、非実時間トランザ
クションの応答時間を必要以上に長くさせてしまうとい
う問題があった。本発明の目的は、実時間トランザクシ
ョンの余裕時間と非実時間トランザシションの処理時間
の関係を考慮して実時間および非実時間トランザクショ
ンの実行優先度を決定し、実時間トランザクションの余
裕時間を非実時間トランザクションの処理に出来る限り
割り当てることにより、このような問題点を改善して、
実時間トランザクションの処理性能を劣化させることな
く、非実時間トランザクションの応答時間を短縮するこ
とが可能なトランザクションの実行順序制御方法および
装置を提供することにある。
In the above prior art, even if a real-time transaction is executed after waiting for the completion of the non-real-time transaction, the real-time transaction precedes the non-real-time transaction even if the completion deadline is satisfied. Since it is processed, there is a problem that the response time of non-real time transaction is made longer than necessary. An object of the present invention is to determine the execution priority of real-time and non-real-time transactions in consideration of the relationship between the real-time transaction margin time and the non-real-time transaction processing time, and determine the real-time transaction margin time. By allocating as much as possible to the processing of non-real-time transactions, these problems can be improved,
It is an object of the present invention to provide a transaction execution order control method and apparatus capable of shortening the response time of a non-real time transaction without degrading the processing performance of the real time transaction.

【0004】[0004]

【課題を解決するための手段】上記目的を達成するた
め、本発明のトランザクションの実行順序制御装置は、
完了期限(例えば、データベースの参照あるいは更新
時)を指定して要求される実時間トランザクションと、
完了期限を指定せずに要求される非実時間トランザクシ
ョンを並行処理するシステム内に、トランザクション処
理に要する時間を見積もる手段(処理時間見積部)と、
実時間トランザクションに対しては、そのトランザクシ
ョンの完了期限より、見積もられた時間分だけ早い時刻
を、非実時間トランザクションに対しては、現時刻より
その見積時間分だけ遅い時刻を、当該トランザクション
の実行優先度として付与する手段(優先度割当部)と、
その実行優先度として付与された時刻がより早いトラン
ザクションを優先的に処理するようにトランザクション
の実行順序を制御する手段(実行順序制御部)と、その
実行順序制御手段からの指示に基づき選択したトランザ
クションを処理する手段(トランザクション実行部)と
を備えたことに特徴がある。また、その実行順序制御部
には、実時間トランザクションと非実時間トランザクシ
ョンの処理順序を決定する場合、実時間トランザクショ
ンの処理を開始すべき最遅時刻を求め、非実時間トラン
ザクションの実行優先度として付与された時刻がその最
遅時刻より早いときのみ、非実時間トランザクションを
実時間トランザクションより優先的に処理するようにト
ランザクションの実行順序を制御する手段を備えたこと
に特徴がある。また、本発明のトランザクションの実行
順序制御方法は、上記システムにトランザクションが到
着すると、処理時間見積部によってそのトランザクショ
ンの処理に要する時間を見積もり、優先度割当部は、実
時間トランザクションに対しては、見積もられた時間分
だけ完了期限より早い時刻を、非実時間トランザクショ
ンに対しては、その見積時間分だけ現時刻より遅い時刻
を、当該トランザクションの実行優先度として付与し、
実行順序制御部は、実行優先度として付与された時刻が
より早いトランザクションを優先的に処理するように制
御することに特徴がある。また、この際、上記実時間ト
ランザクションに付与された実行優先度と完了期限を用
いて、並行処理される複数の実時間トランザクションの
完了期限を全て満たすため、実行順序制御部は、実時間
トランザクションの処理を開始しなければならない最遅
時刻を求め、非実時間トランザクションの実行優先度と
して付与された時刻が実時間トランザクションの最遅時
刻より早いときのみ、非実時間トランザクションを実時
間トランザクションより優先的にトランザクション実行
部へ与えることに特徴がある。
In order to achieve the above object, a transaction execution order control apparatus of the present invention is
A real-time transaction requested by specifying a completion deadline (for example, when referencing or updating the database),
A means for estimating the time required for transaction processing (processing time estimation unit) in a system that processes non-real-time transactions that are requested without specifying a completion deadline.
For real-time transactions, a time that is an estimated amount of time earlier than the transaction completion deadline, and for a non-real-time transaction, a time that is an estimated amount of time later than the current time, A means (priority assigning unit) that is given as an execution priority,
A means (execution order control unit) for controlling the execution order of transactions so as to preferentially process a transaction whose execution priority is given earlier, and a transaction selected based on an instruction from the execution order control means. And a means for processing (transaction execution unit). In addition, when determining the processing order of the real-time transaction and the non-real-time transaction, the execution order control unit obtains the latest time when the processing of the real-time transaction should be started and sets it as the execution priority of the non-real-time transaction. It is characterized in that a means for controlling the execution order of transactions is provided so that non-real-time transactions are processed with priority over real-time transactions only when the given time is earlier than the latest time. Further, in the transaction execution order control method of the present invention, when a transaction arrives at the system, the processing time estimation unit estimates the time required for processing the transaction, and the priority allocation unit determines the real-time transaction. A time that is earlier than the completion deadline by the estimated time and a time that is later than the current time by the estimated time is given to the non-real-time transaction as the execution priority of the transaction.
The execution order control unit is characterized by controlling to preferentially process a transaction whose time assigned as the execution priority is earlier. Further, at this time, by using the execution priority and the completion deadline given to the real-time transaction, all the completion deadlines of a plurality of real-time transactions to be processed in parallel are satisfied. The non-real-time transaction is given priority over the real-time transaction only when the latest time at which processing must be started is calculated and the time given as the execution priority of the non-real-time transaction is earlier than the latest time of the real-time transaction. It is characterized in that it is given to the transaction execution part.

【0005】[0005]

【作用】本発明においては、実時間トランザクションを
主業務とするシステムにおいて、非実時間トランザクシ
ョンを並行処理する場合、実時間トランザクションの余
裕時間を利用して非トランザクションを処理する。例え
ば、図3に示すように、まず時刻D1を完了期限とする
実時間トランザクションR1が時刻S1にシステムへ到
着し、R1の処理時間が処理時間見積部によりE1と見
積もられるならば、優先度割当部はR1の実行優先度を
時刻D1−E1、つまり、R1の完了期限を満たすため
にR1の処理を開始しなければならない最遅時刻とす
る。次に、時刻S2に非実時間トランザクションN1が
システムへ到着し、N1の処理時間が処理時間見積部に
よりE2と見積もられるならば、優先度割当部はN1の
実行優先度を時刻S2+E2、つまりN1の処理が完了
する最早時刻とする。このとき、実行順序制御部は、D
1−E1がS2+E2より早い時刻ならば、R1がN1
の完了を待つとT1までに完了できないと判断し、R1
がN1より優先的にトランザクション実行部で処理され
るように実行順序を制御する。一方、実行順序制御部
は、D1−E1がS2+E2より遅い時刻ならば、R1
がN1の完了を待ってもD1までに完了できると判断
し、N1がR1より優先的にトランザクション実行部で
処理されるように実行順序を制御する。また、図4に示
すように、時刻D1を完了期限とする実時間トランザク
ションR1および時刻D2を完了期限とする実時間トラ
ンザクションR2が時刻S1およびS2にシステムへ到
着し、それぞれの処理時間が処理時間見積部によりE1
およびE2と見積もられならば、優先度割当部は、R1
の実行優先度をD1−E1、R2の実行優先度をD2−
E2とする。このとき、実行順序制御部は、実行優先度
の高いR1がR2より優先的にトランザクション実行部
で処理されるように実行順序を制御するとともに、R1
の完了期限D1がR2の実行優先度D2−E2より遅い
ことを検出し、R1とR2の完了期限をともに満たすた
めにR1の処理を開始しなければならない最遅時刻D2
−E1−E2を求める。次に、非実時間トランザクショ
ンN1が時刻S3にシステムへ到着し、N1の処理時間
が処理時間見積部によりE3と見積もられ、優先度割当
部がN1の実行優先度をS3+E3としたとき、実行順
序制御部は、S3+E3がD2−E1−E2より早いな
らば、N1の完了を待ってR1を処理してもR1とR2
の完了期限をともに満たせると判断し、N1がR1より
優先的にトランザクション実行部で処理されるように実
行順序を制御する。一方、実行順序制御部は、S3+E
3がD2−E1−E2より遅い時刻ならば、N1の完了
を待ってR1を処理すると、R1、R2の少なくとも一
つの完了期限が満たせないと判断し、R1がN1より優
先的にトランザクション実行部で処理されるように実行
順序を制御する。これにより、完了期限までに終了でき
ない実時間トランザクションを増やすことなく、非実時
間トランザクションの応答時間をより短縮することがで
きる。
In the present invention, when a non-real-time transaction is processed in parallel in a system whose main task is real-time transaction, the non-transaction is processed by utilizing the margin time of the real-time transaction. For example, as shown in FIG. 3, if a real-time transaction R1 whose completion deadline is time D1 arrives at the system at time S1 and the processing time of R1 is estimated to be E1 by the processing time estimation unit, priority allocation is performed. The unit sets the execution priority of R1 to time D1-E1, that is, the latest time when the processing of R1 must be started to satisfy the completion deadline of R1. Next, if the non-real-time transaction N1 arrives at the system at time S2 and the processing time of N1 is estimated as E2 by the processing time estimation unit, the priority assignment unit determines the execution priority of N1 at time S2 + E2, that is, N1. It is the earliest time when the process of is completed. At this time, the execution order control unit D
1-E1 is earlier than S2 + E2, R1 is N1
If it waits for the completion of R1, it is judged that it cannot be completed by T1, and R1
Is controlled by the transaction execution unit in preference to N1. On the other hand, if the D1-E1 is later than S2 + E2, the execution order control unit R1
Determines that it can be completed by D1 even after waiting for the completion of N1, and controls the execution order so that N1 is processed by the transaction execution unit with priority over R1. Further, as shown in FIG. 4, a real-time transaction R1 having a completion deadline at time D1 and a real-time transaction R2 having a completion deadline at time D2 arrive at the system at times S1 and S2, and their respective processing times are processing times. E1 by the estimation department
And E2, the priority assignment unit determines that R1
The execution priority of R2 is D1-E1, and the execution priority of R2 is D2-
E2. At this time, the execution order control unit controls the execution order such that R1 having a higher execution priority is processed by the transaction execution unit with a higher priority than R2.
Of the completion deadline D1 of R2 is later than the execution priority D2-E2 of R2, and the latest time D2 at which processing of R1 must be started in order to satisfy both the completion deadlines of R1 and R2.
-E1-E2 is calculated. Next, when the non-real-time transaction N1 arrives at the system at time S3, the processing time of N1 is estimated to be E3 by the processing time estimation unit, and the priority assignment unit sets the execution priority of N1 to S3 + E3 If S3 + E3 is earlier than D2-E1-E2, the sequence control unit waits for completion of N1 and processes R1 and then R1 and R2.
It is determined that both of the completion deadlines are satisfied, and the execution order is controlled so that N1 is processed by the transaction execution unit with priority over R1. On the other hand, the execution order control unit S3 + E
If 3 is later than D2-E1-E2, when R1 is processed after waiting for the completion of N1, it is determined that at least one of the completion deadlines of R1 and R2 cannot be satisfied, and R1 gives priority to the transaction execution unit over N1. The execution order is controlled so that it is processed by. This makes it possible to further shorten the response time of non-real-time transactions without increasing the number of real-time transactions that cannot be completed by the completion deadline.

【0006】[0006]

【実施例】以下、本発明の一実施例を図面により説明す
る。図1は、本発明の一実施例におけるトランザクショ
ン実行制御装置の構成図である。図1において、11は
システム、12は優先度割当部、13は処理時間見積
部、14は実行順序制御部、15はトランザクション実
行部、16は、システム11に対してデータの参照ある
いは更新を完了期限を指定して要求する実時間トランザ
クション、17は、システム11に対してデータの参照
あるいは更新を完了期限を指定せずに要求する非実時間
トランザクションである。本実施例では、システム11
へ到着した実時間あるいは非実時間トランザクション
は、優先度割当部12に送られる。優先度割当部12
は、送られたトランザクションに要する処理時間の見積
もりを処理時間見積部13へ依頼する。このとき、優先
度割当部12は、処理時間見積部13がその見積もりを
行なう上で必要な情報として、例えば、そのトランザク
ションで参照あるいは更新するデータ数を処理時間見積
部13へ通知する。処理時間見積部13は、そのトラン
ザクションに要する処理時間を、優先度割当部12とそ
のトランザクションを処理するトランザクション実行部
15から送られる情報に基づいて見積もる。例えば、優
先度割当部12からそのトランザクションで参照あるい
は更新するデータ数dが通知され、トランザクション実
行部15から一つのデータの参照あるいは更新に要する
平均時間uが通知されると、そのトランザクションに要
する処理時間はd×uとして見積もることができる。ま
た、優先度割当部12は、処理時間見積部13から見積
時間E1を通知された後、トランザクションの実行優先
度を次のように決定する。すなわち、優先度割当部12
は、実時間トランザクション16に対して、そのトラン
ザクションの完了期限が時刻D1であるとき、時刻D1
−E1を実行優先度として与える。一方、優先度割当部
12は非実時間トランザクション17に対して、そのト
ランザクションのシステム到着時刻がS1であるとき、
時刻S1+E1を実行優先度として与える。優先度割当
部12は、実行優先度を付与したトランザクションを実
行順序制御部14へ送る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of a transaction execution control device in an embodiment of the present invention. In FIG. 1, 11 is a system, 12 is a priority assigning unit, 13 is a processing time estimating unit, 14 is an execution order controlling unit, 15 is a transaction executing unit, and 16 is a system 11 which completes data reference or update. A real-time transaction 17 which designates and requests a deadline, and 17 is a non-real-time transaction which requests the system 11 to refer to or update data without designating a completion deadline. In this embodiment, the system 11
The real-time or non-real-time transaction that arrives at is sent to the priority assigning unit 12. Priority allocation unit 12
Requests the processing time estimation unit 13 to estimate the processing time required for the sent transaction. At this time, the priority assignment unit 12 notifies the processing time estimation unit 13 of the number of data to be referred to or updated in the transaction, as information necessary for the processing time estimation unit 13 to make the estimation. The processing time estimation unit 13 estimates the processing time required for the transaction based on the information sent from the priority assignment unit 12 and the transaction execution unit 15 that processes the transaction. For example, when the priority assigning unit 12 notifies the number d of data to be referred to or updated in the transaction and the transaction execution unit 15 notifies the average time u required to refer to or update one data, the process required for the transaction The time can be estimated as dxu. After being notified of the estimated time E1 by the processing time estimation unit 13, the priority assignment unit 12 determines the execution priority of the transaction as follows. That is, the priority allocation unit 12
Is the time D1 for the real-time transaction 16 when the completion deadline of the transaction is time D1.
-E1 is given as the execution priority. On the other hand, when the system arrival time of the transaction is S1 for the non-real-time transaction 17,
The time S1 + E1 is given as the execution priority. The priority assigning unit 12 sends the transaction to which the execution priority is given to the execution order control unit 14.

【0007】実行順序制御部14は、優先度割当部12
から送られるトランザクションの処理を図5に示す手順
でトランザクション実行部15へ依頼する。すなわち、
実行順序制御部14は、実時間トランザクションR1が
優先度割当部12から送られたとき、これまでに実行順
序制御部14へ送られてまだ完了していない実時間トラ
ンザクションとR1の完了期限と実行優先度の関係から
(501)、これらの実時間トランザクションの全ての
完了期限を満たすために最も実行優先度の高い実時間ト
ランザクションR2を開始しなければならない最遅時刻
Lを求める(502,503)。このLは、例えば、図
6に示す手順で求められる。すなわち、まず、最も完了
期限の遅い実時間トランザクションR3を求め(60
1)、R3の実行優先度をLとする(602,60
3)。次に、R3の次に完了期限の遅い実時間トランザ
クションR4を求め(604,605)、R4の完了期
限が現在のLより遅い時刻であるときは、R4の見積処
理時間を現在のLから引いた時刻を新たなLとし(60
6,607,603)、R4の完了期限が現在のLより
早い時刻であるときは、R4の完了期限を新たなLとす
る(606〜608)。以上述べた動作を完了期限の遅
い順序で全ての実時間トランザクションに対して繰り返
せば、最終的に得られるLは最も実行優先度の高い実時
間トランザクションR2を開始すべき最遅時刻に等しく
なる。次に、実行順序制御部14は、トランザクション
実行部15で現在処理中のトランザクションが実時間ト
ランザクションR5であるとき(504)、R1の実行
優先度P1とR5の実行優先度P5を比較し(50
7)、P1がP5より早い時刻ならば、R5の処理を中
断してR1を先行処理するようにトランザクション実行
部15へ通知する(511)。このとき、実行順序制御
部14は、中断されたR5の実行優先度を優先度割当部
12を用いて再評価した後、上述の手順でLを求め直
す。一方、実行順序制御部14は、ステップ507にお
いて、P1がP5より遅い時刻ならば、R1を実行順序
制御部14内で待機させる(508)。また、実行順序
制御部14は、トランザクション実行部15で現在処理
中のトランザクションが非実時間トランザクションN1
であるとき(504)、LとN1の実行優先度Q1を比
較し(505)、LがQ1より早い時刻ならば、N1の
処理を中断して最も実行優先度の高い実時間トランザク
ションR2を先行処理するようにトランザクション実行
部15へ通知する(506)。このとき、実行順序制御
部14は、R1≠R2ならば、R1を実行順序制御部1
4内で待機させ、中断されたN1の実行優先度を優先度
割当部12に依頼して再評価する。一方、実行順序制御
部14は、ステップ504において、LがQ1より遅い
時刻ならば、R1を実行順序制御部14内で待機させる
(508)。
The execution order control unit 14 includes a priority assignment unit 12
The transaction execution unit 15 is requested to process the transaction sent from That is,
When the real-time transaction R1 is sent from the priority assigning unit 12, the execution order control unit 14 sends the real-time transaction R1 to the execution order control unit 14 that has not been completed and the completion deadline and execution of R1. From the relationship of priorities (501), the latest time L at which the real-time transaction R2 with the highest execution priority must be started in order to satisfy all the completion deadlines of these real-time transactions is obtained (502, 503). . This L is obtained by the procedure shown in FIG. 6, for example. That is, first, the real-time transaction R3 with the latest completion deadline is obtained (60
1), the execution priority of R3 is L (602, 60)
3). Next, a real-time transaction R4 with the next completion deadline after R3 is obtained (604, 605), and when the completion deadline of R4 is later than the current L, the estimated processing time of R4 is subtracted from the current L. The new time is set to L (60
6, 607, 603), and when the completion deadline of R4 is earlier than the current L, the completion deadline of R4 is set to a new L (606 to 608). When the above-described operation is repeated for all the real-time transactions in the order of the completion deadline, the finally obtained L becomes equal to the latest time when the real-time transaction R2 having the highest execution priority should be started. Next, when the transaction currently being processed by the transaction execution unit 15 is the real-time transaction R5 (504), the execution order control unit 14 compares the execution priority P1 of R1 with the execution priority P5 of R5 (50).
7) If P1 is earlier than P5, the transaction execution unit 15 is notified to interrupt the processing of R5 and perform the preceding processing of R1 (511). At this time, the execution order control unit 14 re-evaluates the interrupted execution priority of R5 using the priority assignment unit 12, and then re-determines L in the above-described procedure. On the other hand, if the time P1 is later than P5 in step 507, the execution order controller 14 causes R1 to wait in the execution order controller 14 (508). The execution order control unit 14 determines that the transaction currently being processed by the transaction execution unit 15 is a non-real time transaction N1.
(504), the execution priorities Q1 of L and N1 are compared (505). If L is earlier than Q1, the processing of N1 is interrupted and the real-time transaction R2 with the highest execution priority is preceded. The transaction execution unit 15 is notified to process (506). At this time, if R1 ≠ R2, the execution order control unit 14 sets R1 to the execution order control unit 1
4, the execution priority of the interrupted N1 is requested to the priority assigning unit 12 and re-evaluated. On the other hand, if L is later than Q1 in step 504, the execution order control unit 14 causes R1 to wait in the execution order control unit 14 (508).

【0008】また、実行順序制御部14は、非実時間ト
ランザクションN2が優先度割当部13から送られたと
き(501,502)、N2の実行優先度Q2と上述の
Lを比較し(509)、Q2がLより早い時刻であり、
かつトランザクション実行部15で現在処理中のトラン
ザクションが実時間トランザクションR5であるならば
(510)、R5の処理を中断してN2を先行処理する
ようにトランザクション実行部15へ通知する(51
1)。このとき、実行順序制御部14は、中断されたR
5の実行優先度を優先度割当部12を用いて再評価した
後、図6に示した手順でLを求め直す。一方、実行順序
制御部14は、ステップ509において、Q2がLより
早い時刻であり、かつトランザクション実行部15で現
在処理中のトランザクションが非実時間トランザクショ
ンN1であるならば(510)、Q2がQ1より早い時
刻のときは(507)、N1を中断してN2を先行処理
するようにトランザクション実行部15へ通知し(51
1)、Q2がQ1より遅い時刻のときは、N2を実行順
序制御部14内で待機させる(508)。このとき、実
行順序制御部14は、中断されたN1の実行優先度を優
先度割当部12に依頼して再評価する。さらに、実行順
序制御部14は、ステップ509において、Q2がLよ
り遅い時刻ならば、N2を実行順序制御部14内で待機
させる(508)。
When the non-real-time transaction N2 is sent from the priority assigning unit 13 (501, 502), the execution order control unit 14 compares the execution priority Q2 of N2 with the above L (509). , Q2 is earlier than L,
If the transaction currently being processed by the transaction executing unit 15 is the real-time transaction R5 (510), the transaction executing unit 15 is notified to interrupt the processing of R5 and preprocess N2 (51).
1). At this time, the execution order control unit 14 causes the interrupted R
After re-evaluating the execution priority of No. 5 using the priority allocation unit 12, L is calculated again by the procedure shown in FIG. On the other hand, if Q2 is earlier than L in step 509 and the transaction currently being processed by the transaction executing unit 15 is the non-real-time transaction N1 (510), the execution order control unit 14 sets Q2 to Q1. If the time is earlier (507), the transaction execution unit 15 is notified to interrupt N1 and perform prior processing on N2 (51).
1) When Q2 is later than Q1, N2 is made to wait in the execution order control unit 14 (508). At this time, the execution order control unit 14 requests the interrupted execution priority of N1 to the priority allocation unit 12 and re-evaluates it. Further, in step 509, if Q2 is later than L, the execution order control unit 14 causes N2 to wait in the execution order control unit 14 (508).

【0009】また、実行順序制御部14は、トランザク
ション実行部15からトランザクションの完了を通知さ
れたとき、図7に示す手順で次にトランザクション実行
部15へ依頼するトランザクションを実行順序制御部1
4で待機しているトランザクションから選択する。すな
わち、実行順序制御部14は、完了したトランザクショ
ンが実時間トランサクションならば、上述の手順でLを
求め直す(701〜703)。次に、実行順序制御部1
4は、待機している最も実行優先度の高い非実時間トラ
ンザクションN3の実行優先度Q3とLを比較し(70
4)、Q3がLより早い時刻ならば、N3の処理をトラ
ンザクション実行部15へ依頼する(706)。一方、
実行順序制御部14は、Q3がLより遅い時刻ならば、
待機している最も実行優先度の高い実時間トランザクシ
ョンの処理をトランザクション実行部15へ依頼する
(705)。これにより、トランザクション実行部15
は、実行順序制御部14から依頼されるトランザクショ
ンを実行し、処理の完了を実行順序制御部14へ通知す
る。また、トランザクション実行部15は、あるトラン
ザクションを処理している最中に実行順序制御部14か
ら他のトランザクションを依頼されたとき、現在処理中
のトランザクションを中断して、依頼されたトランザク
ションを先行処理する。このとき、トランザクション実
行部15は、中断したトランザクションの実行優先度を
再評価するため、例えば、そのトランザクションで参照
あるいは更新する残りデータ数等の情報を実行順序制御
部14へ通知する。
When the execution order control unit 14 is notified of the completion of the transaction by the transaction execution unit 15, the execution order control unit 1 requests the next transaction to the transaction execution unit 15 in the procedure shown in FIG.
Select from the transactions waiting in 4. That is, if the completed transaction is a real-time transaction, the execution order control unit 14 recalculates L according to the above procedure (701 to 703). Next, the execution order control unit 1
4 compares L with the execution priority Q3 of the non-real-time transaction N3 with the highest execution priority waiting (70
4) If Q3 is earlier than L, the transaction execution unit 15 is requested to process N3 (706). on the other hand,
If Q3 is later than L, the execution order control unit 14
The transaction executing unit 15 is requested to process the waiting real-time transaction with the highest execution priority (705). As a result, the transaction execution unit 15
Executes the transaction requested by the execution order control unit 14 and notifies the execution order control unit 14 of the completion of the process. In addition, when the transaction execution unit 15 is requested by the execution order control unit 14 for another transaction while processing a certain transaction, the transaction execution unit 15 interrupts the transaction currently being processed and precedes the requested transaction. To do. At this time, the transaction execution unit 15 notifies the execution order control unit 14 of information such as the number of remaining data to be referred to or updated in the transaction in order to reevaluate the execution priority of the interrupted transaction.

【0010】[0010]

【発明の効果】本発明によれば、非実時間トランザクシ
ョンを実時間トランザクションより先行して処理しても
実時間トランザクションが完了期限までに終了する場
合、非実時間トランザクションが実時間トランザクショ
ンより優先的に処理され、非実時間トランザクションを
実時間トランザクションより先行して処理すると実時間
トランザクションが完了期限までに完了しない場合、実
時間トランザクションは非実時間トランザクションより
優先的に処理されるので、主業務である実時間トランザ
クションの処理性能を劣化させることなく、非実時間ト
ランザクションを並行処理できる。また、非実時間トラ
ンザクションの処理に実時間トランザクション処理の余
裕時間を活用できるため、実時間トランザクションの性
能に影響を与えない範囲で出来る限り非実時間トランザ
クションの応答時間を短縮できる。
According to the present invention, a non-real-time transaction has priority over a real-time transaction when the non-real-time transaction ends before the completion deadline even if the non-real-time transaction is processed before the real-time transaction. If a real-time transaction does not complete by the completion deadline when the non-real-time transaction is processed before the real-time transaction, the real-time transaction is processed with priority over the non-real-time transaction. Non-real-time transactions can be processed in parallel without degrading the processing performance of certain real-time transactions. Further, since the margin time of the real-time transaction processing can be utilized for the processing of the non-real-time transaction, the response time of the non-real-time transaction can be shortened as much as possible without affecting the performance of the real-time transaction.

【0011】[0011]

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

【図1】本発明の一実施例におけるトランザクション実
行制御装置の構成図である。
FIG. 1 is a configuration diagram of a transaction execution control device according to an embodiment of the present invention.

【図2】従来の実行順序制御方式を適用したトランザク
ション実行制御装置の構成図である。
FIG. 2 is a configuration diagram of a transaction execution control device to which a conventional execution order control method is applied.

【図3】本発明の一実施例におけるトランザクション実
行順序制御方法を示す図である。
FIG. 3 is a diagram showing a transaction execution order control method in an embodiment of the present invention.

【図4】本発明の一実施例におけるトランザクション実
行順序制御方法を示す図である。
FIG. 4 is a diagram showing a transaction execution order control method according to an embodiment of the present invention.

【図5】本発明の一実施例におけるトランザクション実
行順序制御手順を示すフローチャートである。
FIG. 5 is a flowchart showing a transaction execution order control procedure in an embodiment of the present invention.

【図6】本発明の一実施例におけるトランザクション実
行順序制御手順を示すフローチャートである。
FIG. 6 is a flowchart showing a transaction execution order control procedure in an embodiment of the present invention.

【図7】本発明の一実施例におけるトランザクション実
行順序制御手順を示すフローチャートである。
FIG. 7 is a flowchart showing a transaction execution order control procedure in an embodiment of the present invention.

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

11 システム 12 優先度割当部 13 処理時間見積部 14 実行順序制御部 15 トランザクション実行部 71 システム 72 優先度割当部 73 処理時間見積部 74 実行順序制御部 75 トランザクション実行部 11 System 12 Priority Assignment Section 13 Processing Time Estimating Section 14 Execution Order Control Section 15 Transaction Execution Section 71 System 72 Priority Assignment Section 73 Processing Time Estimation Section 74 Execution Order Control Section 75 Transaction Execution Section

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 完了期限を指定して要求される実時間ト
ランザクションと、完了期限を指定せずに要求される非
実時間トランザクションを並行処理するシステムにおい
て、トランザクション処理に要する時間を見積もる手段
と、実時間トランザクションに対しては、見積もられた
時間分だけ完了期限より早い時刻を、非実時間トランザ
クションに対しては、現時刻より該見積時間分だけ遅い
時刻を、当該トランザクションの実行優先度として付与
する手段と、該実行優先度として付与された時刻がより
早いトランザクションを優先的に処理するようにトラン
ザクションの実行順序を制御する手段と、該実行順序制
御手段からの指示に基づき選択したトランザクションを
処理する手段とを備えたことを特徴とするトランザクシ
ョンの実行順序制御装置。
1. A means for estimating a time required for transaction processing in a system for concurrently processing a real-time transaction requested by specifying a completion deadline and a non-real-time transaction requested by not specifying a completion deadline, For real-time transactions, a time that is earlier than the completion deadline by the estimated time, and for non-real-time transactions, a time that is later than the current time by the estimated time is the execution priority of the transaction. A means for giving, a means for controlling the execution order of transactions so as to preferentially process a transaction with a time earlier given as the execution priority, and a transaction selected based on an instruction from the execution order control means. Transaction execution sequence control, characterized by comprising processing means apparatus.
【請求項2】 上記実行順序制御手段には、実時間トラ
ンザクションと非実時間トランザクションの処理順序を
決定する場合、実時間トランザクションの処理を開始す
べき最遅時刻を求め、非実時間トランザクションの実行
優先度として付与された時刻が該最遅時刻より早いとき
のみ、非実時間トランザクションを実時間トランザクシ
ョンより優先的に処理するようにトランザクションの実
行順序を制御する手段を備えたことを特徴とする請求項
1記載のトランザクションの実行順序制御装置。
2. The execution order control means obtains the latest time to start the processing of the real-time transaction when determining the processing order of the real-time transaction and the non-real-time transaction, and executes the non-real-time transaction. A means for controlling the execution order of the transactions is provided so that the non-real-time transaction is processed with priority over the real-time transaction only when the time given as the priority is earlier than the latest time. Item 1. A transaction execution order control device according to item 1.
【請求項3】 完了期限を指定して要求される実時間ト
ランザクションと、完了期限を指定せずに要求される非
実時間トランザクションを並行処理するシステムのトラ
ンザクションの実行順序制御方法において、トランザク
ションが該システムに到着すると、該トランザクション
の処理に要する時間を見積もり、実時間トランザクショ
ンに対しては、見積もられた時間分だけ完了期限より早
い時刻を、非実時間トランザクションに対しては、該見
積時間分だけ現時刻より遅い時刻を、当該トランザクシ
ョンの実行優先度として付与し、該実行優先度として付
与された時刻がより早いトランザクションを優先的に処
理することを特徴とするトランザクションの実行順序制
御方法。
3. A transaction execution order control method for a system that performs parallel processing of a real-time transaction requested by specifying a completion deadline and a non-real-time transaction requested by not specifying a completion deadline. When it arrives at the system, it estimates the time required to process the transaction. For real-time transactions, the estimated time is earlier than the completion deadline, and for non-real-time transactions, it is the estimated time. A method of controlling transaction execution order is characterized in that a time later than the current time is given as an execution priority of the transaction, and a transaction having an earlier time given as the execution priority is preferentially processed.
【請求項4】 上記実時間トランザクションの処理を開
始すべき最遅時刻を求め、非実時間トランザクションの
実行優先度として付与された時刻が実時間トランザクシ
ョンの最遅時刻より早いときのみ、非実時間トランザク
ションを実時間トランザクションより優先的に処理する
ことを特徴とする請求項3記載のトランザクションの実
行順序制御方法。
4. The non-real time is calculated only when the latest time to start the processing of the real-time transaction is calculated, and the time given as the execution priority of the non-real-time transaction is earlier than the latest time of the real-time transaction. 4. The transaction execution order control method according to claim 3, wherein the transaction is processed with priority over the real-time transaction.
JP4212604A 1992-08-10 1992-08-10 Method and device for controlling execution order of transaction Pending JPH0659915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4212604A JPH0659915A (en) 1992-08-10 1992-08-10 Method and device for controlling execution order of transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4212604A JPH0659915A (en) 1992-08-10 1992-08-10 Method and device for controlling execution order of transaction

Publications (1)

Publication Number Publication Date
JPH0659915A true JPH0659915A (en) 1994-03-04

Family

ID=16625447

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4212604A Pending JPH0659915A (en) 1992-08-10 1992-08-10 Method and device for controlling execution order of transaction

Country Status (1)

Country Link
JP (1) JPH0659915A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005316960A (en) * 2004-03-29 2005-11-10 Matsushita Electric Ind Co Ltd Processing terminal, receiving terminal, and processing system for received data
JP2007305029A (en) * 2006-05-15 2007-11-22 Matsushita Electric Ind Co Ltd Processing time allocation method in real time os
US20100318713A1 (en) * 2009-06-16 2010-12-16 Freescale Semiconductor, Inc. Flow Control Mechanisms for Avoidance of Retries and/or Deadlocks in an Interconnect

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005316960A (en) * 2004-03-29 2005-11-10 Matsushita Electric Ind Co Ltd Processing terminal, receiving terminal, and processing system for received data
JP4504236B2 (en) * 2004-03-29 2010-07-14 パナソニック株式会社 Processing terminal, receiving terminal and received data processing system
JP2007305029A (en) * 2006-05-15 2007-11-22 Matsushita Electric Ind Co Ltd Processing time allocation method in real time os
JP4707603B2 (en) * 2006-05-15 2011-06-22 パナソニック株式会社 Processing time allocation method in real-time OS
US20100318713A1 (en) * 2009-06-16 2010-12-16 Freescale Semiconductor, Inc. Flow Control Mechanisms for Avoidance of Retries and/or Deadlocks in an Interconnect
US8554967B2 (en) * 2009-06-16 2013-10-08 Freescale Semiconductor, Inc. Flow control mechanisms for avoidance of retries and/or deadlocks in an interconnect

Similar Documents

Publication Publication Date Title
US7076781B2 (en) Resource reservation for large-scale job scheduling
US7577554B2 (en) Workflow modeling using an acyclic directed graph data structure
JP3211689B2 (en) Production control device
JPH10301793A (en) Information processor and scheduling method
JPH07141305A (en) Control method for execution of parallel computer
JPH0659915A (en) Method and device for controlling execution order of transaction
JP2003131892A (en) Task execution control device and method therefor
JP5482442B2 (en) Job management apparatus, job management method, and job management program
JPH04284548A (en) Data base exclusive controlling system
JP2005092780A (en) Real time processor system and control method
JP2001236236A (en) Task controller and its task scheduling method
Kim et al. A due date-based approach to part type selection in flexible manufacturing systems
JP3005562B1 (en) Task management device and task scheduling method
JP2002182932A (en) Job queue multiple degree controller
JPS6368934A (en) Task scheduing system
JP3409830B2 (en) Process scheduling method
JPH06187171A (en) Scheduling system for interruption
JP2003114711A (en) Process planning method, process planning assisting method, process planning system, process planning assisting system, manufacturing method and program, and recording medium
JP3068556B2 (en) Shared resource exclusion control method and its program recording medium
JPH01180641A (en) Balancing system for cpu source
JPH06110699A (en) Work execution order control method
WO2021056277A1 (en) Program execution method
CN117453379A (en) Scheduling method and system for AOE network computing tasks in Linux system
JPH09128321A (en) User interface device
JPH02196359A (en) Data processing system