JPH03235130A - Exclusive priority control system - Google Patents

Exclusive priority control system

Info

Publication number
JPH03235130A
JPH03235130A JP2031945A JP3194590A JPH03235130A JP H03235130 A JPH03235130 A JP H03235130A JP 2031945 A JP2031945 A JP 2031945A JP 3194590 A JP3194590 A JP 3194590A JP H03235130 A JPH03235130 A JP H03235130A
Authority
JP
Japan
Prior art keywords
transaction
urgency
priority
group
processing
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
JP2031945A
Other languages
Japanese (ja)
Inventor
Yoko Saito
洋子 齋藤
Hiromichi Ogata
緒方 博通
Koji Yamamoto
晃司 山本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2031945A priority Critical patent/JPH03235130A/en
Publication of JPH03235130A publication Critical patent/JPH03235130A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To improve the response of a transaction of a high degree of urgency by executing preferentially a transaction of a high degree of urgency against a transaction of a low degree of urgency which is being executed, in the case plural transactions use exclusively shared resources. CONSTITUTION:The table constitution of a transaction processing queue in a date base system in which plural transactions use exclusively shared resources has a transaction processing queue 10, a lock requiring pointer area 11, a transaction group table 12, a pointer 13, and a transaction 14. In such a state, with respect to resources for which the transaction of the high degree of urgency executes an exclusive control requirement in the case another transaction of the low degree of urgency has the exclusive control right, the transaction of the low degree of urgency is ended abnormally, and the exclusive control right is delivered to the transaction of the high degree of urgency. In such a manner, the response of the transaction of the high degree of urgency can be improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、複数のトランザクションが排他的に使用する
共用資源を有するデータベースシステム。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a database system having shared resources that are exclusively used by a plurality of transactions.

あるいは複数のプロセスが排他的に使用する共用資源を
有するデータ処理システムにおいて、トランザクション
やプロセスの排他優先制御方式に関する。
It also relates to exclusive priority control methods for transactions and processes in data processing systems that have shared resources that are used exclusively by multiple processes.

〔従来の技術〕[Conventional technology]

従来、共用資源の排他優先制御方式としては、例えば特
開昭62−17764号公報に記載されているように、
トランザクションの資源割当て要求を優先度類に待行列
にチエインさせ、優先度の高い要求から順に資源を割当
てることにより、緊急度の高いトランザクションの応答
性を向上させる方式がある。
Conventionally, as an exclusive priority control method for shared resources, for example, as described in Japanese Patent Application Laid-Open No. 17764/1982,
There is a method for improving the responsiveness of transactions with high urgency by chaining resource allocation requests for transactions in queues according to priority level and allocating resources in order of priority.

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

上記従来技術は、緊急度の低いトランザクションを既に
実行中の時に緊急度の高い要求が待行列に登録された場
合に、該緊急度の高い要求を優先的に実行させることに
ついて配慮されておらず、緊急度の高いトランザクショ
ンの応答性の向上には限界があった。
The above-mentioned conventional technology does not take into consideration the fact that when a high-urgency request is registered in the queue while a low-urgency transaction is already being executed, the high-urgency request is executed preferentially. However, there were limits to the improvement of responsiveness for highly urgent transactions.

本発明の目的は、複数のトランザクションが共用資源を
排他的に使用するデータベースシステムにおいて、緊急
度の高いトランザクションを、実行中の緊急度の低いト
ランザクションよりも優先して実行させるトランザクシ
ョン排他優先制御方式を提供することにある。
An object of the present invention is to provide a transaction exclusive priority control method in which a transaction with a high degree of urgency is executed with priority over a transaction with a low degree of urgency that is currently being executed in a database system in which a plurality of transactions use shared resources exclusively. It is about providing.

さらに本発明の目的は、複数のプロセスが排他的に使用
する共用資源を有するデータ処理システムにおいて、緊
急度の高いプロセスを緊急度の低いプロセスより優先さ
せるプロセス排他優先制御方式を提供することにある。
A further object of the present invention is to provide a process exclusive priority control method that gives priority to processes with high urgency over processes with low urgency in a data processing system that has shared resources that are used exclusively by multiple processes. .

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

上記目的を達成するために、本発明は、複数のトランザ
クションにより排他的に使用される共用資源を有するデ
ータベースシステムにおいて、緊急度の高いトランザク
ションが排他制御要求をした資源を緊急度の低い別のト
ランザクションが排他制御権を有していた場合に、該緊
急度の低いトランザクションを異常終了させて、緊急度
の高いトランザクションに排他制御権を渡すことを特徴
とするものである。
In order to achieve the above object, the present invention provides that, in a database system having a shared resource that is exclusively used by a plurality of transactions, a transaction with a high degree of urgency can control the resource for which exclusive control is requested by another transaction with a low degree of urgency. is characterized in that when a transaction has exclusive control rights, the low-urgency transaction is abnormally terminated and exclusive control rights are transferred to a high-urgency transaction.

