Stable Scheduling in Transactional Memory

Costas Busch, Bogdan S. Chlebus, Dariusz R. Kowalski, Pavan Poudel · DOI

Abstract

This paper investigates the stability of Transactional Memory (TM) systems under continuous, adversarial transaction arrivals. By integrating concepts from Adversarial Queueing Theory, we establish the first formal framework for stability in TM. We prove that distributed systems without queues are inherently unstable for any positive arrival rate. Conversely, we derive specific upper and lower bounds on the transaction arrival rate for centralized and queue-based distributed schedulers to maintain stability. These bounds are expressed in terms of the number of shared objects and transaction complexity, providing a theoretical foundation for designing robust concurrent systems.

1. Introduction

In Transactional Memory, multiple threads attempt to update shared objects concurrently. Conflicts occur when two or more transactions access the same object, necessitating aborts and retries. While much of the existing literature focuses on static or batch workloads, real-world systems are dynamic, with transactions arriving continuously. If the arrival rate exceeds the system's processing capacity or if the scheduler is inefficient, the number of pending transactions may grow indefinitely, leading to system instability. This paper seeks to define the conditions under which a scheduler can guarantee that the number of pending transactions remains bounded.

2. Methodology and Models

We employ an adversarial arrival model where an adversary generates transactions at an average rate $\rho$ with a maximum burstiness $b$. We analyze three architectural paradigms:

  • Distributed Queue-Free: Transactions operate as autonomous threads without centralized coordination or local queuing.
  • Centralized: A global scheduler maintains a view of all pending transactions and coordinates their execution.
  • Distributed Queue-Based: Transactions are assigned to specific processors, each managing its own local queue.

Our analysis utilizes graph coloring theory to model transaction conflicts. Transactions are represented as vertices in a conflict graph, with edges connecting transactions that share objects. Scheduling is then treated as the problem of identifying independent sets in this graph to maximize parallel execution.

3. Stability Results

Our analysis reveals a fundamental impossibility result for distributed queue-free systems: stability cannot be guaranteed for any $\rho > 0$. In such systems, autonomous threads can enter deterministic cycles of mutual aborts, preventing progress.

For centralized and queue-based distributed systems, we establish concrete stability thresholds. A key finding is that these thresholds often scale with $\sqrt{m}$, where $m$ is the number of shared objects. This suggests that as memory systems scale, the allowable arrival rate is limited by the density of potential conflicts.

Summary of stability bounds for different scheduler types.

The table above summarizes the derived lower and upper bounds for each scheduler type. For example, a centralized scheduler is stable if the arrival rate $\rho$ satisfies $\rho \le \max\left\{\frac{1}{4k}, \frac{1}{4\lceil\sqrt{m}\rceil}\right\}$, where $k$ is the maximum number of objects accessed by a single transaction. Conversely, no scheduler can be stable if the arrival rate exceeds $\max\left\{\frac{2}{k+1}, \frac{2}{\lfloor\sqrt{2m}\rfloor}\right\}$.

4. Distributed Coordination via Aborts

A notable contribution is the design of a distributed queue-based scheduler that achieves stability. This scheduler uses a novel communication mechanism where processors encode information through intentional transaction conflicts. This allows distributed nodes to reach consensus on execution order without explicit message passing, maintaining stability for rates up to $\rho < \max\left\{\frac{1}{6k}, \frac{1}{6\lceil\sqrt{m}\rceil}\right\}$.

5. Conclusion and Future Directions

This work provides a rigorous theoretical basis for understanding stability in Transactional Memory. Future research should extend these results to randomized schedulers, which are common in practice, and to asynchronous systems with variable transaction execution times. Additionally, investigating the performance of these schedulers in smaller-scale multi-core environments remains an important area for empirical study.

Summary updated

BibTeX
@inproceedings{busch2023stable,
  author = {Costas Busch and Bogdan S. Chlebus and Dariusz R. Kowalski and Pavan Poudel},
  title = {{Stable Scheduling in Transactional Memory}},
  booktitle = {CIAC},
  year = {2023},
  doi = {10.1007/978-3-031-30448-4\_13},
}
Figure