Paper #31

Paper #31

Thread Affinity in Software Transactional Memory

Douglas Pereira Pasqualin1, Matthias Diener 2, André Rauber Du Bois 1 and Mauricio Lima Pilla13

1 Computer Science Graduate Program (PPGC), Universidade Federal de Pelotas, RS, Brazil
fdp.pasqualin, dubois, pillag @ inf ufpel edu br
2 University of Illinois at Urbana-Champaign, IL 61801, USA
mdiener @ illinois edu
3 Google, Inc., Sunnyvale, CA 94089, USA

Abstract: Software Transactional Memory (STM) is an abstraction to synchronize accesses to shared resources. It simplifies parallel programming by replacing the use of explicit locks and synchronization mechanisms with atomic blocks. A well-known approach to improve performance of STM applications is to serialize transactions to avoid conflicts using schedulers and mapping algorithms. However, in current architectures with complex memory hierarchies it is also important to consider where the memory of the program is allocated and how it is accessed. An important technique for improving memory locality is to map threads and data of an application based on their memory access behavior. This technique is called sharing-aware mapping. In this paper, we introduce a method to detect sharing behavior directly inside the STM library by tracking and analyzing how threads perform STM operations. This information is then used to perform an optimized mapping of the application’s threads to cores in order to improve the efficiency of STM operations. Experimental results with the STAMP benchmarks show performance gains of up to 9.7x (1.4x on average), and a reduction of the number of aborts of up to 8.5x, compared to the Linux scheduler.

Keywords:Software Transactional Memory, Thread Mapping, Sharing-aware, Multicore