Locking Made EasyReport as inadecuate

Locking Made Easy - Download this document for free, or read online. Document in PDF available to download.

Presented at: 17th ACM/IFIP/USENIX International Middleware Conference (Middleware '16), Trento, Italy, December 12-16, 2016 Published in: Proceedings of the 17th International Middleware Conference - Middleware '16, p. 1-14 Series: Middleware New York, NY, USA: ACM Press, 2016

A priori, locking seems easy: To protect shared data from concurrent accesses, it is sufficient to lock before accessing the data and unlock after. Nevertheless, making locking efficient requires fine-tuning (a) the granularity of locks and (b) the locking strategy for each lock and possibly each workload. As a result, locking can become very complicated to design and debug. We present GLS, a middleware that makes lock-based programming simple and effective. GLS offers the classic lock-unlock interface of locks. However, in contrast to classic lock libraries, GLS does not require any effort from the programmer for allocating and initializing locks, nor for selecting the appropriate locking strategy. With GLS, all these intricacies of locking are hidden from the programmer. GLS is based on GLK, a generic lock algorithm that dynamically adapts to the contention level on the lock object. GLK is able to deliver the best performance among simple spinlocks, scalable queue-based locks, and blocking locks. Furthermore, GLS offers several debugging options for easily detecting various lock-related issues, such as deadlocks. We evaluate GLS and GLK on two modern hardware platforms, using several software systems (i.e., HamsterDB, Kyoto Cabinet, Memcached, MySQL, SQLite) and show how GLK improves their performance by 23% on average, compared to their default locking strategies. We illustrate the simplicity of using GLS and its debugging facilities by rewriting the synchronization code for Memcached and detecting two potential correctness issues.

Keywords: Locking ; Adaptive Locking ; Locking Middleware ; Locking Runtime ; Synchronization ; Multi-cores ; Performance Reference EPFL-CONF-222954doi:10.1145/2988336.2988357

Author: Antić, Jelena; Chatzopoulos, Georgios; Guerraoui, Rachid; Trigonakis, Vasileios

Source: https://infoscience.epfl.ch/record/222954?ln=en

Related documents