Concurrent programming for dummies (and smart people too)
or
Language support for lightweight transactions
Tim Harris
Concurrent programming is notoriously difficult. Current
abstractions are intricate to use and make it hard to design computer
systems that are reliable and scalable. We argue in favour of a
practical declarative style of concurrency control in which
programmers directly indicate the safety properties that they require.
In essence, the programmer demarks sections of code which execute
within lightweight software-based transactions which commit atomically
and exactly once.
These transactions can update shared data, instantiate objects, invoke
library features and so on. They can also block, waiting for
arbitrary boolean conditions to become true. These features support
general-purpose shared data structures such as hashtables, queues and
buffers. In general, no performance penalty is incurred for
memory accesses outside transactions. Furthermore, transactions which
do not access the same shared memory locations can commit
concurrently.
In this talk, and the accompanying paper, I will present a design of
this proposal along with an
implementation and evaluation. This aims
(i) to be easier for mainstream programmers to use, (ii) to prevent
lock-based priority-inversion and deadlock problems and (iii) to offer
good performance and scalability that is at least as good as
lock-based schemes.
|