Deadlock detection method and device of database transaction lock mechanism

A deadlock detection and database technology, applied in the database field, can solve the problems of wasting computing resources, cumbersome deadlock detection, etc., and achieve the effect of high deadlock detection speed and saving computing resources.

Active Publication Date: 2009-11-11
FORTUNE TECH CO
View PDF0 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] In view of the above analysis, the present invention aims to provide a deadlock detection method and device of a database transaction lock mechanism to solve the problems of cumbersome deadlock detection and waste of computing resources in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Deadlock detection method and device of database transaction lock mechanism
  • Deadlock detection method and device of database transaction lock mechanism
  • Deadlock detection method and device of database transaction lock mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] The main content of the present invention is that the thread generates and maintains deadlock detection information in the process of locking and unlocking, and then uses the deadlock detection information and the aov network principle to perform topological sorting on the thread, thereby judging whether there is a deadlock.

[0049] Preferred embodiments of the present invention will be specifically described below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of the application and are used together with the embodiments of the present invention to explain the principles of the present invention.

[0050] first combined with figure 1 to attach Figure 4 The method described in the embodiment of the present invention is described in detail.

[0051] Such as figure 1 as shown, figure 1 It is a schematic flow chart of the main body of the deadlock detection method according to the embodiment of the present invention,...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a deadlock detection method and a device of a database transaction lock mechanism, which is characterized by predefining an adjacency matrix for storing cross-thread waiting relation messages. The method comprises the following steps: a locking thread records the cross-thread waiting relation messages generated in the process of locking in the adjacency matrix; an unlocking thread updates corresponding waiting relation messages in the adjacency matrix in the process of unlocking according to the requirements; a deadlock detection thread detects and calculates the thread by adopting the adjacency matrix and principles of graph theory so as to judge whether deadlock exists. The device comprises a message storage module, a deadlock detection module, and a message record module and a message update module. The technical proposal of the invention has extremely high deadlock detection speed, can fully utilize useful messages obtained in the processes of locking and unlocking to assist subsequent deadlock detection and saves calculation resources.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a deadlock detection method and device for a database transaction lock mechanism. Background technique [0002] Transaction is one of the basic and most important functions provided by database management system (DBMS), and the realization of transaction function depends on two core basic technologies: lock mechanism and REDO / UNDO log function. The lock mechanism is the core technology of transaction implementation, which is related to whether the transaction function can be realized, the performance and throughput of the system, and the stability of the system. [0003] The basic theory of the lock mechanism adopted by various database management systems is the same, but the implementation methods are different. At present, mainstream database management systems, such as Oracle, Sybase, MS SQL Server, MySQL (InnoDB), etc., all implement their own set of locking mechanisms, ea...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/46G06F17/30
CPCG06F17/30008G06F9/524G06F17/30359G06F16/2336
Inventor 陈河堆常二鹏卢勤元
Owner FORTUNE TECH CO
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products