JPH0443303B2 - - Google Patents
Info
- Publication number
- JPH0443303B2 JPH0443303B2 JP10424884A JP10424884A JPH0443303B2 JP H0443303 B2 JPH0443303 B2 JP H0443303B2 JP 10424884 A JP10424884 A JP 10424884A JP 10424884 A JP10424884 A JP 10424884A JP H0443303 B2 JPH0443303 B2 JP H0443303B2
- Authority
- JP
- Japan
- Prior art keywords
- transaction
- deadlock
- data
- count value
- route
- 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
Links
Landscapes
- Multi Processors (AREA)
Description
【発明の詳細な説明】
本発明は共用データを利用する複合データ処理
装置システムに発生するデツドロツクの検出方法
に関するものである。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a method for detecting deadlock occurring in a complex data processing system that uses shared data.
(a) 産業上の利用分野
複数のジヨブで使用され、目的が同じデータは
1つのフアイルとし、又複数のシステムで使用さ
れるフアイルでも、共用することによつてシステ
ム資源を有効に利用できることから、共用データ
を用いることが複合データ処理装置システムに適
用されている。(a) Industrial application field Data that is used by multiple jobs and has the same purpose is treated as one file, and even files used by multiple systems can be shared because system resources can be used effectively. , the use of shared data has been applied to complex data processor systems.
(b) 従来の技術
単一データ処理装置システムにてもデータを共
用すると使用するデータを占有宣言を行い、特定
のジヨブやタスクが一定時間占有して使用してい
る。ところが此の占有のために、デツドロツク現
象が発生し、データ処理装置システムの運用を妨
げる。特に、複数のデータ処理装置から構成され
る複合システムにおいては、トランザクシヨンの
待ち時間は第2図に示すように複数のシステムが
絡み合い複雑なネツトワーク構造を持つている。(b) Prior Art Even in a single data processing device system, when data is shared, a declaration is made that the data to be used is occupied, and a specific job or task uses the data exclusively for a certain period of time. However, due to this occupation, a deadlock phenomenon occurs, which hinders the operation of the data processing device system. In particular, in a complex system consisting of a plurality of data processing devices, the transaction waiting time is affected by a complicated network structure in which the plurality of systems are intertwined, as shown in FIG.
(c) 発明が解決しようとする問題点
このネツトワーク構造をくまなく検索すること
によつてループになつたルート、即ちデツドロツ
クを検出することが可能である。しかしながら全
ルートを検索するのには其の処理にデータ処理装
置が運用され、データ処理装置のオーバヘツドが
生じるといつた問題がある。(c) Problems to be Solved by the Invention By thoroughly searching this network structure, it is possible to detect routes that become loops, that is, deadlocks. However, when searching all routes, a data processing device is used for the processing, and there is a problem in that overhead of the data processing device is generated.
本発明は上記したような問題点を除去して、効
率良くデツドロツクの検出の行えるデツドロツク
の検出方法を提案するものである。 The present invention proposes a deadlock detection method that eliminates the above-mentioned problems and can efficiently detect deadlocks.
(d) 問題点を解決するための手段
この提案は、共用データを利用する複合データ
処理装置システムにおいて、前記各データ処理装
置のデータ管理部に制御テーブルを備え、前記制
御テーブルに待ち状態にあるトランザクシヨン名
と待ち状態になつた時刻と要求システム名とデツ
ドロツク検出カウンタのカウント値を記載して、
当該トランザクシヨンのデツドロツク検出を前記
制御テーブルの最も旧い時刻を持つトランザクシ
ヨンから順次連なるトランザクシヨンを選定する
と共に、前記カウント値と同じカウント値を選定
されたトランザクシヨンに付してルートを作成
し、前記ルートが前記同じカウント値をもつたト
ランザクシヨンを再び選定した際に前記ルートを
閉ルートのトランザクシヨンで構成されるデツド
ロツクと認識することである。(d) Means for solving the problem This proposal provides a control table in the data management section of each data processing device in a complex data processing device system that uses shared data, and a control table that stores data in a waiting state in the control table. Enter the transaction name, the time it entered the waiting state, the requesting system name, and the count value of the deadlock detection counter.
detecting the deadlock of the transaction by selecting consecutive transactions in sequence from the transaction with the oldest time in the control table, and creating a route by assigning the same count value as the count value to the selected transactions; When the root again selects a transaction having the same count value, the root is recognized as a deadlock consisting of closed root transactions.
(e) 作用
即ち、待ち状態にあるトランザクシヨンを待ち
発生要因と発生時刻とで管理して、旧い時刻のト
ランザクシヨンを起点として各トランザクシヨン
における待ち順にルートを検索して、閉ルートを
検出すると当該トランザクシヨンをデツドロツク
と認識するのである。(e) Effect In other words, transactions in the waiting state are managed by the waiting occurrence factor and the occurrence time, and a route is searched in the waiting order of each transaction starting from the transaction at the old time, and a closed route is detected. This transaction is recognized as a deadlock.
(f) 実施例
以下、図によつて本発明の要旨を具体的に説明
する。(f) Examples Hereinafter, the gist of the present invention will be specifically explained with reference to the drawings.
第1図は本発明によるデツドロツクの検出方法
の一実施例のブロツク図、第3図は本発明のフロ
ーチヤートを示す。 FIG. 1 is a block diagram of an embodiment of the deadlock detection method according to the present invention, and FIG. 3 is a flowchart of the present invention.
データ処理装置1と2と3は共用データを格納
する共用フアイル4を共用利用している。各デー
タ処理装置1,2,3のデータ管理部11,2
1,31にそれぞれ制御テーブル12,22,3
2を設ける。制御テーブル12,22,32には
図に示すようにトランザクシヨン、待ち発生時
刻、要因、カウント欄等が設けてある。第4図の
待ちネツトワークにおいて、例えば、テーブル処
理装置1にて、トランザクシヨンA1がデータB
を使用しようとして、例えば時刻8,00に占有宣
言が行われたが、データBは既にトランザクシヨ
ンA2によつて占有されているので、図に示すよ
うに待ち状態にあり、この時デツドロツク検出が
開始される一契機となる。 Data processing devices 1, 2, and 3 commonly use a shared file 4 that stores shared data. Data management units 11, 2 of each data processing device 1, 2, 3
1 and 31 respectively control tables 12, 22, and 3.
2 will be provided. As shown in the figure, the control tables 12, 22, and 32 are provided with columns such as transaction, wait occurrence time, cause, and count. In the waiting network shown in FIG. 4, for example, in the table processing device 1, transaction A1 is transferred to data B.
For example, an occupancy declaration was made at time 8,00, but since data B is already occupied by transaction A2, it is in a waiting state as shown in the figure, and at this time, deadlock detection is executed. This is an opportunity to start.
この状態を制御テーブル12に記録する。即ち
トランザクシヨン名にA1、要因欄にB、発生時
刻に8,00等のように記録される。勿論此の記録
はデータの管理を行つているデータ管理部11が
行う。他のデータ処理装置2と3も同一動作を行
う。なお、各データ処理装置1,2,3はそれぞ
れ他装置に自装置の待ち状態を報告する。 This state is recorded in the control table 12. That is, the transaction name is recorded as A1, the cause column as B, and the occurrence time as 8,00, etc. Of course, this recording is performed by the data management section 11 that manages the data. The other data processing devices 2 and 3 also perform the same operation. Note that each data processing device 1, 2, and 3 reports its own waiting state to other devices.
デツドロツク検出の方法を第3図のフローチヤ
ートを用いて説明する。 The deadlock detection method will be explained using the flowchart of FIG.
以後、データ処理装置1について説明を行う。 Hereinafter, the data processing device 1 will be explained.
先ず、トランザクシヨンA1がデツドロツク検
出を行う以前の状態を説明する。 First, the state before transaction A1 performs deadlock detection will be described.
例えば過去にトランザクシヨンA2からデツド
ロツク検出が開始され、デツドロツク検出処理が
トランザクシヨンA2−A3……An−A1のル
ートで行われ、トランザクシヨンA1に到達した
時、トランザクシヨンA1は待ち状態でなく正常
動作中であれば、後述する第3図5の「動作中」
であり、このルートはデツドロツクでないと判定
されてデツドロツク検出は終了する。 For example, in the past, deadlock detection was started from transaction A2, deadlock detection processing was performed along the route of transactions A2-A3...An-A1, and when transaction A1 was reached, transaction A1 was not in a waiting state and was normal. If it is in operation, "in operation" in Fig. 3, which will be described later.
Therefore, it is determined that this route is not a deadlock, and the deadlock detection ends.
しかし、トランザクシヨンA2−A3……An
はトランザクシヨンA1が占有している資源が開
放されるまで待ち状態となる。 However, transaction A2-A3...An
is in a waiting state until the resources occupied by transaction A1 are released.
ここで、トランザクシヨンA2において過去に
デツドロツク検出が行われた回数を示すデツドロ
ツク検出カウンタの値が例えば“9”であるとす
れば、後述するようにトランザクシヨンA2−A
3……An−A1のデツドロツク検出カウンタの
カウント値は全て“9”である。 Here, if the value of the deadlock detection counter indicating the number of times deadlock detection has been performed in the past in transaction A2 is, for example, "9", transaction A2-A
3...The count values of the deadlock detection counter of An-A1 are all "9".
この状態で、トランザクシヨンA1の動作中に
データBを使用する必要が生じ、データBの占有
宣言が行われた時、データBが他のトランザクシ
ヨンに占有されていると待ち状態になる。 In this state, it becomes necessary to use data B during the operation of transaction A1, and when the occupancy of data B is declared, if data B is occupied by another transaction, it enters a waiting state.
トランザクシヨンA1は待ち状態になつたので
直ちにデツドロツク検出処理が開始される。 Since transaction A1 has entered the waiting state, deadlock detection processing is immediately started.
先ずデータ管理部11は制御テーブル12のカ
ウント欄のデツドロツク検出カウンタの過去のカ
ウント値“9”を+1カウントアツプしたカウン
ト値“10”とし、ルート列の順序を示すシーケン
シヤルカウンタのカウント値を“0”としてデツ
ドロツク検出を開始する。 First, the data management unit 11 increases the past count value "9" of the deadlock detection counter in the count column of the control table 12 by +1 count to "10", and sets the count value of the sequential counter indicating the order of the route string to "10". 0'' and starts deadlock detection.
この状態が第3図のフローチヤートの(1)の状態
である。 This state is state (1) in the flowchart of FIG.
次に、上記の状態を初期条件としてデータ管理
部11はデツドロツク検出を継続する。 Next, the data management unit 11 continues deadlock detection using the above state as an initial condition.
この状態が第3図2の「継続」である。 This state is "continuation" in FIG. 32.
次に、データ管理部11は、トランザクシヨン
A1からルート検出を開始し、制御テーブル12
において、トランザクシヨンA1がルート検出順
序の最初であることを示すシーケンシヤルカウン
タのカウント値に+1を加えカウント欄を10−1
とする。 Next, the data management unit 11 starts route detection from transaction A1, and the control table 12
In , +1 is added to the count value of the sequential counter indicating that transaction A1 is the first in the route detection order, and the count field is set to 10-1.
shall be.
この状態が第1図の制御テーブル12の状態で
あり、また第3図3である。 This state is the state of the control table 12 in FIG. 1, and also in FIG. 3.
データ処理装置は互いに他装置の状態を把握し
ているので、データ管理部11において、トラン
ザクシヨンA1が待ち状態になつた要因即ちデー
タBを占有しているトランザクシヨンの中で、最
も旧い待ち発生時刻の付けられたトランザクシヨ
ンはA2であることが認識され、これを選択す
る。 Since the data processing devices each know the status of other devices, the data management unit 11 determines the cause of transaction A1 entering the wait state, that is, the oldest wait occurrence among the transactions occupying data B. The timed transaction is recognized as A2 and is selected.
この状態が第3図4である。 This state is shown in FIG. 34.
次に、第3図5のトランザクシヨンA2の状態
判定が行われる。 Next, the status of transaction A2 in FIG. 3 is determined.
もし、トランザクシヨンA2が「動作中」であ
ればデツドロツクではなく、トランザクシヨンA
1はデータBが開放されるのを待てばよい。 If transaction A2 is "running", transaction A is not deadlocked.
1 can wait for data B to be released.
トランザクシヨンA2が「待ち状態」の場合
は、そのデータBが他システムの固有のデータで
あるか否かの判断を行い、他システムの固有のデ
ータであれば他システムに対し、そのデータの占
有状態の検査を依頼する。 If transaction A2 is in the "waiting state", it is determined whether the data B is data unique to another system, and if it is data unique to another system, the other system is notified of the exclusive use of that data. Request a condition inspection.
他のシステムでなければ、第3図2に戻りデツ
ドロツク判定を行う。 If it is not another system, return to FIG. 3 and perform a deadlock determination.
即ち、制御テーブル12において、図示されて
いないトランザクシヨンA2のカウント欄とトラ
ンザクシヨンA1のカウント欄を照合すると、ト
ランザクシヨンA2のデツドロツク検出カウンタ
のカウント値は過去の“9”であり、トランザク
シヨンA1のカウント値は“10”である。 That is, in the control table 12, when the count column of transaction A2 (not shown) is compared with the count column of transaction A1, the count value of the deadlock detection counter of transaction A2 is the past "9", and transaction A1 is The count value of is “10”.
従つて、第3図2のデツドロツク判定では
「大」即ちトランザクシヨンA2のカウント値が
“11”以上でもなく、「等しい」即ちカウント値が
“10”でもないのでデツドロツク検出を「継続」
する。 Therefore, in the deadlock determination shown in FIG. 3, since the count value of transaction A2 is not "large", that is, the count value of transaction A2 is neither "11" or more, nor is it "equal", that is, the count value is not "10", the deadlock detection is "continued".
do.
次に、第3図3のように、トランザクシヨンA
2のデツドロツク検出カウンタをトランザクシヨ
ンA1と同じカウント値の“10”に書替え、シー
ケンシヤルカウンタのカウント値に+1を加え10
−2とする。 Next, as shown in Figure 3, transaction A
Rewrite the deadlock detection counter in step 2 to “10”, the same count value as transaction A1, and add +1 to the count value of the sequential counter to 10.
-2.
この状態を第4図ではA1が10−1、A2が10
−2であることを示している。 In this state, A1 is 10-1 and A2 is 10-1 in Figure 4.
-2.
更に次のトランザクシヨンA3を選定し、第3
図4,5,2,3の工程を繰り返し行う。 Furthermore, the next transaction A3 is selected and the third
Repeat the steps in Figures 4, 5, 2, and 3.
この繰り返し工程は第4図のトランザクシヨン
Anのカウント10−nまで行われ、毎回第3図2
のデツドロツク判定が上記のように行われる。 This iterative process is shown in the transaction in Figure 4.
Counts of An are carried out up to 10-n, each time Figure 3 2
A deadlock determination is made as described above.
最後にトランザクシヨンAnの待ち状態の要因
がトランザクシヨンA1にあるとすると、両トラ
ンザクシヨンのカウント欄は10−nと10−1で、
デツドロツク検出カウンタのカウント値は共に
“10”である。 Finally, if the cause of transaction An's waiting state is transaction A1, the count columns of both transactions are 10-n and 10-1,
The count values of the deadlock detection counters are both "10".
従つて第3図2によりこのルートは閉ループが
完成されており、デツドロツクと判定される。 Therefore, as shown in FIG. 3, a closed loop has been completed for this route, and it is determined that the route is deadlocked.
ここで、第4図のようにトランザクシヨンA1
〜Anのルートでデツドロツク検出処理の途中に、
他のトランザクシヨンA1〜Anのルートでデツ
ドロツク検出装置の途中に他のトランザクシヨン
B1が待ち状態となり、トランザクシヨンB1か
ら新たなデツドロツク検出が開始されると、トラ
ンザクシヨンB1につていも前述の第3図1〜5
の処理が行われる。 Here, as shown in Figure 4, transaction A1
~ During the deadlock detection process in the route of An,
If another transaction B1 enters the waiting state in the middle of the deadlock detection device on the route of other transactions A1 to An, and a new deadlock detection is started from transaction B1, the above-mentioned 3 Figures 1-5
processing is performed.
従つて、トランザクシヨンB1のカウント欄は
11−1が書き込まれる。 Therefore, the count column of transaction B1 is
11-1 is written.
トランザクシヨンB1の待ち状態の要因がトラ
ンザクシヨンA1にあれば、トランザクシヨン
A1が選定され、A1のカウント欄には11−2が
書き換えられてしまう。 If the cause of transaction B1's waiting state is transaction A1, transaction
A1 is selected, and 11-2 is rewritten in the count column of A1.
その結果、トランザクシヨンAnがトランザク
シヨンA1を選定した時は、Anのカウン欄は10
−nであるが、A1のカウント欄は11−2で変わ
つており、第3図2のデツドロツク判定ではトラ
ンザクシヨンAnから見てトランザクシヨンA1
のデツドロツク検出カウンタのカウント値が
「大」であり、デツドロツクでないと判定され、
検出処理は中止される。 As a result, when transaction An selects transaction A1, the counter column of An is 10.
-n, but the count column of A1 has changed to 11-2, and in the deadlock judgment in Figure 3 2, transaction A1 is
The count value of the deadlock detection counter is "large" and it is determined that there is no deadlock,
The detection process is aborted.
しかし、新たなデツドロツク検出がデツドロツ
クカウンタのカウント値“11”で開始され、第4
図のように結局トランザクシヨンAnとトランザ
クシヨンA1の間でカウント欄11−(n+1)と
11−2のカウント値が「等しい」となり、この
ルートが閉ループを構成しておりデツドロツクと
なつていることが検出される。 However, a new deadlock detection starts with the count value "11" of the deadlock counter, and the fourth deadlock detection starts.
As shown in the figure, the count values in the count fields 11-(n+1) and 11-2 between transaction An and transaction A1 become equal, and this route forms a closed loop and is a deadlock. is detected.
以上の説明はテーブル処理装置1について行つ
たがデータ処理装置2,3においても同様に行わ
れる。 The above explanation has been made regarding the table processing device 1, but the same applies to the data processing devices 2 and 3 as well.
(g) 発明の効果
以上説明のように本発明においては、トランザ
クシヨンの待ち時刻の旧いものから系統だててル
ート検出を行い、閉ルートをデツドロツク検出と
する効率の良い検出方法となり、データ処理装置
のデツドロツク検出時間を短縮する利点がある。(g) Effects of the Invention As explained above, in the present invention, routes are systematically detected starting from the transaction with the oldest waiting time, and a closed route is detected as a deadlock, which is an efficient detection method and improves data processing. This has the advantage of shortening the deadlock detection time of the device.
第1図は本発明によるデツドロツクの検出方法
の一実施例のブロツク図、第2図はトランザクシ
ヨン待ち状態を示す模式図、第3図は本発明のフ
ローチヤート、第4図は本発明を説明するための
トランザクシヨン状態を示す模式図、をそれぞれ
示す。
図において、1と2と3はデータ処理装置、4
は共用フアイル、11と21と31はデータ管理
部、12と22と32は制御テーブルをそれぞれ
示す。
FIG. 1 is a block diagram of an embodiment of the deadlock detection method according to the present invention, FIG. 2 is a schematic diagram showing a transaction waiting state, FIG. 3 is a flowchart of the present invention, and FIG. 4 explains the present invention. A schematic diagram illustrating the transaction state for each is shown. In the figure, 1, 2 and 3 are data processing devices, 4
11, 21, and 31 are data management units, and 12, 22, and 32 are control tables, respectively.
Claims (1)
ステムにおいて、前記各データ処理装置のデータ
管理部に制御テーブルを備え、前記制御テーブル
に待ち状態にあるトランザクシヨン名と待ち状態
になつた時刻と要求システム名とデツドロツク検
出カウンタのカウント値を記載して、当該トラン
ザクシヨンのデツドロツク検出を前記制御テーブ
ルの最も旧い時刻を持つトランザクシヨンから順
次連なるトランザクシヨンを選定すると共に、前
記カウント値と同じカウント値を選定されたトラ
ンザクシヨンに付してルートを作成し、前記ルー
トが前記同じカウント値をもつたトランザクシヨ
ンを再び選定した際に前記ルートを閉ルートのト
ランザクシヨンで構成されるデツドロツクと認識
することを特徴とするデツドロツクの検出方法。1. In a composite data processing device system that uses shared data, a control table is provided in the data management unit of each data processing device, and the name of the transaction in the waiting state, the time when the transaction entered the waiting state, and the requesting system name are stored in the control table. and the count value of the deadlock detection counter, and for deadlock detection of the transaction, successive transactions are selected in order from the transaction with the oldest time in the control table, and the same count value as the count value is selected. A route is created by attaching the transaction to the transaction, and when the route selects a transaction having the same count value again, the route is recognized as a deadlock consisting of transactions with a closed route. How to detect deadlock.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10424884A JPS60247746A (en) | 1984-05-22 | 1984-05-22 | Detecting method of deadlock |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10424884A JPS60247746A (en) | 1984-05-22 | 1984-05-22 | Detecting method of deadlock |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS60247746A JPS60247746A (en) | 1985-12-07 |
| JPH0443303B2 true JPH0443303B2 (en) | 1992-07-16 |
Family
ID=14375631
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP10424884A Granted JPS60247746A (en) | 1984-05-22 | 1984-05-22 | Detecting method of deadlock |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS60247746A (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0451335A (en) * | 1990-06-20 | 1992-02-19 | Oki Electric Ind Co Ltd | Data base processor |
-
1984
- 1984-05-22 JP JP10424884A patent/JPS60247746A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS60247746A (en) | 1985-12-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5701457A (en) | Method of designated time interval reservation access process of online updating and backing up of large database versions without reserving exclusive control | |
| JP2543253B2 (en) | Method of detecting and solving data link and data processing apparatus sharing file | |
| DE69232045T2 (en) | DEVICE AND METHOD FOR IMPLEMENTING INSTRUCTIONS IN NON-SEQUENTIAL ORDER | |
| EP0264568A2 (en) | Serialisation of system events in a multiprocessing system | |
| EP0727742A2 (en) | Method and apparatus for crash safe enforcement of mutually exclusive access to shared resources in a multitasking computer system | |
| JP2000284995A (en) | Data processing device and recording medium | |
| KR20010103705A (en) | Method and apparatus for concurrent dbms table operations | |
| DE2517297A1 (en) | DEVICE FOR DETERMINING A SYSTEM STATE LEADING TO A FINAL STANDSTILL TO BE PREVENTED | |
| JPH0743665B2 (en) | Computer system resource management method | |
| JPS62180429A (en) | Lock management under multiplex processing environment | |
| DE68925064T2 (en) | Task execution control method for a multiprocessor system with post / wait procedure | |
| JPH0443303B2 (en) | ||
| JPH06149765A (en) | Shared memory exclusive control automatic release method | |
| JP3559581B2 (en) | Job execution control method | |
| JPH0342740A (en) | File media allocation method | |
| JP2787107B2 (en) | Buffer control system and device | |
| JPH02156348A (en) | Overflow area control method for plural hash tables | |
| JPS61226842A (en) | Resources control system for electronic computer system | |
| JPS60178547A (en) | Data processing system | |
| JPH02300823A (en) | Charged check system | |
| JPH11143824A (en) | Bus arbitration system | |
| JPH05143422A (en) | Updated journal managing system | |
| JPS5913062B2 (en) | Multiprocessing scheduling processing method | |
| JPH0348950A (en) | Memory control system | |
| JPH012149A (en) | Log information collection control method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |