JPH03116341A - Dead lock release system - Google Patents

Dead lock release system

Info

Publication number
JPH03116341A
JPH03116341A JP1254958A JP25495889A JPH03116341A JP H03116341 A JPH03116341 A JP H03116341A JP 1254958 A JP1254958 A JP 1254958A JP 25495889 A JP25495889 A JP 25495889A JP H03116341 A JPH03116341 A JP H03116341A
Authority
JP
Japan
Prior art keywords
transaction
resource
resources
update
resource list
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
JP1254958A
Other languages
Japanese (ja)
Inventor
Masayasu Amano
天野 正康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP1254958A priority Critical patent/JPH03116341A/en
Publication of JPH03116341A publication Critical patent/JPH03116341A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To efficiently release the dead lock by selecting a resource as the processing request object, whose processing right another transaction does not acquire, out of resources as transfer object candidates of a prescribed transaction and transferring this resource to a corresponding transaction. CONSTITUTION:If resources entered in the update right unacquiring resource list of another transaction, for example, a transaction 1n exist in resources entered in the update right transfer resource list stored in an update right transfer resource list storage part 91 of a transaction as the cause of dead lock, for example, a transaction 11, they are added to an update right acquiring resource list storage part 6n corresponding to the transaction 1n. When an update right request resource list storage part 5n and the update right acquiring resource list storage part 6n coincide with each other, the update request of the transaction 1n is executed. Thus, the dead lock is efficiently released because update requests of respective transactions can be successively executed.

Description

【発明の詳細な説明】 〔発明の目的] (産業上の利用分野) この発明はコンピュータシステムのデータベース管理ま
たはファイル入出力管理処理におけるデッドロック解除
方式に関し、特にデータベースまたはファイルに対する
複数のトランザクションからの処理要求を同時に受け付
けるコンピュータシステムのデッドロック解除方式に関
する。
[Detailed Description of the Invention] [Objective of the Invention] (Industrial Application Field) The present invention relates to a deadlock release method in database management or file input/output management processing of a computer system, and in particular to a deadlock release method in database management or file input/output management processing of a computer system, and in particular, to This invention relates to a deadlock release method for a computer system that accepts processing requests simultaneously.

