Title :
Architectural Support for Fair Reader-Writer Locking
Author :
Vallejo, Enrique ; Beivide, Ramón ; Cristal, Adrian ; Harris, Tim ; Vallejo, Fernando ; Unsal, Ozan ; Valero, Mateo
Author_Institution :
Univ. of Cantabria, Santander, Spain
Abstract :
Many shared-memory parallel systems use lock-based synchronization mechanisms to provide mutual exclusion or reader-writer access to memory locations. Software locks are inefficient either in memory usage, lock transfer time, or both. Proposed hardware locking mechanisms are either too specific (for example, requiring static assignment of threads to cores and vice-versa), support a limited number of concurrent locks, require tag values to be associated with every memory location, rely on the low latencies of single-chip multicore designs or are slow in adversarial cases such as suspended threads in a lock queue. Additionally, few proposals cover reader-writer locks and their associated fairness issues. In this paper we introduce the Lock Control Unit (LCU) which is an acceleration mechanism collocated with each core to explicitly handle fast reader-writer locking. By associating a unique thread-id to each lock request we decouple the hardware lock from the requestor core. This provides correct and efficient execution in the presence of thread migration. By making the LCU logic autonomous from the core, it seamlessly handles thread preemption. Our design offers richer semantics than previous proposals, such as try lock support while providing direct core-to-core transfers. We evaluate our proposal with micro benchmarks, a fine-grain Software Transactional Memory system and programs from the Parsec and Splash parallel benchmark suites. The lock transfer time decreases in up to 30% when compared to previous hardware proposals. Transactional Memory systems limited by reader-locking congestion boost up to 3x while still preserving graceful fairness and starvation freedom properties. Finally, commonly used applications achieve speedups up to a 7% when compared to software models.
Keywords :
concurrency control; multi-threading; shared memory systems; synchronisation; LCU logic autonomous; Parsec benchmark suites; acceleration mechanism; architectural support; core-to-core transfers; fair reader-writer locking; fine grain software transactional memory system; hardware lock; lock based synchronization mechanism; lock control unit; lock transfer time; memory access; microbenchmarks; requestor core; shared memory parallel systems; splash parallel benchmark suites; unique thread-id; Lock Control Unit; fairness; reader-writer locks;
Conference_Titel :
Microarchitecture (MICRO), 2010 43rd Annual IEEE/ACM International Symposium on
Conference_Location :
Atlanta, GA
Print_ISBN :
978-1-4244-9071-4
DOI :
10.1109/MICRO.2010.12