また、本発明は、複数のプロセスにより排他的に使用さ
れる共用資源を有するデータ処理システムにおいて、緊
急度の高いプロセスが排他制御要求をした資源を緊急度
の低いプロセスが排他制御権を有していた場合に、該緊
急度の低いプロセスを休止させて、緊急度の高いプロセ
スに排他制御権を渡すことを特徴とするものである。
Furthermore, in a data processing system having a shared resource that is exclusively used by a plurality of processes, the present invention provides that a process with a low level of urgency has exclusive control over the resource for which a process with a high level of urgency has requested exclusive control. If there is a problem, the process with a low degree of urgency is suspended and exclusive control is passed to a process with a high degree of urgency.

〔作 用〕[For production]

データベースシステムやデータ処理システムにおいて、
共用する資源に対するトランザクションやプロセスのロ
ック要求は優先度の高い順に処理されるが、特に最優先
度のロック要求時には、他の優先度の低いトランザクシ
ョンやプロセスにロック付与されている場合でも、最優
先度のトランザクションやプロセスにロック付与が変更
される。
In database systems and data processing systems,
Lock requests by transactions and processes for shared resources are processed in order of priority, but in particular, the highest priority lock request is processed with the highest priority even if the lock is granted to another transaction or process with a lower priority. The lock grant is changed for each transaction or process.

これにより、緊急度の高いトランザクションやプロセス
の応答性を更に向上させることができる。
This makes it possible to further improve the responsiveness of transactions and processes with high urgency.

〔実施例〕〔Example〕

以下、本発明の一実施例について図面により説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図は、複数のトランザクションが排他的に共用資源
を使用するデータベースシステムにおけるトランザクシ
ョン処理待行列のテーブル構成を示している。ここで、
共用資源への排他制御要求(ロック要求)についてのト
ランザクション処理の優先度として、1〜NのN段階が
あるとし、数が多いほど優先度が高く、特に優先度Nの
トランザクションは他の優先度のトランザクション処理
が実行中であっても優先して処理するものとする6トラ
ンザモ にサーチ・チエインを持ち、トランザクション・グルー
プ・テーブル12は、その優先度に従ってトランザクシ
ョン処理待行列10の上記サーチ・チエインにつながれ
る。トランザクション14は。
FIG. 1 shows the table structure of a transaction processing queue in a database system in which multiple transactions exclusively use shared resources. here,
There are N levels from 1 to N as the transaction processing priority for exclusive control requests (lock requests) to shared resources, and the higher the number, the higher the priority, and in particular, transactions with priority N have higher priority than other priorities. The transaction group table 12 assigns search chains to the six transamos that are to be processed with priority even if the transaction processing is currently being executed, and the transaction group table 12 assigns the above search chains to the transaction processing queue 10 according to the priority. Connected. Transaction 14 is.

各々その属するグループのトランザクション・グループ
・テーブル12に先着順につながれている。
Each group is connected to the transaction group table 12 of the group to which it belongs on a first-come, first-served basis.

また、トランザクション処理待行列10のロック要求ポ
インタエリア11は、N個の優先度ごとに存在し、各々
の優先度の次のロック要求を示すためにポインタ13を
用いる。
Further, a lock request pointer area 11 of the transaction processing queue 10 exists for each of N priorities, and a pointer 13 is used to indicate the next lock request of each priority.

第2図はトランザクション・グループ・テーブル12の
エントリ構成を示す。トランザクション・グループ・テ
ーブル12は、予め外部パラメタとして設定する当グル
ープの処理保証値16、前回ゼロクリアされて以来処理
完了した当グループのトランザクション数を示す処理実
績値18、現在当グループで処理実行を待っているトラ
ンザクション数20のエントリを含む。また、22,2
4はそれぞれサーチ・チエインのフォワード・ポインタ
、バックワード・ポインタが入るエントリである。なお
、処理保証値16及び処理実績値18はトランザクショ
ン沈み込み防止のために用意されるもので、これについ
ては特開昭62−19957号公報に詳述されている。
FIG. 2 shows the entry structure of the transaction group table 12. The transaction group table 12 includes a guaranteed processing value 16 of this group that is set in advance as an external parameter, a processing performance value 18 that indicates the number of transactions of this group that have been processed since the last time it was cleared to zero, and a processing result value 18 that indicates the number of transactions that have been completed in this group since the last time it was cleared to zero. Contains entries for 20 transactions. Also, 22,2
4 are entries into which the forward pointer and backward pointer of the search chain are entered, respectively. Note that the processing guarantee value 16 and the processing performance value 18 are prepared to prevent transaction sinking, and this is detailed in Japanese Patent Application Laid-Open No. 19957/1983.

