SpinWise: A Practical Energy-Efficient Synchronization Technique for CMPs

Spinning had been the classical way of implementing synchronization primitives (i.e., barriers, locks and conditions) in pthread library before the adoption of fast user space mutex (futex). Since spinning cores do not perform any useful work, it has been believed that futex is more energyefficient than spinning. In this paper, using commercial chip multi-processors (CMPs), first we provide deep insights on how the commercial CMP and operating system together reduce power consumption during spinning- and futex-based synchronization and analyze the duration of synchronization cycles for each implementation. Second, we analyze limitations of existing techniques that attempt to reduce power consumption of CMPs during synchronization. Finally, we propose a spinning-based energy-efficient synchronization technique dubbed SpinWise. We demonstrate that SpinWise can provide 22% higher geometric mean energy efficiency than futex for a CMP running applications with many frequent and short synchronization events.