(従来の技術) 一般に、コンピュータシステムのデータベース管理また
はファイル入出力管理においては、各トランザクション
単位でデータベースまたはファイル内の資源(例えば、
項目、列、レコード等)が更新要求される。この場合、
各トランザクションの更新処理は、そのトランザクショ
ンが更新要求した各資源に対する更新権を全て獲得した
時点で実行可能となる。
(Prior Art) Generally, in database management or file input/output management of a computer system, resources in a database or file (for example,
(item, column, record, etc.) is requested to be updated. in this case,
The update processing of each transaction becomes executable when the transaction acquires all update rights for each resource requested for update.

複数のトランザクションによる更新要求を同時に受け付
けるシステムにおいては、共通の資源に対して複数のト
ランザクションが同時に更新要求する事がある。この場
合、その同時に更新要求された資源については、どのト
ランザクションも更新権を獲得することができなくなる
。この結果、トランザクション同志がお互いに必要とす
る資源に対する更新権が譲渡されることを永久に待ち合
ってしまうようなデッドロック状態が発生される。
In a system that accepts update requests from multiple transactions at the same time, multiple transactions may request updates to a common resource at the same time. In this case, no transaction will be able to acquire update rights for the resources that are requested to be updated at the same time. As a result, a deadlock situation occurs in which transactions are forever waiting for the transfer of update rights to mutually needed resources.

従来では、この様なデッドロック状態を解除するために
、デッドロックの原因となっているトランザクションの
幾つかを強制的に犠牲にする処理が行われている。この
場合、その犠牲にするトランザクションの更新要求は不
実行となり、アプリケーションプログラムに対してエラ
ーが返送される。エラーを受け取ったアプリケーション
プログラムは、不実行となった更新処理を再実行させる
為に、ロールパック命令やりトライ命令を発行する。
Conventionally, in order to release such a deadlock state, a process is performed in which some of the transactions causing the deadlock are forcibly sacrificed. In this case, the update request of the victim transaction is not executed, and an error is returned to the application program. The application program that received the error issues a roll pack command or a try command in order to re-execute the update process that was not executed.

この様に、従来は、デッドロック状態を解除するために
、アプリケーションプログラムを利用して更新要求の再
実行を行っているので、トランザクションの更新要求が
拒否された場合のロールパック命令またはりトライ要求
の設計およびコーディングをアプリケーションプログラ
ムに施す必要があった。このため、アプリケーションプ
ログラムが複雑化され、デッドロック状態を効率良く解
除することが困難であった。
In this way, conventionally, in order to release a deadlock state, an application program is used to re-execute an update request, so when a transaction update request is rejected, a roll pack instruction or retry request is It was necessary to design and code the application program. For this reason, the application program has become complicated, and it has been difficult to efficiently release the deadlock state.

(発明が解決しようとする課題) 従来では、デッドロック状態を解除するためにアプリケ
ーションプログラムにエラーを返送する方式であり、ア
プリケーションプログラムの設計が複雑化されて、効率
良くデッドロック状態を解除できない欠点があった。
(Problem to be Solved by the Invention) Conventionally, in order to release a deadlock state, an error is sent back to the application program, which has the disadvantage that the design of the application program becomes complicated and the deadlock state cannot be released efficiently. was there.

この発明はこの様な点に鑑みなされたもので、アプリケ
ーションプログラムにエラーを返送すること無く、各ト
ランザクションの更新要求を逐次実行できるようにして
、効率良くデッドロックを解除することが可能なデッド
ロック解除方式を提供する事を目的とする。
This invention was made in view of the above points, and it is possible to eliminate deadlocks efficiently by executing update requests of each transaction sequentially without sending an error back to the application program. The purpose is to provide a release method.

[発明の構成] (課題を解決するための手段及び作用)この発明は、デ
ータベースまたはファイルに対する複数のトランザクシ
ョンからの処理要求を同時に受け付けるシステムのデッ
ドロック解除方式において、前記データベースまたはフ
ァイル内の資源に予め割り付けられている順位情報を記
憶する第1の記憶手段と、前記各トランザクションによ
って処理要求された資源のうちで処理権が獲得された資
源を前記各トランザクション毎に記憶する第2の記憶手
段と、前記各トランザクションによって処理要求された
資源のうちで処理権が獲得されてない資源を前記各トラ
ンザクション毎に記憶する第3の記憶手段と、前記第1
、第2および第3の記憶手段を参照して、処理権獲得済
み資源のうちで、処理権未獲得資源の所定の順位の資源
よりも高順位の資源を、前記各トランザクション毎に譲
渡対象候補資源として選定する譲渡候補選定手段と、こ
の譲渡候補選定手段によって選定された譲渡対象候補の
資源を各トランザクション毎に記憶する第4の記憶手段
と、前記第3および第4の記憶手段を参照して、所定の
トランザクションの譲渡対象候補の資源のうちで他のト
ランザクションが処理権を獲得してない処理要求対象の
資源を選定し、その選定した資源に対する処理権を対応
するトランザクションに譲渡する譲渡手段とを具備する
ことを特徴とする。
[Structure of the Invention] (Means and Effects for Solving the Problems) The present invention provides a deadlock release method for a system that simultaneously accepts processing requests from a plurality of transactions for a database or file. a first storage means for storing rank information allocated in advance; and a second storage means for storing, for each transaction, a resource for which a processing right has been acquired among the resources requested to be processed by each transaction. , a third storage means for storing, for each transaction, resources for which processing rights have not been acquired among the resources requested to be processed by each of the transactions;
, refers to the second and third storage means, and selects, for each transaction, a resource with a higher rank than a predetermined rank of resources for which processing rights have not been acquired, among the resources for which processing rights have been acquired, as transfer target candidates for each transaction. Referring to a transfer candidate selection means for selecting a resource, a fourth storage means for storing the resource of a transfer target candidate selected by the transfer candidate selection means for each transaction, and the third and fourth storage means. transfer means that selects a processing request target resource for which no other transaction has acquired processing rights from among resources that are transfer target candidates for a given transaction, and transfers processing rights for the selected resource to a corresponding transaction; It is characterized by comprising the following.

このデッドロック解除方式においては、各トランザクシ
ョン毎に譲渡対象候補の資源が選定され、譲渡対象候補
の資源のうちで他のトランザクションが処理権を獲得し
てない処理要求対象の資源がそのトランザクションに譲
渡される。したがって、デッドロックが発生しても、ト
ランザクション同志がお互いに必要とする資源に対する
処理権を永久に待ち合ってしまう事が無くなり、デッド
ロックを効率良く解除することができる。
In this deadlock release method, resources that are candidates for transfer are selected for each transaction, and among the resources that are candidates for transfer, the resource that is the subject of a processing request for which no other transaction has acquired processing rights is transferred to that transaction. be done. Therefore, even if a deadlock occurs, transactions do not have to wait forever for processing rights to mutually needed resources, and the deadlock can be efficiently released.

(実施例) 以下、図面を参照してこの発明の詳細な説明する。(Example) Hereinafter, the present invention will be described in detail with reference to the drawings.

第1図にこの発明の一実施例に係わるデッドロック解除
方式を実現するためのシステム構成を示す。
FIG. 1 shows a system configuration for realizing a deadlock release method according to an embodiment of the present invention.

複数のトランザクション11〜Inは、それぞれ種々の
業務プロセスにおける各事象に応じて発生される情報処
理要求を伝えるものであり、情報処理要求としては、例
えば、データベース(またはファイル)40の資源を更
新するものや、その資源を取り出して参照するもの等が
ある。これらトランザクション11〜1nは、データベ
ース(またはファイル)管理部30に供給される。
The plurality of transactions 11 to In each convey an information processing request generated in response to each event in various business processes, and the information processing request includes, for example, updating the resources of the database (or file) 40. There are things such as things and things that take out and refer to their resources. These transactions 11 to 1n are supplied to the database (or file) management section 30.

データベース(またはファイル)管理部30は、データ
ベース(またはファイル)40に対する入出力管理を行
うためのものであり、資源リスト管理部IOを利用して
データベース(またはファイル)40内の各資源に対す
る譲渡処理等を制御する。
The database (or file) management unit 30 is for managing input/output to the database (or file) 40, and uses the resource list management unit IO to perform transfer processing for each resource in the database (or file) 40. control etc.

デッドロック通知部20は、データベース40の資源に
対してトランザクション11〜Inから同時に更新要求
が出される事によってこのシステム内にデッドロックが
発生された場合、それを検出してデッドロックが発生し
たことをデータベース管理部30に通知する。
If a deadlock occurs in this system due to simultaneous update requests issued to the resources of the database 40 from transactions 11 to In, the deadlock notification unit 20 detects this and informs that the deadlock has occurred. is notified to the database management unit 30.

資源リスト管理部10は、データベース管理部30と共
同して、更新要求資源リスト格納部51〜5n、更新権
獲得資源リスト格納部61〜Bn、更新権未獲得資源リ
スト格納部71〜70、資源順位リスト格納部81.更
新権譲渡資源リスト格納部91〜9n、及び比較部11
.12を制御する。
The resource list management unit 10, in collaboration with the database management unit 30, stores update request resource list storage units 51 to 5n, update right acquired resource list storage units 61 to Bn, update right unacquired resource list storage units 71 to 70, and resource list storage units 51 to 5n. Ranking list storage section 81. Update right transfer resource list storage units 91 to 9n and comparison unit 11
.. 12.

更新要求資源リスト格納部51〜50はトランザクショ
ンll= Inにそれぞれ対応するものであり、これら
更新要求資源リスト格納部51〜50には、対応するト
ランザクションによって更新要求された全ての資源のリ
ストが格納される。
The update request resource list storage units 51 to 50 respectively correspond to transaction ll=In, and these update request resource list storage units 51 to 50 store a list of all resources that have been requested to be updated by the corresponding transaction. be done.

更新権獲得資源リスト格納部61〜6nはトランザクシ
ョン11〜Inにそれぞれ対応するものであり、これら
更新権獲得資源リスト格納部61〜6nには、対応する
トランザクションが更新権を獲得した資源のリストが格
納される。
The update right acquisition resource list storage units 61 to 6n correspond to transactions 11 to In, respectively, and these update right acquisition resource list storage units 61 to 6n contain a list of resources for which the corresponding transaction has acquired update rights. Stored.

更新権未獲得資源リスト格納部71〜7nはトランザク
ション11〜Inにそれぞれ対応するものであり、これ
ら更新権未獲得資源リスト格納部71〜7nには、対応
するトランザクションの更新権未獲得の資源のリストが
格納される。更新権未獲得資源リストは、比較部11に
よって対応する更新要求資源リストと更新権獲得資源リ
ストとを比較することによって得られる。
The update right unacquired resource list storage units 71 to 7n correspond to transactions 11 to In, respectively, and these update right unacquired resource list storage units 71 to 7n store information about the resources for which update rights have not been acquired for the corresponding transactions. A list is stored. The update right unacquired resource list is obtained by the comparison unit 11 comparing the corresponding update request resource list and update right acquired resource list.

資源順位リスト格納部81には、データベース40内の
各資源に対して予め割り当てられた順位情報が格納され
ている。更新権譲渡資源リスト格納部91〜9nはトラ
ンザクション11〜Inにそれぞれ対応するものであり
、これら更新権譲渡資源リスト格納部91〜9nには、
対応するトランザクションが更新権を獲得した資源のう
ちで他のトランザクショに譲渡するための譲渡対象資源
のリストが格納される。譲渡対象資源のリストは、比較
部12によって更新権獲得資源リストと更新権未獲得資
源リストと資源順位リストを参照することによって得ら
れる。すなわち、譲渡対象資源としては、更新権獲得済
の資源のうちで他のトランザクションから更新要求され
、しかも、更新権未獲得資源の中で最も順位の低い資源
よりも高順位にある資源が選定される。
The resource ranking list storage unit 81 stores ranking information assigned in advance to each resource in the database 40. The update right transfer resource list storage units 91 to 9n correspond to transactions 11 to In, respectively, and these update right transfer resource list storage units 91 to 9n include the following:
A list of resources to be transferred to other transactions among the resources for which the corresponding transaction has acquired update rights is stored. The list of resources to be transferred is obtained by the comparison unit 12 by referring to the update rights acquired resource list, the update rights unacquired resource list, and the resource ranking list. In other words, a resource that has been requested to be updated by another transaction among the resources for which the update right has been acquired and that has a higher ranking than the resource that has the lowest ranking among the resources that have not acquired the update right is selected as the resource to be transferred. Ru.

次に、第2図(A)乃至(C)のフローチャートを参照
して、第1図に示したシステムのデッドロック解除処理
の手順を説明する。
Next, the procedure for deadlock release processing in the system shown in FIG. 1 will be explained with reference to the flowcharts in FIGS. 2(A) to 2(C).

デッドロック通知部20によってデッドロック状態が検
出された場合には、まず、第2図(A)に示されている
ように、そのデッドロックの原因となっている複数のト
ランザクションの内の1つが選定される(ステップAI
)。次いで、その選定されたトランザクション、例えば
トランザクション11に対応する更新要求資源リスト格
納部51と更新権獲得資源リスト格納部61が参照され
、比較部11によって更新権獲得資源リストと更新権獲
得資源リストが比較される(ステップA2)。
When a deadlock condition is detected by the deadlock notification unit 20, first, as shown in FIG. 2(A), one of the multiple transactions causing the deadlock is selected (step AI
). Next, the update request resource list storage unit 51 and the update right acquisition resource list storage unit 61 corresponding to the selected transaction, for example transaction 11, are referred to, and the comparison unit 11 compares the update right acquisition resource list and the update right acquisition resource list. are compared (step A2).

これによって、トランザクション11に対応する更新権
未獲得資源リストが生成され、それが更新権未獲得資源
リスト格納部71に格納される(ステップA3)。
As a result, an update right unacquired resource list corresponding to the transaction 11 is generated, and it is stored in the update right unacquired resource list storage section 71 (step A3).

次に、資源順位リスト格納部81および更新権未獲得資
源リスト格納部71が参照され、更新権譲渡資源のうち
で最も順位の低い資源が確認され(ステップA4)、そ
の後、更新権獲得資源リスト格納部61が参照されて、
最も順位の低い未獲得資源よりも高順位の資源がその更
新権獲得資源リスト格納部61に格納されているか否か
が判断される(ステップA5)。最も順位の低い未獲得
資源よりも高順位の獲得済み資源がある場合には、その
獲得済み資源が更新権譲渡資源に選定され、更新権譲渡
資源リストが生成される(ステップAS)。この更新権
譲渡資源リストは、更新権譲渡資源リスト格納部91に
格納される。
Next, the resource ranking list storage section 81 and the update right unacquired resource list storage section 71 are referred to, and the resource with the lowest rank among the update right transfer resources is confirmed (step A4). When the storage unit 61 is referred to,
It is determined whether a resource with a higher rank than the unacquired resource with the lowest rank is stored in the update right acquisition resource list storage unit 61 (step A5). If there is an acquired resource with a higher rank than the unacquired resource with the lowest rank, the acquired resource is selected as the update right transfer resource, and an update right transfer resource list is generated (step AS). This update right transfer resource list is stored in the update right transfer resource list storage section 91.

このステップAt−ASの処理は、デッドロックの原因
となっている各トランザクションについて同様にして実
行され、全てのトランザクションについての処理が終了
したことが判断された場合に(ステップA7)、第2図
(B)のステップA8〜AI2の処理に移行する。
The process of step At-AS is executed in the same way for each transaction causing the deadlock, and when it is determined that the process for all transactions has been completed (step A7), the process shown in FIG. The process moves to steps A8 to AI2 in (B).

ステップA1〜A6の処理がデッドロックの原因となっ
ている各トランザクションについて終了すると、第2図
(B)に示されているように、まず、デッドロックの原
因となっている複数のトランザクションの内の1つが選
定される(ステップA8)。次いで、その選定されたト
ランザクション、例えばトランザクション11に対応す
る更新権譲渡資源リストの資源の内で、他のトランザク
ションの更新権未獲得資源リストに載っている資源があ
るか否かが判断される(ステップA9)。
When the processing of steps A1 to A6 is completed for each transaction causing the deadlock, first, as shown in FIG. 2(B), one of the transactions causing the deadlock is one is selected (step A8). Next, it is determined whether or not among the resources on the update right transfer resource list corresponding to the selected transaction, for example transaction 11, there is a resource listed on the update right unacquired resource list of another transaction ( Step A9).

もし、トランザクション11の更新権譲渡資源リストの
資源のうちで他のトランザクション例えばトランザクシ
ョンinの更新権未獲得資源リストに載っている資源が
あれば、その資源がトランザクション11に対応する更
新権獲得資源リスト格納部61と更新権譲渡資源リスト
格納部91からそれぞれ削除される(ステップAIG)
If there is a resource listed in the update right transfer resource list of transaction 11 that is listed in the update right unacquired resource list of another transaction, for example, transaction in, then that resource is listed in the update right acquisition resource list corresponding to transaction 11. They are deleted from the storage section 61 and the update right transfer resource list storage section 91 (step AIG).
.

次に、トランザクションInに対応する更新権未獲得資
源リスト格納部7nから該当する資源が削除されると共
に、トランザクション1nに対応する更新権獲得資源リ
スト格納部6nにその該当する資源が追加される(ステ
ップA 11)。
Next, the corresponding resource is deleted from the update right unacquired resource list storage section 7n corresponding to the transaction In, and the corresponding resource is added to the update right acquired resource list storage section 6n corresponding to the transaction 1n ( Step A 11).

このステップ八8〜Allの処理は、デッドロックの原
因となっている各トランザクションについて同様にして
実行され、全てのトランザクションについての処理が終
了したことが判断された場合に(ステップA12)、第
2図(C)のステップAI3〜A20の処理に移行する
The processing in steps 88 to All is executed in the same way for each transaction causing the deadlock, and when it is determined that the processing for all transactions has been completed (step A12), the second The process moves to steps AI3 to A20 in FIG.

ステップ八8〜Allの処理がデッドロックの原因とな
っている各トランザクションについて終了すると、第2
図(C)に示されているように、まず、デッドロックの
原因となっている複数のトランザクションの内の1つが
選定される(ステップA 13)。次いで、その選定さ
れたトランザクション、例えばトランザクションInに
対応する更新権要求資源リスト格納部5nと更新権獲得
資源リスト格納部6nが参照され、それらが一致するか
否かが判断される(ステップA 14)。
When the processing of steps 8 to 8-All is completed for each transaction causing the deadlock, the second
As shown in Figure (C), first, one of the multiple transactions causing the deadlock is selected (step A13). Next, the update right request resource list storage section 5n and the update right acquisition resource list storage section 6n corresponding to the selected transaction, for example, transaction In, are referred to, and it is determined whether or not they match (step A14). ).

