• Home
  • Welcome to the Jungle
  • GotW
  • Elements of Modern C++ Style
  • About

Sutter’s Mill

Herb Sutter on software, hardware, and concurrency

Feeds:
Posts
Comments
« Postponed: Effective Concurrency Europe
RIP: SD Conferences »

Effective Concurrency: Use Threads Correctly = Isolation + Asynchronous Messages

2009-03-16 by Herb Sutter

This month’s Effective Concurrency column, “Use Threads Correctly = Isolation + Asynchronous Messages”, is now live on DDJ’s website.

From the article:

Explicit threads are undisciplined. They need some structure to keep them in line. In this column, we’re going to see what that structure is, as we motivate and illustrate best practices for using threads — techniques that will make our concurrent code easier to write correctly and to reason about with confidence.

I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns and the DDJ print magazine issue in which they first appeared:

The Pillars of Concurrency (Aug 2007)

How Much Scalability Do You Have or Need? (Sep 2007)

Use Critical Sections (Preferably Locks) to Eliminate Races (Oct 2007)

Apply Critical Sections Consistently (Nov 2007)

Avoid Calling Unknown Code While Inside a Critical Section (Dec 2007)

Use Lock Hierarchies to Avoid Deadlock (Jan 2008)

Break Amdahl’s Law! (Feb 2008)

Going Superlinear (Mar 2008)

Super Linearity and the Bigger Machine (Apr 2008)

Interrupt Politely (May 2008)

Maximize Locality, Minimize Contention (Jun 2008)

Choose Concurrency-Friendly Data Structures (Jul 2008)

The Many Faces of Deadlock (Aug 2008)

Lock-Free Code: A False Sense of Security (Sep 2008)

Writing Lock-Free Code: A Corrected Queue (Oct 2008)

Writing a Generalized Concurrent Queue (Nov 2008)

Understanding Parallel Performance (Dec 2008)

Measuring Parallel Performance: Optimizing a Concurrent Queue (Jan 2009)

volatile vs. volatile (Feb 2009)

Sharing Is the Root of All Contention (Mar 2009)

Use Threads Correctly = Isolation + Asynchronous Messages (Apr 2009)

Share this:

  • Email
  • Reddit
  • Twitter

Posted in Concurrency, Software Development | 6 Comments

6 Responses

  1. on 2009-03-19 at 2:55 pm Henrik Vallgren

    This is the best one yet. I’m looking forward to the book!


  2. on 2009-03-20 at 4:05 am Ghita

    Great article !
    Have a question: quote “Getting work off the GUI thread using a thread pool (appropriate for shorter and non-blocking work)”.

    Why there is such a strong requirement there, that it has to be non-blocking and shorter work ? (compare it to async options: Dedicated Background Thread and Background Thread Per Task)


  3. on 2009-03-20 at 5:43 pm Brian

    Interesting article, but wow, does it look unprofessional. Shame on DDJ. These images look like they’ve been through a lossy compression cycle AND they’ve been scaled as a raster image.


  4. on 2009-03-24 at 8:16 am Thomi

    I’m inclined to agree with Brian – the images really let the otherwise superb quality of the article down. With my poor eyesight, I can barely read the text in the image on page 1. The others aren’t much better.

    What’s going on?


  5. on 2009-03-24 at 8:55 am Herb Sutter

    I’ve brought it to their attention and resent the images. Oddly, the images always look fine in the “print” version (the print magazine while it was alive, and now the PDF print-like version they email to subscribers), but have variable quality on the website.


  6. on 2009-04-20 at 10:22 am Carlos O'Ryan

    If the best way to use threads is Isolation + Asynchronous Messages then I would use processes talking via some type of queue (sockets, message queues, shared memory queues, whatever.)

    They naturally enforce the level of isolation and the type of communication you want, and for client-side work the additional overhead is negligible (I did not say zero, I said the user is hardly going to notice.)
    If you are on a busy server, then the story is different.

    What did I miss?



Comments are closed.

  • Top Posts

    • Going Native Sessions Online
    • Welcome to the Jungle
    • Elements of Modern C++ Style
  • Browse By Date

    March 2009
    S M T W T F S
    « Feb   Apr »
    1234567
    891011121314
    15161718192021
    22232425262728
    293031  
  • Categories

    • Apple
    • C# / .NET
    • C++
    • Concurrency
    • Effective Concurrency
    • Friday Thoughts
    • GotW
    • Hardware
    • Java
    • Microsoft
    • Opinion & Editorial
    • Software Development
    • Talks & Events
    • Uncategorized
    • Web
  • Tweets

    • @dgregor79 sure, and AST envy :) 1 week ago
    • @phlox81 Wird noch ein Panel sein mit allen Sprecher, 16:00h PST (1.25 Stunden). Wird sicher interessant werden 1 week ago
    Follow @herbsutter

Blog at WordPress.com. Fonts on this blog.

Theme: MistyLook by Sadish.


Follow

Get every new post delivered to your Inbox.

Join 2,641 other followers

Powered by WordPress.com
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.