A Nonblocking Algorithm for Shared Queues Using Compare-and-Swap

Sundeep Prakash, Yann Hang Lee, Theodore Johnson

Research output: Contribution to journalArticlepeer-review

52 Scopus citations

Abstract

Nonblocking algorithms for concurrent objects guar- antee that an object is always accessible, in contrast to blocking algorithms in which a slow or halted process can render part or all of the data structure inaccessible to other processes. A number of algorithms have been proposed for shared FIFO queues, but nonblocking implementations are few and either limit the concurrency or provide inefficient solutions. In this paper we present a simple and efficient nonblocking shared FIFO queue algorithm with O(n) system latency, no additional memory requirements, and enqueuing and dequeuing times independent of the size of the queue. We use the compare&swap &swap operation as the basic synchronization primitive. We model our algorithm analytically and with a simulation, and compare its performance with that of a blocking FIFO queue. We find that the nonblocking queue has better performance if processors are occasionally slow, but worse performance if some processors are always slower than others.

Original languageEnglish (US)
Pages (from-to)548-559
Number of pages12
JournalIEEE Transactions on Computers
Volume43
Issue number5
DOIs
StatePublished - May 1994
Externally publishedYes

ASJC Scopus subject areas

  • Software
  • Theoretical Computer Science
  • Hardware and Architecture
  • Computational Theory and Mathematics

Fingerprint

Dive into the research topics of 'A Nonblocking Algorithm for Shared Queues Using Compare-and-Swap'. Together they form a unique fingerprint.

Cite this