LockSTM: Mixing Locks and Transactional Memory
Nicholas Kuilema · 2008
Atomic sections are a technique used to simplify the writing of parallel programs. Actions performed during the execution of an atomic section should not be visible to other components in the program until after the section completes. Usually the atomicity requirement is enforced through optimistic transactional memory. However, transactional memories have the drawback that not every action is allowed to occur inside of an atomic section. In particular, I/O actions cannot be rolled back on most systems, and so they may not appear within transactions. This paper examines supporting atomic sections that can contain arbitrary actions, using a combination of locks and transactions. We present a system that infers a locking strategy, identifies problematic atomic sections and creates a hybrid solution. This paper presents the algorithm, argues the process is sound and reports experimental results. 1.