JPS6354638A - Deadlock releasing system - Google Patents

Deadlock releasing system

Info

Publication number
JPS6354638A
JPS6354638A JP61199460A JP19946086A JPS6354638A JP S6354638 A JPS6354638 A JP S6354638A JP 61199460 A JP61199460 A JP 61199460A JP 19946086 A JP19946086 A JP 19946086A JP S6354638 A JPS6354638 A JP S6354638A
Authority
JP
Japan
Prior art keywords
deadlock
data base
database
operating instruction
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP61199460A
Other languages
Japanese (ja)
Inventor
Tatsuki Nishi
西 龍己
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP61199460A priority Critical patent/JPS6354638A/en
Publication of JPS6354638A publication Critical patent/JPS6354638A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/524Deadlock detection or avoidance

Abstract

PURPOSE:To improve the productivity of a program by detecting a reference system program when a deadlock has been generated, executing automatically a rollback processing of this reference system program and a re-execution processing of a data base operating instruction by a data base managing system and releasing the deadlock. CONSTITUTION:A data base operating instruction storage means 3 stores an issuing state of a data base operating instruction at every process, a cancel process detecting means 5 detects a process which is executing only an input to a data base from in process group related to a deadlock based on storage information stored in the data base operating instruction storage means 3, when the deadlock has been generated, and a canceling/re-executing means cancels and re-executes the data base operating instruction which is being executed of the process which has been detected by a cancel process detecting means 6. Accordingly, when the deadlock is generated, the reference system program is detected and a rollback processing of this reference system program and a re-execution processing of the data base operating instruction can be executed automatically by a data base managing system.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデッドロック解除方式に関し、特にコミットメ
ント制御を行っているデータベース管理システムにおけ
るデッドロック発生時のデッドロック解除方式に関する
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a deadlock release method, and more particularly to a deadlock release method when a deadlock occurs in a database management system that performs commitment control.

