Section: New Results
Transactional Memory in Multicore Systems
Participants : Toufiq Sarni, Patrick Valduriez.
We started a new, promising research direction on transactional memory in multicore systems, with the objective of levereging multicore technology for accessing shared data under real-time constraints. With the advent of multicore systems, the transactional memory (TM) concept has attracted much interest from both academy and industry as it eases programming and avoids the problems of lock-based methods. By supporting the ACI (Atomicity, Consistency and Isolation) properties of transactions, transactional memory relieves the programmer from dealing with locks to access resources. More important, it avoids the severe problems of lock-based methods such as deadlock situations and priority inversions. Furthermore, in the case of multicore systems, lock-based synchronization can reduce the data bandwidth by blocking several processes that try to access critical sections, thus reducing processors utilization. By contrast, TM allows several transactions to access resources in parallel. A transaction is either aborted when a conflict is detected, or committed in case of successful completion. Conflicts are handled with non-blocking synchronization which offers some guarantee of forward progress.
Existing solutions for transactional memory are implemented either in hardware (HTM) or software (STM) or both together (HyTM). STM researchers take care about performance issues on TM, and in the literature, several policies have been proposed to manage conflicts between transactions. The main challenge of these policies is to increase the system's throughput by increasing the number of committed transactions per unit of time.
However, the performance metrics used to study TM are rather intended for classical systems, without time constraints, and then not suitable for real-time applications [45] . Real-time means a predictable execution time of both tasks and their resource accesses, thus involving predictability at the transactions level.
Real-time applications are now becoming more and more concurrent and complex. For instance, telecommunication systems today, manage a huge and growing amount of shared data customers with time constraints on services. This challenge imposes to consider the interactions between the multiprocessor real-time scheduler of tasks and that of transactions embedded within TM. For this purpose, our first approach was to identify which STM among various kinds of non-blocking synchronization, is more suitable for the real-time context. For the best selected STM, the second step consisted in identifying the best multiprocessor real-time scheduling policy among both the partitionned, global, and fairness approaches [41] . Moreover, the scheduler of transactions takes a decision to abort or commit a transaction if a conflit occurs. This decision is usually based on the transaction time-stamp value or number the of transactions' retries. However, in real-time systems the task execution is based on its priority. For this reason, we proposed a new transaction model for STM that integrates deadline parameter of transactions. Based on this model, the scheduler of transactions commits first transactions that are close to their deadline, thus reducing the probability for a transaction to violate its time constraints. [41] .
On the other hand, it is often claimed that the rollback times are the main cause of the execution time variation when using transactions in memory. However, the most recent STMs are based on a dynamic memory allocator. We carried out a directed real-time case study [42] to show that the rollbacks times are not the main reason for the execution time variation of transactions, and proved that a good memory allocator must also be provided to bound the execution time variation of transactions.