Title
Scalable and practical locking with shuffling
Abstract
Locks are an essential building block for high-performance multicore system software. To meet performance goals, lock algorithms have evolved towards specialized solutions for architectural characteristics (e.g., NUMA). However, inpractice, applications run on different server platforms and exhibit widely diverse behaviors that evolve with time (e.g., number of threads, number of locks). This creates performance and scalability problems for locks optimized for a single scenario and platform. For example, popular spinlocks suffer from excessive cache-line bouncing in NUMA systems, while scalable, NUMA-aware locks exhibit sub-par single-thread performance. In this paper, we identify four dominating factors that impact the performance of lock algorithms. We then propose a new technique, shuffling, that can dynamically accommodate all these factors, without slowing down the critical path of the lock. The key idea of shuffling is to re-order the queue of threads waiting to acquire the lock in accordance with some pre-established policy. For best performance, this work is done off the critical path, by the waiter threads. Using shuffling, we demonstrate how to achieve NUMA-awareness and implement an efficient parking/wake-up strategy, without any auxiliary data structure, mostly off the critical path. The evaluation shows that our family of locks based on shuffling improves the throughput of real-world applications up to 12.5x, with impressive memory footprint reduction compared with the recent lock algorithms.
Year
DOI
Venue
2019
10.1145/3341301.3359629
Proceedings of the 27th ACM Symposium on Operating Systems Principles
Keywords
Field
DocType
Linux, memory footprint, mutual exclusion
Lock (computer science),Computer science,Thread (computing),Shuffling,Critical path method,Memory footprint,Multi-core processor,Mutual exclusion,Distributed computing,Scalability
Conference
ISBN
Citations 
PageRank 
978-1-4503-6873-5
2
0.37
References 
Authors
0
5
Name
Order
Citations
PageRank
Sanidhya Kashyap112410.92
Irina Calciu231.74
Xiaohe Cheng341.07
Changwoo Min429429.89
Taesoo Kim580951.85