第3図は、第1図に示したテーブル構成において1次に
ロックを付与するグループを優先度の高い順に選択する
際のフローチャートである。まず。
FIG. 3 is a flowchart for selecting groups to which a primary lock is to be granted in order of priority in the table configuration shown in FIG. 1. first.

処理31でトランザクション処理待行列10について最
優先度のNのグループからサーチを開始する。処理32
で先頭のロック要求ポインタ13がnullかどうか判
定し、nullでなければ、処理33で先頭のロック要
求にロックを付与し、処理34で次のロック要求にポイ
ンタ13をずらしてサーチを終了する。また、処理32
の判定で先頭のロック要求ポインタ13がnullであ
ったら、処理35でより優先度の低いグループのサーチ
に移る。
In step 31, a search for the transaction processing queue 10 is started from the N groups with the highest priority. Processing 32
It is determined whether the first lock request pointer 13 is null or not. If it is not null, a lock is granted to the first lock request in step 33, and the pointer 13 is shifted to the next lock request in step 34, and the search ends. Also, processing 32
If it is determined that the first lock request pointer 13 is null, in step 35 the process moves on to searching for a group with a lower priority.

このようにして、処理36で優先度1のグループまでサ
ーチし終えたことがわかると、ロック付与の処理を終了
する。これにより、優先度の高いグループからロック付
与されることになる。
In this way, when it is found in process 36 that the search has been completed up to the group with priority 1, the lock granting process is ended. As a result, locks will be granted from the group with the highest priority.

第4図は、優先度n (nはNより小さい)のグループ
にロックを付与し、優先度nのトランザクションを実行
中に、優先度Nのトランザクションが登録された場合の
フローチャートで、これが本発明の基本的考え方を示す
ものである。
FIG. 4 is a flowchart when a lock is granted to a group with priority n (n is smaller than N) and a transaction with priority N is registered while a transaction with priority n is being executed. It shows the basic idea of

まず、処理41で現在の優先度nがNでないことを確認
する。既に優先度Nのグループにロックが付与されてい
る場合、また、処理42で優先度Nの先頭のロック要求
ポインタ13がnullの場合には、ロックの変更は不
要であり、そのまサーチを終了する。処理41で優先度
Nのグループにロック付与がなく、処理42で新たに優
先度Nのロック要求が発生したことが判定された場合に
は。
First, in step 41, it is confirmed that the current priority level n is not N. If a lock has already been granted to a group with priority N, or if the first lock request pointer 13 of priority N is null in step 42, there is no need to change the lock, and the search ends immediately. do. If it is determined in process 41 that no lock has been granted to a group with priority N, and in process 42 that a new lock request with priority N has occurred.

処理43で現在の優先度nに対するロックを解除し、処
理44で優先度Nに対してロックを付与する。そして、
処理45で次のロック要求にポインタ13をずらしてサ
ーチを終了する。
In process 43, the lock on the current priority level n is released, and in process 44, the lock is applied to the priority level N. and,
In process 45, the pointer 13 is shifted to the next lock request and the search is ended.

このように、第4図のフローチャートに従えば、Nより
小さい優先度にロック付与されている場合にも、それを
解除して優先度Nのグループにロックを付与することが
できる。
In this manner, by following the flowchart of FIG. 4, even if a lock is granted to a priority level lower than N, it is possible to release the lock and grant a lock to a group with priority level N.

第5図は、次に処理するトランザクションを選択する際
のフローチャートである。まず、処理51でトランザク
ション処理待行列10を最優先度のNのグループからサ
ーチを開始する。処理52で当該優先度のグループが全
てサーチ済みか判定し、サーチ済でない場合は、処理5
3でフォワードポインタによりトランザクション・グル
ープ・テーブルの一つをポイントし、処理54で当該グ
ループに処理待ちのトランザクションがあることを確認
すると、処理55で当該グループの処理実績値を処理保
証値と比較し、まだ処理保証値に達していない場合は、
処理56で当該トランザクショングループで先着順に待
っている先頭のトランザクションを選択してサーチを終
了する0選択すべきトランザクションが当該グループに
ない場合、当該トランザクショングループの処理実績値
が処理保証値に達している場合、処理53においてフォ
ワードポインタでポイントした次のトランザクショング
ループをサーチする。一方、処理52でその優先度のト
ランザクショングループが全てサーチし終えたことが判
定されると、処理57でより優先度の低いトランザクシ
ョングループのサーチに移る。このようにして、処理5
8で優先度1のトランザクショングループをサーチし終
えたことがわかると、サーチはトランザクションを選択
することなく終了する。
FIG. 5 is a flowchart when selecting a transaction to be processed next. First, in process 51, a search is started in the transaction processing queue 10 starting from the N group with the highest priority. In process 52, it is determined whether all groups of the priority level have been searched, and if they have not been searched, process 5
In step 3, the forward pointer points to one of the transaction group tables, and in step 54 it is confirmed that there is a transaction waiting to be processed in the group.In step 55, the processing actual value of the group is compared with the guaranteed processing value. , if the processing guarantee value has not yet been reached,
In process 56, select the first transaction waiting in the transaction group on a first-come, first-served basis and end the search. 0 If there is no transaction to be selected in the group, the processing performance value of the transaction group has reached the guaranteed processing value. If so, the next transaction group pointed to by the forward pointer is searched for in step 53. On the other hand, if it is determined in process 52 that all transaction groups of that priority have been searched, the process moves on to search for transaction groups of lower priority in process 57. In this way, process 5
8 indicates that the search for the transaction group with priority 1 has been completed, the search ends without selecting any transaction.