更新権要求資源リスト格納部5nと更新権獲得資源リス
ト格納部6nが一致した場合には、そのトランザクショ
ンlnの更新要求が実行される(ステップA 15)。
When the update right request resource list storage section 5n and the update right acquisition resource list storage section 6n match, an update request for the transaction ln is executed (step A15).

次いで、更新要求処理が完了したそのトランザクション
inに対応する更新権獲得資源リスト格納部anと他の
トランザクションの更新権未獲得資源リスト格納部が参
照され、更新処理が完了したトランザクションinが更
新権を獲得していた資源の中で他のトランザクションか
ら更新要求されている資源があるか否かが判断される(
ステップA 1B)。
Next, the update right acquired resource list storage part an corresponding to the transaction in for which the update request process has been completed and the update right unacquired resource list storage part of other transactions are referenced, and the transaction in for which the update process has been completed acquires the update right. It is determined whether or not there are resources that have been requested to be updated by other transactions among the acquired resources (
Step A 1B).

処理が完了したトランザクションlnが更新権を獲得し
ていた資源の中で他のトランザクションから更新要求さ
れている資源がある場合には、その資源がトランザクシ
ョンInの更新権獲得資源リスト格納部6nから削除さ
れ(ステップ17)、その後、その資源を更新要求して
いる任意のトランザクションに対応する更新権未獲得資
源リスト格納部から該当する資源が削除されると共に、
その更新権獲得資源リスト格納部にその該当する資源が
追加される(ステップA 18)。
If there is a resource that has been requested to be updated by another transaction among the resources for which the transaction ln that has completed processing has acquired the update right, that resource is deleted from the update right acquisition resource list storage unit 6n of the transaction In. (step 17), and thereafter, the corresponding resource is deleted from the update right unacquired resource list storage unit corresponding to any transaction requesting update of the resource, and
The corresponding resource is added to the update right acquisition resource list storage section (step A18).

