We present the TIC (Transactions with Isolation and Cooperation) model for concurrent programming. TIC adds to standard transactional memory the ability for a transaction to observe the effects of other threads at selected points. This allows transactions to cooperate, as well as to invoke nonrepeatable or irreversible operations, such as I/O. Cooperating transactions run the danger of exposing intermediate state and of having other threads change the transactionâ™s state. The TIC model protects against unanticipated interference by having the type system keep track of all operations that may (transitively) violate the atomicity of a transaction and require the programmer to establish consistency at appropriate points. The result is a programming model that is both general and simple. We have used the TIC model to re-engineer existing lock-based applications including a substantial multi-threaded web mail server and a memory allocator with coarse-grained locking. Our experience confirms the features of the TIC model: It is convenient for the programmer, while maintaining the benefits of transactional memory.
The TIC programming model does not exist as part of a full-blown language. Instead, a low-level API which provides the basic necessary mechanisms is provided. This API require a C and C++ compiler.
It can be used to write C programs that support the central mechanisms of TIC. Other language support could be created using this API as a starting point.
The following source code is an extension of TL2 (pdf). Please read the license within the various files for details on licensing.
TIC Source (Sept. 2007): tic-0.01.tar.gz