以上に述べた第5図のトランザクションの選択処理は、
いずれかのトランザクションの処理が完了して、オンラ
インシステム資源に余裕ができ、新たなトランザクショ
ンの処理実行を開始できるようになった時点で行われる
The transaction selection process in Figure 5 described above is as follows:
This is done when the processing of one of the transactions has been completed and online system resources have become available, allowing the processing of a new transaction to begin.

次に具体例として、第11図で処理時間の長いトランザ
クションの実行中に優先度Nのトランザクションを実行
させる例について説明する。
Next, as a specific example, an example will be described in which a transaction with priority N is executed while a transaction with a long processing time is being executed in FIG. 11.

第11図において、トランザクション111、トランザ
クション113、トランザクション115は資源Bを共
用し、資源Bに対する排他制御要求(ロック要求)はそ
れぞれ優先度1、優先度3、優先度Nであるとする。特
にトランザクション115は優先度Nなので、他のトラ
ンザクションが実行であっても、第4図のフローチャー
トに従って該実行中のトランザクションのロック要求を
解除し、トランザクション115を優先して実行できる
ようにする。第11図では処理を時間軸tで表わしてい
る。
In FIG. 11, it is assumed that transaction 111, transaction 113, and transaction 115 share resource B, and exclusive control requests (lock requests) for resource B have priority 1, priority 3, and priority N, respectively. In particular, since transaction 115 has priority N, even if other transactions are being executed, the lock request of the transaction being executed is released according to the flowchart of FIG. 4, so that transaction 115 can be executed with priority. In FIG. 11, the processing is represented by the time axis t.

トランザクション111は、処理時間の長いトランザク
ジョンであり、時刻t工がら実行を開始し、資源A、B
、Cを使用してトランザクション処理を行っている。ま
た、トランザクション113は時刻t、から実行を開始
するが、時刻t、では資源Bをトランザクション111
が使用中のため、資源Bのロック解除待の状態になる。
Transaction 111 is a transaction with a long processing time, starts execution at time t, and uses resources A and B.
, C is used to perform transaction processing. Also, transaction 113 starts execution from time t, but at time t, resource B is transferred to transaction 111.
Since resource B is in use, it is in a state where it is waiting for resource B to be unlocked.

一方、トランザクション115は、時刻t、がら実行を
開始するが、資gBに対して優先度Nのトランザクショ
ンであるため1時刻t7で資gBを使用しているトラン
ザクション111を異常終了させ、資源Bを使用して処
理を続行する。トランザクション111は時刻1sで資
gBをロック解除し、異常終了するため、トランザクシ
ョン部分回復処理を行った後、再スケジュールされる。
On the other hand, transaction 115 starts execution at time t, but since it is a transaction with priority N for resource gB, transaction 111 using resource gB is abnormally terminated at time t7, and resource B is to continue processing. Since the transaction 111 unlocks the capital gB at time 1s and terminates abnormally, it is rescheduled after partial transaction recovery processing is performed.

その間、トランザクション115は資源Bを用いて処理
を実行し、時刻t工、で終了する。
Meanwhile, transaction 115 executes processing using resource B and ends at time t.

次に、本発明をプロセスの排他優先制御に適用した実施
例を説明する。
Next, an embodiment in which the present invention is applied to exclusive priority control of processes will be described.