このステップA13〜A1gの処理は、デッドロックの
原因となっている各トランザクションについて同様にし
て実行され、全てのトランザクションについての処理が
終了したことが判断された場合に(ステップA19)、
次のステップA20において、全てのトランザクション
についての更新要求が実行されたか否かが判断される。
The processing in steps A13 to A1g is executed in the same way for each transaction causing the deadlock, and when it is determined that the processing for all transactions has been completed (step A19),
In the next step A20, it is determined whether update requests for all transactions have been executed.

全てのトランザクションについての更新要求が実行され
た場合にはデッドロック解除処理が終了され、一方、更
新要求が実行されてないトランザクションが残っている
場合には、第2図(B)のステップ八8からの処理が再
び実行される。
If the update requests for all transactions have been executed, the deadlock release process is completed. On the other hand, if there are transactions for which update requests have not been executed, step 88 in FIG. 2(B) is performed. The process from then on is executed again.

以上のように、この実施例においては、各トランザクシ
ョン毎に譲渡対象候補の資源が選定され、詣渡対象候補
の資源のうちで他のトランザクションが処理層を獲得し
てない処理要求対象の資源がそのトランザクションに譲
渡される。したがって、デッドロックが発生しても、ト
ランザクション同志がお互いに必要とする資源に対する
処理層を永久に待ち合ってしまう事が無くなり、アプリ
ケーションプログラムにエラー返送すること無く、デッ
ドロックを効率良く解除することができる。
As described above, in this embodiment, a resource to be transferred is selected for each transaction, and among the resources to be transferred, the resource that is the target of a processing request and whose processing layer has not been acquired by another transaction is selected. transferred to that transaction. Therefore, even if a deadlock occurs, transactions will not have to wait forever for the processing layer to receive the resources they each need, and the deadlock can be efficiently released without sending an error back to the application program. I can do it.

