3
$\begingroup$

In his paper The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software, Herb Sutter writes:

The mainstream state of the art revolves around lock-based programming, which is subtle and hazardous. We desperately need a higher-level programming model for concurrency than languages offer today; I'll have more to say about that soon.

Can somebody with more knowledge about his work answer what he is referring to? Did he say more about that later?

$\endgroup$
2
  • 1
    $\begingroup$ Did you check the next Dr Dobb's issues ? $\endgroup$
    – user16034
    Apr 12, 2022 at 16:06
  • $\begingroup$ Their archive does not work. $\endgroup$
    – Gergely
    Apr 13, 2022 at 10:05

2 Answers 2

2
$\begingroup$

I think this question was answered in "The Trouble with Locks" (Dr. Dobb's Journal, 1 March 2005), which article indicates that his "I'll have more to say about that soon" was more about the problems of lock-based programming than about a specific proposal for improvement.

Personally, I think that the most important sentence in ... ["The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software"] ... was the fourth and last conclusion: "4. Finally, programming languages and systems will increasingly be forced to deal well with concurrency." Before concurrency becomes accessible for routine use by mainstream developers, we will need significantly better, still-to-be-designed, higher level language abstractions for concurrency than are available in any language on any platform. Lock-based programming is our status quo and it isn't enough; it is known to be not composable, hard to use, and full of latent races (where you forgot to lock) and deadlocks (where you lock the wrong way). Comparing the concurrency world to the programming language world, basics such as semaphores have been around almost as long as assembler and are at the same level as assembler; locks are like structured programming with goto; and we need an "OO" level of abstraction for concurrency.

Note: "still to be designed".

("Lock-Free Code: A False Sense of Security", 8 September 2008, and "Writing Lock-Free Code: A Corrected Queue", 29 September 2008, explored how "lock-free coding is hard even for experts".)

$\endgroup$
3
  • $\begingroup$ Thanks indeed. The Lock-Free Code article page says 1 2 3 4 5 Next at the end, but when I click any of them, it says "Oops, something has gone wrong. Please contact administrator.". $\endgroup$
    – Gergely
    May 10, 2022 at 5:25
  • 1
    $\begingroup$ @Gergely Yes, I had the same problem, but I looked at the urls that did work and manipulated them to get urls for the other pages; adding "?pgno=" and the page number to the base url seemed to work even though that looked like the same address. (Perhaps there is some issue when the browser gives a referrer of the previous page??) $\endgroup$
    – user4577
    May 10, 2022 at 18:28
  • 1
    $\begingroup$ Thanks that worked. I have found another trick: clicking on the printer icon shows the full article without the sidebar advertisements. $\endgroup$
    – Gergely
    May 11, 2022 at 9:30
3
$\begingroup$

He's saying the clock/IPC/cache/etc. speedup of CPUs must come to an end, and with it the increasing speedup of serial code, which is relatively easy to write - the free lunch.

Therefore parallel code (= concurrency) must take over to keep that growth going, and to do that better support for concurrency, including locking primitives (because parallel code can be relatively hard to write).

My take anyway.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.