第6図は、複数のプロセスが排他的に共用資源を使用す
るデータ処理システムにおけるプロセス待行列のテーブ
ル構成を示している。ここでも、第1図の場合と同様に
、共用資源への排他制御要求(ロック要求)についての
プロセスの優先度には、1〜NのN段階あるとし、数が
多いほど優先度は高いものとする。特に、優先度Nのプ
ロセスは他の優先度のプロセスが実行中であっても優先
して処理するものとする。プロセス処理待行列60は、
優先度ごとにサーチ・チエインを持ち、プロセス・グル
ープ・テーブル62は、その優先度に従ってプロセス処
理待行列60のサーチ・チエインにつながれる。プロセ
ス64は、各々その属するグループのプロセス・グルー
プ・テーブル62に先着順につながれている。また、プ
ロセス処理待行列60のロック要求ポインタエリア61
は、N個の優先度ごとに存在し、各々の優先度の次のロ
ック要求を示すためにポインタ63を用いる。
FIG. 6 shows a table structure of a process queue in a data processing system in which multiple processes exclusively use shared resources. Here, as in the case of Figure 1, it is assumed that there are N levels of process priority from 1 to N for exclusive control requests (lock requests) to shared resources, and the higher the number, the higher the priority. shall be. In particular, it is assumed that a process with priority N is processed with priority even if processes with other priorities are being executed. The process processing queue 60 is
Each priority has a search chain, and the process group table 62 is connected to the search chain of the process processing queue 60 according to the priority. Each process 64 is connected to the process group table 62 of the group to which it belongs on a first-come, first-served basis. In addition, the lock request pointer area 61 of the process processing queue 60
exists for each of N priorities, and uses a pointer 63 to indicate the next lock request for each priority.

第7図は、プロセス・グループ・テーブル62のエント
リ構成を示す。プロセス・グループ・テーブル62は、
予め外部パラメタとして設定する当グループの処理保証
値66、前回ゼロクリアされて以来処理完了した当グル
ープのプロセス数を示す処理実績値68、現在当グルー
プで処理実行を待っているプロセス数70のエントリを
含む。
FIG. 7 shows the entry structure of the process group table 62. The process group table 62 is
The processing guarantee value 66 of this group, which is set in advance as external parameters, the processing performance value 68, which indicates the number of processes of this group that have completed processing since the last time it was cleared to zero, and the entry of 70, the number of processes currently waiting to be executed in this group. include.

また、72.74はそれぞれサーチ・チエインのフォワ
ード・ポインタ、バックワード・ポインタが入るエント
リである。
Further, 72 and 74 are entries into which the forward pointer and backward pointer of the search chain are entered, respectively.

第8図は、第6図に示したテーブル構成において、次に
ロックを付与するグループを優先度の高い順に選択する
際のフローチャートである。まず、処理−81で最優先
度のNのグループからサーチを開始する。処理82で先
頭のロック要求ポインタ63がnulかどうかが判定し
、nullでなければ、処理83で先頭のロック要求に
ロックを付与し、処理84で次のロック要求にポインタ
63をずらしてサーチを終了する。また、処理82の判
定で先頭のロック要求ポインタ63がnullであった
ら。
FIG. 8 is a flowchart for selecting the next group to be locked in descending order of priority in the table configuration shown in FIG. 6. First, in process-81, a search is started from the N group with the highest priority. In process 82, it is determined whether or not the first lock request pointer 63 is null. If it is not null, a lock is granted to the first lock request in process 83, and in process 84, the pointer 63 is shifted to the next lock request and the search is performed. finish. Also, if the first lock request pointer 63 is null as determined in process 82;

処理85でより優先度の低いグループのサーチに移る。In process 85, the search moves to a group with a lower priority.

このようにして、処理86で優先度1のグループまでサ
ーチし終えたことがわかると終了する。これにより、優
先度の高いグループからロック付与されることになる。
In this way, when it is found in process 86 that the search has been completed up to the group with priority 1, the process ends. As a result, locks will be granted from the group with the highest priority.

第9図は、優先度n (nはNより小さい)のグループ
にロックを付与し、優先度nのプロセスを実行中に、優
先度Nのプロセスが登録された場合のフローチャートで
ある。まず、処理91で現在の優先度nがNでないこと
を確認する。既に、優先度Nのグループにロックが付与
されている場合、また、処理92で優先度Nの先頭のロ
ック要求ポインタ63がnullの場合には、ロックの
変更は不要であり、そのまま終了する。処理91で優先
度Nのグループにロック付与がなく、処理92で新たに
優先度Nのロック要求が発生したことが分ると、処理9
3で現在の優先度nに対するロックを解除し、処理94
で優先度Nに対してロックを付与する。そして、処理9
5で次のロック要求にポインタ63をずらしてサーチを
終了する。
FIG. 9 is a flowchart when a lock is granted to a group with priority n (n is smaller than N) and a process with priority N is registered while the process with priority n is being executed. First, in step 91, it is confirmed that the current priority level n is not N. If a lock has already been granted to the group of priority N, or if the first lock request pointer 63 of priority N is null in step 92, there is no need to change the lock, and the process ends as is. When it is found in process 91 that no lock has been granted to the group with priority N and that a new lock request with priority N has occurred in process 92, process 9
3 to unlock the current priority n, and process 94
gives a lock to priority N. And processing 9
In step 5, the pointer 63 is shifted to the next lock request and the search is ended.

