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$.
翻译:MultiQueue是一种宽松的并发优先级队列,由$n$个内部优先级队列组成,其中插入操作使用一个随机队列,而删除操作则考虑两个随机队列,并从其中最小值较小的队列中删除该最小值。删除操作的秩误差是指MultiQueue中比被删除元素更小的元素数量。Alistarh等人[2]通过一个复杂的势函数论证证明了,在长时间的删除序列中,期望秩误差保持有界于$O(n)$。本文通过识别底层马尔可夫链的稳态分布,并由此精确得到秩误差的长期分布,提出了一种更简单的分析。简单的计算随后揭示,期望长期秩误差为$\tfrac{5}{6}n-1+\tfrac{1}{6n}$。我们的论证可以推广到删除方案,其中从给定队列删除的概率仅取决于该队列的秩。具体来说,这包括从$c$个随机选择的队列中(对于任意$c>1$)删除最佳元素的情况。