This Article 
 Bibliographic References 
 Add to: 
A Nonblocking Algorithm for Shared Queues Using Compare-and-Swap
May 1994 (vol. 43 no. 5)
pp. 548-559

Nonblocking algorithms for concurrent objects guarantee 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. The authors 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. They use the compare & swap operation as the basic synchronization primitive. They model their algorithm analytically and with a simulation, and compare its performance with that of a blocking FIFO queue. They find that the nonblocking queue has better performance if processors are occasionally slow, but worse performance if some processors are always slower than others.

[1] "TC2000 Programming Handbook," BBN Advanced Computers, Inc.
[2] A. Gottlieb, B. D. Lubachevsky, and L. Rudolph, "Basic techniques for the efficient coordination of very large numbers of cooperating sequential processors,"ACM Trans. Programming Languages Syst., vol. 5, no. 2, pp. 164-189, Apr. 1993.
[3] M. Herlihy, "A Methodology for Implementing Highly Concurrent Data Structures,"Proc. Second ACM SIGPlan Symp. Principles and Practice of Parallel Programming, SIGPlan Notices, Vol. 25, No. 3, Mar. 1990, pp. 197-206.
[4] M. Herlihy and J. Wing, "Axioms for concurrent obiects," in14th ACM Symp. Principles of Programming Languages, Jan. 1987, pp. 13-26.
[5] M. P. Herlihy, "Impossibility and universality results for wait-free synchronization," inSeventh ACM SIGACT-SIGOPS Symp. Principles of Distributed Computing, Aug. 1988, pp. 276-290.
[6] H. T. Kung and J. T. Robinson, "On optimistic methods for concurrency control,"ACM Trans. Database Syst., vol. 6, pp. 213-226, June 1981.
[7] L. Lamport, "Specifying Concurrent ProgramModules,"ACM Trans. Programming Languages and Systems, Vol. 5, No. 2, Apr. 1983, pp. 190-222.
[8] "M68000 Family Programmer's Reference Manual," Motorola.
[9] S. Prakash, "Non-blocking algorithms for concurrent data structures," Masters thesis, Univ. of Florida, Dept. of Computer Sci., 1991. Available at anonymous ftp site
[10] I. K. Ryu and A. Thomasian, "Performance analysis of centralized databased with optimistic concurrency control," Performance Evaluation 7, pp. 195-211, 1987.
[11] J. M. Stone, "A simple and correct shared-queue algorithm using compare-and-swap," inProc. IEEE Comput. Society and ACM SIGARCH Supercomputing '90 Conf., Nov. 1990, pp. 495-505.
[12] D. Shasha and N. Goodman, "Concurrent search structure algorithms,"ACM Trans. Database Syst., vol. 13, no. 1, pp. 53-90, Mar, 1988.
[13] R. Kent Treiber, "Systems programming: Coping with parallelism," RJ 5118, IBM Almaden Res. Ctr., Apr. 1986).
[14] J. Turek, "Resilient computation in the presence of slowdowns," Ph.D. Thesis, Dept. of Comput. Sci., NYU, 1991.
[15] J. Turek, D. Shasha, and S. Prakash, "Locking without blocking: Making lock based concurrent data structure algorithms nonblocking," inACM Symp. Principles of Database Syst., 1992, pp. 212-222.
[16] IBM T. J. Watson Res. Ctr., System/370 Principles of Operations, 1983, pp. 7.13, 14.
[17] C.-Q. Zhu and P.-C. Yew, "A synchronization scheme and its applications for large multiprocessor systems," inProc. 4th Int. Conf. Distrib. Computing Syst., May 1984, pp. 486-493.

Index Terms:
queueing theory; data structures; nonblocking algorithm; shared queues; compare-and-swap; concurrent objects; data structure; FIFO queue algorithm; queue; nonblocking queue; performance.
S. Prakash, Yann Hang Lee, T. Johnson, "A Nonblocking Algorithm for Shared Queues Using Compare-and-Swap," IEEE Transactions on Computers, vol. 43, no. 5, pp. 548-559, May 1994, doi:10.1109/12.280802
Usage of this product signifies your acceptance of the Terms of Use.