第10図は、次に処理するプロセスを選択する際のフロ
ーチャートである。まず、処理101で最優先度Nのグ
ループからサーチを開始する。処理103では該優先度
の一つのプロセス・グループ・テーブル62をポイント
し、処理104で当該グループに処理待ちのプロセスが
あることを確認すると、処理105で当該グループの処
理実績値を処理保証値と比較し、まだ処理保証値に達し
ていない場合は、処理106で当該プロセスグループで
先着順に待っている先頭のプロセスを選択してサーチを
終了する。選択すべきプロセスが当該グループにない場
合、当該プロセスグループの処理実績値が処理保証値に
達している場合、処理103において、フォワードポイ
ンタでポイントした次のプロセスグループをサーチする
。一方。
FIG. 10 is a flowchart when selecting a process to be processed next. First, in process 101, a search is started from the group with the highest priority N. In process 103, one process group table 62 of the priority level is pointed to, and when it is confirmed in process 104 that there is a process waiting to be processed in the group, in process 105, the processing performance value of the group is set as the guaranteed process value. After comparison, if the guaranteed processing value has not been reached yet, in step 106, the first process waiting in the process group is selected on a first-come, first-served basis, and the search is ended. If the process to be selected is not in the group, or if the processing performance value of the process group has reached the guaranteed processing value, in step 103, the next process group pointed to by the forward pointer is searched. on the other hand.

処理102で該優先度のプロセスグループをサーチし終
えたことが判定されると、処理108でより優先度の低
いプロセスグループのサーチに移る。
When it is determined in process 102 that the search for the process group with the priority level has been completed, the process moves on to search for a process group with a lower priority level in process 108.

そして、処理108で優先度1のプロセスグループをサ
ーチし終えたことがわかると、サーチはプロセスを選択
することなく終了する。
When it is determined in step 108 that the search for the process group with priority 1 has been completed, the search ends without selecting any process.

なお、第10図のプロセスの選択は、いずれかのプロセ
スの処理が完了して、オンラインシステム資源等に余裕
ができ、新たなプロセスの処理実行を開始できるように
なった時点で行われる。
Note that the selection of the process shown in FIG. 10 is performed when the processing of one of the processes is completed and there is sufficient online system resources, etc., and it becomes possible to start processing execution of a new process.

上記プロセス処理の具体例として、第12図でシステム
異常終了後にOSタスクが他タスクに確保した作業領域
を解放させる例を説明する。
As a specific example of the above process processing, an example in which the OS task releases the work area reserved for another task after the system abnormally ends will be described with reference to FIG.

第12図において、プロセスD、プロセスE、プロセス
Fは作業領域を共用し、プロセスDは上記作業領域に対
するロック要求につき優先度Nであるとする。そのため
、プロセスDのタスク121のロック要求は、プロセス
Eのタスク123及びプロセスFのタスク125で処理
実行中であっても、第9図のフローチャートに従って優
先して実行できるようにする。第12図では、プロセス
のタスク処理を時間軸tで表わしている。
In FIG. 12, it is assumed that process D, process E, and process F share a work area, and process D has priority N for a lock request for the work area. Therefore, the lock request of the task 121 of the process D can be executed with priority according to the flowchart of FIG. 9 even if the task 123 of the process E and the task 125 of the process F are being executed. In FIG. 12, the task processing of the process is represented by the time axis t.

タスク121,123,125は各々のプロセスの中で
起動されると、作業領域を確保後、処理される。時刻t
6でタスク121に障害が発生した時、プロセスDでは
システム異常処理を開始するが、プロセスEのタスク1
23及びプロセスFのタスク125が大容意の操業領域
を確保しているため、上記システム異常処理のための作
業領域を確保することができない。この場合、プロセス
Dのタスクは優先度Nのため、タスク123及びタスク
125の確保している作業領域を解放させ、プロセスE
及びプロセスFを休止させる。これにより、プロセスD
の上記システム異常終了外環のための作業領域が確保さ
れ、時刻t、にシステム異常処理が完了する。
When tasks 121, 123, and 125 are activated in each process, they are processed after securing a work area. Time t
When a failure occurs in task 121 in step 6, process D starts system error processing, but task 1 of process E
23 and task 125 of process F have secured a large operating area, it is not possible to secure a working area for the above-mentioned system abnormality processing. In this case, since the task of process D has priority N, the work areas secured by tasks 123 and 125 are released, and process E
and suspends process F. This allows process D
A work area for the system abnormal termination outer ring is secured, and the system abnormal processing is completed at time t.

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

