Skip to main content
QUICK REVIEW

[Paper Review] From Sequential to Concurrent: Correctness and Relative Efficiency

Vincent Gramoli, Petr Kuznetsov|arXiv (Cornell University)|Mar 21, 2012
Distributed systems and fault toleranceComputer Science1 citations
TL;DR

This paper introduces a correctness criterion independent of synchronization techniques to fairly compare optimistic (transactional) and pessimistic (locking) concurrency control. It demonstrates that pessimistic locking can outperform transactions in some workloads, transactions can outperform locks in others, and combining both techniques achieves strictly higher concurrency—validated by an optimal, scalable list-based set algorithm.

ABSTRACT

Modern concurrent programming benefits from a large variety of synchronization techniques. These include conventional pessimistic locking, as well as optimistic techniques based on conditional synchronization primitives or transactional memory. Yet, it is unclear which of these approaches better leverage the concurrency inherent to multi-cores. In this paper, we compare the level of concurrency one can obtain by converting a sequential program into a concurrent one using optimistic or pessimistic techniques. To establish fair comparison of such implementations, we introduce a new correctness criterion for concurrent programs, defined independently of the synchronization techniques they use. We treat a program's concurrency as its ability to accept a concurrent schedule, a metric inspired by the theories of both databases and transactional memory. We show that pessimistic locking can provide strictly higher concurrency than transactions for some applications whereas transactions can provide strictly higher concurrency than pessimistic locks for others. Finally, we show that combining the benefits of the two synchronization techniques can provide strictly more concurrency than any of them individually. We propose a list-based set algorithm that is optimal in the sense that it accepts all correct concurrent schedules. As we show via experimentation, the optimality in terms of concurrency is reflected by scalability gains.

Motivation & Objective

  • To establish a fair comparison between optimistic and pessimistic synchronization techniques in concurrent programming.
  • To define a correctness criterion for concurrent programs independent of specific synchronization mechanisms.
  • To evaluate and quantify the concurrency levels achievable through different synchronization strategies.
  • To design and implement a concurrent list-based set algorithm that maximizes acceptance of correct concurrent schedules.
  • To demonstrate that combining optimistic and pessimistic techniques can achieve higher concurrency than either individually.

Proposed method

  • Introduces a correctness criterion based on the acceptance of concurrent schedules, inspired by database and transactional memory theories.
  • Uses a formal model to compare concurrency levels across sequential, pessimistic-locking, and transactional implementations.
  • Proposes a list-based set algorithm designed to accept all correct concurrent schedules, achieving optimal concurrency.
  • Employs experimental evaluation on multi-core systems to measure scalability and concurrency gains.
  • Applies a metric of concurrency as the number of valid concurrent schedules a program can accept.
  • Uses a hybrid approach combining pessimistic locks and transactional memory to enhance concurrency beyond individual techniques.

Experimental results

Research questions

  • RQ1Can pessimistic locking provide higher concurrency than transactional memory for certain applications?
  • RQ2Can transactional memory provide higher concurrency than pessimistic locking for certain applications?
  • RQ3Is there a combined synchronization technique that achieves strictly higher concurrency than either optimistic or pessimistic approaches alone?
  • RQ4Can a concurrent data structure be designed to accept all correct concurrent schedules, thereby achieving optimal concurrency?
  • RQ5To what extent does concurrency optimality translate into improved scalability on multi-core systems?

Key findings

  • Pessimistic locking can achieve strictly higher concurrency than transactional memory for some workloads, such as those with high write contention.
  • Transactional memory can achieve strictly higher concurrency than pessimistic locking for other workloads, particularly those with low contention and fine-grained access patterns.
  • Combining both techniques results in strictly higher concurrency than using either technique in isolation.
  • The proposed list-based set algorithm is optimal in that it accepts all correct concurrent schedules, demonstrating the theoretical upper bound of concurrency.
  • Experimental results show that the optimality in concurrency translates into measurable scalability improvements on multi-core architectures.
  • The study establishes that concurrency, measured as schedule acceptance, is a meaningful and quantifiable metric for comparing synchronization techniques.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.