scispace - formally typeset
Search or ask a question
Book ChapterDOI

Toggle: Contention-Aware Task Scheduler for Concurrent Hierarchical Operations

26 Aug 2019-pp 142-155
TL;DR: This work proposes a lock-contention aware task scheduler which considers the locking request while assigning tasks to threads, and presents the design and implementation of Toggle, which exploits nested intervals and work-stealing to maximize throughput.
Abstract: Rooted hierarchies are efficiently operated on using hierarchical tasks. Effective synchronization for hierarchies therefore demands hierarchical locks. State-of-the-art approaches for hierarchical locking are unaware of how tasks are scheduled. We propose a lock-contention aware task scheduler which considers the locking request while assigning tasks to threads. We present the design and implementation of Toggle, which exploits nested intervals and work-stealing to maximize throughput. Using widely used STMBench7 benchmark, a real-world XML hierarchy, and a state-of-the-art hierarchical locking protocol, we illustrate that Toggle considerably improves the overall application throughput.
Citations
More filters
Journal ArticleDOI
TL;DR: Multi-Interval DomLock (MID), a new technique to improve the degree of concurrency of interval-based hierarchical locking, is presented and it is shown that with sufficient number of intervals, MID can avoid all the lock rejections due to false-positive lock status of nodes.
Abstract: Locking has been a predominant technique depended upon for achieving thread synchronization and ensuring correctness in multi-threaded applications. It has been established that the concurrent applications working with hierarchical data witness significant benefits due to multi-granularity locking (MGL) techniques compared to either fine- or coarse-grained locking. The de facto MGL technique used in hierarchical databases is intention locks, which uses a traversal-based protocol for hierarchical locking. A recent MGL implementation, dominator-based locking (DomLock), exploits interval numbering to balance the locking cost and concurrency and outperforms intention locks for non-tree-structured hierarchies. We observe, however, that depending upon the hierarchy structure and the interval numbering, DomLock pessimistically declares subhierarchies to be locked when in reality they are not. This increases the waiting time of locks and, in turn, reduces concurrency. To address this issue, we present Multi-Interval DomLock (MID), a new technique to improve the degree of concurrency of interval-based hierarchical locking. By adding additional intervals for each node, MID helps in reducing the unnecessary lock rejections due to false-positive lock status of sub-hierarchies. Unleashing the hidden opportunities to exploit more concurrency allows the parallel threads to finish their operations quickly, leading to notable performance improvement. We also show that with sufficient number of intervals, MID can avoid all the lock rejections due to false-positive lock status of nodes. MID is general and can be applied to any arbitrary hierarchy of trees, Directed Acyclic Graphs (DAGs), and cycles. It also works with dynamic hierarchies wherein the hierarchical structure undergoes updates. We illustrate the effectiveness of MID using STMBench7 and, with extensive experimental evaluation, show that it leads to significant throughput improvement (up to 141%, average 106%) over DomLock.
References
More filters
Proceedings ArticleDOI
21 Mar 2007
TL;DR: STMBench7 is presented: a candidate benchmark for evaluating STM implementations and illustrated with an evaluation of a well-known software transactional memory implementation.
Abstract: Software transactional memory (STM) is a promising technique for controlling concurrency in modern multi-processor architectures. STM aims to be more scalable than explicit coarse-grained locking and easier to use than fine-grained locking. However, STM implementations have yet to demonstrate that their runtime overheads are acceptable. To date, empiric evaluations of these implementations have suffered from the lack of realistic benchmarks. Measuring performance of an STM in an overly simplified setting can be at best uninformative and at worst misleading as it may steer researchers to try to optimize irrelevant aspects of their implementations.This paper presents STMBench7: a candidate benchmark for evaluating STM implementations. The underlying data structure consists of a set of graphs and indexes intended to be suggestive of many complex applications, e.g., CAD/CAM. A collection of operations is supported to model a wide range of workloads and concurrency patterns. Companion locking strategies serve as a baseline for STM performance comparisons. STMBench7 strives for simplicity. Users may choose a workload, number of threads, benchmark length, as well as the possibility of structure modification and the nature of traversals of shared data structures. We illustrate the use of STMBench7 with an evaluation of a well-known software transactional memory implementation.

