[erlang-questions] Interesting Paper "The Problem With Threads"

Gordon Guthrie gordonguthrie@REDACTED
Wed Jan 24 15:13:32 CET 2007


Folks

Came across this paper on reddit:

'The Problem With Threads' by Edward A Lee

http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf

The only really new thing that caught my attention was:

  The cost of context switching is high, so only a tiny percentage of the
  possible interleavings of thread instructions ever occur in practice. I
  conjecture that most multi-threaded general-purpose applications are, in
  fact, so full of concurrency bugs that as multi-core architectures
  become commonplace, these bugs will begin to show up as system failures.
  This scenario is bleak for computer vendors: their next generation of
  machines will become widely known as the ones on which many programs
  crash.

He makes a strange statement about syntax, which I would tend to disagree
with:

  Regrettably, programmers seem to be more guided by syntax than
  semantics. The alternatives to threads that have taken root, like MPI and
  OpenMP, share this same key feature. They make no syntactic change to
  languages. Alternatives that replace these languages with entirely new
  syntax, such as Erlang or Ada, have not taken root, and probably will not

Earlier in the paper he plows through computation theory to show that
multi-threaded programming is demonstrably non-determinative and that
possible thread interleavings cannot be realistically quantified,
culminating in what reads like a classic EUC punchline:

(Cue drumroll)

   To offer a third analogy, a folk definition of insanity is to do the
   same thing over and over again and to expect the results to be
   different. By this definition, we in fact require that programmers of
   multithreaded systems be insane. Were they sane, they could not
   understand their programs.

(Rimshot)

He might say that, I couldn't possibly comment :)

Gordon




More information about the erlang-questions mailing list