尚、ここでは、譲渡候補の資源として、未獲得資源の最
下位順位よりも高順位の獲得済資源を選定したが、これ
は譲渡候補資源の選定効率を高めるためであり、この発
明のデッドロック解除方式はその選定の方式に制限され
るものではない。
In this case, acquired resources with a higher ranking than the lowest ranking of unacquired resources are selected as transfer candidate resources, but this is to improve the efficiency of selecting transfer candidate resources, and to avoid deadlock in this invention. The cancellation method is not limited to the selected method.

[発明の効果] 以上のように、この発明によれば、各トランザクション
の更新要求を逐次実行できるので、効率良くデッドロッ
クを解除することが可能となる。
[Effects of the Invention] As described above, according to the present invention, update requests for each transaction can be executed sequentially, so that deadlocks can be efficiently released.

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

第1図はこの発明の一実施例に係わるシステムの構成を
示すブロック図、第2図は第1図に示したシステムのデ
ッドロック解除動作を説明するフローチャートである。 10・・・資源リスト管理部、30・・・データベース
管理部、51〜5n・・・更新要求資源リスト格納部、
61〜6n・・・更新権獲得資源リスト格納部、71〜
7n・・・更新権未獲得資源リスト格納部、81・・・
資源順位リスト格納部、91〜9n・・・更新権譲渡資
源リスト格納部。
FIG. 1 is a block diagram showing the configuration of a system according to an embodiment of the present invention, and FIG. 2 is a flowchart illustrating the deadlock release operation of the system shown in FIG. 1. 10... Resource list management unit, 30... Database management unit, 51-5n... Update request resource list storage unit,
61-6n... Update right acquisition resource list storage unit, 71-
7n...Resource list storage unit for which update rights have not been acquired, 81...
Resource ranking list storage unit, 91 to 9n... Update right transfer resource list storage unit.