(従来の技術〕 従来、この種のデッドロック解除方式では、デッドロッ
クの発生時にデータベース管理システムでデッドロック
を検出したプロセスに一方的にデッドロックステータス
を戻し、デッドロックステータスを戻されたプロセスが
ロールバック処理を行うことによりデッドロックの解除
を行っていた。
(Prior Art) Conventionally, in this type of deadlock release method, when a deadlock occurs, a database management system unilaterally returns the deadlock status to the process that detected the deadlock, and the process to which the deadlock status was returned is The deadlock was released by performing rollback processing.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来のデフドロック解除方式は、次に示すよう
な欠点がある。
The conventional def lock release method described above has the following drawbacks.

(1)デッドロックを1食出したプロセスに一方的にデ
ッドロックステータスを通知していたので、入力しかし
ていないプログラム(以下、参照系プログラムと呼ぶ)
をも含めて全てのプログラムにデッドロックのための処
理を組み込んでおく必要がある。
(1) A program that only performs input because it unilaterally notified the deadlock status to the process that caused the first deadlock (hereinafter referred to as a reference program)
It is necessary to incorporate processing for deadlock into all programs, including programs.

(2)参照系プログラムと参照系プログラム以外の更新
系プログラムとの間でデッドロックが発生した場合、参
照系プログラムにデッドロックステータスの通知を行い
、この参照系プログラムにロールバック処理を行わせた
方がロールハック処理のオーハヘフドを少なくすること
ができるが、タイミングによってどちらに通知されるか
は不定である。
(2) If a deadlock occurs between a reference program and an update program other than the reference program, the reference program is notified of the deadlock status and has the reference program perform rollback processing. However, depending on the timing, it is uncertain which party will be notified.

本発明の目的は、上述の点に鑑み、デッドロック発生時
に参照系プログラムを検出してこの参照系プログラムの
ロールバンク処理およびデータベース操作命令の再実行
処理をデータベース管理システムで自動的に行わせるよ
うにしたデッドロック解除方式を提供することにある。
In view of the above-mentioned points, an object of the present invention is to detect a reference program when a deadlock occurs, and to automatically perform roll bank processing and re-execution processing of database operation instructions for this reference program in a database management system. The purpose of this invention is to provide a deadlock release method based on the following methods.

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

本発明のデッドロック解除方式は、コミットメント制御
を行っているデータベース管理システムにおいて、デー
タベース操作命令の発行状況をプロセス毎に記憶するデ
ータベース操作命令記憶手段と、デッドロック発生時に
前記データベース操作命令記憶手段に記jfIされた記
憶情報に基づきこのデッドロックに関連するプロセス群
の中からデータベースに対して人力のみを行っているプ
ロセスを検出するキャンセルプロセス検出手段と、この
キャンセルプロセス検出手段により検出されたプロセス
の実行中のデータベース操作命令の実行ヲキャンセルし
再実行させるキャンセル・再実行手段とを有する。
The deadlock release method of the present invention, in a database management system performing commitment control, includes a database operation instruction storage means that stores the issuing status of database operation instructions for each process, and a database operation instruction storage means that stores the database operation instruction issuance status for each process when a deadlock occurs. A canceling process detecting means detects a process that performs only manual operation on the database from among the processes related to this deadlock based on the recorded memory information, and a process detecting process detected by the canceling process detecting means It has cancel/re-execute means for canceling and re-executing the execution of the database operation command being executed.

〔作用〕[Effect]

本発明のデッドロック解除方式では、データベース操作
命令記憶手段がデータベース操作命令の発行状況をプロ
セス毎に記憶し、キャンセルプロセス検出手段がデッド
ロック発生時にデータベース操作命令記憶手段に記憶さ
れた記憶情相に基づキコノデッドロックに関連するプロ
セス群の中からデータベースに対して入力のみを行って
いるプロセスを検出し、キャンセル・再実行手段がキャ
ンセルプロセス検出手段により検出されたプロセスの実
行中のデータベース操作命令の実行をキャンセルし再実
行させる。
In the deadlock release method of the present invention, the database operation command storage means stores the issuing status of the database manipulation command for each process, and the canceling process detection means stores the storage state stored in the database manipulation command storage means when the deadlock occurs. A process that is only inputting information to the database is detected from among the processes related to the deadlock, and the cancel/re-execution means cancels the database operation during execution of the process detected by the process detection means. Cancels the execution of the command and re-executes it.

〔実施例〕〔Example〕

次に、本発明について図面を参照して詳細に説明する。 Next, the present invention will be explained in detail with reference to the drawings.

第1図を参照すると、本発明の一実施例は、ユーザプロ
セス1と、データベース操作命令解析手段2と、データ
ベース操作命令記憶手段3と、デッドロック検出手段4
と、キャンセルプロセス検出手段5と、キャンセル・再
実行手段6とがら構成されている。
Referring to FIG. 1, one embodiment of the present invention includes a user process 1, a database operation command analysis means 2, a database operation command storage means 3, and a deadlock detection means 4.
, a cancellation process detection means 5, and a cancellation/re-execution means 6.

第2図を参照すると、データベース操作命令記・tα手
段3における処理は、データベース更新命令判定ステッ
プ21と、データベース更新フラグオン設定ステップ2
2とからなる。
Referring to FIG. 2, the processing in the database operation instruction/tα means 3 includes a database update command determination step 21 and a database update flag on setting step 2.
It consists of 2.

第3図を6照すると、キャンセルプロセス検出手段5に
おける処理は、プロセス番号設定ステップ31と、デー
タベース更新フラグオン判定ステップ32と、H&プロ
セス判定ステップ33と、次プロセス番号設定ステフブ
34と、参照系プロセス無し設定ステップ35と、キャ
ンセルプロセス設定ステップ36とからなる。
Referring to FIG. 3, the processes in the cancel process detection means 5 include a process number setting step 31, a database update flag on judgment step 32, an H & process judgment step 33, a next process number setting step 34, and a reference process number setting step 34. It consists of a none setting step 35 and a cancel process setting step 36.

第4図を参照すると、キャンセル・再実行手段6におけ
る処理は、カレンシ情報退避ステフブ41と、ロールバ
ック処理実行ステップ42と、カレンシ情報復帰ステッ
プ43と、データベース操作命令再実行ステップ44と
からなる。
Referring to FIG. 4, the processing in the cancel/re-execution means 6 consists of a currency information saving step 41, a rollback processing execution step 42, a currency information restoration step 43, and a database operation command re-execution step 44.

次に、このように構成された本実施例のデッドロック解
除方式の動作について説明する。
Next, the operation of the deadlock release method of this embodiment configured as described above will be explained.

ユーザプロセス1がデータベース操作命令を発行すると
、制御がデータベース操作命令解析手段2に移される。
When the user process 1 issues a database manipulation command, control is transferred to the database manipulation command analysis means 2.

データベース操作命令解析手段2は、まずデータベース
操作命令記19手段3を呼ぶ。データベース操作命令記
憶手段3は、データベース操作命令がデータベース更新
命令であるかどうかを判定する(ステップ21)。デー
タベース操作命令がデータベース更新命令であれば、デ
ータベース更新命令グ(以下、華に更新フラグという)
をオンに設定する(ステップ22)。なお、更新フラグ
は、プロセスの開始時にオフに初期化されている。
The database operation instruction analysis means 2 first calls the database operation instruction writing 19 means 3. The database operation instruction storage means 3 determines whether the database operation instruction is a database update instruction (step 21). If the database operation command is a database update command, the database update command flag (hereinafter referred to as update flag)
is set to on (step 22). Note that the update flag is initialized to off at the start of the process.

次に、データベース操作命令解析手段2は、デッドロッ
ク検出手段4を呼ぶ。デフドロック検出手段4は、デー
タベース操作命令によるデータベースに対するアクセス
要求がデッドロックを引き起こすか否かを判定する。デ
フドロックを引き起こさない場合は、制御をデータベー
ス操作命令解析手段2に戻す。デフドロックを引き起こ
す場合には、キャンセルプロセス検出手段5を呼ぶ。
Next, the database operation command analysis means 2 calls the deadlock detection means 4. The deflock detection means 4 determines whether an access request to the database based on a database operation command causes a deadlock. If a deflock is not caused, control is returned to the database operation instruction analysis means 2. If a deflock occurs, the cancel process detection means 5 is called.

キャンセルプロセス検出手段5は、デッドロックを引き
起こしたプロセス群の中に参照系プログラムが存在する
か否かを検出する。詳しくは、キャンセルプロセス検出
手段5は、デッドロックを引き起こしたプロセス群を管
理しているキューの中から最初のプロセスを捜し、その
プロセス番号を作業域P、に設定する(ステップ31)
。次に、作業域P1に設定されたプロセス番号で示され
るプロセスの更新フラグがオンであるかどうかを調べる
(ステップ32)。更新フラグがオンであれば、デフド
ロックを引き起こしたプロセス群の中で最マ麦のブロセ
スカ)否め)を8周べる(ステップ33)。最後のプロ
セスでなければ、デッドロックを引き起こしたプロセス
群のキューの中で次のプロセスのプロセス番号をP、に
設定しくステップ34)、ステップ32に戻る。ステッ
プ33の判定で最後のプロセスであれば、デッドロック
を引き起こしたプロセス群の中には参照系プログラムが
1本もなかったことになり、デッドロック検出手段4お
よびデータベース操作命令解析手段2を介してユーザプ
ロセス1にデッドロックステータスを通知する(ステッ
プ35)。このため、更新系プログラム同士でデッドロ
ックが発生した場合は、いままでどうりユーザプロセス
1でロールバンク処理が行われる。ステップ32の判定
で更新フラグがオンでなければ、作業域P+に設定され
たプロセスが参照系プログラムであるので、このプロセ
スをキャンセルプロセスとしてデフドロック検出手段4
に通知する(ステップ36)。
The canceled process detection means 5 detects whether a reference program exists in the process group that caused the deadlock. Specifically, the canceled process detection means 5 searches for the first process from the queue that manages the process group that caused the deadlock, and sets its process number in the work area P (step 31).
. Next, it is checked whether the update flag of the process indicated by the process number set in the work area P1 is on (step 32). If the update flag is on, the process that caused the default lock can be run eight times (step 33). If it is not the last process, the process number of the next process in the queue of processes that caused the deadlock is set to P, step 34), and the process returns to step 32. If it is the last process as determined in step 33, it means that there is no reference system program in the process group that caused the deadlock, and the deadlock detection means 4 and database operation instruction analysis means 2 and notifies user process 1 of the deadlock status (step 35). Therefore, when a deadlock occurs between update programs, the roll bank process is performed by the user process 1 as before. If the update flag is not on in the determination in step 32, the process set in the work area P+ is a reference program, so the deflock detection means 4 considers this process to be a canceled process.
(Step 36).