226 citations

Proceedings ArticleDOI
25 Apr 2006
TL;DR: In this paper, the authors focus on the problem of scheduling more than one DAG at the same time onto a set of heterogeneous resources, defined on the basis of the slowdown that each DAG would experience as a result of competing for resources with other DAGs.
Abstract: The problem of scheduling a single DAG onto heterogeneous systems has been studied extensively. In this paper, we focus on the problem of scheduling more than one DAG at the same time onto a set of heterogeneous resources. The aim is not only to optimize the overall makespan, but also to achieve fairness, defined on the basis of the slowdown that each DAG would experience as a result of competing for resources with other DAGs. Two policies particularly focussing to deliver fairness are presented and evaluated along with another four policies that can be used to schedule multiple DAGs.

217 citations

Proceedings ArticleDOI
Jim Gray1, Raymond A. Lorie1, G. R. Putzolu1
22 Sep 1975
TL;DR: This paper proposes a locking protocol which associates locks with sets of resources and allows simultaneous locking at various granularities by different transactions based on the introduction of additional lock modes besides the conventional share mode and exclusive mode.
Abstract: This paper proposes a locking protocol which associates locks with sets of resources. This protocol allows simultaneous locking at various granularities by different transactions. It is based on the introduction of additional lock modes besides the conventional share mode and exclusive mode. The protocol is generalized from simple hierarchies of locks to directed acyclic graphs of locks and to dynamic graphs of locks. The issues of scheduling and granting conflicting requests for the same resource are then discussed. Lastly, these ideas are compared with the lock mechanisms provided by existing data management systems.

177 citations

Proceedings Article
24 Aug 1993
TL;DR: This work investigates lock modes for ranges and describes new lock modes lhal greatly increase concurrency, and explores locking strategies involving range, key, and record resources that permit trade-offs between concurrency and lock overhead.
Abstract: “Phan~oma” are records inserted into a concurrently aelected set of records specified by a predicate such that Ihe selection does not eee a transaction conaietent result. The usual locking slrategy is lo lock only czisling records. However, records that satisfy the eeleclion predicate muat be locked even when they are nol present in the database to prevent their insertion. One way to cope with phantoms is through range locking, 4 limited form of predicate locking. We investigate lock modes for ranges and describe new lock modes lhal greatly increase concurrency. We explore locking strategies involving range, key, and record resources that permit trade-offs between concurrency and lock overhead.

91 citations

Journal ArticleDOI
01 Aug 2009
TL;DR: It is shown how partitions as covering resources combine high concurrency with low locking overhead, and is sufficiently effective to consider adapting it for a traditional database kernel.
Abstract: To adapt database technology to new environments like cloud platforms or multi-core hardware, or to try anew to provide an extensible database platform, it is useful to separate transaction services from data management elements that need close physical proximity to data. With "generic" transactional services of concurrency control and recovery in a separate transactional component (TC), indexing, cache and disk management, now in a data component (DC), can be simplified and tailored more easily to the platform or to a data type extension with a special purpose index. This decomposition requires that details of the DC's management of data be hidden from the TC. Thus, locking and logging need to be "logical", which poses a number of problems. One problem is the handling of locking for ranges of keys. Locks need to be taken at the TC prior to the records and their keys being known to the TC. We describe generic two approaches for dealing with this. (1) Make a "speculative" visit" to the DC to learn key values. (2) Lock a "covering resource" first, then learn and lock key values and ultimately release the covering resource lock. The "table" is the only logical (and hence known to the TC) covering resourse in the traditional locking hierarchy, but using it limits concurrency. Concurrency is improved with the introduction of new partition resources. We show how partitions as covering resources combine high concurrency with low locking overhead. Using partitions is sufficiently effective to consider adapting it for a traditional database kernel.

39 citations