Claims (1)

【特許請求の範囲】[Claims] データベースまたはファイルに対する複数のトランザク
ションからの処理要求を同時に受け付けるシステムのデ
ッドロック解除方式において、前記データベースまたは
ファイル内の資源に予め割り付けられている順位情報を
記憶する第1の記憶手段と、前記各トランザクションに
よって処理要求された資源のうちで処理権が獲得された
資源を前記各トランザクション毎に記憶する第2の記憶
手段と、前記各トランザクションによって処理要求され
た資源のうちで処理権が獲得されてない資源を前記各ト
ランザクション毎に記憶する第3の記憶手段と、前記第
1、第2および第3の記憶手段を参照して、処理権獲得
済み資源のうちで、処理権未獲得資源の所定の順位の資
源よりも高順位の資源を、前記各トランザクション毎に
譲渡対象候補資源として選定する譲渡候補選定手段と、
この譲渡候補選定手段によって選定された譲渡対象候補
の資源を各トランザクション毎に記憶する第4の記憶手
段と、前記第3および第4の記憶手段を参照して、所定
のトランザクションの譲渡対象候補の資源のうちで他の
トランザクションが処理権を獲得してない処理要求対象
の資源を選定し、その選定した資源に対する処理権を対
応するトランザクションに譲渡する譲渡手段とを具備す
ることを特徴とするデッドロック解除方式。
In a deadlock release method for a system that simultaneously accepts processing requests from a plurality of transactions for a database or file, the system comprises: a first storage means for storing ranking information pre-allocated to resources in the database or file; and each transaction. a second storage means for storing, for each transaction, resources for which processing rights have been acquired among the resources requested to be processed by the transaction, and resources for which processing rights have not been obtained among the resources requested to be processed by each transaction; With reference to the third storage means for storing resources for each transaction, and the first, second, and third storage means, a predetermined resource for which processing rights have not been acquired among the resources for which processing rights have been acquired is stored. Transfer candidate selection means for selecting a resource with a higher rank than a resource with a higher rank as a transfer target candidate resource for each transaction;
A fourth storage means stores the resources of the transfer target candidates selected by the transfer candidate selection means for each transaction, and a fourth storage means stores the resources of the transfer target candidates selected by the transfer candidate selection means, and refers to the third and fourth storage means, A dead transaction system comprising a transfer means for selecting a resource to be processed for which no other transaction has acquired processing rights among the resources, and transferring processing rights for the selected resource to a corresponding transaction. Unlock method.
JP1254958A 1989-09-29 1989-09-29 Dead lock release system Pending JPH03116341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1254958A JPH03116341A (en) 1989-09-29 1989-09-29 Dead lock release system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1254958A JPH03116341A (en) 1989-09-29 1989-09-29 Dead lock release system

