FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
High Performance Computing
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
January 15, 2007
Multithreading Invites String of Nasty Bugs

Jeff Bier
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.

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 ARTICLES
No Related Articles
TOP 5 ARTICLES
No Top Articles.
DR. DOBB'S CAREER CENTER
Looking for a new job? open | close
Search jobs on Dr. Dobb's TechCareers
Function:

Keyword(s):

State:  
  • Post Your Resume
  • Employers Area
  • News & Features
  • Blogs & Forums
  • Career Resources

    Browse By:
    Location | Employer | City
  • Most Recent Posts:



    MICROSITES
    FEATURED TOPIC

    ADDITIONAL TOPICS

    INFO-LINK



     




    Techweb
    Informationweek Business Technology Network
    InformationweekInformationweek 500Informationweek 500 ConferenceInformationweek AnalyticsInformationweek Events
    Informationweek MagazineGlobal CIOIWK Government ITbMightyByte and SwitchDark Reading
    Digital LibraryIntelligent EnterpriseInternet EvolutionNetwork ComputingPlug Into The CloudDr. DobbsContentinople
    space
    TechWeb Events Network
    InteropVoiceConWeb 2.0 ExpoWeb 2.0 SummitEnterprise 2.0Mobile Business ExpoNoJitter
    Black HatGTECEnergy CampCloud ConnectGov 2.0 ExpoGov 2.0 Summit
    space
    Light Reading Communications Network
    Light ReadingLight Reading AsiaUnstrungCable Digital NewsInternet EvolutionPyramid Research
    Heavy ReadingLight Reading LiveLight Reading InsiderEthrnet ExpoTelco TVTower Technology Summit
    space
    Financial Technology Network
    Advanced TradingBank Systems and TechnologyInsurance and TechnologyWall Street and TechnologyAccelerating WallstreetBST SummitBuyside Trading SummitIT Summit
    space
    Microsoft Technology Network
    MSDNTechNetTotal IT ProTotal Dev ProNET Total Dev Pro CommunitySQL Total Dev Pro Community
    space