以上の説明から明らかな如く、本発明によれば。 As is clear from the above description, according to the present invention.

複数のトラザクジョンが共用資源を排他的に使用するデ
ータベースシステムにおいて、緊急度の低いトランザク
ションを実行中に緊急度の高いトランザクションが登録
された時、緊急度の低いトランザクションを異常終了さ
せて緊急度の高いトランザクションを実行できるため、
実行処理時間の長いトランザクションの部分回復処理中
に間合せ応答処理ができるという効果がある。
In a database system where multiple transactions use shared resources exclusively, when a transaction with high urgency is registered while a transaction with low urgency is being executed, the transaction with low urgency is abnormally terminated and the transaction with high urgency is executed. transaction can be executed,
This has the effect of allowing intermittent response processing to be performed during partial recovery processing for transactions that take a long time to execute.

また、複数のプロセスが共用資源を排他的に使用するデ
ータ処理システムにおいて、緊急度の低いプロセスを実
行中に緊急度の高いプロセスが登録された時、緊急度の
低いプロセスを休止させて緊急度の高いプロセスを実行
できるため、システム異常のOSタスクからのエリアの
確保、及び他タスクのエリアの解放等を行うことができ
る。
In addition, in a data processing system in which multiple processes use shared resources exclusively, when a process with a high level of urgency is registered while a process with a low level of urgency is being executed, the process with a low level of urgency is paused and the level of urgency is increased. Since it is possible to execute a process with high performance, it is possible to secure an area from an OS task with a system error and release an area for other tasks.

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

