The Race Is On to Debug Dual-Core Deadlocks


Exploring best practices for building parallel applications


Email    print   
February 1, 2006 —  (Page 1 of 3)
You write a program. You test it. You ship it. Then, mysteriously, it doesn’t run.

What’s the culprit? Most likely, a deadlock or a race condition, said James Reinders, a senior engineer at Intel. Both errors can grind a multithreaded application to a halt, and are notoriously difficult to detect. “They simply don’t exist in sequential programs,” he said.

Deadlocks and race conditions aren’t new; they’ve afflicted multiprocessor systems, particularly large servers, for many years. But dual-core processors for the desktop, delivered by AMD and Intel last year, are bringing them to the fore. That’s generating renewed interest in an old problem: the difficulty of designing and coding applications that execute multiple processes concurrently.

Dual-core processors don’t fundamentally change the way developers write applications, said Margaret Lewis, director of commercial ISV marketing at Sunnyvale, Calif.-based chipmaker AMD. But they further enable multithreading—also known as concurrent development or parallel programming—in which an application sends “multiple execution strings to the processor,” she said.

Threads within multithreaded applications, which also can run on single processors, often compete for shared resources (such as memory and disk space) as well as variables and functions. A deadlock can occur, for example, when a multithreaded application locks a resource and fails to unlock it once the thread has completed its task, said Andy Yang, product manager at

San Francisco-based Coverity, which sells a source code analyzer, among other tools. “The system freezes up.”

Race conditions happen when threads compete for the same resources and the application fails to specify the order in which the threads can access those resources. “You solve the problem with synchronization,” said Reinders. “If the flag is up, don’t take [the resource]. If the flag is down, it’s available.”

Detecting either error is difficult because collisions don’t always occur, so pinpointing the problem is a matter of timing, said Ken Cowan, a product line manager for Detroit-based Compuware, which sells coding, testing and other tools. When QA tests the app by hand, the error doesn’t appear, but it may show up in load testing, he said. “With 50 users, the application fails. And it’s not clear why.”




Pages 1 2 3 


Share this link: http://sdt.bz/29110
 
Most Read Latest News Blog Resources

Add comment


Name*
Email*  
Country     


  • Comment
Loading




close
NEXT ARTICLE
Erasing Race Conditions
Coverity again is helping to unwind the intricacies of multithreaded applications and make testing for concurrency defects more automated and Read More...
 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
FEBRUARY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
Are you at risk for burnout?
Burnout is a severe problem and it can strike at any time. Here's how to tell if you are nearing the edge.
02/09/2012 02:16 PM EST

Agility, mom, and apple pie
If we're to evaluate the state-of-the-art in software development, we should start with the values espoused in the Agile Manifesto.
02/07/2012 11:57 AM EST

RIM woos developers with free tablet
How do you get more apps ported to the BlackBerry PlayBook? By giving every developer a free tablet, of course!
02/04/2012 01:57 PM EST

GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
02/03/2012 12:17 PM EST

Facebook claims hacker cred
Facebook's SEC S-1 filing form includes a short essay on the Hacker Way by Mark Zuckerberg himself.
02/02/2012 08:26 AM EST

Ryan Dahl steps down
Ryan Dahl, creator of Node.js, steps back from his position as gatekeeper for the project.
02/01/2012 04:58 PM EST

 
Events calendar tab
2/13/2012 to 2/16/2012
Santa Clara
TechWeb

2/26/2012 to 2/29/2012
San Francisco
BZ Media

2/27/2012 to 3/2/2012
San Francisco
RSA

3/4/2012 to 3/7/2012
Las Vegas
IBM Tivoli

3/5/2012 to 3/9/2012
San Francisco
TechWeb