Publications (1)

Publication Number Publication Date
JPH03116341A true JPH03116341A (en) 1991-05-17

Family

ID=17272229

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1254958A Pending JPH03116341A (en) 1989-09-29 1989-09-29 Dead lock release system

Country Status (1)

Country Link
JP (1) JPH03116341A (en)

Similar Documents

Publication Publication Date Title
JP3672208B2 (en) Hierarchical transaction processing method
US5964838A (en) Method for sequential and consistent startup and/or reload of multiple processor nodes in a multiple node cluster
EP2825958B1 (en) Systems and methods for supporting transaction recovery based on a strict ordering of two-phase commit calls
WO2018077073A1 (en) Distributed database system, transaction processing method, lock server and storage medium
US6665814B2 (en) Method and apparatus for providing serialization support for a computer system
US7760743B2 (en) Effective high availability cluster management and effective state propagation for failure recovery in high availability clusters
US9621409B2 (en) System and method for handling storage events in a distributed data grid
US20040158549A1 (en) Method and apparatus for online transaction processing
JPH06318164A (en) Method and equipment for executing distributive transaction
JPH01188965A (en) Data processing
JPH0131216B2 (en)
EP2501106B1 (en) System and method for session synchronization with independent external systems
US6842763B2 (en) Method and apparatus for improving message availability in a subsystem which supports shared message queues
JP2011096065A (en) Data access device, data access method, and data access program
US8549007B1 (en) System and method for indexing meta-data in a computer storage system
EP1164484A2 (en) Method, system and program product for managing processing groups of a distributed computing environment
US9766949B2 (en) System and method for locking exclusive access to a divided resource
EP3811227B1 (en) Methods, devices and systems for non-disruptive upgrades to a distributed coordination engine in a distributed computing environment
JPH0916527A (en) Method and system for large scale distributed information processing
WO2023103340A1 (en) Block data committing method and apparatus
JPH03116341A (en) Dead lock release system
US10459810B2 (en) Technique for higher availability in a multi-node system using replicated lock information to determine a set of data blocks for recovery
EP0817019B1 (en) Method of stratified transaction processing
Ibrahim Mobile transaction processing for a distributed war environment
US20220382635A1 (en) Method and apparatus for processing transaction