Table of Contents
Fetching ...

A Simple yet Exact Analysis of the MultiQueue

Stefan Walzer, Marvin Williams

TL;DR

The paper tackles the problem of understanding the rank error in the MultiQueue, a highly scalable relaxed concurrent priority queue. It introduces a formal $\sigma$-MultiQueue model and an Exponential-Jump Process to analyze the long-run distribution of top-element ranks, showing that the rank gaps are governed by independent geometric or exponential components. The authors derive exact expressions for the long-term rank error, notably $\mathbb{E}[E]=\tfrac{5}{6}n-1+\tfrac{1}{6n}$ for the case of deleting from the best of two queues, and extend the results to general deletion schemes dependent only on queue rank and to $c$-MultiQueue via explicit $\sigma$-distributions. Their approach yields not only precise asymptotics but also concentration insights and a clear connection between the discrete multi-queue dynamics and the continuous Exponential-Jump Process, offering a simpler and more exact understanding than prior potential-based methods.

Abstract

The MultiQueue is a relaxed concurrent priority queue consisting of $n$ internal priority queues, where an insertion uses a random queue and a deletion considers two random queues and deletes the minimum from the one with the smaller minimum. The rank error of the deletion is the number of smaller elements in the MultiQueue. Alistarh et al. [2] have demonstrated in a sophisticated potential argument that the expected rank error remains bounded by $O(n)$ over long sequences of deletions. In this paper we present a simpler analysis by identifying the stable distribution of an underlying Markov chain and with it the long-term distribution of the rank error exactly. Simple calculations then reveal the expected long-term rank error to be $\tfrac{5}{6}n-1+\tfrac{1}{6n}$. Our arguments generalize to deletion schemes where the probability to delete from a given queue depends only on the rank of the queue. Specifically, this includes deleting from the best of $c$ randomly selected queues for any $c>1$.

A Simple yet Exact Analysis of the MultiQueue

TL;DR

The paper tackles the problem of understanding the rank error in the MultiQueue, a highly scalable relaxed concurrent priority queue. It introduces a formal -MultiQueue model and an Exponential-Jump Process to analyze the long-run distribution of top-element ranks, showing that the rank gaps are governed by independent geometric or exponential components. The authors derive exact expressions for the long-term rank error, notably for the case of deleting from the best of two queues, and extend the results to general deletion schemes dependent only on queue rank and to -MultiQueue via explicit -distributions. Their approach yields not only precise asymptotics but also concentration insights and a clear connection between the discrete multi-queue dynamics and the continuous Exponential-Jump Process, offering a simpler and more exact understanding than prior potential-based methods.

Abstract

The MultiQueue is a relaxed concurrent priority queue consisting of internal priority queues, where an insertion uses a random queue and a deletion considers two random queues and deletes the minimum from the one with the smaller minimum. The rank error of the deletion is the number of smaller elements in the MultiQueue. Alistarh et al. [2] have demonstrated in a sophisticated potential argument that the expected rank error remains bounded by over long sequences of deletions. In this paper we present a simpler analysis by identifying the stable distribution of an underlying Markov chain and with it the long-term distribution of the rank error exactly. Simple calculations then reveal the expected long-term rank error to be . Our arguments generalize to deletion schemes where the probability to delete from a given queue depends only on the rank of the queue. Specifically, this includes deleting from the best of randomly selected queues for any .

Paper Structure

This paper contains 18 sections, 12 theorems, 12 equations, 6 figures.

Key Result

Theorem 1

Let $(r₁^{(s)}, …, rₙ^{(s)})$ denote the ranks of the top-elements of a $\sigma$-MultiQueue with $\sigma$ satisfying $(☆)$ after $s$ deletions. Then $(r₁^{(s)}, …, rₙ^{(s)})$ converges in distribution to a sequence $(r₁, …, rₙ)$ of random variables where where $\mathrm{Geom}₁(p)$ denotes the geometric distribution of the number of Bernoulli trials with success probability $p$ until (and including

Figures (6)

  • Figure 1: The MultiQueue with $n = 6$ queues and some elements already inserted. The shown insertion picks queue $2$ to insert the element $34$ (green). The shown deletion picks queues $3$ and $6$ with minima $8$ (red) and $12$ (orange), and deletes the $8$ since it is smaller. The deletion exhibits a rank error of $3$ due to the $3$ smaller elements highlighted in blue.
  • Figure 2: For large $n$, the $c$-MultiQueue has an expected rank error of $𝔼[E] = n·\int₀¹f_c(x)\,dx + o(n)$ where $f_c(x)$ is defined in \ref{['thm:expected-rank-error']}. The solid line shows $c ↦ \int₀¹f_c(x)\,dx$ and hence the constant in front of the leading term. The dashed line $c ↦ \frac{1}{c-1}$ is an asymptote for both $c\to1$ and $c\to\infty$.
  • Figure 3: Increasingly abstract ways for modeling the state of a MultiQueue system with $4$ queues. (a) contains all information. (b) assumes that the queues in which the elements reside has only been partially revealed. (c) abstracts away from concrete elements. (d) represents the information in (c) using numbers.
  • Figure 4: The convergence of the $2$-MultiQueue with $n = 2^{10}$ to its stable state. After $s$ deletions, let $r_i^{(s)}$ be the rank of queue $i$. The plot shows the observed ranks $i ↦ r_i^{(s)}$ for some values of $s$, as well as the expected ranks $i ↦ 𝔼[r_i^{(0)}]$ and $i ↦ 𝔼[r_i^{(∞)}]$ in the initial state and the converged state.
  • Figure 5: A person (the can-kicker) walks along the real number line from left to right. Whenever she reaches one of the $n$ tokens (the cans) then she kicks it such that it lands some distance $X \sim \mathrm{Exp}(1)$ to the right.
  • ...and 1 more figures

Theorems & Definitions (12)

  • Theorem 1
  • Corollary 2
  • Theorem 3
  • Theorem 4
  • Theorem 5
  • Lemma 7
  • Lemma 8
  • Theorem 8
  • Theorem 9
  • Theorem 10
  • ...and 2 more