Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Deadlock detection method and device for database transaction lock mechanism

A deadlock detection and database technology, applied in the database field, can solve problems such as waste of computing resources and cumbersome deadlock detection, achieve high deadlock detection speed and save computing resources

Active Publication Date: 2011-11-30
FORTUNE TECH CO
View PDF0 Cites 2 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 for database transaction lock mechanism
  • Deadlock detection method and device for database transaction lock mechanism
  • Deadlock detection method and device for database transaction lock mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] 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.

[0039] 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.

[0040] First combine with figure 1 to the attached Figure 4 The methods described in the embodiments of the present invention will be described in detail.

[0041] like figure 1 shown, figure 1 This is a schematic flow chart of the main body of the deadlock detection method according to the embodiment of the present inve...

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

A method and a device for deadlock detection of a database transaction lock mechanism are disclosed, wherein, an adjacency matrix for storing between-thread waiting relation information is preset. The method comprises: a locking thread records the between-thread waiting relation information generated in the process of locking in the adjacency matrix; an unlocking thread updates corresponding waiting relation information in the adjacency matrix in the process of unlocking according to the requirements; a deadlock detection thread detects and calculates the thread according to the adjacency matrix and principles of Activity On Vertex (AOV) network so as to judge whether a deadlock exists. The device comprises an information storage module, a deadlock detection module, as well as an information record module and an information update module both comprised in every thread. The solution has a extremely high deadlock detection speed, can fully utilize useful information obtained in the process 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 Patents(China)
IPC IPC(8): G06F9/46G06F17/30
CPCG06F17/30359G06F9/524G06F17/30008G06F16/2336
Inventor 陈河堆常二鹏卢勤元
Owner FORTUNE TECH CO
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products