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

Methods and apparatus for detecting deadlock in multithreading programs

a multi-threading program and deadlock detection technology, applied in the field of multi-threading programs, can solve problems such as difficult detection of deadlock, and achieve the effect of large problems

Inactive Publication Date: 2007-06-28
IBM CORP
View PDF18 Cites 21 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Benefits of technology

[0016] The approach of the present invention includes detailed reporting at both the interprocedural and intraprocedural level allowing for the clear identification of resource contention locations. The method is general in that it works on a resource cycle strategy through an abstract description of the program involving graphs and not details of the programming language. Thus, the embodiments of the present invention may be applied to any language which implements monitors and may be scaled to large problems.

Problems solved by technology

Deadlock is a pernicious condition in which multiple processes are prohibited from making progress, because each is waiting for one or more resources that are being used by some other process.
However, deadlock is difficult to detect because it may occur only under specific conditions involving, for example, the interleaving or timing of the executing threads.

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
  • Methods and apparatus for detecting deadlock in multithreading programs
  • Methods and apparatus for detecting deadlock in multithreading programs
  • Methods and apparatus for detecting deadlock in multithreading programs

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] As will be illustrated in detail below, the present invention introduces techniques for detecting deadlock in multithreading programs. The embodiments of the present invention may be implemented for any multithreading program implementing monitors, however, for illustrative purposes they are described herein as applied to a Java™ program.

[0028] The embodiments of the present invention may be utilized for both source code and byte code. In the former case, the source code is compiled and the approach is applied to Java™ archive (jar) files containing the byte code. In the latter case, the methodology may be applied even if the source code is unavailable, which may frequently occur. The embodiments are automatic, and no annotation of the code is required. The jar files are input to the system along with some configuration data, and the output is a report that includes a summary of potential deadlocks.

[0029] The Java™ language makes use of monitors, which protect a body of cod...

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 of detecting deadlock in a multithreading program is provided. An invocation graph is constructed having a single root and a plurality of nodes corresponding to one or more functions written in code of the multithreading program. A resource graph is computed in accordance with one or more resource sets in effect at each node of the invocation graph. It is determined whether cycles exist between two or more nodes of the resource graph. A cycle is an indication of deadlock in the multithreading program.

Description

FIELD OF THE INVENTION [0001] The present invention relates generally to multithreading programs and, more particularly, to techniques for detecting deadlock in multithreading programs. BACKGROUND OF THE INVENTION [0002] Deadlock is a pernicious condition in which multiple processes are prohibited from making progress, because each is waiting for one or more resources that are being used by some other process. However, deadlock is difficult to detect because it may occur only under specific conditions involving, for example, the interleaving or timing of the executing threads. [0003] In a simple example of deadlock, an operating system contains two files, file1 and file2. Two concurrently running processes, thread1 and thread2, both require file1 and file2 to complete successfully. If thread1 opens file1, and thread2 opens file2, deadlock may result when thread1 attempts to open file2 before closing file1, and thread2 attempts to open file1 before closing file2. Thus, the two proces...

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(United States)
IPC IPC(8): G06F9/46
CPCG06F9/524
Inventor LEEMAN, GEORGE B. JR.
Owner IBM CORP
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