デッドロック検出手段4は、キャンセルプロセス検出手
段5から通知されたプロセスをキャンセル・再実行手段
6に通知する。キャンセル・再実行手段6は、実行中の
データベース操作命令の実行のキャンセルおよび再実行
を行う。詳しくは、キャンセル・再実行手段6は、まず
キャンセルするプロセスの力レンジ情報を作業域S、に
退避する(ステップ41)。これは、ロールバック処理
において力レンジ情報が不定になるので、ロールバック
処理後に力レンジ情報を復帰させるためである。次に、
実行中のデータベース操作命令の実行をキャンセルし、
デッドロックを解除するためにキャンセルプロセスに対
してロールバック処理を実行する(ステップ42)。続
いて、ロールバンク処理によって不定となった力レンジ
情報を作業域S1の内容で復帰する(ステップ43)。
The deadlock detection means 4 notifies the cancellation/re-execution means 6 of the process notified from the canceled process detection means 5. The cancel/re-execute means 6 cancels and re-executes the execution of a database operation command that is currently being executed. Specifically, the cancel/re-execute means 6 first saves the force range information of the process to be canceled into the work area S (step 41). This is because the force range information becomes unstable in the rollback process, so the force range information is restored after the rollback process. next,
Cancels the execution of a database operation instruction that is currently being executed,
Rollback processing is performed on the cancel process to release the deadlock (step 42). Subsequently, the force range information that has become unstable due to the roll bank processing is restored with the contents of the work area S1 (step 43).

