WO2010139260A1 - 数据库事务锁机制的死锁检测方法及装置 - Google Patents
数据库事务锁机制的死锁检测方法及装置 Download PDFInfo
- Publication number
- WO2010139260A1 WO2010139260A1 PCT/CN2010/073392 CN2010073392W WO2010139260A1 WO 2010139260 A1 WO2010139260 A1 WO 2010139260A1 CN 2010073392 W CN2010073392 W CN 2010073392W WO 2010139260 A1 WO2010139260 A1 WO 2010139260A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- thread
- lock
- deadlock
- adjacency matrix
- information
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F9/524—Deadlock detection or avoidance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
- G06F16/2336—Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
Definitions
- the present invention relates to the field of database technologies, and in particular, to a deadlock detection method and apparatus for a database transaction lock mechanism. Background technique
- Transaction is one of the basic and most important functions provided by the database management system (DBMS), and the implementation of transaction functions depends on two core infrastructure technologies: lock mechanism and REDO/UNDO log function.
- lock mechanism is the core technology of transaction implementation. It is related to whether the transaction function can be realized, the performance and throughput of the system, and the stability of the system.
- Deadlock detection is a key technology in the lock mechanism. Although some methods can be used to avoid and reduce deadlocks in certain scenarios, deadlocks are sometimes difficult to avoid, so deadlock detection is an integral part of the lock mechanism. Deadlock detection requires a lot of computing resources, and its efficiency has a significant impact on the overall performance of the system.
- the deadlock detection method of MS SQL Server 2008 is as follows: When the lock monitor initiates a deadlock search for a particular thread, it identifies the resource that the thread is waiting for. The lock monitor then looks up the owner of the particular resource and recursively continues the deadlock search for those threads until a loop is found. Loops identified in this way form a deadlock. This is a post hoc test.
- InnoDB's deadlock detection also has a similar recursive algorithm, that is, transaction T1 (requestor thread) locks an object obj (table or record), when it needs to wait, first create A lock object wait_lock, and then test if a deadlock occurs beforehand. It calls a self-recursive function lock-deadlock-recursive (Tl, wait-lock) to indicate whether the locker (transaction) before the wait-lock waits for Tl.
- Tl self-recursive function lock-deadlock-recursive
- the specific deadlock detection algorithm is as follows: 1) If the previous lock added to the object obj does not exist, there is no deadlock and exit.
- Both MS SQL Server and InnoDB use recursive methods to detect deadlocks, especially InnoDB, which uses a doubly linked list to organize the list of lock objects that the protected object has granted, and a list of lock objects owned by the transaction.
- the deadlock detection algorithm traverses these linked lists to detect Wait for the ring to exist. This method is less efficient, and only one wait loop can be detected in one test, and the detection process has no small hindrance to the ongoing thread (transaction).
- the present invention is directed to a deadlock detection method and apparatus for a database transaction lock mechanism, which solves the problem of tedious deadlock detection and waste of computing resources existing in the prior art.
- the invention provides a deadlock detection method for a database transaction lock mechanism, which is preset to store an adjacency matrix of waiting relationship information between threads; the method includes:
- Step A The locking thread generates the inter-thread waiting relationship information generated when the lock is locked in the neighbor In the matrix;
- Step B The unlocking thread updates the corresponding waiting relationship information in the adjacency matrix as needed when unlocking;
- Step C The deadlock detection thread performs detection and calculation on the thread according to the adjacency matrix and the AOV network principle, and determines whether there is a deadlock.
- step A specifically includes:
- the lock thread waits for the wait relationship information of other threads to be recorded.
- the lock thread hangs waiting for the relevant thread to unlock.
- the related thread refers to: all threads that have been granted this lock, in other words, those threads that have applied for locking successfully.
- step B specifically includes:
- Step B1 When the unlocking thread releases the lock a that was previously granted, it checks each thread t recorded in the adjacency matrix to apply for a lock, and determines whether the lock type to be applied by the thread t and the lock owned by the unlocking thread Type compatible, if not, proceed to step B2; if compatible, perform step B3;
- Step B2 Keep the waiting relationship information unchanged; end the current process
- Step B3 Continue to determine whether the lock type to be applied by the thread t is incompatible with the lock type owned by at least one other thread, and if yes, perform a lock wait relationship migration, and update the corresponding wait relationship information in the adjacency matrix; otherwise , only clear the original inter-thread wait relationship information; end the current process.
- step C specifically includes:
- Step C1 A deadlock detection thread copies a backup of the adjacency matrix
- Step C2 Perform detection detection on the thread according to the inter-thread waiting relationship information in the backup adjacency matrix and the topology sorting manner in the AOV network principle, and detect whether there is a dead between the threads.
- the lock loop when present, selects a thread in the deadlock loop as a victim thread according to a predetermined policy, and the victim thread fails to return, and the deadlock state is broken.
- step C2 specifically includes:
- Step C21 Calculate an in-order array and an out-out array of the adjacency matrix, and determine whether the in-order array is equal to the out-of-order array. If yes, execute step C22; otherwise, execute step C23; step C22, whether the in-degree array is 0 vector, if yes, the calculation ends; otherwise, a thread is selected as the victim thread in the deadlock loop according to a predetermined strategy, and the victim thread fails to return;
- Step C23 Clear all elements whose degree of exit is not 0 and the degree of entry is 0, and go to step C21.
- the embodiment of the present invention further provides a deadlock detection apparatus for a database transaction lock mechanism, and the apparatus includes: an information storage module, a deadlock detection module, an information recording module and an information update module included in each thread;
- the information recording module is configured to record the inter-thread waiting relationship information generated when the lock is locked into the information storage module;
- the information update module is configured to update corresponding waiting relationship information in the adjacency matrix as needed when unlocking;
- the information storage module is configured to save inter-thread waiting relationship information in a preset adjacency matrix
- the deadlock detection module is configured to detect and calculate a thread according to the inter-thread waiting relationship information and the AOV network principle stored in the information storage module, and determine whether there is a deadlock.
- the information recording module is further configured to: when the lock is applied, when the lock type to be applied by the lock thread is incompatible with the lock type that the lock object has been granted to other threads, the information record module The locking thread waits for the waiting relationship information of other threads to be recorded in the information storage module, and then suspends waiting for the relevant thread to unlock.
- the information update module is further configured to: when the related thread performs unlocking, Determining whether the type of the lock to be applied for each thread to be applied for the current lock in the information storage module is compatible with the lock type owned by the unlocked thread; if the lock is incompatible, the wait relationship information remains unchanged; And continuing to determine whether the lock type to be applied by each thread currently locked by the application is incompatible with the lock type owned by at least one other thread, and if the incompatibility is performed, performing a lock wait relationship migration, updating the adjacency matrix The corresponding waiting relationship information; when compatible, only the original inter-thread waiting relationship information is cleared.
- the deadlock detection module is further configured to copy the adjacency matrix in the information storage module as a backup, according to the inter-thread waiting relationship information in the backup adjacency matrix and the topological sorting manner in the AOV network principle. Performing detection and calculation on the thread, detecting whether there is a deadlock loop between the threads, and confirming that there is a deadlock loop, selecting one thread as the victim thread in the deadlock loop according to a predetermined policy, sacrificing the thread failure return, breaking the deadlock state .
- the technical solution proposed by the invention has a very high deadlock detection speed, and can fully utilize the useful information obtained by the unlocking process to help the subsequent detection of deadlock, thereby saving computing resources.
- FIG. 1 is a schematic flowchart of a main body of a deadlock detecting method according to an embodiment of the present invention
- FIG. 2 is a schematic flowchart of a deadlock detection information update in a method according to an embodiment of the present invention
- FIG. 3 is a schematic flowchart of a deadlock detection algorithm in a method according to an embodiment of the present invention
- FIG. 5 is a schematic diagram of the method according to the embodiment of the present invention, where the algorithm described in FIG. 3 is used to detect a deadlock neighbor. State diagram of the matrix;
- FIG. 6 is a state diagram of a method for detecting a deadlocked adjacency matrix by using the algorithm described in FIG. 3 in the method according to the embodiment of the present invention
- FIG. 7 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- the thread generates and maintains deadlock detection information during the locking and unlocking process, and then uses the deadlock detection information and the AOV network principle to perform topology sorting on the thread to determine whether there is a deadlock.
- FIG. 1 is a schematic diagram of a main flow of a deadlock detection method according to an embodiment of the present invention, which mainly includes two phases, namely: collection of deadlock detection information and detection of deadlock status by using deadlock detection information.
- the deadlock detection information refers to waiting relationship information between threads, and the waiting relationship information is all stored in an adjacency matrix called aov, which records waiting relationship information between threads.
- the locking thread is responsible for generating the waiting relationship information between the threads
- the unlocking thread is responsible for updating the waiting relationship information between the threads as needed during the unlocking process
- the deadlock detecting thread is responsible for the waiting relationship information collected according to the adding and unlocking process, and utilizing the aov network principle. , topologically sorting threads to determine if there is a deadlock, and the existence of a loop waiting loop.
- Step 101 During the locking process, if the locking thread needs to wait for other threads, the waiting relationship information between the threads is recorded in the adjacency matrix aov.
- Step 102 During the unlocking process, the unlocking thread updates the corresponding data in the aov adjacency matrix by updating the waiting relationship information between the threads as needed.
- Step 103 The deadlock detection thread first copies the aov adjacency matrix (the aov adjacency matrix constitutes one A backup of the directed graph G), then the aov network topology sorting method is used to calculate the backup data, and find the loop waiting loop (deadlock loop): remove all the nodes without the precursor and all the arcs it emits. If all nodes can be removed, it means that no deadlock occurs, and the detection ends; otherwise, there is a deadlock loop.
- the predetermined strategy for example, it can be formulated according to the user's needs, such as the minimum cost strategy, that is, the thread with the smallest workload is selected.
- deadlock detection can be performed periodically by a background independent thread (deadlock detection thread) (post-detection), or it can be detected immediately (pre-detection) during the locking process.
- deadlock detection thread post-detection
- pre-detection pre-detection
- the aov network is mainly used to evaluate the feasibility of the project schedule. It uses vertices to represent activities and arcs to indicate priority relationships between activities. The main reason is to use the characteristics of the aov network as a powerful tool for deadlock detection: 1) The arc in the aov network indicates a certain constraint relationship between activities; 2) The loop cannot occur in the aov network.
- the present invention uses a vertex to represent the thread itself, and an arc to indicate a waiting relationship between threads. When there is no loop in the aov network, it indicates that there is no deadlock, otherwise there is at least one deadlock.
- the process of generating deadlock detection information (ie, step 101) specifically includes:
- Thread i applies for locking a certain type of lock on the object lm, when the type lock and lm have been granted to the thread j
- the lock type is incompatible, it indicates that the thread i needs to wait for the thread j to release the lock of the corresponding type in order to successfully obtain the lock type of the application.
- there is a partial order relationship (waiting relationship) between thread i and thread j which is represented by an arc of node i to node j in the directed graph, and aov in the aov adjacency matrix.
- i] j] The unit records a pointer to the notification event event that thread i is waiting for.
- FIG. 2 is a schematic flowchart of a deadlock detection information update (step 102) in the method according to the embodiment of the present invention, which may specifically include:
- Step 201 Thread j checks the first thread t waiting for the lock recorded in the jth column of the aov adjacency matrix during the process of unlocking a lock object lm.
- Step 202 Determine whether the type of the lock to be applied by the thread t is compatible with the type of the lock owned by the thread j. If yes, go to step 203; otherwise, go to step 205.
- Step 203 Determine whether there is another thread k that owns the lock, and the type of lock it possesses is incompatible with the type of lock to be applied by the thread t. If so, step 204 is performed in sequence, otherwise it proceeds to step 205.
- Step 205 Clear aov[t] j] is empty.
- Step 206 Determine whether there is a next thread applying for the lock in the jth column of the aov adjacency matrix, and if yes, go to step 202, otherwise the unlocking process is ended.
- thread j releases a lock of a certain type of lock object lm, this will cause other threads that were originally blocked by thread j to have the opportunity to obtain the type of lock applied.
- thread t blocked by thread j there are 2 possibilities at this time.
- the first possibility is that the lock type owned by thread j is incompatible with the lock type that thread t is applying for, then the wait between the two threads The relationship remains the same; the second possibility is that the lock type owned by thread j is compatible with the lock type that thread t is applying for, and thread t has the opportunity to obtain the type of lock applied, and the wait relationship between threads may need to be changed.
- the above thread locking process and the unlocking process jointly complete the collection process of the deadlock detection information, and they prepare the waiting relationship information between all the threads of the global for the deadlock detection thread.
- FIG. 3 is a schematic flowchart of a deadlock detection algorithm, which describes an algorithm for detecting a deadlock by using the graph theory aov network principle.
- a deadlock detection algorithm which describes an algorithm for detecting a deadlock by using the graph theory aov network principle.
- the data in the aov adjacency matrix is dynamically changed, it is very accurate to use the backup data of the aov adjacency matrix to detect the deadlock that has occurred. This is because for threads that have entered the deadlock state, they are all in a blocked state. In the absence of external intervention, the deadlock state cannot be automatically released. Therefore, although static data is used during the detection of deadlock, However, it is still possible to accurately detect the deadlock that has occurred. However, during the detection of deadlocks, new deadlocks are not ruled out and they need to wait until the next deadlock detection process to detect them.
- Step 301 Copy a backup of aov for calculation, because there is no ambiguity, so this backup is also called aov.
- Step 302 Calculate the inovity array of aov, and store the result in in_degree.
- Step 303 Calculate the out array of aov, and store the result in out_degree.
- Step 304 Is in_degree equal to out_degree? If yes, go to step 305; otherwise, go to step 307.
- Step 305 Is in_degree a 0 vector? If yes, it indicates that no loop occurs, the calculation ends (the only function exit), otherwise go to step 306.
- Step 306 According to a predetermined policy, select a non-zero subscript k from in_degree, and the thread k is to roll back the thread number of the transaction. Find a non-zero element aov[k] j] from aov, which is a pointer to the event object. According to the lock lm it finds, find the thread k lock information table tli, set the status field of tli to -1, and then Wake up the thread k. Clear aov[k] j] to 0, and go to step 302.
- Step 307 Clear all aov[i][O..MAX_THREADS] to 0 for all subscripts i whose degree is not 0 and the degree of entry is 0. Jump step 2).
- MAX_THREADS represents the maximum number of threads.
- FIG. 4 is a schematic diagram of a scene in which a deadlock phenomenon is described using a directed graph.
- the top half of Figure 4 depicts the wait relationship between threads at a certain point in time.
- the av network topology sorting method can detect these two loops.
- the deadlock detection algorithm finds all vertices with only degree of out and no degree, removes the vertices and the arcs they initiate, as shown by the dashed line in Figure 4, repeating the process until There are no such vertices.
- the thread t5 and the thread t8 are respectively selected as the victim threads for breaking the deadlock state. It is necessary to remind that any vertex has at most one arc initiated by it. This is because any thread that fails to apply for a lock will be blocked, and there is no chance to apply for another lock and it will be blocked for the second time.
- FIG. 5 and FIG. 6 are diagrams showing state changes of the aov adjacency matrix for detecting deadlock by using the algorithm described in FIG. 3, wherein FIG. 5 is a state diagram of the aov adjacency matrix before the deadlock is detected, FIG. A state diagram for the aov adjacency matrix after the deadlock is detected. If there is an arc reaching the vertex of the vertex ⁇ , then the i-th row and the j-th column of aov record a pointer of the waiting event object, which is represented by solid dots in FIG. 5 and FIG. 6, and the unit without the solid dot is empty data. .
- the thread number is represented by an Arabic numeral, and the thread number of the thread is i.
- the i-th row of the aov adjacency matrix records the information of the thread waiting for other threads. As mentioned above, it is obvious that there is at most one non-empty unit in a row.
- the jth column of the aov adjacency matrix records information about other threads waiting for the thread ⁇ , and a column may have multiple non-empty cells, indicating that multiple threads are waiting for the thread.
- FIG. 7 is a schematic structural diagram of an apparatus according to an embodiment of the present invention, which may specifically include:
- the information storage module the deadlock detection module, the information recording module in each thread, and the information update module are described in detail below.
- the information storage module in the process of locking, if the locking thread needs to wait for other threads, the waiting relationship information between the threads is generated, and the waiting relationship information between the threads is stored in the information storage module; the information storage module is in the present
- the form of the aov adjacency matrix is employed in the embodiment of the invention.
- the information recording module can be included in the thread.
- the thread is called a locking thread.
- the information recording module records the waiting relationship information of the locking thread waiting for other threads in the information storage module, and then suspends waiting for the relevant thread to unlock.
- the information recording module of the locking thread i records the waiting relationship information (aov[i][j] indicating that the thread i waits for the thread j) in the i row j column of the aov adjacency matrix, and empties after waking up and obtaining the applied lock.
- the information update module may be included in the thread.
- the thread When the thread unlocks, the thread is called an unlocking thread; during the unlocking process of the relevant thread, determining each thread recorded in the information storage module to apply for the lock, Whether the type of lock to be applied is compatible with the type of lock owned by the unlocking thread. If it is incompatible, the waiting relationship information remains unchanged. If it is compatible, it is further determined whether it is incompatible with the type of lock owned by at least one other thread. If yes, perform a lock wait relationship migration, update the corresponding waiting relationship information in the adjacency matrix, otherwise only clear the original inter-thread waiting relationship information.
- the information update module of the unlocking process j determines whether the thread t is waiting.
- the lock is lm and the type of lock to be applied by the thread t is compatible with the lock type that the thread also has. If it is incompatible, the aov[t] j] is kept unchanged. If it is compatible, the next lock is found.
- each thread itself may include an information recording module for recording waiting relationship information between the thread and other threads in the information storage module when the thread is used as a locking thread; and may further include an information update module. And for updating the corresponding waiting relationship information in the information storage module as needed when the thread is used as the unlocking module.
- an information recording module for recording waiting relationship information between the thread and other threads in the information storage module when the thread is used as a locking thread
- an information update module for updating the corresponding waiting relationship information in the information storage module as needed when the thread is used as the unlocking module.
- the deadlock detection module in the embodiment of the present invention, the deadlock detection module is periodically executed by a background independent thread (dead lock detection thread) (post-detection) or immediately detected during the locking process (pre-detection).
- the deadlock detection thread first copies a backup of the aov adjacency matrix (the adj adjacency matrix constitutes a directed graph G), and then applies the detection algorithm shown in FIG. 3 to perform operations on the backup data to find a loop waiting loop (deadlock loop) therein. : Remove all nodes without predecessors and all arcs it emits. If all nodes can be removed, no deadlock occurs, end detection; otherwise, there is a deadlock loop, select one of the deadlock loops according to the predetermined strategy. Node as deadlock detection Sacrifice thread.
- the embodiments of the present invention provide a deadlock detection method and apparatus for a database transaction lock mechanism, and the following advantages are as follows:
- the adjacency matrix is used to record the waiting relationship between threads. Only the operation of the matrix can detect all the loop waiting loops between the threads. For each ring, a victim thread is selected according to a certain strategy. When it fails to return, it can break the deadlock and has extremely high detection efficiency.
- the information obtained by the adding and unlocking process can be fully utilized to assist in detecting deadlocks, and the repeated calculation of such information during the deadlock detection process is avoided, thereby improving the utilization rate of the system computing resources.
- many lock mechanisms completely separate the adding, unlocking process and deadlock detection process, and lose some useful information, resulting in repeated calculation of the deadlock detection process in the later stage, wasting computing resources.
- aov adjacency matrix backup data to detect deadlocks can make the deadlock detection thread extremely small, hinder the normal thread's adding and unlocking process, and hardly block the execution of normal threads.
- the multi-locking mechanism needs to access the data in the resource map and the lock entity during the process of detecting the deadlock, so the deadlock detection process inevitably blocks the addition and unlocking processes of other normal threads.
- the deadlock detection phase uses the backup data for operation, and does not interfere with the normal thread's plus unlock process, thereby improving the overall efficiency of the system.
Description
Claims
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP10782964.0A EP2439640A4 (en) | 2009-06-04 | 2010-05-31 | METHOD AND DEVICE FOR DETECTING FATAL STOP OF DATA BASE TRANSACTION LOCKING MECHANISM |
BRPI1011087A BRPI1011087A2 (pt) | 2009-06-04 | 2010-05-31 | método e dispositivo para detecção de bloqueio de mecanismo de trava de transação de banco de dados. |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910143961.7 | 2009-06-04 | ||
CN2009101439617A CN101576830B (zh) | 2009-06-04 | 2009-06-04 | 数据库事务锁机制的死锁检测方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2010139260A1 true WO2010139260A1 (zh) | 2010-12-09 |
Family
ID=41271767
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2010/073392 WO2010139260A1 (zh) | 2009-06-04 | 2010-05-31 | 数据库事务锁机制的死锁检测方法及装置 |
Country Status (4)
Country | Link |
---|---|
EP (1) | EP2439640A4 (zh) |
CN (1) | CN101576830B (zh) |
BR (1) | BRPI1011087A2 (zh) |
WO (1) | WO2010139260A1 (zh) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111522730A (zh) * | 2020-03-09 | 2020-08-11 | 平安科技(深圳)有限公司 | 程序测试方法及装置、计算机装置、计算机可读介质 |
CN112099960A (zh) * | 2020-09-21 | 2020-12-18 | 天津神舟通用数据技术有限公司 | 一种基于路径推进的分布式死锁检测方法 |
CN113742091A (zh) * | 2021-08-31 | 2021-12-03 | 深圳Tcl新技术有限公司 | 一种线程运行方法、装置、计算机设备和存储介质 |
CN116089100A (zh) * | 2023-01-12 | 2023-05-09 | 北京万里开源软件有限公司 | 一种数据库中锁资源监控方法及装置 |
WO2024046089A1 (zh) * | 2022-08-31 | 2024-03-07 | 华为技术有限公司 | 持锁进程检测方法及相关设备 |
Families Citing this family (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101576830B (zh) * | 2009-06-04 | 2011-11-30 | 中兴通讯股份有限公司 | 数据库事务锁机制的死锁检测方法及装置 |
CN102222015B (zh) * | 2010-04-13 | 2016-04-27 | 三星电子(中国)研发中心 | 检测多线程程序中的死锁的方法及系统 |
CN102156928A (zh) * | 2011-04-29 | 2011-08-17 | 浪潮通信信息系统有限公司 | 一种通过业务逻辑锁进行系统并发控制的方法 |
CN102521033B (zh) * | 2011-12-14 | 2014-06-25 | 华南理工大学 | 一种监测系统调度的死锁检测与解除方法 |
CN105468509A (zh) * | 2014-09-04 | 2016-04-06 | 阿里巴巴集团控股有限公司 | 代码稳定性检测方法及装置 |
CN105468508B (zh) * | 2014-09-04 | 2018-07-03 | 阿里巴巴集团控股有限公司 | 代码检测方法及装置 |
EP3278239B1 (en) | 2015-04-01 | 2019-08-14 | AB Initio Technology LLC | Processing database transactions in a distributed computing system |
CN106959895B (zh) * | 2016-01-12 | 2021-01-01 | 创新先进技术有限公司 | 快速释放线程的资源调度方法和系统 |
CN107305507B (zh) * | 2016-04-25 | 2020-05-01 | 北京京东尚科信息技术有限公司 | 死锁控制方法和装置 |
EP3557459B1 (en) * | 2018-04-17 | 2022-05-25 | Panasonic Intellectual Property Corporation of America | Method, information processing device, management system, and program to control locking and unlocking of storage |
CN109669858B (zh) * | 2018-11-22 | 2022-04-12 | 新华三技术有限公司合肥分公司 | 程序死锁的测试方法、装置和设备 |
CN111221658B (zh) * | 2019-05-31 | 2023-08-01 | 烟台职业学院 | 系统死锁的检测方法及系统 |
CN112256442A (zh) * | 2019-07-22 | 2021-01-22 | 中兴通讯股份有限公司 | 一种数据库死锁检测方法及装置 |
CN110909012B (zh) * | 2019-12-04 | 2020-09-04 | 上海达梦数据库有限公司 | 数据库对象的封锁方法、装置、设备和存储介质 |
CN111752718B (zh) * | 2020-05-28 | 2022-07-12 | 西安深信科创信息技术有限公司 | 一种低开销的死锁预测方法、装置及电子设备 |
CN112100192A (zh) * | 2020-09-27 | 2020-12-18 | 中国建设银行股份有限公司 | 数据库锁等待处理方法及装置 |
CN112363846B (zh) * | 2021-01-11 | 2021-04-13 | 北京金山云网络技术有限公司 | 数据库事务的死锁检测方法、装置及电子设备 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0433882A2 (en) * | 1989-12-22 | 1991-06-26 | International Business Machines Corporation | Accelerated deadlock detection in congested data transactions |
CN1987796A (zh) * | 2005-12-22 | 2007-06-27 | 国际商业机器公司 | 检测多线程程序中的死锁的方法和装置 |
CN101576830A (zh) * | 2009-06-04 | 2009-11-11 | 中兴通讯股份有限公司 | 数据库事务锁机制的死锁检测方法及装置 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6128706A (en) * | 1998-02-03 | 2000-10-03 | Institute For The Development Of Emerging Architectures, L.L.C. | Apparatus and method for a load bias--load with intent to semaphore |
CN100344125C (zh) * | 2003-11-26 | 2007-10-17 | 华为技术有限公司 | 一种数据传输死锁的解决方法 |
ATE366959T1 (de) * | 2004-02-26 | 2007-08-15 | Research In Motion Ltd | Verfahren und system zur erkennung von möglichen blockierungen in computerprogrammen |
CN101295266B (zh) * | 2008-06-05 | 2010-06-16 | 成都市华为赛门铁克科技有限公司 | 检测和解除死锁的方法、装置和系统 |
-
2009
- 2009-06-04 CN CN2009101439617A patent/CN101576830B/zh active Active
-
2010
- 2010-05-31 WO PCT/CN2010/073392 patent/WO2010139260A1/zh active Application Filing
- 2010-05-31 EP EP10782964.0A patent/EP2439640A4/en not_active Withdrawn
- 2010-05-31 BR BRPI1011087A patent/BRPI1011087A2/pt not_active Application Discontinuation
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0433882A2 (en) * | 1989-12-22 | 1991-06-26 | International Business Machines Corporation | Accelerated deadlock detection in congested data transactions |
CN1987796A (zh) * | 2005-12-22 | 2007-06-27 | 国际商业机器公司 | 检测多线程程序中的死锁的方法和装置 |
CN101576830A (zh) * | 2009-06-04 | 2009-11-11 | 中兴通讯股份有限公司 | 数据库事务锁机制的死锁检测方法及装置 |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111522730A (zh) * | 2020-03-09 | 2020-08-11 | 平安科技(深圳)有限公司 | 程序测试方法及装置、计算机装置、计算机可读介质 |
CN111522730B (zh) * | 2020-03-09 | 2024-03-29 | 平安科技(深圳)有限公司 | 程序测试方法及装置、计算机装置、计算机可读介质 |
CN112099960A (zh) * | 2020-09-21 | 2020-12-18 | 天津神舟通用数据技术有限公司 | 一种基于路径推进的分布式死锁检测方法 |
CN113742091A (zh) * | 2021-08-31 | 2021-12-03 | 深圳Tcl新技术有限公司 | 一种线程运行方法、装置、计算机设备和存储介质 |
WO2024046089A1 (zh) * | 2022-08-31 | 2024-03-07 | 华为技术有限公司 | 持锁进程检测方法及相关设备 |
CN116089100A (zh) * | 2023-01-12 | 2023-05-09 | 北京万里开源软件有限公司 | 一种数据库中锁资源监控方法及装置 |
CN116089100B (zh) * | 2023-01-12 | 2023-10-20 | 北京万里开源软件有限公司 | 一种数据库中锁资源监控方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN101576830A (zh) | 2009-11-11 |
CN101576830B (zh) | 2011-11-30 |
EP2439640A4 (en) | 2015-01-21 |
EP2439640A1 (en) | 2012-04-11 |
BRPI1011087A2 (pt) | 2018-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2010139260A1 (zh) | 数据库事务锁机制的死锁检测方法及装置 | |
KR102103063B1 (ko) | 분산 컴퓨팅 시스템에서 데이터베이스 트랜잭션들을 프로세싱하는 방법 | |
JP4726416B2 (ja) | コンピュータ・クラスタを操作するための方法 | |
US7284151B2 (en) | Conditional data access after database system failure | |
US7240054B2 (en) | Techniques to preserve data constraints and referential integrity in asynchronous transactional replication of relational tables | |
JP2531881B2 (ja) | 並行制御方法 | |
Wang et al. | Scaling multicore databases via constrained parallel execution | |
CN102355473B (zh) | 分布式计算环境下的锁定控制系统和方法 | |
CA2375376A1 (en) | Collision avoidance in bidirectional database replication | |
JP2023509035A (ja) | トランザクション処理方法、装置、コンピュータデバイス及びコンピュータプログラム | |
CN112241400A (zh) | 一种基于数据库实现分布式锁的方法 | |
CN108431808A (zh) | 对分区的数据存储空间当中的结构化数据记录的提醒处理 | |
CN109783578A (zh) | 数据读取方法、装置、电子设备以及存储介质 | |
Chen et al. | Achieving low tail-latency and high scalability for serializable transactions in edge computing | |
US20140040219A1 (en) | Methods and systems for a deadlock resolution engine | |
US20230072976A1 (en) | Database system with transactional commit protocol based on safe conjunction of majorities | |
JPH0277868A (ja) | 共用データの管理方法 | |
JP2019101518A (ja) | 情報処理プログラム、情報処理装置及び情報処理方法 | |
Gupta | Deadlock detection techniques in distributed database system | |
JP4604032B2 (ja) | 非共有データベースシステムにおける1段階コミット | |
Waudby et al. | A performance study of epoch-based commit protocols in distributed OLTP databases | |
Shao et al. | Read Consistency in Distributed Database Based on DMVCC | |
CN112667652B (zh) | 基于区块链的模拟交易方法、装置、设备和可读存储介质 | |
Makni et al. | Performance evaluation of an optimistic concurrency control algorithm for temporal databases | |
CN111221658B (zh) | 系统死锁的检测方法及系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 10782964 Country of ref document: EP Kind code of ref document: A1 |
|
REEP | Request for entry into the european phase |
Ref document number: 2010782964 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2010782964 Country of ref document: EP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 10431/DELNP/2011 Country of ref document: IN |
|
WWE | Wipo information: entry into national phase |
Ref document number: A20111844 Country of ref document: BY |
|
REG | Reference to national code |
Ref country code: BR Ref legal event code: B01A Ref document number: PI1011087 Country of ref document: BR |
|
REG | Reference to national code |
Ref country code: BR Ref legal event code: B01E Ref document number: PI1011087 Country of ref document: BR |
|
ENP | Entry into the national phase |
Ref document number: PI1011087 Country of ref document: BR Kind code of ref document: A2 Effective date: 20111202 |