Modeling and Resolving Lock Contention for Multi-threaded Systems
نویسندگان
چکیده
Locks are efficient concurrent control mechanisms to ensure that shared resources are accessed by only a single thread in multi-threaded applications. However, for multi-core systems, lock usage leads to lock contention, which degrades program performance, increases system response time, and negatively affects scalability. This paper initially models lock contention from two aspects: static structure and dynamic behavior. Static constraints of lock contention that describe the contention among threads and the dynamic constraints that define the lock request behavior during contended process are presented. In addition, a contention-aware lock (CA-Lock) is proposed. The CA-Lock is an ordinary lock when there is no contention; it improves the concurrency by transforming into software transactional memory (STM) when the contention is serious. For those situations that are not fitted with STM, the CA-Lock can transform back into an ordinary lock. Primary experimental results show that the CA-Lock can track the best world of lock or STM.
منابع مشابه
A Generic Graph Model for WCET Analysis of Multi-Core Concurrent Applications
Worst-case execution time (WCET) analysis of multi-threaded software is still a challenge. This comes mainly from the fact that synchronization has to be taken into account. In this paper, we focus on this issue and on automatically calculating and incorporating stalling times (e.g. caused by lock contention) in a generic graph model. The idea that thread interleavings can be studied with a mat...
متن کاملExtending JML for Modular Specification and Verification of Multi-threaded Programs
The Java Modeling Language (JML) is a formal specification language for Java that allows developers to specify rich software contracts for interfaces and classes, using preand postconditions and invariants. Although JML has been widely studied and has robust tool support based on a variety of automated verification technologies, it shares a problem with many similar object-oriented specificatio...
متن کاملTo Lock, Swap, or Elide: On the Interplay of Hardware Transactional Memory and Lock-Free Indexing
The release of hardware transactional memory (HTM) in commodity CPUs has major implications on the design and implementation of main-memory databases, especially on the architecture of highperformance lock-free indexing methods at the core of several of these systems. This paper studies the interplay of HTM and lockfree indexing methods. First, we evaluate whether HTM will obviate the need for ...
متن کاملBounded Context-Switching and Reentrant Locking
Reentrant locking is a recursive locking mechanism which allows a thread in a multi-threaded program to acquire the reentrant lock multiple times. The thread must release this lock an equal number of times before another thread can acquire this lock. We consider the control state reachability problem for recursive multi-threaded programs synchronizing via a finite number of reentrant locks. Suc...
متن کاملDesign Characteristics and Dynamic Modeling of a Cooperative Dual-Arm- Lock Manipulator
Recent developments in the area of smart structures indicate that variable geometry / stiffness truss network is of fundamental importance in designing smart transformable structures and systems for space applications. This paper presents the conceptual design and dynamic modeling of a cooperative re-configurabel dual-arm robotic structure called Dual-Arm Cam-Lock Manipulator. The Manipulator i...
متن کامل