Page 1 of 1

"The Problem With Threads" - IEEE Computer Magazin

Posted: Tue Jun 13, 2006 9:36 pm
by Tomahawk
http://rapidshare.de/files/22976644/The ... s.pdf.html


IEEE Computer Magazine May 2006 Issue


Edward A. Lee
University of California, Berkeley


Abstract:
For concurrent programming to become mainstream,we must discard threads as a
programming model.Nondeterminism should be judiciously and carefully introduced
where needed, and it should be explicit in programs.


Introduction:
Concurrent programming is difficult,yet many
technologists predict the end of MooreΆs law
will be answered with increasingly parallel
computer architectures—multicore or chip
multiprocessors (CMPs).If we hope to achieve
continued performance gains, programs must be able to
exploit this parallelism.
Automatic exploitation of parallelism in sequential
programs, through either computer architecture techniques
such as dynamic dispatch or automatic parallelization
of sequential programs,3 offers one possible
technical solution. However, many researchers agree that
these automatic techniques have been pushed to their
limits and can exploit only modest parallelism. Thus,
programs themselves must become more concurrent.
Understanding why concurrent programming is so difficult
can help us solve the problem. The physical world
is highly concurrent, and our very survival depends on
our ability to reason about concurrent physical dynamics.
This reasoning doesnΆt extend to concurrent programs
because we have chosen abstractions that do not
even vaguely resemble the physical worldΆs concurrency.
We have become so used to these computational abstractions
that we have forgotten they are not immutable.
The difficulty of concurrent programming is a consequence
of these abstractions, and if we can let go of
them, the problem will be fixable.


.........



Conclusion:
Achieving concurrency in software is difficult.
However, much of this difficulty arises from the
abstractions for concurrency we have chosen.
Threads provide the dominant method in use today for
general-purpose computing. But nontrivial multithreaded
programs are incomprehensible to humans. Design patterns,
better granularity of atomicity, improved languages,
and formal methods can improve the
programming model. These techniques, however, merely
chip away at the unnecessarily enormous nondeterminism
of the threading model, which remains intrinsically
intractable.
If we expect concurrent programming to become
mainstream, and if we demand reliability and predictability
from programs, we must discard threads as
a programming model. We can construct concurrent
programming models that are much more predictable
and understandable than threads based on a simple principle:
Deterministic ends should be accomplished with
deterministic means. Nondeterminism should be judiciously
and carefully introduced where needed, and it
should be explicit in programs. This principle seems
obvious, yet threads do not accomplish it. They must be
relegated to the engine room of computing, to be suffered
only by expert technology providers.