JPH02247770A - Dead lock detection processing system - Google Patents

Dead lock detection processing system

Info

Publication number
JPH02247770A
JPH02247770A JP1068814A JP6881489A JPH02247770A JP H02247770 A JPH02247770 A JP H02247770A JP 1068814 A JP1068814 A JP 1068814A JP 6881489 A JP6881489 A JP 6881489A JP H02247770 A JPH02247770 A JP H02247770A
Authority
JP
Japan
Prior art keywords
information
wfg
local
processor module
deadlock
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.)
Granted
Application number
JP1068814A
Other languages
Japanese (ja)
Other versions
JP2825839B2 (en
Inventor
Kazuhiko Saito
一彦 斉藤
Katsumi Hayashi
克己 林
Masaaki Mitani
三谷 政昭
Tomohiro Hayashi
林 知博
Yutaka Sekine
裕 関根
Yoshinori Shimogai
下雅意 義徳
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 JP1068814A priority Critical patent/JP2825839B2/en
Priority to CA002011807A priority patent/CA2011807C/en
Priority to AU52001/90A priority patent/AU614225B2/en
Priority to US07/495,982 priority patent/US5649184A/en
Priority to ES90302972T priority patent/ES2116267T3/en
Priority to KR1019900003741A priority patent/KR930000853B1/en
Priority to DE69032337T priority patent/DE69032337T2/en
Priority to EP90302972A priority patent/EP0389242B1/en
Publication of JPH02247770A publication Critical patent/JPH02247770A/en
Application granted granted Critical
Publication of JP2825839B2 publication Critical patent/JP2825839B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To reduce processing cost for dead lock detection and to improve the processing performance of the whole system by separating a local wait for graph (WFG) information from a global WFG information and controlling respective information. CONSTITUTION:When all relating WFGs are included in a local memory 16 as local WFG information 17, a processor module having the local memory 16 refers only the local WFG information 17 and dead lock detection processing can be attained independently of other WFG information. When the relating WFGs are included in both the local WFG information 17 and global WFG information 14, a graph loop by the information 17 is checked at first and then a common memory 10 is accessed if necessary and the information 14 is referred to execute the dead lock detection processing. Consequently, local dead lock detection and the whole dead lock detection can be balanced and efficiently processed.

Description

【発明の詳細な説明】 〔概要〕 共用メモリをバス結合したマルチブロセッサアーキテク
チアでのデータベース処理におけるデッドロック検出処
理方式に関し。
DETAILED DESCRIPTION OF THE INVENTION [Summary] This invention relates to a deadlock detection processing method in database processing in a multiprocessor architecture in which shared memories are bus-coupled.

デッドロック検出のための処理コストを削減し。Reduce processing costs for deadlock detection.

システム全体の処理性能を向上させることを目的とし。The purpose is to improve the processing performance of the entire system.

1つのプロセッサモジュール内で動作するトランザクシ
ョン間の待ち関係を示す有向グラフ情報を、そのプロセ
ッサモジュール内のローカルメモリ上に置き、複数のプ
ロセッサモジュールに関係するトランザクション間の待
ち関係を示す有向グラフ情報を、共用メモリ上に置いて
、ローカルなデッドロック検出と、グローバルなデッド
ロック検出とを分離し、ローカルメモリおよび共用メモ
リ上の上記有向グラフ情報を参照して、待ち関係を追跡
することにより、デッドロックを検出するように構成す
る。
Directed graph information indicating wait relationships between transactions operating within one processor module is placed in the local memory within that processor module, and directed graph information indicating wait relationships between transactions related to multiple processor modules is placed in a shared memory. Based on the above, deadlocks are detected by separating local deadlock detection and global deadlock detection, and tracking wait relationships by referring to the above directed graph information on local memory and shared memory. Configure it as follows.

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

本発明は、共用メモリをバス結合したマルチブロセッサ
アーキテクチアでのデータベース処理におけるデッドロ
ック検出処理方式に関する。
The present invention relates to a deadlock detection processing method in database processing in a multiprocessor architecture in which shared memories are bus-coupled.

マルチプロセッサシステムは、密結合マルチプロセッサ
システムと、疎結合マルチプロセッサシステムとに大別
されるが、さらにこれらを複合させたものや、密結合と
疎結合との中間的なものなど、多種多様のシステム構成
が、実用化されてきている。
Multiprocessor systems are broadly classified into tightly coupled multiprocessor systems and loosely coupled multiprocessor systems, but there are also a wide variety of systems, including those that combine these systems and systems that are intermediate between tightly coupled and loosely coupled systems. The system configuration is being put into practical use.

一方、データベース管理システムを、1つのプロセッサ
上で実現するには、レスポンスにある程度の限界が生じ
るので、マルチプロセッサで処理することが考えられて
いるが、データベースの資源の管理が複雑化し、特にア
クセス競合の防止のための排他制御等に関する処理時間
が長くなる傾向にあるので、その効率的な処理が望まれ
ている。
On the other hand, implementing a database management system on a single processor would impose some limits on response, so processing on multiple processors has been considered, but this would complicate the management of database resources, especially access Since processing time related to exclusive control and the like to prevent conflicts tends to become longer, efficient processing is desired.

〔従来の技術〕[Conventional technology]

第6図は従来の一般的なロックによる排他制御における
デッドロックを説明するための図、第7図は従来の待ち
関係を示す有向グラフ情報によるデッドロック検出方式
の説明図である。
FIG. 6 is a diagram for explaining deadlock in conventional general exclusive control using locks, and FIG. 7 is a diagram for explaining a conventional deadlock detection method using directed graph information indicating wait relationships.

データベースの資源(リソース)は2通常、グラニユー
ルと呼ばれる単位、すなわち、データベース中のあるデ
ータ集合の単位で、アクセスが管理される。この単位は
2例えばファイルレベルのこともあり、レコードレベル
のこともある。
Access to database resources is usually managed in units called granules, that is, units of data sets in the database. This unit may be 2, for example, file level or record level.

この資源に対するアクセスでは、アクセス競合によるデ
ータ矛盾の発生を防止し、データのインテグリテイを保
証するために排他制御が必要になる。排他制御を実現す
るために、一般にロックが使用される。
Access to this resource requires exclusive control in order to prevent data inconsistency due to access conflicts and guarantee data integrity. Locks are commonly used to achieve exclusive control.

ロックwtmでは、ある資源の名前とその資源に対する
ロックのモード(共用モード/排他モードなど)を指定
することにより、同一の資源を特徴とする請求元に対し
て、該当資源に対する参照・更新処理の順序を規定する
。これにより、その資源のインテグリテイを保証する。
With lock wtm, by specifying the name of a certain resource and the lock mode (shared mode/exclusive mode, etc.) for that resource, requesters that are characterized by the same resource can request access and update processing for that resource. Specify the order. This ensures the integrity of the resource.

第6図(イ)は、資源R1に対して、トランザクション
T1が、共用モードSでロックを最初に行っている状態
で、トランザクションT2が、排他モードXによるロッ
クを要求した状態を示している。T2のロックは、TI
がロックを解除するまで待たされることになる。
FIG. 6A shows a state in which transaction T1 initially locks resource R1 in shared mode S, and transaction T2 requests a lock in exclusive mode X. T2 lock is TI
You will have to wait until the lock is released.

ロックによる排他制御を行う場合に、一般的に問題にな
るのが、デッドロックの発生である。デッドロックとは
、任意の資源のロックを依願する依頼者間で、ロックの
待ちによる「す(み」が発生している状態をいう。
A common problem when performing exclusive control using locks is the occurrence of deadlock. A deadlock is a situation in which requests to lock arbitrary resources are at a standstill due to waiting for a lock.

例えば第6図(ロ)に示すように、トランザクションT
1が、資源R1に対してロックを行い。
For example, as shown in Figure 6 (b), transaction T
1 locks resource R1.

資源R2に対する待ちの状態にあるときに、他のトラン
ザクションT2が、資源R2にロック、資源R1に対し
て他のロックの解除待ちの状態にあるとする。そうする
と、第6図(ハ)に示すように、TIがT2を待ち、T
2がT1を待つ状態になる。したがって、どちらの処理
も終了しないことになり、デッドロックが発生する。
Assume that while the transaction T2 is in a waiting state for the resource R2, another transaction T2 has locked the resource R2 and is waiting for the release of another lock for the resource R1. Then, as shown in FIG. 6(c), TI waits for T2 and T
2 is in a state of waiting for T1. Therefore, neither process ends, resulting in a deadlock.

これを防止するため、最初からデッドロックを発生させ
ないように制御することもできるが2通常のロック要求
に対する処理性能が劣化するため。
To prevent this, it is possible to control the deadlock so that it does not occur from the beginning, but the processing performance for normal lock requests deteriorates.

一般的に適当な契機でデッドロックの検出を行うことに
より、デッドロックの状態が発生していれば、それを解
消するような手段を講じる。
In general, by detecting deadlock at an appropriate opportunity, if a deadlock has occurred, measures are taken to resolve it.

デッドロックの検出では、主に、ある資源のロックを媒
介として、ロック依願者間の待ち関係を。
In deadlock detection, we mainly detect the waiting relationship between lock applicants using a lock on a resource as an intermediary.

有向グラフとして表現し、そのグラフのループを検出す
ることにより、デッドロックを検出する方式が用いられ
ている。この有向グラフを、WFG(Wait For
 Graph)という。
A method is used to detect deadlock by expressing it as a directed graph and detecting loops in the graph. This directed graph is defined as WFG (Wait For
Graph).

第7図は、そのWFGの例を示しており、すべての待ち
関係を矢印に従って追跡してみると、この例では、Tl
→T2→T6→T7→T5→T1というループが存在す
ることがわかる。したがって、デッドロックが発生して
いることがわかる。
FIG. 7 shows an example of the WFG, and if you trace all the wait relationships according to the arrows, in this example, Tl
It can be seen that there is a loop of →T2→T6→T7→T5→T1. Therefore, it can be seen that a deadlock has occurred.

デッドロックの解除は、このループを断ち切るように、
どれかの要求をエラーとして終了させればよい。
To break the deadlock, break this loop.
All you have to do is terminate one of the requests as an error.

以上が、−船釣なデッドロック検出の原理であるが、従
来、マルチプロセッサシステムにおいて。
The above is the basic principle of deadlock detection, which is conventionally used in multiprocessor systems.

WFGを利用してデッドロックを検出する場合。When detecting deadlock using WFG.

次のような方式があった。There was a method as follows.

(al  マルチプロセッサシステムの中で、デッドロ
ックの検出を行う特定のプロセッサモジュールを決め、
そのプロセッサモジュールが、システム全体の集中した
デッドロック検出処理を行う、WFGは、そのデッドロ
ックを検出するプロセンサが持つ。
(al) In a multiprocessor system, determine a specific processor module that performs deadlock detection,
The WFG, whose processor module performs intensive deadlock detection processing for the entire system, has a processor module that detects the deadlock.

(bl  すべでのWFGを、共用メモリ上において。(bl All WFGs on shared memory.

各プロセッサモジュールが、それぞれシンメトリックに
デッドロックの検出処理を行う。
Each processor module performs deadlock detection processing symmetrically.

(C1各プロセッサモジエールが、ローカルメ−1−’
Jを使用して独立にデッドロック検出を行う、各プロセ
ッサモジュールは、自システム内のローカルなWFGと
、システム間のWFGとを持ち、他のプロセッサモジュ
ールのローカルwFcが必Wになった場合には、メツセ
ージ通信により、その情報をもらい、全体のデッドロッ
ク検出を行う。
(C1 each processor module is local mail-1-'
Each processor module has a local WFG within its own system and a WFG between systems, and when the local wFc of another processor module becomes mandatory, receives this information through message communication and performs overall deadlock detection.

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

以上のように、従来方式では、WFGを完全に共用メモ
リで管理するか、各ローカルメモリで管理するようにさ
れ1次のような問題があった。
As described above, in the conventional system, the WFG is managed either completely in the shared memory or managed in each local memory, which causes the following problems.

上記fa+の特定のプロセッサモジュールが集中管理す
る方式では。特定のプロセッサモジエールに負荷がかか
り、また、全体のWFGを維持するためのコストが大き
くなるという問題がある。さらに、その特定のプロセッ
サモジュールが障害などによりクラッシュした場合に、
影響が全体に及び。
In the method in which a specific processor module of the fa+ is centrally managed. There are problems in that a load is placed on a specific processor module and the cost for maintaining the entire WFG increases. Furthermore, if that particular processor module crashes due to a failure etc.
The impact is felt throughout.

その対処が必要になるという問題がある。There is a problem that needs to be addressed.

上記山)のWFGを完全に共用メモリ上で管理する方式
では、あるプロセッサモジュール内でローカルに処理で
きる場合であっち、かならず共用メモリへのアクセスが
必要になるので、処理が遅くなるという問題がある。
In the above method of managing WFG completely on shared memory, even if it can be processed locally within a certain processor module, access to shared memory is always required, which slows down the processing. .

上記(C1のWFGを各プロセッサモジュールがすべて
ローカルメモリで管理する方式では、メツセージ通信の
オーバヘッドが増大し、デッドロック検出のコストが大
きく、検出に時間がかかるという問題がある。
The method described above (in which each processor module manages all the WFGs of C1 in its local memory) has problems in that the overhead of message communication increases, the cost of deadlock detection is large, and the detection takes time.

本発明は上記問題点の解決を図り、デッドロック検出の
ための処理コストを削減し、システム全体の処理性能を
向上させることを目的としている。
The present invention aims to solve the above problems, reduce the processing cost for deadlock detection, and improve the processing performance of the entire system.

〔!!lBを解決するための手段〕[! ! Means to solve IB]

第1図は本発明の原理説明図である。 FIG. 1 is a diagram explaining the principle of the present invention.

第1図において、10は共用メモリ、11はプロセッサ
モジュール(PM)、12は各プロセッサモジュール1
1と共用メモリ10とを接続する高速バス、13はデー
タベースに対するアクセスを行う処理単位であるトラン
ザクションを管理するためのトランザクション管理情報
、14は複数のプロセッサモジュール11間のトランザ
クションの待ち関係を示すグローバルWFG情報、15
はデッドロックの検出処理を行うデッドロック検出処理
部、16は各プロセッサモジュール11が持つローカル
メモリ、17は各プロセッサモジュール11内で動作し
ているトランザクシラン間の待ち関係を示すローカルW
FG情報を表す。
In FIG. 1, 10 is a shared memory, 11 is a processor module (PM), and 12 is each processor module 1.
1 and the shared memory 10; 13 is transaction management information for managing transactions that are processing units for accessing the database; 14 is a global WFG that indicates transaction waiting relationships among a plurality of processor modules 11; information, 15
16 is a local memory possessed by each processor module 11; and 17 is a local W indicating the waiting relationship between transaction runs operating within each processor module 11.
Represents FG information.

各プロセッサモジュール11は、それぞれローカルメモ
リ16を持つ。また、各プロセッサモジュール11は、
高速バス12を介して、共用メモリ10にバス結合され
ている。なお、2つのバスを1つで構成してもよい。
Each processor module 11 has a local memory 16, respectively. Furthermore, each processor module 11 is
It is bus coupled to shared memory 10 via high speed bus 12 . Note that the two buses may be configured as one.

本発明では、デッドロックの検出を、データベースの資
源に対するロック依較者〈トランザクション)間の待ち
関係を表す有向グラフ(WFG:Wait For G
raph)を用いて、そのグラフのループを検出するこ
とにより行う。
In the present invention, deadlock detection is performed using a directed graph (WFG) representing a wait relationship between lock requesters (transactions) for database resources.
This is done by detecting loops in the graph using

そして、各プロセッサモジュール11のローカルメモリ
16には、その各プロセッサモジュール11内で動作し
ているトランザクシラン間の待ち関係を示す有向グラフ
情報であるローカルWFG情報17を設定し管理する。
Then, in the local memory 16 of each processor module 11, local WFG information 17, which is directed graph information indicating the waiting relationship between the transaxis runs operating within each processor module 11, is set and managed.

一方、各プロセッサモジュール11か+d”Jにアクセ
ス可能な共用メモリ10には、異なるプロセッサモジュ
ール11でそれぞれ動作するトランザクシラン間の待ち
関係を示す有向グラフ情報であるグローバルWFG情報
14を設定し管理する。
On the other hand, in the shared memory 10 that can be accessed by each processor module 11 or +d''J, global WFG information 14, which is directed graph information indicating the wait relationship between transaxis runs operating in different processor modules 11, is set and managed.

以上のように、ローカルWFG情報17とグローバルW
FG情報14とを配置することにより。
As mentioned above, local WFG information 17 and global WFG information 17
By arranging the FG information 14.

各プロセッサモジュール11が、他のプロセッサモジュ
ール11に関係なく処理できるローカルなデッドロック
検出と、他のプロセッサモジュール11で動作するトラ
ンザクシランに関係するグローバルなデッドロック検出
とを分離する。
Local deadlock detection, which each processor module 11 can process independently of other processor modules 11, is separated from global deadlock detection, which is related to transaction runs operating on other processor modules 11.

デッドロック検出処理部15は、ローカルメモリ16お
よび共用メモリ1(l上の上記有向グラフ情報に従って
待ち関係を追跡し、ループを検出した場合には、デッド
ロックの発生を!!識し、デッドロック解消のための処
理を起動する。
The deadlock detection processing unit 15 tracks the wait relationship according to the above-mentioned directed graph information on the local memory 16 and the shared memory 1 (l), and when a loop is detected, recognizes that a deadlock has occurred and resolves the deadlock. Start processing for.

〔作用〕[Effect]

WFGを用いてデッドロックを検出する方式を。 A method for detecting deadlock using WFG.

マルチプロセッサシステムに適用する場合5従来方式で
は9例えばすべてのWFG情報を共用メモリ10に置く
か、またはデッドロック検出を行う専用のプロセッサモ
ジュール11を決めておき。
When applied to a multiprocessor system, in the conventional method, for example, all WFG information is stored in the shared memory 10, or a processor module 11 dedicated to deadlock detection is determined.

そのローカルメモリ16にまとめて記憶するようにして
いた。
The information is stored in the local memory 16 all at once.

本発明では、第1図(イ)、(ロ)に示すように、ロー
カルWFG情報17とグローバルWFG情報14とを分
離して管理する。特に、第1図(ロ)は、グローバルW
Fl11114とローカルWFG情報17の具体例を示
しており、その関係は次のようになっている。
In the present invention, as shown in FIGS. 1(a) and 1(b), local WFG information 17 and global WFG information 14 are managed separately. In particular, Figure 1 (b) shows the global W
A specific example of Fl 11114 and local WFG information 17 is shown, and their relationship is as follows.

同じプロセッサモジュール内で動作するトランザクシラ
ン間の待ち関係を持つトランザクションは、各プロセッ
サモジュールごとに9次のように個別に管理される。
Transactions that have a waiting relationship between transactions running within the same processor module are individually managed for each processor module as follows.

(4) トランザクシランTI、T2.T3.T4(b
)トランザクシランT8.T9.Tl0(C)トランザ
クションT14.T15.T16゜一方、異なるプロセ
ッサモジュール間のトランザクシランの待ち間係を持つ
トランザクシまンは。
(4) Transaxilan TI, T2. T3. T4(b
) Transaxilan T8. T9. Tl0(C) Transaction T14. T15. T16゜On the other hand, a transaction manager with a transaction waiter between different processor modules.

第1図(ロ)では以下のものである。Figure 1 (b) shows the following.

(d)トランザクシランT5.T6.T7.Tl 1゜
T12.T13゜ このように、各プロセンサモジュール内のWFGは ロ
ーカルメモリ16に配置し、各プロセッサモジエール間
のWFGは、共用メモリ10上に配置することにより2
次のように従来方式の欠点が解決される。
(d) Transaxilan T5. T6. T7. Tl 1°T12. T13゜In this way, the WFG in each processor module is placed in the local memory 16, and the WFG between each processor module is placed in the shared memory 10.
The drawbacks of the conventional method are solved as follows.

(i)ローカルに閉じるデッドロックの検出処理は、そ
のプロセッサモジュール11だけで行うことができる0
例えば、トランザクションTI、T2、T3がデッドロ
ックの関係にあるかないかは。
(i) The locally closing deadlock detection process can be performed only by the processor module 11.
For example, whether or not transactions TI, T2, and T3 are in a deadlock relationship.

そのトランザクションを処理するプロセッサモジュール
11のローカルメモリ16を参照することだけで検出す
ることが可能である。
This can be detected simply by referring to the local memory 16 of the processor module 11 that processes the transaction.

(it)システム間に関連するデッドロック検出は。(it) Deadlock detection related between systems.

共用メモリ10の情報を参照することにより、完全に各
プロセッサモジュールが独立に行う方式と。
A method in which each processor module performs operations completely independently by referring to information in the shared memory 10.

各プロセッサモジュールが連携して共用情報を参照する
ことにより、検出する方式が選択可能となり、システム
に応じて効率的な方式を選択することができる。
By cooperating with each processor module and referring to the shared information, a detection method can be selected, and an efficient method can be selected depending on the system.

(iii )プロセッサモジュール間にまたがるグロー
バルなデッドロック検出について、検出する頻度の調整
を容易化することができる0例えば、システムの負荷を
考慮して、デッドロックの検出を省略し、規定処理時間
を超過したトランザクションを処理打ち切りにするよう
なことも可能であり。
(iii) Regarding global deadlock detection across processor modules, it is possible to easily adjust the detection frequency. For example, in consideration of the system load, deadlock detection can be omitted and the specified processing time can be It is also possible to cancel processing of transactions that exceed the limit.

その影響範囲を少なくすることもできる。It is also possible to reduce the range of influence.

〔実施例〕〔Example〕

第2図は本発明の一実施例によるシステム構成例、第3
図は本発明の一実施例に関係する管理情報説明図、第4
図は本発明の一実施例に係るデッドロック検出形態の例
、第5図は本発明の一実施例で用いるWFGIIJ41
表の例を示す。
Figure 2 is an example of a system configuration according to an embodiment of the present invention;
The figure is an explanatory diagram of management information related to one embodiment of the present invention.
The figure shows an example of a deadlock detection mode according to an embodiment of the present invention, and FIG. 5 shows a WFGIIJ41 used in an embodiment of the present invention.
An example of a table is shown.

本発明は1例えば第2′図に示すようなマルチプロセフ
サシステム上で実施される。第2図において、SSUは
共用メモリ装置、SCAはI10インタフェースアダプ
タ、DKはディスク記憶装置。
The present invention may be implemented on a multiprocessor system, such as that shown in FIG. 2'. In FIG. 2, SSU is a shared memory device, SCA is an I10 interface adapter, and DK is a disk storage device.

DLPはデータリンクプロセッサ、DRCは回線制御を
行うドライバ・レシーバ・カードを表す。
DLP represents a data link processor, and DRC represents a driver/receiver card that performs line control.

各プロセッサモジュール11は、1台または複数台のC
PUとローカルメモリ16とを持っている。ローカルメ
モリ16に対しては、キャッシュメモリのような高速ア
クセスが可能である。また。
Each processor module 11 has one or more C
It has a PU and local memory 16. The local memory 16 can be accessed at high speed like a cache memory. Also.

各プロセッサモジュール11は、バスコントローラ(図
示省略)による制御のもとに、高速バス12を介して、
共用メモリ装置SSUに対するアクセスを行うことがで
きるようになっている。
Each processor module 11 is connected via a high-speed bus 12 under the control of a bus controller (not shown).
Access to the shared memory unit SSU is now possible.

バスオペレージ四ンの高速化と障害対策のため。To speed up bus operations and prevent failures.

高速バス12やI10バス20などは、多重化されてい
る。もちろん、−重でもよい。
The high-speed bus 12, I10 bus 20, etc. are multiplexed. Of course, it may be -heavy.

各プロセッサモジュール11は、全く対称的に構成され
るため、1つのプロセッサモジュール11の処理を、他
のプロセッサモジュール11が代わりに行うことができ
る。したがって、プロセッサモジュール11の障害時に
は、その障害装置をシステムから切り離して、残りのプ
ロセッサモジュール11により、サービスを続行するこ
とができるようになっている。
Since each processor module 11 is configured completely symmetrically, the processing of one processor module 11 can be performed by another processor module 11 instead. Therefore, when a processor module 11 fails, the failed device can be disconnected from the system and services can be continued using the remaining processor modules 11.

データベースの実体は、光ディスクや磁気ディスクなど
のディスク記憶装置DKに格納され、どのプロセッサモ
ジュール11からも、I10バス20およびアダプタS
CAを介してアクセスできるようになっている。2つの
バスを1つで構成してもよい。
The entity of the database is stored in a disk storage device DK such as an optical disk or a magnetic disk, and can be accessed from any processor module 11 via the I10 bus 20 and adapter S.
It can be accessed via CA. Two buses may be configured into one.

このようなシステムに類似したシステムとして。As a system similar to this one.

日経BP社発行の「日経エレクトロニクスNa461゜
1988年11月28日号J、PIIO〜P115に示
されているような各種のシステムが知られているが、こ
れらに限らず、共用メモリをバス結合した種々のマルチ
プロセッサアーキテクチャ上で0本発明を実現すること
が可能である。
Various systems are known, such as those shown in "Nikkei Electronics Na461゜November 28, 1988 Issue J, PIIO to P115," published by Nikkei BP, but are not limited to these. It is possible to implement the invention on a variety of multiprocessor architectures.

データベースの資源に対するロックに関連する資源管理
情報は2例えば第3図(イ)のようになっている。
Resource management information related to locking of database resources is as shown in FIG. 3(a), for example.

第3図(イ)において、(a)は、ロックの対象となる
資gR1,R2,・・・の管理情報である。
In FIG. 3(a), (a) is the management information of the assets to be locked, R1, R2, . . . .

(b)、 fc)は、資源を要求しているロック依願者
の要求受は付けのための待ち管理情報であって、特に、
山)は、対応する資源のロックを保持しているトランザ
クション、(C)は、資源のロックを行うために前のト
ランザクションが解放するのを待っているトランザクシ
ョンを示している。
(b) and fc) are waiting management information for receiving requests from lock applicants requesting resources, and in particular,
The (mountain) indicates a transaction that holds a lock on the corresponding resource, and (C) indicates a transaction that is waiting for the previous transaction to release the lock on the resource.

この例では、資源R1のロックをトランザクションTI
が保持しており、そのトランザクションT1が資源R1
のロックを解放するのを、トランザクションT2が待っ
ている。さらに、トランザクションT2を、トランザク
ションT4が待っている。他の資源に対する待ち関係も
同様である。
In this example, transaction TI locks resource R1.
holds the resource R1, and its transaction T1
Transaction T2 is waiting for the lock to be released. Furthermore, transaction T4 is waiting for transaction T2. The same holds true for waiting relationships with other resources.

この待ち関係を、有向グラフで表したのが、第3図(ロ
)である、なお、計算機内では、このWFG情報を、テ
ーブルとそのリンク情報で表現することになる。
This waiting relationship is expressed in a directed graph as shown in FIG. 3 (b).In the computer, this WFG information is expressed as a table and its link information.

本発明によるデッドロックの検出形態は9例えば第4図
に示すようになる。
The deadlock detection mode according to the present invention is as shown in FIG. 4, for example.

第4図(イ)に示すように、関連するWFGが。As shown in Figure 4 (a), the related WFG.

すべてローカルWFG情報17として、ローカルメモリ
内にある場合、そのローカルメモリを持つプロセッサモ
ジュールが、ローカルWFG情報17だけを参照し、他
とは独立にデッドロックの検出処理を行うことができる
If all of the local WFG information 17 is stored in the local memory, the processor module that has the local memory can refer only to the local WFG information 17 and perform deadlock detection processing independently of the others.

第4図(ロ)に示すように、関連するWFGが。As shown in FIG. 4 (b), the related WFG.

ローカルWFG情報17とグローバルWFG情報14と
に存在する場合、ローカルWFG情報17によるグラフ
のループを調べた後、必要に応じて共用メモリ10にア
クセスして、グローバルWFG情報14を参照すること
により、デッドロックの検出処理を行うことができる。
If it exists in the local WFG information 17 and the global WFG information 14, after checking the loop of the graph by the local WFG information 17, access the shared memory 10 as necessary and refer to the global WFG information 14. Deadlock detection processing can be performed.

例えば、第4図(ハ)に示すように、プロセッサモジュ
ール(PMI)のローカルメモリに格納されているロー
カルWFG情報17から、グローバルWFG情報14を
経て、他のプロセッサモジュールPM2のローカルWF
G情報17との間に。
For example, as shown in FIG. 4(c), from the local WFG information 17 stored in the local memory of the processor module (PMI), the local WF of another processor module PM2 is transmitted via the global WFG information 14.
Between G information 17.

待ち関係の接続がある場合、プロセッサモジュールPM
Iだけでは、デッドロックを検出することはできない、
そこで、このような場合には、プロセッサモジュールP
MIは、自分の持つローカルWFG情報17のサブグラ
フを、プロセッサモジュールPM2ヘメッセージ通信で
送り、プロセッサモジュールPM2に、デッドロックの
検出を依願する。プロセッサモジュールPM2は、その
サブグラフと自分の持つローカルWFG情報17とによ
り、デッドロック発生の有無を調べることが可能になる
If there is a wait-related connection, the processor module PM
I alone cannot detect deadlock,
Therefore, in such a case, the processor module P
The MI sends the subgraph of the local WFG information 17 that it owns to the processor module PM2 by message communication, and requests the processor module PM2 to detect a deadlock. The processor module PM2 can check whether a deadlock has occurred using the subgraph and its own local WFG information 17.

待ちとなっている各トランザクションごとに設けられる
WFG制御表は1例えば第5図(イ)に示すように構成
され2次のような領域を持つ、なお、グローバルなWF
GもローカルなWFGも。
The WFG control table provided for each waiting transaction is configured as shown in Figure 5 (a), and has the following areas.
G and local WFG.

共通であり、同じ形式で管理される。common and managed in the same format.

(al  デッドロック検出制御情報域デッドロック解
消のための犠牲者選択情報などが設定される。
(al Deadlock detection control information area Victim selection information for deadlock resolution etc. is set.

(′b)デッドロック検出作業情報域 デッドロック検出中に一時的に使用される作業領域であ
る。
('b) Deadlock detection work information area This is a work area temporarily used during deadlock detection.

(C)トランザクション識別子設定域 待ちとなっているトランザクションの識別子が格納され
る。
(C) Transaction identifier setting area The identifier of the transaction that is waiting is stored.

+d+  システム識別子設定域 トランザクションが動作しているプロセッサモジュール
の識別子またはそのプロセッサモジュールで動作してい
るデータベースを管理するサブシステムの識別子が設定
される。
+d+ System identifier setting area The identifier of the processor module on which the transaction is running or the identifier of the subsystem that manages the database running on that processor module is set.

i81  待ち相手へのポインタ域 待ち関係にあるトランザクションのWFGIIIa1表
へのポインタが格納される。複数の待ち関係がある場合
、このエントリは複数個作成される。
i81 Pointer area to waiting partner A pointer to the WFGIIIa1 table of transactions in a waiting relationship is stored. If there are multiple wait relationships, multiple entries are created.

WFGIII御表30は、第5図(ロ)に示すように、
索引表31からポイントされ、また、各WFG制御表3
0間でリンク関係を持つ、これ以外に。
WFGIII table 30, as shown in Figure 5 (b),
It is pointed from the index table 31, and each WFG control table 3
In addition to this, there is a link relationship between 0.

デッドロック検出の開始のための索引表を、ローカルメ
モリ内に持ち、これを見て、デッドロック検出の開始点
を決める。
An index table for starting deadlock detection is held in local memory, and the starting point for deadlock detection is determined by looking at this table.

デッドロック検出のアルゴリズム、すなわち。Algorithms for deadlock detection, ie.

第1図に示すデッドロック検出処理部15の処理は1例
えば以下のとおりである。
The processing of the deadlock detection processing section 15 shown in FIG. 1 is as follows, for example.

(a)デッドロック検出を開始するローカルシステムが
行う処理。
(a) Processing performed by the local system that starts deadlock detection.

■ 自分のローカルシステム内のWFGを検索し。■ Search for WFG in your local system.

ローカルシステム内でのWFGによる待ち関係のループ
を検出する。
Detects a wait-related loop caused by WFG within the local system.

■ グローバルWFGへ至るトランザクションについて
は、トランザクションの待ち時間が妥当であるかどうか
の判断を行い、長時間待っているトランザクションなら
ば、グローバルWFGに対する待ち関係のループも検出
する。
- For transactions that reach the global WFG, it is determined whether the waiting time of the transaction is appropriate, and if the transaction has been waiting for a long time, a loop related to waiting for the global WFG is also detected.

■ 処理■の結果、他のローカルシステムが扱うローカ
ルWFGへの探索となった場合、そのローカルシステム
に対して、WFGサイクルの検出依鯨を行う、このとき
、それまでに扱ったトランザクションに関連するWFG
のサブグラフを、依願先のローカルシステムへ転送する
■ If the result of processing ■ is a search for a local WFG handled by another local system, a WFG cycle detection request is performed for that local system. WFG
Transfer the subgraph of to the requesting local system.

(b)依1!されたローカルシステムが行う処理。(b) Yi 1! processing performed by the local system.

■ 依願されたトランザクションから探索を開始する。■ Start searching from the requested transaction.

■ ローカルシステム内でデッドロック検出がなく、他
のローカルシステムへの依願もない場合には、ここで処
理を終了する。
■ If there is no deadlock detected within the local system and no requests to other local systems, the process ends here.

■ 探索の結果、再び他のローカルシステムへの待ちト
ランザクションが発見されたならば、同様にWFGのサ
ブグラフを構成して、他のローカルシステムへ転送する
- If a waiting transaction for another local system is found again as a result of the search, a subgraph of WFG is similarly constructed and transferred to the other local system.

(c)デッドロックの判定 上記(b)の処理において、依願されたWFGのサブグ
ラフのトランザクションから、再び同一のトランザクシ
ョンへのサイクルが発見されたとき、デッドロックと判
定する。デッドロック解消のための犠牲となるトランザ
クションは、この判定したシステム内のトランザクショ
ンか、サブグラフを構成するトランザクションの中から
選択する6通常は、処理打ち切りによる被害が最も小さ
いものを、トランザクションの実行制御情報などにより
選択する。このデッドロック解消の処理については、従
来と同様でよいので、説明を省略する。
(c) Determination of deadlock In the process of (b) above, when a cycle from a transaction in the subgraph of the requested WFG to the same transaction is found again, it is determined that a deadlock has occurred. The victim transaction for resolving the deadlock is selected from among the transactions in the determined system or from among the transactions that constitute the subgraph6.Usually, the one that will cause the least damage due to processing abort is selected based on the transaction execution control information. Select based on etc. This deadlock resolution process may be the same as the conventional one, so a description thereof will be omitted.

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

以上説明したように2本発明によれば、マルチプロセッ
サアーキテクチャの特性を活かして、ローカルなデッド
ロック検出と、全体のデッドロック検出とをバランスさ
せて、効率よく検出処理を行うことができるようになる
As explained above, according to the present invention, by taking advantage of the characteristics of the multiprocessor architecture, it is possible to efficiently perform detection processing by balancing local deadlock detection and overall deadlock detection. Become.

デッドロック検出のための負荷が特定のプロセッサモジ
ュールに集中することがなく、また、他のプロセッサモ
ジュールで動作するトランザクシ璽ンとの待ち関係がな
い場合には、ローカルメモリのアクセスだけで、単一プ
ロセッサの場合と同様に、高速に検出処理を行うことが
できる。
If the load for deadlock detection is not concentrated on a specific processor module, and if there is no waiting relationship with transaction codes operating in other processor modules, a single As in the case of a processor, detection processing can be performed at high speed.

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

第1図は本発明の原理説明図。 第2図は本発明の一実施例によるシステム構成例。 第3図は本発明の一実施例に関係する管理情報説明図。 第4図は本発明の一実施例に係るデッドロック検出形態
の例。 第5図は本発明の一実施例で用いるWFG制御表の例。 第6図は従来の一般的なロックによる排他制御における
デッドロックを説明するための図。 第7図は従来の待ち関係を示す有向グラフ情報によるデ
ッドロック検出方式の説明図を示す。 図中、10は共用メモリ、11はプロセッサモジュール
、12は高速バス、13はトランザクシラン管理情報、
14はグローバルWFGI報、15はデッドロック検出
処理部、16はローカルメモリ、17はローカルWFG
情報を表す。
FIG. 1 is a diagram explaining the principle of the present invention. FIG. 2 is an example of a system configuration according to an embodiment of the present invention. FIG. 3 is an explanatory diagram of management information related to an embodiment of the present invention. FIG. 4 is an example of a deadlock detection mode according to an embodiment of the present invention. FIG. 5 is an example of a WFG control table used in an embodiment of the present invention. FIG. 6 is a diagram for explaining deadlock in exclusive control using conventional general locking. FIG. 7 is an explanatory diagram of a conventional deadlock detection method using directed graph information indicating wait relationships. In the figure, 10 is a shared memory, 11 is a processor module, 12 is a high-speed bus, 13 is transaction management information,
14 is global WFGI information, 15 is deadlock detection processing unit, 16 is local memory, 17 is local WFG
Represents information.

Claims (1)

【特許請求の範囲】 それぞれローカルメモリ(16)を持つ複数のプロセッ
サモジュール(11)と、これらの各プロセッサモジュ
ールにバス結合される共用メモリ(10)とを備えたマ
ルチプロセッサシステムによるデータベース処理におけ
るデッドロック検出処理方式において、 各プロセッサモジュールのローカルメモリ上に、その各
プロセッサモジュール内で動作しているトランザクショ
ン間の待ち関係を示す有向グラフ情報(17)を置き、 上記共用メモリ上に、異なるプロセッサモジュールでそ
れぞれ動作するトランザクション間の待ち関係を示す有
向グラフ情報(14)を置いて、ローカルなデッドロッ
ク検出と、グローバルなデッドロック検出とを分離し、 ローカルメモリおよび共用メモリ上の上記有向グラフ情
報に従って待ち関係を追跡することによりデッドロック
を検出するようにしたことを特徴とするデッドロック検
出処理方式。
[Scope of Claims] A method for eliminating dead ends in database processing by a multiprocessor system comprising a plurality of processor modules (11) each having a local memory (16) and a shared memory (10) bus-coupled to each of these processor modules. In the lock detection processing method, directed graph information (17) indicating the wait relationship between transactions operating within each processor module is placed on the local memory of each processor module, and directed graph information (17) indicating the wait relationship between transactions operating within each processor module is placed on the shared memory. Directed graph information (14) indicating the wait relationship between each operating transaction is placed to separate local deadlock detection from global deadlock detection, and the wait relationship is determined according to the above directed graph information on the local memory and shared memory. A deadlock detection processing method characterized in that deadlock is detected by tracking.
JP1068814A 1989-03-20 1989-03-20 Deadlock detection processing method Expired - Fee Related JP2825839B2 (en)

Priority Applications (8)

Application Number Priority Date Filing Date Title
JP1068814A JP2825839B2 (en) 1989-03-20 1989-03-20 Deadlock detection processing method
CA002011807A CA2011807C (en) 1989-03-20 1990-03-15 Data base processing system using multiprocessor system
AU52001/90A AU614225B2 (en) 1989-03-20 1990-03-19 Data base processing system using multiprocessor system
ES90302972T ES2116267T3 (en) 1989-03-20 1990-03-20 DATABASE TREATMENT SYSTEM USING A MULTIPROCESSOR SYSTEM.
US07/495,982 US5649184A (en) 1989-03-20 1990-03-20 Symmetric/asymmetric shared processing operation in a tightly coupled multiprocessor
KR1019900003741A KR930000853B1 (en) 1989-03-20 1990-03-20 Database processing system using multiprocessor system
DE69032337T DE69032337T2 (en) 1989-03-20 1990-03-20 Database processing system using multiprocessor system
EP90302972A EP0389242B1 (en) 1989-03-20 1990-03-20 Data base processing system using multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1068814A JP2825839B2 (en) 1989-03-20 1989-03-20 Deadlock detection processing method

Publications (2)

Publication Number Publication Date
JPH02247770A true JPH02247770A (en) 1990-10-03
JP2825839B2 JP2825839B2 (en) 1998-11-18

Family

ID=13384563

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1068814A Expired - Fee Related JP2825839B2 (en) 1989-03-20 1989-03-20 Deadlock detection processing method

Country Status (1)

Country Link
JP (1) JP2825839B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014063235A (en) * 2012-09-19 2014-04-10 Fujitsu Semiconductor Ltd Execution control method and multi-processor system
CN113899383A (en) * 2021-11-22 2022-01-07 上海西井信息科技有限公司 Multi-vehicle deadlock prevention method, system, equipment and storage medium based on short path

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014063235A (en) * 2012-09-19 2014-04-10 Fujitsu Semiconductor Ltd Execution control method and multi-processor system
CN113899383A (en) * 2021-11-22 2022-01-07 上海西井信息科技有限公司 Multi-vehicle deadlock prevention method, system, equipment and storage medium based on short path
CN113899383B (en) * 2021-11-22 2024-04-19 上海西井科技股份有限公司 Multi-vehicle deadlock prevention method, system, equipment and storage medium based on short path

Also Published As

Publication number Publication date
JP2825839B2 (en) 1998-11-18

Similar Documents

Publication Publication Date Title
US4399504A (en) Method and means for the sharing of data resources in a multiprocessing, multiprogramming environment
US7584222B1 (en) Methods and apparatus facilitating access to shared storage among multiple computers
US5649184A (en) Symmetric/asymmetric shared processing operation in a tightly coupled multiprocessor
JP2820752B2 (en) Cache Memory Coincidence Control Method in Tightly Coupled Multiprocessor System
US5845147A (en) Single lock command for an I/O storage system that performs both locking and I/O data operation
US4480304A (en) Method and means for the retention of locks across system, subsystem, and communication failures in a multiprocessing, multiprogramming, shared data environment
US7284151B2 (en) Conditional data access after database system failure
US7120746B2 (en) Technique for data transfer
US9208090B2 (en) Transactional memory proxy
JPH03161859A (en) Request control method and access control system
JPH0522259B2 (en)
US20100017572A1 (en) Transactional memory support for non-coherent shared memory systems using selective write through caches
WO2014173364A1 (en) Shared resource access method and device
WO2017129036A1 (en) Processing node, computer system and transaction conflict detection method
JP2781092B2 (en) Exclusive control method between systems
US20050262159A1 (en) Managing a thread pool
US9032484B2 (en) Access control in a hybrid environment
JP2685530B2 (en) How to manage shared data
JPH02247770A (en) Dead lock detection processing system
KR100978082B1 (en) Asynchronous remote procedure calling method in shared memory multiprocessor and computer-redable redording medium recorded asynchronous remote procedure calling program
JP3312652B2 (en) Database management method in multiprocessor architecture
JPH04112260A (en) Data base processor by multiprocessor
EP0049423A2 (en) Multiprocessor system
JPS62145349A (en) Intersystem data base sharing system
JP2848437B2 (en) Multi-cluster exclusive control unit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees