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

An automatic deadlock repair method based on lock acquisition in advance

A technology of early acquisition and automatic repair, applied in the fields of instrumentation, electrical digital data processing, computing, etc., to achieve the effect of high success rate

Active Publication Date: 2018-04-13
INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, statically or dynamically adding new locks in the outer layer is not the best deadlock repair method

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
  • An automatic deadlock repair method based on lock acquisition in advance
  • An automatic deadlock repair method based on lock acquisition in advance
  • An automatic deadlock repair method based on lock acquisition in advance

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] Such as figure 1 As shown, the steps of the present invention include: for each thread t in the deadlock, extract the synchronization module of the program and the control flow in the synchronization module, and calculate the set of operations on other locks in the synchronization module; according to the obtained set, select the most suitable The candidate thread directly executes the lock acquisition operation in advance, and additional context-aware condition control; according to the control flow chart type of the extracted synchronization module, do corresponding processing; execute the repaired program, if the compilation fails, return to the previous step, Select another candidate thread for deadlock repair operation. The present invention cannot fix the deadlock if there are no candidate threads to choose from.

[0037] A thread acquires a lock and waits to acquire another lock is a necessary condition for deadlock to occur. The first lock acquired by a thread ...

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 relates to a deadlock automatic repairing method based on lock early acquisition, and belongs to the fields of software testing and software reliability. The method comprises the following steps: firstly extracting a synchronization module of a program and a control flow chart in the synchronization module, computing a set of the operations for other locks in the synchronization module; and then selecting a proper candidate thread to execute the deadlock repairing operation; if one thread exists in the thread referred to the deadlock and the operation for other locks is inexistent between two operations for acquiring the lock, directly executing the lock early acquisition operation on the thread to perform the deadlock repairing; otherwise, adding context-aware condition control on the basis of executing the lock early acquisition operation so as to perform the deadlock repairing. Under the condition of not introducing a new lock, the method disclosed by the invention can repair the deadlock in the program. The theory can prove that the method cannot introduce new deadlock, new deadlock is not introduced in the process of successfully repairing 20 deadlocks, and the serious performance degradation cannot be caused.

Description

technical field [0001] The invention belongs to the technical field of software testing and the field of software reliability, in particular to a deadlock automatic repair method in a multi-threaded program. Background technique [0002] With the widespread use of multi-core CPUs, more and more software uses multi-threading technology to process certain tasks concurrently. However, a multi-threaded program requires each thread to be well synchronized to complete a certain task during the running process. When there is an error in the synchronization between these threads, it will lead to the occurrence of concurrency defects, and deadlock (Deadlock) is the most basic concurrency defect. [0003] Deadlocks can usually be divided into two categories: resource deadlocks and communication deadlocks. Communication deadlocks are usually caused by buffer competition for information sending and receiving; resource deadlocks, that is, two Or when two or more threads are executing c...

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): G06F11/36
CPCG06F11/3636
Inventor 蔡彦曹玲微
Owner INST OF SOFTWARE - CHINESE ACAD OF SCI
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