United Business Media EE Times


Search

HOMEMARKET INTELLIGENCE UNITFORUMSDESIGNNEW PRODUCTSCAREERSBLOGSCONTACTEVENTSSIGN UP!RSSMost Popular contentTrusted Sources

 


Multithreading invites string of nasty bugs
Print this article Email this article Reprints RSS Digital Edition

EE Times


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 nondeterministic and largely unintelligible to their own programmers. That's because in a multihreaded system, the program execution sequence (and processor state) can be switched at any time, thus making it difficult--if not impossible--for 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 nondeterminism in some multithreaded applications. But he asserts that the techniques are insufficient. Indeed, he goes so 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 nondeterminism where abso- lutely 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 methodology--and I'm starting to wonder whether multithreading is the right approach.

Jeff Bier is president of Berkeley Design Technology Inc. (www. BDTI.com), a consulting firm providing analysis and advice on DSP technology. Jennifer Eyre of BDTI contributed to this column.



Related Links:

  • Impulse Response columns


  • The views and opinions expressed in this column are strictly those of the author and should not be taken as an editorial position of EE Times or any of its other editors, publications or Web sites.


      Free Subscription to EE Times
    First Name Last Name
    Company Name Title
    Email address
      Click here for your Free Subscription to EETimes Europe
     
    CAREER CENTER
    Looking for a new job?
    SEARCH JOBS
    SPONSOR

    RECENT JOB POSTINGS
    CAREER NEWS
    SRC Expands R&D Centers
    The Semiconductor Research Corp has added a new center to its university R&D efforts.

    For more great jobs, career related news, features and services, please visit EETimes' Career Center.


    All White Papers »   

     
    Education and
    Learning


    Learn Now:












    Home | About | Editorial Calendar | Feedback | Subscriptions | Newsletter | Media Kit | Contact | Reprints|  RSS|   Digital|  Mobile
    Network Websites
    International
    Network Features




    All materials on this site Copyright © 2009 TechInsights, a Division of United Business Media LLC All rights reserved.
    Privacy Statement | Terms of Service | About