JPH0690703B2 - Global detection system - Google Patents

Global detection system

Info

Publication number
JPH0690703B2
JPH0690703B2 JP60092482A JP9248285A JPH0690703B2 JP H0690703 B2 JPH0690703 B2 JP H0690703B2 JP 60092482 A JP60092482 A JP 60092482A JP 9248285 A JP9248285 A JP 9248285A JP H0690703 B2 JPH0690703 B2 JP H0690703B2
Authority
JP
Japan
Prior art keywords
site
transaction
waiting
sub
sites
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.)
Expired - Lifetime
Application number
JP60092482A
Other languages
Japanese (ja)
Other versions
JPS61250767A (en
Inventor
理一郎 武
進 安達
康男 山根
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP60092482A priority Critical patent/JPH0690703B2/en
Publication of JPS61250767A publication Critical patent/JPS61250767A/en
Publication of JPH0690703B2 publication Critical patent/JPH0690703B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔目 次〕 概 要 産業上の利用分野 従来の技術と発明が解決しようとする問題点 問題点を解決するための手段 作 用 実施例 ロック管理機構(第1図) 待合せ通知部(第1図、第2図) 待合せ問合せ部(第1図) デッドロック検出処理例(第3図、第4図) 発明の効果 〔概 要〕 複数のサイトからなる計算機ネットワークで実行される
トランザクションによって、サイト間にまたがって発生
する、いわゆるグローバルデッドロックを検出する方式
である。トランザクション間の待合せ情報を、トランザ
クション識別子の関数として定まるサイトへ集め、又同
様に定まるサイトへの問合せにより情報を補充して、グ
ローバルデッドロックの存在を検出する。
[Detailed Description of the Invention] [Table of Contents] Outline of Industrial Application Field of the Invention and Problems to be Solved by the Invention Means for Solving Problems Problems Working Example Lock Management Mechanism (Fig. 1) Waiting notification unit (Figs. 1 and 2) Waiting inquiry unit (Fig. 1) Deadlock detection processing example (Figs. 3 and 4) Effect of the invention [Outline] Execution in a computer network consisting of multiple sites This is a method of detecting so-called global deadlock that occurs across sites due to generated transactions. Queuing information between transactions is collected at sites that are defined as a function of the transaction identifier, and information is supplemented by inquiries to the sites that are also defined to detect the presence of global deadlocks.

〔産業上の利用分野〕[Industrial application field]

本発明は、情報処理システムにおける、複数のサイトか
らなる計算機ネットワークの、複数のサイトで実行され
るトラザクションによって、サイト間にまたがって発生
する。いわゆるグローバルデッドロックを検出する方式
に関する。
The present invention occurs across sites due to a transaction executed in a plurality of sites in a computer network including a plurality of sites in an information processing system. The present invention relates to a so-called global deadlock detection method.

計算機システムの複数の共用資源を、複数のトランザク
ションが排他的に占有して使用する場合には、例えばト
ランザクション間で、他のトランザクションが占有して
いる資源の空くのを互いに待ち合うために、それらのト
ランザクションの処理が進まなくなる、いわゆるデッド
ロックの状態が生じ得ることは、よく知られている。
When a plurality of shared resources of the computer system are exclusively used by a plurality of transactions, for example, in order to wait for the resources occupied by other transactions to wait for each other to be occupied by the other transactions, It is well known that a so-called deadlock state may occur in which the processing of the above transaction is stopped.

公知のように、デッドロックが発生した場合には、原因
の複数トランザクションのうちの、少なくとも1トラン
ザクションの実行を中断しない限り、原因の全トランザ
クションが、処理の進まない状態に凍結される。
As is well known, when a deadlock occurs, all of the causal transactions are frozen in a state in which processing cannot proceed unless execution of at least one transaction among the causal transactions is interrupted.

通信回線で相互に結ばれた複数のサイトに、例えばデー
タベースを分散した。計算機ネットワーク等において
は、1つのトランザクションで、複数のサイトのデータ
ベースのデータを排他的にアクセスする必要がある場合
がある。
For example, a database was distributed to multiple sites that were connected to each other by communication lines. In a computer network or the like, it may be necessary to exclusively access data in databases of a plurality of sites in one transaction.

このようなトランザクションが複数存在して、各サイト
で並列に実行され、且つ通常行われるように、各トラン
ザクションは所要の全サイトのアクセスが成功したと
き、該全サイトのデータ等の排他的占有を解く方式の場
合には、複数のサイトにまたがったデッドロック、いわ
ゆるグローバルデッドロックが発生し得る。
When a plurality of such transactions exist, they are executed in parallel at each site, and are normally executed, each transaction takes exclusive possession of the data of all the sites when the access of all the required sites is successful. In the case of the solving method, a deadlock across a plurality of sites, a so-called global deadlock may occur.

グローバルデッドロックは、各サイトで発生するトラン
ザクションの待合せ状態を、2以上のサイトについて結
合して見て、初めて検出できるので、効率よく検出する
ためには特別の考慮が必要である。
The global deadlock cannot be detected until the queuing state of the transaction occurring at each site is combined and seen for two or more sites, and therefore special consideration is required for efficient detection.

〔従来の技術と発明が解決しようとする問題点〕[Problems to be solved by conventional technology and invention]

第5図は4サイトからなる計算機ネットワークを示し、
各サイト1、2、3、4には、データベースシステムが
分散して設けられるものとし、サイト間は通信回線5に
よって接続される。
Figure 5 shows a computer network consisting of four sites.
A database system is dispersedly provided at each of the sites 1, 2, 3 and 4, and the sites are connected by a communication line 5.

各サイト1〜4においては、例えば利用者の端末装置6
から入力されるコマンドに従って、指定のデータベース
処理をするためのトランザクションを発生する。
In each of the sites 1 to 4, for example, the user's terminal device 6
Generate a transaction to process the specified database according to the command input from.

トランザクションは一般に、最初に発生される親サブト
ランザクションと、親サブトランザクションによって、
処理の必要に従って発生される1以上の子サブトランザ
クションからなる。なお、子トランザクションが、更に
子トランザクションを発生する方式のシステムもある。
A transaction is typically a parent subtransaction that occurs first and the parent subtransaction
It consists of one or more child subtransactions that are generated according to the needs of the process. There is also a system in which a child transaction further causes a child transaction.

例えばサイト1で発生したトランザクションT1が、サイ
ト1及びサイト2の両データベースにアクセスする処理
を要する場合には、サイト1にサブトランザクションT1
が作られると、サブトランザクションT1はサイト2と通
信して、サイト2に子サブトランザクションT1′を発生
する。
For example Site Transaction T 1 generated in the 1, when it takes the process to access both database site 1 and site 2, sub-transactions T 1 to Site 1
When sub-transaction T 1 is created, sub-transaction T 1 communicates with site 2 to generate a child sub-transaction T 1 ′ at site 2.

以下において、データベースへのアクセスは、すべて所
要のデータを排他的に占有して行う必要があるものとす
ると、サブトランザクションT1及びT1′は、それぞれの
サイト1及び2のロック管理機構に、所要のデータを排
他的に占有することを要求し、占有ができた場合のみ、
該データへのアクセス処理を開始する。
In the following, assuming that all access to the database is required to exclusively occupy the required data, the sub-transactions T 1 and T 1 ′ are assigned to the lock management mechanism of the respective sites 1 and 2. Only when you request to exclusively occupy the required data, and if you can do so,
Access processing to the data is started.

処理を終わったサブトランザクションT1、T1′は、相互
に終了を通知し、両者のアクセスが完了したことによっ
て、ロック管理機構に占有解除を要求する。
The sub-transactions T 1 and T 1 ′ that have finished processing notify each other of the end and request the lock management mechanism to release the exclusive use when the access of both is completed.

前記の占有要求において、他のトランザクションが、既
にそのデータを占有していた場合には、待合せが必要に
なり、前要求の他のトランザクションの処理がすべて終
わった後に、占有が可能になる。
If the other transaction has already occupied the data in the occupancy request, waiting is necessary, and the occupancy becomes possible after the processing of the other transaction of the previous request is completed.

このような制御の下に、上記のようにトランザクション
T1のサブトランザクションがサイト1と2にあり、トラ
ンザクションT2のサブトランザクションがサイト2と3
にあり、トランザクションT3のサブトランザクションが
サイト3と1にあって、各サイトのサブトランザクショ
ンが、同じデータを占有しようとしたために、第6図
(a)に示すような待合せ関係が生じたとする。
Transactions as above, under control like this
The sub-transaction for T 1 is at sites 1 and 2, and the sub-transaction for transaction T 2 is at sites 2 and 3
And there are subtransactions of transaction T 3 at sites 3 and 1 and the subtransactions at each site tried to occupy the same data, so that a queuing relationship as shown in FIG. 6 (a) occurred. .

なお、この説明において、トランザクションTiのサブト
ランザクションは、すべてTiと表すものとする。又、Ti
→Tjにより、サブトランザクションTiが、サブトランザ
クションTjの占有終了を待っている状態を示す。
In this description, all subtransactions of transaction Ti are represented as Ti. Also, Ti
→ Tj indicates that the sub-transaction Ti is waiting for the occupation end of the sub-transaction Tj.

第6図(a)に示すような待合せ関係が生じると、例え
ばトランザクションT1についてみると、サイト1のT1
占有を果たしたとしても、サイト2のT1の処理終了まで
占有を解除できないという関係が、すべてのトランザク
ションにあり、互いに他のトランザクションの占有解除
を待つので、この状態は変化できない。即ち、グローバ
ルデッドロックが発生している。
If Figure 6 waiting relation shown in (a) occurs, for example, looking at the transaction T 1, even if the T 1 of the site 1 played occupied, can not be released occupied until the processing end T 1 of the site 2 This state cannot change because all transactions have the relation, and they wait for the other transaction to release their possession. That is, a global deadlock has occurred.

このようなグローバルデッドロックの発生は、各サイト
内の待合せ状態を見ただけでは検出できず、この例の場
合は、サイト1〜3の状態を1個所に集めて、第6図
(b)のような待合せ関係グラフを得、そこにループが
あることにより、初めて検出できる。
The occurrence of such a global deadlock cannot be detected only by looking at the waiting state in each site. In this example, the states of sites 1 to 3 are collected in one place, and the state of FIG. It can be detected for the first time by obtaining a queuing relation graph such as and having a loop there.

このために、例えばすべてのサイトの待合せ情報を、特
定の1サイトに転送し、該特定サイトでグローバルデッ
ドロックを検出する、いわゆる集中方式がある。
For this purpose, for example, there is a so-called centralized system in which waiting information of all sites is transferred to a specific one site and a global deadlock is detected at the specific site.

このような集中方式は、制御構成としては簡明である
が、ネットワーク全体のグローバルデッドロック監視を
行う特定サイトに、特に高い信頼性が要求され、特定サ
イトのダウン時の処理を考慮すると、必ずしも制御は単
純では無く、又特定サイトに多量の待合せ情報の受信及
び処理の負荷が課せられること等から、例えば比較的小
規模のローカルエリアネットワーク等にのみ向く方式で
ある。
Although such a centralized method is simple as a control configuration, a high reliability is especially required for a specific site that monitors the global deadlock of the entire network. Is not a simple method, and a load of receiving and processing a large amount of waiting information is imposed on a specific site. Therefore, this method is suitable only for a relatively small local area network.

そのために、グローバルデッドロックの検出を特定の1
サイトに集中しない、いわゆる分散方式が考えられてい
る。
To that end, one specific global deadlock detection
A so-called distributed method is considered, which does not concentrate on the site.

その1方式として、例えば他サイトに子サブトランザク
ションのあるサブトランザクションを待合せる状態を検
出して、その他サイトへ待合せ情報を転送する操作を繰
り返すことにより、待合せ関係のグラフが逐次成長され
ることにより、トランザクションの発生状態に応じて、
特定されないあるサイトでデッドロックが検出されるよ
うにする方式がある。
As one of the methods, for example, by detecting a state of waiting for a sub-transaction having a child sub-transaction at another site and repeating the operation of transferring the waiting information to the other site, the graph of the waiting relationship is sequentially grown. , Depending on the transaction occurrence status
There is a method to detect deadlocks at some unspecified site.

しかし、この方式は制御が複雑であり、又サイト間にお
ける、待合せ情報の転送量が多くなる等の問題がある。
However, this method has problems that the control is complicated and that the transfer amount of the waiting information between sites is increased.

〔問題点を解決するための手段〕[Means for solving problems]

第1図は、本発明の構成を示すブロック図であり、10は
他サイト等との通信を制御する通信制御部、11はサブト
ランザクション、12はトランザクション識別子からサイ
トアドレスを発生するサイトアドレス関数部、13は待合
せ関係についての情報を所定のサイトへ送出する待合せ
通知部、14はデッドロック検出部15で構成される待合せ
関係グラフから、所要の待合せ情報の問合せを送出する
待合せ問合せ部である。
FIG. 1 is a block diagram showing the configuration of the present invention. 10 is a communication control unit that controls communication with other sites, 11 is a sub-transaction, and 12 is a site address function unit that generates a site address from a transaction identifier. , 13 is a queuing notification unit that sends information about queuing relationships to a predetermined site, and 14 is a queuing inquiry unit that sends a query for required queuing information from a queuing relationship graph configured by the deadlock detection unit 15.

〔作用〕[Action]

サブトランザクションは、前記のようにロック管理機構
16に、所要のデータ等の共有資源の占有を要求する。
The subtransaction is the lock management mechanism as described above.
16 request the occupation of shared resources such as required data.

ロック管理機構16は、占有の待合せが生じると、サブト
ランザクション間の待合せ関係を示す情報を待合せ通知
部13に渡す。
When an exclusive wait occurs, the lock management mechanism 16 passes information indicating a wait relationship between subtransactions to the wait notification unit 13.

待合せ通知部13は、この待合せに関係するサブトランザ
クションのトランザクション識別子をサイトアドレス関
数部12に渡して、サイトアドレスを得、通信制御部10を
経て、そのサイトへ待合せ情報を送信する。
The queuing notification unit 13 passes the transaction identifier of the subtransaction related to the queuing to the site address function unit 12, obtains the site address, and transmits the queuing information to the site via the communication control unit 10.

デッドロック検出部15は、他サイト及び自サイトからの
待合せ情報を受信し、それらを結合して、トランザクシ
ョン間のグローバルな待合せ関係グラフを構成する。
The deadlock detection unit 15 receives queuing information from other sites and its own site, combines them, and forms a global queuing relationship graph between transactions.

待合せ問合せ部14は、構成された待合せ関係グラフ上の
各ノードについて、所定の条件で問合せの要否を判定
し、問合せの必要な場合には、そのトランザクション識
別子をサイトアドレス関数部12に渡して問合せ先サイト
を決定し、問合せを送信する。
The queuing inquiry unit 14 determines the necessity of the inquiry for each node on the configured queuing relationship graph under a predetermined condition, and when the inquiry is necessary, passes the transaction identifier to the site address function unit 12. Decide the contact destination site and send the inquiry.

問合せは、宛先サイトのデッドロック検出部15が受信
し、指定のトランザクションにつながる待合せ関係の所
定部分の情報を返送する。
The inquiry is received by the deadlock detection unit 15 of the destination site, and returns information of a predetermined part of the queuing relationship leading to the designated transaction.

要求元のデッドロック検出部15は、これを受信し、先の
待合せ関係グラフを補充する。
The request source deadlock detection unit 15 receives this and supplements the preceding waiting relation graph.

要すれば、この補充操作を反復し、グラフ上にループが
構成された場合には、公知の適当な方法により、ループ
上のトランザクションの1つを選択し、そのトランザク
ションの実行を中断して、終了させることにより、グロ
ーバルデッドロックを解消する。
If necessary, this replenishment operation is repeated, and when a loop is formed on the graph, one of the transactions on the loop is selected and the execution of the transaction is suspended by a known appropriate method. The global deadlock is resolved by ending it.

以上の構成の制御により、待合せ情報の通知は、待合せ
の発生ごとに1回、所定のサイト(一般に2サイト)へ
行えばよい。
With the control of the above configuration, the notification of the waiting information may be sent to a predetermined site (generally two sites) once every time the waiting occurs.

その後、所要のトランザクションについて、問合せを必
要とする場合が生じるが、上記の通知方式によって、所
要の情報を必ず保持するサイトが定まっているので、無
駄な問合せ、或いは問合せの中継等を生じることが無
い。
After that, in some cases, an inquiry may be required for a required transaction, but since the site that always holds the required information is determined by the above notification method, useless inquiry or relay of inquiry may occur. There is no.

従って、グローバルデッドロックの検出を効率よく制御
することが可能になる。
Therefore, it becomes possible to efficiently control the detection of the global deadlock.

サイトアドレス関数部12の、トランザクション識別子か
らサイトアドレスを決定する関数は、例えばトランザク
ションを発生したサイトのサイトアドレスを関数値とす
ることにより、一般に適切な分散が可能である。
The function of the site address function unit 12 that determines the site address from the transaction identifier can generally be appropriately distributed by using, for example, the site address of the site that has generated the transaction as the function value.

しかし、システムの必要に応じて、例えば、関数値を固
定値とすれば、集中方式となり、トランザクション識別
子の値の適当なハッシュ関数とすれば、複数の特定サイ
トがグローバルデッドロック検出を分担する半集中方式
となる等、融通性の高い運用が可能である。
However, depending on the needs of the system, for example, if the function value is a fixed value, it becomes a centralized method, and if an appropriate hash function of the value of the transaction identifier is used, a plurality of specific sites will share the global deadlock detection. A highly flexible operation is possible, such as a centralized system.

〔実施例〕〔Example〕

ロック管理機構 第1図において、サブトランザクション11は、図示しな
い機構により、前記のようにして、このサイトで発生さ
れたトランザクションの親サブトランザクションか、又
は他サイトで発生されたトランザクションの子サブトラ
ンザクションであるが、何れの場合も、トランザクショ
ンが発生されたサイトで付けられるトランザクション識
別子を持っている。
Lock Management Mechanism In FIG. 1, the sub-transaction 11 is a parent sub-transaction of a transaction generated at this site or a child sub-transaction of a transaction generated at another site as described above by a mechanism not shown. However, in either case, it has a transaction identifier attached at the site where the transaction occurred.

トランザクション識別子は、この計算機ネットワークの
中で、ユニークにトランザクションを識別できるもので
なければならない。このために、トランザクション識別
子は、例えば各サイトを識別するサイトアドレスと、サ
イトごとに重複無く発生する一連番号とをつないだ構成
をとるものとする。
The transaction identifier must be able to uniquely identify the transaction within this computer network. For this reason, the transaction identifier has a structure in which, for example, a site address for identifying each site and a serial number generated without duplication for each site are connected.

ロック管理機構16は、サブトランザクション11から、デ
ータベースの指定のデータの占有制御を要求されると、
そのデータが占有されていなければ、これを占有状態に
設定して、サブトランザクション11に占有を通知するの
で、サブトランザクション11は該データのアクセスを開
始する。
When the sub-transaction 11 requests the lock management mechanism 16 to occupy the specified data in the database,
If the data is not occupied, it is set to the occupied state and the subtransaction 11 is notified of the occupation, so that the subtransaction 11 starts accessing the data.

しかし、前記要求時、既に他のサブトランザクションに
よって占有されていた場合には、その要求を待ち行列に
接続し、サブトランザクション11を待合せ状態に置く。
However, when the request is already occupied by another sub-transaction, the request is connected to the queue and the sub-transaction 11 is placed in the waiting state.

この場合にロック管理機構16は、要求サブトランザクシ
ョン11と、サブトランザクション11によって待たれるこ
とになった、待ち行列上の直前につながるサブトランザ
クションとのトランザクション識別子の並びを、待合せ
情報として待合せ通知部13へ通知する。
In this case, the lock management mechanism 16 uses the sequence of transaction identifiers of the request subtransaction 11 and the subtransaction that is to be waited by the subtransaction 11 and immediately preceding on the queue as the queuing notification unit 13 as queuing information. Notify to.

待合せ通知部 待合せ通知部13は、この待合せ情報の両トランザクショ
ン識別子を、サイトアドレス関数部12に渡して、それぞ
れに対応する関数値として、サイトアドレスを得る。
Waiting Notification Unit The waiting notification unit 13 passes both transaction identifiers of this waiting information to the site address function unit 12, and obtains the site address as a function value corresponding to each transaction identifier.

待合せ通知部13は、サイトアドレス関数部12から得たア
ドレスのサイトを宛先として、上記待合せ情報の送信
を、通信制御部10に依頼することにより、待合せ情報を
通知する。
The waiting notification unit 13 notifies the waiting information by requesting the communication control unit 10 to transmit the waiting information addressed to the site of the address obtained from the site address function unit 12.

なお、送信先には自サイト宛も含まれてよく、その場合
には、通信制御部10からデッドロック検出部15に待合せ
情報が中断される。
It should be noted that the destination may include the destination of the own site, in which case the waiting information is interrupted from the communication control unit 10 to the deadlock detection unit 15.

こゝで、サイトアドレス関数部12のアドレス関数値は、
入力されるトランザクション識別子の一部を構成するサ
イトアドレス部分の値を採るものとすれば、上記による
待合せ情報はトランザクションの発生元サイトへ集めら
れることになる。
Here, the address function value of the site address function unit 12 is
If the value of the site address portion forming a part of the input transaction identifier is taken, the above-mentioned queuing information is collected at the transaction origination site.

通常は、トランザクションの発生量を主要データとし
て、各サイトのシステム規模が定められることを考える
と、前記のアドレス関数により、一般に妥当な負荷分担
がなされることになると期待できる。
Usually, considering that the system scale of each site is determined by using the transaction generation amount as the main data, it can be expected that generally the appropriate load sharing will be performed by the address function.

デッドロック検出部15は、通信制御部10から受信する待
合せ情報を結合して、グローバルな待合せ関係グラフを
得る。即ち、第6図(a)のような個々の待合せ情報
を、第6図(b)のように結合して、待合せ関係グラフ
とする。
The deadlock detector 15 combines the waiting information received from the communication controller 10 to obtain a global waiting relation graph. That is, individual waiting information as shown in FIG. 6 (a) is combined as shown in FIG. 6 (b) to form a waiting relationship graph.

その結果、待合せ関数T1→T2、T2→T3、……が、すべて
異なるサイトで発生したとしても、第2図に示すよう
に、デッドロックループ上で、少なくとも1つ置きのト
ランザクションによって定まる通知先サイトが同一の場
合には、そのサイト(図の場合、サイトS1)に待合せ情
報が集まって、直ちにループを検出することができる。
As a result, even if the waiting functions T 1 → T 2 , T 2 → T 3 , ... all occur at different sites, as shown in Fig. 2, at least every other transaction is executed on the deadlock loop. If the notification destination sites determined by the same are the same, the waiting information is gathered at that site (site S 1 in the case of the figure), and the loop can be immediately detected.

なお、図において、S( )によって、サイトアドレス
関数部12の関数を示し、Smはサイトアドレスを示すもの
とする。
In the figure, S () indicates a function of the site address function unit 12, and Sm indicates a site address.

待合せ問合せ部 しかし、このような特別な条件に無い場合には、一般に
前記の通知によって集まる待合せ情報のみでは、デッド
ロックを検出できない場合があるので、デッドロック検
出部15は、待合せ問合せ部14により、他サイトに問合せ
を出して、待合せ情報を補充する。
However, if there is no such special condition, the deadlock detection unit 15, the deadlock detection unit 15, the deadline detection unit 15, the deadlock detection unit 15 by , Send inquiries to other sites and supplement the meeting information.

こゝで、冗長な問合せを除き、デッドロックの解消処理
の重複を避ける等のために、例えば待合せ関係グラフに
デッドロックループがある場合に、そのループ内のトラ
ンザクションの、トランザクション識別子の、或る重み
関数値が最も大きいトランザクションのサイトが、その
ループを処理するという規約を設けることにする。
Here, except for redundant queries, in order to avoid duplication of deadlock resolution processing, for example, when there is a deadlock loop in the queuing relationship graph, the transaction identifier We will establish a convention that the site of the transaction with the highest weight function value will process the loop.

このようにすると、あるサイトが、待合せ情報グラフ上
のループの存否を追跡しなければならないのは、待合せ
情報グラフ上で待ち側の端末にある他サイトのトランザ
クションから、待たれ側の端末にある他サイトのトラン
ザクションに至るパスのうち、そのパス上のトランザク
ションの、上記重み関数値が最大のものが、自サイトの
トランザクションであるパス(このパスを該サイトの責
任パスという)のみになる。
In this way, one site has to keep track of the presence or absence of a loop on the waiting information graph from the transaction of another site on the waiting information graph at the terminal on the waiting side to the terminal on the waiting side. Among the paths leading to the transactions of other sites, the one with the largest weight function value of the transaction on that path is only the path that is the transaction of the own site (this path is called the responsible path of the site).

従って、待合せ問合せ部14は、この条件に合致する責任
パスの、例えば待たれ側の端末のトランザクションを指
定して、そのトランザクションのトランザクション識別
子のアドレス関数で定まるサイトへ、問合せを送信す
る。
Therefore, the waiting inquiry unit 14 specifies the transaction of the terminal on the waiting side of the responsible path that matches this condition, and sends the inquiry to the site determined by the address function of the transaction identifier of the transaction.

前記の、待合せ情報の通知処理の論理から、指定のトラ
ンザクションに関する待合せが存在している場合には、
この送信先サイトは、必ず指定のトランザクションの待
合せに関する情報を持ち、問合せ元サイトは、有効な待
合せ情報の回答を受信することができる。
From the logic of the notification processing of the above-mentioned waiting information, if there is a waiting for a specified transaction,
The destination site always has information regarding the waiting of the designated transaction, and the inquiry source site can receive the reply of the valid waiting information.

問合せ元サイトのデッドロック検出部15は、問合せに対
する応答情報によって、待合せ関係グラフを補充し、こ
のようにして、待合せ関係が続く限り、責任のあるパス
について、待合せ関係グラフの枝を逐次延長し、その結
果、もしもループが存在する場合には、ループを検出す
る。
The deadlock detection unit 15 of the inquiry source site replenishes the waiting relationship graph with the response information to the inquiry, and thus extends the branches of the waiting relationship graph for the responsible path as long as the waiting relationship continues. As a result, if a loop exists, the loop is detected.

デッドロック検出処理例 以上の処理により、ループを検出する過程を、第3図及
び第4図に示す一例により説明する。
Deadlock Detection Processing Example The process of detecting a loop by the above processing will be described with reference to the examples shown in FIGS. 3 and 4.

第3、4図において、サイトのアドレスは1〜4(以下
において、他の数字と区別するために、〜で示す)
とし、2桁の数字はトランザクション識別子の値を示
し、その1位桁でサイトアドレスを示している。即ち、
トランザクション識別子ikとしたとき、S(ik)=kと
する。又、□形内のトランザクション識別子は、それが
示されているサイトのトランザクションを示す。
In Figs. 3 and 4, the site addresses are 1 to 4 (indicated by to distinguish them from other numbers below).
The two-digit number indicates the value of the transaction identifier, and the first digit thereof indicates the site address. That is,
When the transaction identifier is ik, S (ik) = k. Also, the transaction identifier in the square indicates the transaction of the site where it is shown.

第3図はトランザクション間の待合せ関係について仮定
した状況を示し、第4図(a)、(b)、(c)は、第
3図の待合せ関係がある場合に、何れかのサイトでデッ
ドロックループを検出する処理の過程を示す。
FIG. 3 shows a situation assuming a waiting relationship between transactions, and FIGS. 4 (a), (b), and (c) show deadlocks at any site when the waiting relationship shown in FIG. 3 exists. The process of detecting a loop will be described.

第4図(a)、(b)、(c)は、それぞれの処理フェ
ーズ、第1〜第3フェーズの初期における、各サイト内
の待合せ関係グラフと、それ基づいて送受されるメッセ
ージとを示し、第4図(a)は待合せ情報を通知する第
1フェーズ、第4図(b)は問合せによって情報を補充
する第2フェーズ、第4図(c)は判定処理の第3フェ
ーズである。
FIGS. 4 (a), (b), and (c) show a waiting relation graph in each site at the beginning of each processing phase and the first to third phases, and messages transmitted / received based on the graph. , FIG. 4 (a) is the first phase of notifying the waiting information, FIG. 4 (b) is the second phase of supplementing the information by inquiry, and FIG. 4 (c) is the third phase of the judgment processing.

この例において、重み関数は、トランザクション識別子
の値を、そのまゝ関数値として採るものとする。
In this example, the weighting function takes the value of the transaction identifier as its function value.

第1フェーズにおいて、サイトの待合せ通知部13は、
13→32なる待合せ情報を、トランザクション識別子‘1
3'のトランザクションのサイトであるサイト、及びト
ランザクション識別子‘32'のトランザクションのサイ
トへ送信する。同様にして、待合せ情報34→33は、サ
イトとへ、待合せ情報31→12→22の内、31→12の部
分はサイトと、12→22の部分はサイトに送信して
通知する。
In the first phase, the site appointment notification unit 13
The transaction information '1' is used as the waiting information 13 → 32.
Send to the site that is the transaction site of 3'and the transaction site of transaction identifier '32'. Similarly, the waiting information 34 → 33 is notified to the site by transmitting the waiting information 31 → 12 → 22 of the waiting information 31 → 12 → 22 to the site and the portion 12 → 22 to the site.

こゝで、サイト宛は、自身の待合せ通知部13からデッ
ドロック検出部15への転送であり、図には宛先に括弧を
付して区別してある。
Here, the destination of the site is the transfer from the waiting notification unit 13 of itself to the deadlock detection unit 15, and the destination is shown in parentheses in the figure for distinction.

サイト、、も、図の第1フェーズに示すように、
サイトの場合と同様に各サイトへ待合せ情報を通知す
る送信を行う。
The site, too, as shown in the first phase of the figure,
Similar to the case of the site, it sends the notification of the meeting information to each site.

その結果、例えばサイトのデッドロック検出部15は、
第1フェーズのメッセージに示すように、自サイトの待
合せ通知部13から待合せ情報31→12、サイトから21→
14→31、41→13及び12→11、サイトから21→41、サイ
トから24→11→21を受信するので、それらを結合し
て、図の(b)第2フェーズのサイトに示す待合せ関
係グラフを得る。
As a result, for example, the deadlock detection unit 15 of the site
As shown in the message of the first phase, the appointment information 31 → 12 from the appointment notification section 13 of the own site, 21 from the site →
Since 14 → 31, 41 → 13 and 12 → 11, 21 → 41 from the site, and 24 → 11 → 21 from the site are received, they are combined and the waiting relationship shown in the (b) Phase 2 site in the figure Get the graph.

サイトでは、このグラフ上に11→21→14→31→12→11
なるデッドロックループを検出し、且つこのループ上の
最大の重み関数値はトランザクション識別子‘31'であ
り、それは自サイトのトランザクションであることか
ら、このデッドロックを解消するため、トランザクショ
ン識別子‘31'のトランザクションの実行を中断し、各
サイトに通知する。
On the site, on this graph, 11 → 21 → 14 → 31 → 12 → 11
Is detected, and the maximum weight function value on this loop is the transaction identifier '31'. Since it is the transaction of the own site, the transaction identifier '31' is used to cancel this deadlock. Suspend execution of the transaction and notify each site.

又、待合せ問合せ部14は、待合せ関係グラフ上に、下記
のパスが残ることを検出する。
Further, the waiting inquiry unit 14 detects that the following paths remain on the waiting relation graph.

(イ) 24→11→21→41→13 (ロ) 24→11→21→14 (ハ) 12→11→21→41→13 (ニ) 12→11→21→14 このうち、前記の条件による責任パスは、(イ)、
(ハ)及び(ニ)であるので、それらのパスの待たれ側
の端末にあるトランザクション‘13'及び‘14'を指定す
る問合せのメッセージ(図に、13?、14?として示す)
を、それぞれサイトアドレス関数部12のアドレス関数で
定まる、サイト及びに送る。
(A) 24 → 11 → 21 → 41 → 13 (b) 24 → 11 → 21 → 14 (c) 12 → 11 → 21 → 41 → 13 (d) 12 → 11 → 21 → 14 Of these, the above conditions The responsibility path by (a),
Since it is (c) and (d), the inquiry message that specifies transactions '13' and '14' on the terminal on the waiting side of those paths (shown as 13 ?, 14? In the figure)
Are sent to the site and, which are determined by the address function of the site address function unit 12, respectively.

他の各サイトも同様に、問合せの必要なパスを検出し
て、問合せメッセージを送る。例えば、サイトは、図
に示すように宛先をサイトとして、メッセージ11?を
送信するので、サイトのデッドロック検出部15は、こ
の問合せメッセージに対して、サイト宛てに、図示の
ようにトランザクション‘11'に始まる待合せパスの情
報を応答する。
Similarly, each of the other sites detects a path that needs an inquiry and sends an inquiry message. For example, since the site sends the message 11? With the destination as the site as shown in the figure, the deadlock detection unit 15 of the site responds to this inquiry message with the transaction '11 as shown in the figure. The information of the waiting path starting with 'is returned.

各サイトは、他のサイトに送った問合せに対する応答
を、各サイトから受信すると、それらの応答情報で第2
フェーズの待合せ関係グラフを補充して、第4図(c)
に示す第3フェーズの待合せ関係グラフを得る。
When each site receives a response to the inquiry sent to the other site from each site, the second information is used as the response information.
Fig. 4 (c), supplementing the waiting relationship graph of the phase
The waiting relation graph of the third phase shown in FIG.

サイトの場合、サイトからの応答は、新しい情報を
追加しないが、サイトからの応答により、トランザク
ション‘13'が、更にトランザクション‘32'を待ち、待
合せ関係32→23→34→33を経て、トランザクション‘1
2'に至るパスが追加されることにより、図示のようにデ
ッドロックループがあることを検出できる。
In the case of the site, the response from the site does not add new information, but the response from the site causes the transaction '13' to wait for the transaction '32', and goes through the waiting relationship 32 → 23 → 34 → 33, '1
By adding the path to 2 ', it is possible to detect that there is a deadlock loop as shown.

そこで、サイトが、例えばトランザクション識別子
‘41'のトランザクションの実行を中断させることによ
り、このデッドロックを解消することができる。
Therefore, the site can cancel this deadlock by interrupting the execution of the transaction with the transaction identifier '41', for example.

〔発明の効果〕〔The invention's effect〕

以上の説明から明らかなように、本発明によれば、複数
のサイトからなる計算機ネットワークのトランザクショ
ンに発生する、サイト間にまたがるグローバルデッドロ
ックの検出を、効率よく行うことができるので、計算機
ネットワークの性能を向上するという著しい工業的効果
がある。
As is clear from the above description, according to the present invention, it is possible to efficiently detect a global deadlock that occurs in transactions of a computer network composed of a plurality of sites and that spans the sites. There is a significant industrial effect of improving performance.

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

第1図は本発明の実施例構成ブロック図、 第2図はデッドロックループの一例を示す図、 第3図は待合せ関係の一例を示す図、 第4図はグローバルデッドロック検出処理説明図、 第5図は計算機ネットワークの構成ブロック図、 第6図はデッドロック発生状態の説明図 である。 図において、 1〜4はサイト、5は通信回線、 6は端末装置、10は通信制御部、 11はサブトランザクション、 12はサイトアドレス関数部、 13は待合せ通知部、14は待合せ問合せ部、 15はデッドロック検出部、 16はロック管理機構 を示す。 FIG. 1 is a block diagram of a configuration of an embodiment of the present invention, FIG. 2 is a diagram showing an example of a deadlock loop, FIG. 3 is a diagram showing an example of a waiting relationship, and FIG. 4 is an explanatory diagram of global deadlock detection processing. FIG. 5 is a configuration block diagram of the computer network, and FIG. 6 is an explanatory diagram of a deadlock occurrence state. In the figure, 1 to 4 are sites, 5 is a communication line, 6 is a terminal device, 10 is a communication control unit, 11 is a sub-transaction, 12 is a site address function unit, 13 is a waiting notification unit, 14 is a waiting inquiry unit, 15 Indicates a deadlock detector, and 16 indicates a lock management mechanism.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 武理一郎他、「最適負荷配分が可能な分 散型グローバルデッドロック検出方式」、 情報処理学会第31回全国大会2B−2 (1985) ─────────────────────────────────────────────────── ─── Continuation of the front page (56) References: Riichiro Take et al., “Distributed Global Deadlock Detection Method with Optimal Load Distribution”, IPSJ 31st National Convention 2B-2 (1985)

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】互いに通信する手段(10)を有し、それぞ
れ個別の計算機システムからなる複数のサイトからな
り、トランザクションを構成する複数のサブトランザク
ション(11)が、それぞれ複数の該サイトで並列に実行
される計算機ネットワークにおいて、 該各サブトランザクション(11)は、該サブトランザク
ションによって構成されるトランザクションのトランザ
クション識別子を有し、 該各サイトは、該サイトで実行するサブトランザクショ
ン間に、共有資源の排他的使用のための待合せが生じた
場合には、該サブトランザクションのトランザクション
識別子のみの関数(12)として一意に定まるサイトへ、
該待合せに関する情報を通知する手段(13)、及び、 あるサブトランザクションから待合せ関係を待ち側に辿
って到達し得る部分を始点側と呼び、同じく待たれ側に
辿って到達し得る部分を終点側と呼ぶとき、受信した該
待合せに関する情報に基づき、始点側および終点側に他
サイトのサブトランザクションが存在し、該始点側と該
終点側の中間に自サイトのサブトランザクションが存在
し、かつ該自サイトのサブトランザクションの関数値が
最大である待合せ情報を検出し、該検出した待合せ情報
の該終点側のサブトランザクションについて、前記関数
(12)によって定まるサイトに問い合わせる手段(14)
を有することを特徴とするグローバルデッドロック検出
方式。
1. A plurality of sub-transactions (11) each having a means (10) for communicating with each other and comprising a plurality of sites each comprising an individual computer system and constituting a transaction are parallel to each other at the plurality of sites. In the computer network to be executed, each of the sub-transactions (11) has a transaction identifier of a transaction constituted by the sub-transaction, and each of the sites has exclusive control of shared resources between the sub-transactions executed by the site. When a waiting for a specific use occurs, go to the site uniquely defined as a function (12) of only the transaction identifier of the sub-transaction,
A means (13) for notifying information about the queuing, and a part which can reach the waiting side from a certain sub-transaction is called a start point side, and a part which can also reach the waiting side is reached by the end point side. , The sub-transactions of the other site exist on the start point side and the end point side, the sub-transaction of the own site exists between the start point side and the end point side, and Means (14) for detecting queuing information having the maximum function value of the subtransaction of the site, and inquiring of the site determined by the function (12) for the subtransaction on the end point side of the detected queuing information
A global deadlock detection method characterized by having.
【請求項2】トランザクション識別子には、該トランザ
クションを発生したサイトのサイトアドレスを含み、ト
ランザクション識別子の前記関数は、該トランザクショ
ン識別子に含まれるサイトアドレスを値とすることを特
徴とする、特許請求の範囲第1項記載のグローバルデッ
ドロック検出方式。
2. A transaction identifier includes a site address of a site that has generated the transaction, and the function of the transaction identifier takes a value of the site address included in the transaction identifier. The global deadlock detection method described in the first item of the range.
JP60092482A 1985-04-30 1985-04-30 Global detection system Expired - Lifetime JPH0690703B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60092482A JPH0690703B2 (en) 1985-04-30 1985-04-30 Global detection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60092482A JPH0690703B2 (en) 1985-04-30 1985-04-30 Global detection system

Publications (2)

Publication Number Publication Date
JPS61250767A JPS61250767A (en) 1986-11-07
JPH0690703B2 true JPH0690703B2 (en) 1994-11-14

Family

ID=14055525

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60092482A Expired - Lifetime JPH0690703B2 (en) 1985-04-30 1985-04-30 Global detection system

Country Status (1)

Country Link
JP (1) JPH0690703B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7892586B2 (en) 2001-02-22 2011-02-22 Suzanne Jaffe Stillman Water containing soluble fiber
US8178150B2 (en) 2000-02-22 2012-05-15 Suzanne Jaffe Stillman Water containing soluble fiber

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01223558A (en) * 1988-03-02 1989-09-06 Hitachi Ltd Global dead lock detecting system
JP2015194886A (en) * 2014-03-31 2015-11-05 富士通株式会社 Decentralized data processing device, decentralized data processing method, and decentralized data processing program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
武理一郎他、「最適負荷配分が可能な分散型グローバルデッドロック検出方式」、情報処理学会第31回全国大会2B−2(1985)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8178150B2 (en) 2000-02-22 2012-05-15 Suzanne Jaffe Stillman Water containing soluble fiber
US8257762B2 (en) 2000-02-22 2012-09-04 Suzanne Jaffe Stillman Water containing soluble fiber
US7892586B2 (en) 2001-02-22 2011-02-22 Suzanne Jaffe Stillman Water containing soluble fiber

Also Published As

Publication number Publication date
JPS61250767A (en) 1986-11-07

Similar Documents

Publication Publication Date Title
JP3910539B2 (en) Resource actions in clustered computer systems incorporating preparatory processing
EP0618532B1 (en) Deadlock detecting device
US5561809A (en) In a multiprocessing system having a coupling facility, communicating messages between the processors and the coupling facility in either a synchronous operation or an asynchronous operation
EP0427250B1 (en) Method and apparatus for exploiting communications bandwidth as for providing shared memory
EP0563624B1 (en) Method and apparatus for performing conditional operations on externally shared data
EP0251584A2 (en) A synchronization service for a distributed operating system or the like
CN100359508C (en) Merge protocol for schooling computer system
JPH0226254B2 (en)
CA2241899A1 (en) A method and system for reliable remote object reference management
US7246255B1 (en) Method for shortening the resynchronization time following failure in a computer system utilizing separate servers for redundancy
US7181642B1 (en) Method for distributing the processing among multiple synchronization paths in a computer system utilizing separate servers for redundancy
JPH0690703B2 (en) Global detection system
Badal et al. A Proposal for Distributed Concurrency Control for Partially Redundant Distributed Data Base Systems.
JPH02118747A (en) Message transmission network, bus network and broadcasting of message to multiple processor
JP2000047890A (en) Distributed object managing system, its object selecting method and storage medium recording its processing program
Mahmoud et al. Software controlled access to distributed data bases
US7149923B1 (en) Software control using the controller as a component to achieve resiliency in a computer system utilizing separate servers for redundancy
EP3629171A1 (en) Lock manager for multi-core architectures
Marovac On interprocess interaction in distributed architectures
JPS62232064A (en) Deadlock prevention system for distributed data base system
Sharieh et al. A dynamic resource synchronizer mutual exclusion algorithm for wired/wireless distributed systems
JP2002149619A (en) Method for managing message queue
Place An algorithm based on queue migration for mutual exclusion in computer networks
JP2907924B2 (en) Computer system
Makki et al. Efficient detection and resolution of deadlocks in distributed databases