January 2019
Intermediate to advanced
384 pages
11h 50m
English
Because locks do not compose (remember the composability problems?), researchers were trying to provide synchronization mechanisms that would be composable. One such proposal that obtained some traction was the concept of transactional memory. It is best explained with an example from the relevant C++ proposal:
int f(){ static int i = 0; atomic_noexcept { // begins transaction ++i; return i; // commits }}
As we may see, a transactional memory clause allows a group of load and store instructions to execute in an atomic way, and thus either succeed or fail. If another transaction updates some of the variables used by this transaction, changes will be silently retried. The abstraction of atomicity in transactional memory ...
Read now
Unlock full access