この後、キャンセルされたデータベース操作命令を再実
行する(ステップ44)。
Thereafter, the canceled database operation command is re-executed (step 44).

もし、再度デッドロックが発生した場合は、デッドロッ
ク検出手段4.キャンセルプロセス検出手段5およびキ
ャンセル・再実行手段6の処理を繰り返し実行する。
If deadlock occurs again, deadlock detection means 4. The processes of the cancellation process detection means 5 and the cancellation/re-execution means 6 are repeatedly executed.

なお、上記実施例では、参照系プログラムか否かを判定
するための更新フラグの初期化をプログラム開始時に行
っているが、これをコミット処理時およびロールバンク
処理時に行うようにすればよりきめの細かな制御が可能
となる。
Note that in the above embodiment, the update flag to determine whether it is a reference program is initialized at the start of the program, but if this is done at the time of commit processing and roll bank processing, it will be more precise. Fine control becomes possible.

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

以上説明したように本発明は、デフドロック発生時にデ
ッドロックを引き起こしたプロセスに一方的にデッドロ
ックステータスを通知するのではなく、参照系プログラ
ムを検出しこの参照系プログラムのロールバック処理お
よびデータベース操作命令の再実行処理をデータベース
管理システムで自動的に行ってデッドロックを解除する
ようにしたことにより、次のような効果がある。
As explained above, the present invention does not unilaterally notify the deadlock status to the process that caused the deadlock when a deflock occurs, but detects a reference program and executes rollback processing and database operation instructions for the reference program. The database management system automatically performs the re-execution process to release deadlocks, resulting in the following effects:

fi+  参照系プログラムにはデフドロフタステータ
スが通知されないため、参照系プログラムはデッドロッ
クのための処理を組み込む必要がない。
fi+ Since the reference system program is not notified of the defrofter status, the reference system program does not need to incorporate processing for deadlock.

これにより、プログラムの生産性を向上させることがで
きる。
Thereby, the productivity of the program can be improved.

(2)参照系プログラムと更新系プログラムとの間でデ
ッドロックが発生した場合に参照系プログラムのロール
バンク処理を行うことによりデッドロックの解除を行う
ため、デッドロック解除時のオーバヘッドを少なくする
ミとができる。
(2) When a deadlock occurs between a reference program and an update program, the deadlock is released by performing roll bank processing for the reference program, so the overhead at the time of deadlock release is reduced. I can do it.

(3)同時に動作させる更新系プログラムをデータベー
ス管理システムに1零止制限することにより、全てのプ
ログラムでデッドロックの処理を不要とすることが可能
となる。
(3) By limiting the number of update programs to be executed simultaneously to one zero in the database management system, it becomes possible to eliminate the need for deadlock processing in all programs.

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