第1図はトランザクション処理待行列のテーブル構成を
示す図、第2図はトランザクション・グループ・テーブ
ルのエントリ構成を示す図、第3図はトランザクション
・グループへのロック付与のフローチャート、第4図は
最高優先度のトランザクション・グループへの優先的な
ロック付与のフローチャート、第5図はトランザクショ
ン沈み込み防止のフローチャート、第6図はプロセス処
理待行列のテーブル構成を示す図、第7図はプロセス・
グループ・テーブルのエントリ構成を示す図、第8図は
プロセス・グループへのロック付与のフローチャート、
第9図は最高優先度のプロセス・グループへの優先的な
ロック付与のフローチャート、第10図はプロセス沈み
込み防止のフローチャート、第11図は処理時間の長い
トランザクション実行中に最高優先度のトランザクショ
ンを実行させる例を示す図、第12図はシステム異常終
域後にOSタスクが他タスクに確保した作業領域を解放
させることにより異常終了処理を行う例を示す図である
。 10・・・トランザクション処理待行列、11・・・ロ
ック要求ポインタエリア、12・・・トランザクション
・グループ・テーブル、13・・・ポインタ、  14
・・・トランザクション、60・・・プロセス処理待行
列、 61・・・ロック要求ポインタエリア、62・・・プロ
セス・グループ・テーブル。 63・・・ポインタ、  64・・・プロセス。 第6図 62.−7’口tスフqL−7’1 子−7IL−63
−併、′イ〉タ ー−76[7セス 菓5 第10図 第11図
Figure 1 is a diagram showing the table structure of the transaction processing queue, Figure 2 is a diagram showing the entry structure of the transaction group table, Figure 3 is a flowchart of granting a lock to a transaction group, and Figure 4 is a diagram showing the maximum Flowchart for preferentially granting a lock to a priority transaction group, Figure 5 is a flowchart for preventing transaction sinking, Figure 6 is a diagram showing the table structure of the process processing queue, and Figure 7 is a diagram showing the process processing queue table structure.
A diagram showing the entry configuration of the group table, Figure 8 is a flowchart of granting a lock to a process group,
Figure 9 is a flowchart for preferentially granting a lock to the highest priority process group, Figure 10 is a flowchart for preventing process stagnation, and Figure 11 is a flowchart for locking the highest priority process group while the highest priority transaction is being executed. FIG. 12 is a diagram illustrating an example of executing the abnormal termination process by causing the OS task to release the work area secured by another task after the system terminates abnormally. DESCRIPTION OF SYMBOLS 10... Transaction processing queue, 11... Lock request pointer area, 12... Transaction group table, 13... Pointer, 14
... Transaction, 60 ... Process processing queue, 61 ... Lock request pointer area, 62 ... Process group table. 63...Pointer, 64...Process. Figure 6 62. -7'mouth tsufuqL-7'1 child-7IL-63
76

Claims (2)

【特許請求の範囲】[Claims] (1)複数のトランザクションにより排他的に使用され
る共用資源を有するデータベースシステムにおいて、緊
急度の高いトランザクションが排他制御要求をした資源
を緊急度の低い別のトランザクションが排他制御権を有
していた場合に、該緊急度の低いトランザクションを異
常終了させて、緊急度の高いトランザクションに排他制
御権を渡すことを特徴とする排他優先制御方式。
(1) In a database system that has a shared resource that is used exclusively by multiple transactions, another transaction with a lower urgency has exclusive control over the resource for which a transaction with a higher degree of urgency has requested exclusive control. 1. An exclusive priority control method characterized in that when a transaction with a low degree of urgency is terminated abnormally, the exclusive control right is passed to a transaction with a high degree of urgency.
(2)複数のプロセスにより排他的に使用される共用資
源を有するデータ処理システムにおいて、緊急度の高い
プロセスが排他制御要求をした資源を緊急度の低いプロ
セスが排他制御権を有していた場合に、該緊急度の低い
プロセスを休止させて、緊急度の高いプロセスに排他制
御権を渡すことを特徴とする排他優先制御方式。
(2) In a data processing system that has shared resources that are used exclusively by multiple processes, when a less urgent process has exclusive control over the resource for which a more urgent process has requested exclusive control. An exclusive priority control method characterized in that the process with a low degree of urgency is suspended and the exclusive control right is passed to a process with a high degree of urgency.
JP2031945A 1990-02-13 1990-02-13 Exclusive priority control system Pending JPH03235130A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2031945A JPH03235130A (en) 1990-02-13 1990-02-13 Exclusive priority control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2031945A JPH03235130A (en) 1990-02-13 1990-02-13 Exclusive priority control system

Publications (1)

Publication Number Publication Date
JPH03235130A true JPH03235130A (en) 1991-10-21

Family

ID=12345104

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2031945A Pending JPH03235130A (en) 1990-02-13 1990-02-13 Exclusive priority control system

Country Status (1)

Country Link
JP (1) JPH03235130A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0675911A (en) * 1992-08-25 1994-03-18 Fujitsu Ltd On-line processing system and overload suppression processing method
JPH07129452A (en) * 1993-10-28 1995-05-19 Nec Corp Exclusive control system
JP2009294695A (en) * 2008-06-02 2009-12-17 Hitachi Ltd Transaction parallel control method, database management system, and program
WO2018224169A1 (en) * 2017-06-09 2018-12-13 Huawei Technologies Co., Ltd. Methods and systems for managing prioritized database transactions

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0675911A (en) * 1992-08-25 1994-03-18 Fujitsu Ltd On-line processing system and overload suppression processing method
JPH07129452A (en) * 1993-10-28 1995-05-19 Nec Corp Exclusive control system
JP2009294695A (en) * 2008-06-02 2009-12-17 Hitachi Ltd Transaction parallel control method, database management system, and program
JP4612710B2 (en) * 2008-06-02 2011-01-12 株式会社日立製作所 Transaction parallel control method, database management system, and program
WO2018224169A1 (en) * 2017-06-09 2018-12-13 Huawei Technologies Co., Ltd. Methods and systems for managing prioritized database transactions
US11537567B2 (en) 2017-06-09 2022-12-27 Huawei Technologies Co., Ltd. Methods and systems for managing prioritized database transactions

Similar Documents

Publication Publication Date Title
US20050235289A1 (en) Method for allocating resources in a hierarchical data processing system
US5377352A (en) Method of scheduling tasks with priority to interrupted task locking shared resource
EP0834806B1 (en) Process executing method and resource accessing method in computer system
US5450592A (en) Shared resource control using a deferred operations list
JP2866241B2 (en) Computer system and scheduling method
JPS61233849A (en) Method for controlling exclusively data base
JPH1153202A (en) Parallel transaction processing system
CN101216785A (en) Multi-tasking method according to simple priority inheritance scheme and embedded system therefor
JPH10283243A (en) Data base management system
JPH02195453A (en) File access control system
CN112148480A (en) Task processing method, device and equipment based on multithreading and storage medium
US6507861B1 (en) System and method for avoiding deadlock in a non-preemptive multi-threaded application running in a non-preemptive multi-tasking environment
JPH03235130A (en) Exclusive priority control system
CN115269136A (en) Heterogeneous multi-core platform partition operating system safety scheduling method and system
JPS63124138A (en) Occupation conflict control method for shared resources
JPH0417041A (en) Resource managing system for decentralized data managing system
JP3724075B2 (en) How to run the process
JPH0944366A (en) Multi-thread scheduling device
JP2876970B2 (en) Integrated exclusive control method
JPH0478932A (en) Shared resource exclusion control system
JPH05120040A (en) Computer system
JP3068556B2 (en) Shared resource exclusion control method and its program recording medium
JPS6242245A (en) File access method
JPH05204875A (en) Scheduling system for thread
JPH02112030A (en) System for exclusive control