Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Getting C++ Threads Right

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
84,755
Loading...
Alert icon
Sign in or sign up now!
Alert icon
There is no Interactive Transcript.

Uploaded by on Dec 14, 2007

Google Tech Talks
December, 12 2007

ABSTRACT

The advent of multicore processors has generated profound debate on the merits of writing parallel programs with threads and locks. Nonetheless, for many application domains, this remains the standard paradigm for writing parallel programs, and at the moment, there is no apparent universal replacement. And it is the focus of this talk.

Somewhat surprisingly, there are a number of often subtle, but generally fixable, industry-wide problems with current approaches to threads programming. We'll focus on probably the most widely used environments, consisting of C or C++ with a standard threads library. Problems span the spectrum from system libraries through language implementations through supporting hardware. They get in the way both in that they often make it difficult to write 100% reliable multi-threaded software, and in that they confuse even the basics of the programming model, thus making it hard to teach. A surprising number of "experts" do not understand the basic rules. Arguably, these problems really need to be addressed to even allow a meaningful comparison to other parallel programming approaches.

Since solutions to these problems generally require a coordinated industry effort, we helped to persuade the C++ standards committee to address them by pursuing a coherent approach to threads in the next C++ standard. The talk will outline some of the proposed solutions, and give an update on this effort.

Speaker: Hans Boehm
Hans Boehm is a member of the advanced architecture group at HP Labs. He has worked on many aspects of programming language design and implementation, including garbage collection and concurrency, and he was HP's representative to the effort to redesign Java's memory model. He is a past Chair of ACM SIGPLAN, and is an ACM Distinguished Scientist.

Category:

People & Blogs

Tags:

License:

Standard YouTube License

  • likes, 16 dislikes

Link to this comment:

Share to:

Top Comments

  • "I need your clothes, your boots, and your motorcycle."

  • Good lecture for compiler writers, not so good for users of compilers. If you are scared of threads now, watch this and get REALLY scared.

    As his slides show, you have to write really bad code to maybe get these bugs to show up --like multiple writes to unprotected shared bitfields. Well duh--that might cause you a problem.

    Im glad C++ is fixing this stuff, but this lecture isnt going to help you write better MT apps.

see all

All Comments (84)

Sign In or Sign Up now to post a comment!
  • He definitely needs the subtitles.

  • GAH GET YOUR DAMN QUALITY RIGHT GOOGLE, this is so annoying.

    Great video = Bad quality... so common these days, I hope this doesn't happen in 2020 (In the future)

  • This would be great if youtube would actually stream it without pausing every 20 seconds (I'm on a 18MBit connection)

  • this could have been interesting if youtube didn't exit fullscreen on pause

  • /watch?v=ps0QOaqcrII

  • @bogoid each one is gonna die

  • @rahulrvideo, @robnox - Whether or not Python is slower than C++ depends a lot on the application. I can promise you that if you're implementing 'cp' you will not notice any difference in speed between the two. You will only notice a difference when your program is CPU bound.

    That said, the factor of '1000' is believable in some instances, and as an average for a bunch of benchmarks I'm fully willing to believe it. But don't think that kind of measurement tells the whole story.

  • @VideoFilterGuy i think i was trying to say that.. but nevertheless nicely put :)

  • @non91 Assembly will always be around as it is merely a human readable mnemonic representation of machine language, which is the raw bits the processor uses. C++ is very likely to be around forever as well. 'New' languages like C# and Java are really more solution in search of a problem. C++ does everything C# and Java do. Some languages are special purpose like SQL and PHP, where the language is neither intended nor suited to application or OS programming.

  • He is a bit nervous about public speaking, its pretty common, most people are uncomfortable talking to groups.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more