第1図は本発明の一実施例を示す構成図、第2図は第1
図中のデータベース操作命令記憶手段における処理を示
す流れ図、 第3図は第1回中のキャンセルプロセス検出手段におけ
る処理を示す流れ図、 第4図は第1図中のキャンセル・再実行手段における処
理を示す流れ図である。 図において、 l・・・ユーザプロセス、 2・・・データベース操作命令解析手段、3・・・デー
タベース操作命令記憶手段、4・・・デッドロック検出
手段、 5・・・キャンセルプロセス検出手段、6・・・キャン
セル・再実行手段である。
FIG. 1 is a configuration diagram showing one embodiment of the present invention, and FIG.
FIG. 3 is a flowchart showing the processing in the database operation command storage means in the figure; FIG. 3 is a flowchart showing the processing in the cancel process detection means during the first round; FIG. FIG. In the figure, l...User process, 2...Database operation instruction analysis means, 3...Database operation instruction storage means, 4...Deadlock detection means, 5.Cancellation process detection means, 6. ...It is a means of canceling and re-executing.

Claims (1)

【特許請求の範囲】 コミットメント制御を行っているデータベース管理シス
テムにおいて、 データベース操作命令の発行状況をプロセス毎に記憶す
るデータベース操作命令記憶手段と、デッドロック発生
時に前記データベース操作命令記憶手段に記憶された記
憶情報に基づきこのデッドロックに関連するプロセス群
の中からデータベースに対して入力のみを行っているプ
ロセスを検出するキャンセルプロセス検出手段と、 このキャンセルプロセス検出手段により検出されたプロ
セスの実行中のデータベース操作命令の実行をキャンセ
ルし再実行させるキャンセル・再実行手段と、 を有することを特徴とするデッドロック解除方式。
[Scope of Claim] A database management system that performs commitment control includes: database operation instruction storage means for storing the issuing status of database operation instructions for each process; Cancellation process detection means for detecting a process that is only making input to a database from among the processes related to this deadlock based on stored information, and a database of running processes detected by this cancellation process detection means. A deadlock release method comprising: cancel/re-execute means for canceling and re-executing execution of an operation command.
JP61199460A 1986-08-26 1986-08-26 Deadlock releasing system Pending JPS6354638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61199460A JPS6354638A (en) 1986-08-26 1986-08-26 Deadlock releasing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61199460A JPS6354638A (en) 1986-08-26 1986-08-26 Deadlock releasing system

Publications (1)

Publication Number Publication Date
JPS6354638A true JPS6354638A (en) 1988-03-09

Family

ID=16408170

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61199460A Pending JPS6354638A (en) 1986-08-26 1986-08-26 Deadlock releasing system

Country Status (1)

Country Link
JP (1) JPS6354638A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02157943A (en) * 1988-12-09 1990-06-18 Nec Corp Data manipulation language instruction retesting system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02157943A (en) * 1988-12-09 1990-06-18 Nec Corp Data manipulation language instruction retesting system

Similar Documents

Publication Publication Date Title
US9569254B2 (en) Automatic checkpointing and partial rollback in software transaction memory
US7178062B1 (en) Methods and apparatus for executing code while avoiding interference
US6502122B1 (en) Method and apparatus for executing transaction programs in parallel
JP2001344142A (en) Multiprogram processor and file roll-back method used for it
JPH04284548A (en) Data base exclusive controlling system
JPS6354638A (en) Deadlock releasing system
US9858172B2 (en) Apparatus and method for controlling debugging of program instructions including a transaction
JPH07101399B2 (en) Database deadlock processing method
JP2743860B2 (en) User program debug processing system
JPS62204351A (en) Deadlock releasing system
JPH04314141A (en) Method and mechanism for controlling multi-task
JPS6159538A (en) Queue control system between tasks
JPH0433127A (en) Check point control system
JPH01180651A (en) Commit synchronization control system for report file output
JP2623968B2 (en) Commit synchronization control method for journalless files
JPH02157943A (en) Data manipulation language instruction retesting system
JPH0324648A (en) Simultaneous file access control system
JPH0371235A (en) Device for restarting multitask in interruption
JPS61233838A (en) Information processor
JPH0926907A (en) Lock controller
JPH0546452A (en) Commitment control system
JPH03237554A (en) Multiprocessor control system
JPH0248766A (en) Processor interface controlling system
JPH05143422A (en) Updated journal managing system
JPS63115249A (en) File restoration processing system