Abstract: Multicore hardware recently received wide acceptance in all areas of computing from servers to notebooks and now it requires novel software to unleash full power of parallelism. By this reason technologies for parallel programming especially for shared memory systems (such as multicore) are getting significant boost nowadays.

Among hot topics of ongoing researches in this area are easy to use and scalable concurrency control mechanisms and one of those is Transactional Memory (TM). This paper presents pure software implementation of transactional memory system (STM) which supports the following TM ideology of shared data accesses: all data modifications belonging to the same transaction (atomic section) become visible to other threads at the same moment or discarded altogether if conflict with other thread (contention) is detected, in this case transaction is restarted.

The system consists of C/C++ compiler supporting TM-specific language extensions and TM run-time library. This paper primarily focuses on language constructs and aspects of C++ support: the system presented is, perhaps, the fist STM system which consistently supports C++ classes, inheritance, virtual methods, functional and class templates and exception handling

Transactional memory provides simple means for concurrency control and adds such advantages over traditional approaches as composability of transactional codes and failure atomicity. The cost of convenience is performance: TM and especially STM adds overhead on code in transactions. Some optimization helping to relax this problem are listed and discussed. Paper also shows comparative performance results of STM versus different lock techniques.

The main result of the presented work is publicly available full-featured STM system for C/C++ which accelerates development of concurrent systems providing syntax and semantics of single global lock while achieving scalability of fine-grain locking systems and gives some nice additional benefits.