Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
?
EE Times-Asia > Controls/MCUs
?
?
Controls/MCUs??

What's bugging multithreading?

Posted: 02 Apr 2007 ?? ?Print Version ?Bookmark and Share

Keywords:multithreaded application programming? bugs on multithreading? multithreading disadvantages?

Multithreaded programming isn't a new idea, but it's experiencing a major upswing in attention. That's because many multicore-chip vendors are pushing multithreading as the best way to harness their chips' processing horsepower.

But a recent paper by Edward Lee argues that multithreaded application programming, as commonly practiced, is a flawed methodology that invites a range of nasty, hard-to-identify bugs.

Lee is a professor of EECS at the University of California, Berkeley, and a founder of Berkeley Design Technology Inc. In The Problem with Threads (www.eecs.berkeley.edu), he asserts that multithreaded applications are often wildly non-deterministic and largely unintelligible to their own programmers. That's because in a multithreaded system, the program execution sequence (and processor state) can be switched at any time, thus making it difficultif not impossiblefor the programmer to determine whether every possible sequence will work correctly. As a result, even simple-looking programs may be riddled with potential deadlocks and other hazards.

According to Lee, thread-based programming has worked reasonably well so far because it has been applied in fairly limited ways and has typically been used on single-core processors, which offer limited parallelism. But as engineers implement more aggressive multithreading on highly parallel processors, they can expect severe bugs to show up with alarming frequency, he argues.

Lee acknowledges that there are techniques to mitigate the problem and allow the programmer to reduce the inherent non-determinism in some multithreaded applications. But he asserts that the techniques are insufficient. Indeed, he goes far as to say that the current approach is fundamentally backward.

His solution? Develop programming approaches and languages that start with deterministic behavior and only introduce non-determinism where absolutely necessary. That would not be a quick fix.

Not surprisingly, Lee's paper has attracted considerable attention in the software-engineering world. But his point is no less relevant for DSP engineers. In fact, it may be even more important in that realm, since DSP engineers often work on mission-critical systems and deal with hard real-time constraints that demand a high level of determinism.

As DSP system designers increasingly adopt multicore technologies, they will need a robust software development methodologyand I'm starting to wonder whether multithreading is the right approach.

- Jeff Bier
President, Berkeley Design Technology Inc.

Jennifer Eyre contributed to this article




Article Comments - What's bugging multithreading?
Comments:??
*? You can enter [0] more charecters.
*Verify code:
?
?
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

?
?
Back to Top