Advertisement

Implementing FIFO queues and stacks

Extended abstract
  • Hagit Attiya
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 579)

Abstract

The cost of implementing FIFO queues and stacks is studied under two consistency condiions for shared memory multiprocessors, sequential consistency and linearizability. The cost measure is the worst-case response time in distributed implementations of virtual shared memory supporting one of the two conditions. The worst-case response time is very sensitive to the assumptions that are made about the timing information available to the system. All the results in this paper assume that processes have clocks that run at the same rate as real time and that all message delays are in the range [d−u, d] for some known constants u and d, 0≤u≤d.

If processes have perfectly synchronized clocks or if every message has delay exactly d, then the response time of a dequeue operation is at least d, for any sequentially consistent implementation of FIFO queues. This matches exactly an upper bound in which an enqueue operation is performed instantaneously and the response time of a dequeue operation is d; this upper bound implements linearizability. If clocks are not perfectly synchronized and if message delays are variable, i.e., u>0, then, for any linearizable implementation of a queue, the response time of an enqueue operations is at least Ω(u). In contrast, we present sequentially consistent implementation for this weaker timing model in which an enqueue operation is performed instantaneously, and the worst-case response time of a dequeue operation is 2d. (This algorithm is completely asynchronous and does not rely on any timing information.)

Similar results are proved for implementing stacks, with the pop operation playing the role of the dequeue operation, and the push operation playing the role of the enqueue operation.

Keywords

Local Copy Sequential Consistency FIFO Queue Message Delay Shared Memory Multiprocessor 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    S. Adve and M. Hill, “Implementing Sequential Consistency in Cache-Based Systems,” Proc. Int. Conf. on Parallel Processing, 1990.Google Scholar
  2. [2]
    Y. Afek, G. Brown, and M. Merritt. “A Lazy Cache Algorithm,” Proc. 1st ACM Symp. on Parallel Algorithms and Architectures, 1989, pp. 209–222.Google Scholar
  3. [3]
    H. Attiya and J. L. Welch, “Sequential Consistency versus Linearizability,” Proc. 3rd ACM Symp. on Parallel Algorithms and Architectures, 1991, pp. 305–315.Google Scholar
  4. [4]
    J. Bennett, J. Carter, and W. Zwaenepoel, “Munin: Distributed Shared Memory Based on Type-Specific Memory Coherence,” Proc. 2nd ACM Symp. on Principles and Practice of Parallel Programming, 1990, pp. 168–176.Google Scholar
  5. [5]
    R. Bisiani, A. Nowatzyk, and M. Ravishankar, “Coherent Shared Memory on a Distributed Memory Machine,” Proc. Int. Conf. on Parallel Processing, 1989, pp. I-133–141.Google Scholar
  6. [6]
    P. Bernstein, V. Hadzilacos, and H. Goodman, Concurrency Control and Recovery in Database Systems, Addison-Wesley, Reading, MA, 1987.Google Scholar
  7. [7]
    K. Birman and T. Joseph, “Reliable Communication in the Presence of Failures,” ACM Trans. on Computer Systems, Vol. 5, No. 1 (February 1987), pp. 47–76.Google Scholar
  8. [8]
    W. Brantley, K. McAuliffe, and J. Weiss, “RP3 Processor-Memory Element,” Proc. Int. Conf. on Parallel Processing, 1985, pp. 782–789.Google Scholar
  9. [9]
    M. Dubois and C. Scheurich, “Memory Access Dependencies in Shared-Memory Multiprocessors”, IEEE Trans. on Software Engineering, vol. 16, no. 6 (June 1990), pp. 660–673.Google Scholar
  10. [10]
    M. Herlihy, “Wait-Free Implementations of Concurrent Objects,” Proc. 7th ACM Symp. on Principles of Distributed Computing, 1988, pp. 276–290.Google Scholar
  11. [11]
    M. Herlihy and J. Wing, “Linearizability: A Correctness Condition for Concurrent Objects,” ACM Trans, on Programming Languages and Systems, Vol. 12, No. 3 (July 1990), pp. 463–492.Google Scholar
  12. [12]
    L. Lamport, “How to Make a Multiprocessor Computer that Correctly Executes Multiprocess Programs,” IEEE Trans. on Computers, Vol. C-28, No. 9 (September 1979), pp. 690–691.Google Scholar
  13. [13]
    K. Li and P. Hudak, “Memory Coherence in Shared Virtual Memory Systems,” ACM Trans. on Computer Systems, vol. 7, no. 4, pp. 321–359.Google Scholar
  14. [14]
    R. Lipton and J. Sandberg, PRAM: A Scalable Shared Memory, Technical Report CS-TR-180-88, Princeton University, September 1988.Google Scholar
  15. [15]
    J. Lundelius and N. Lynch, “An Upper and Lower Bound for Clock Synchronization,” Information and Control, Vol. 62, Nos. 2/3 (August/September 1984), pp. 190–204.Google Scholar
  16. [16]
    S. Min and J. Baer, “A Timestamp-Based Cache Coherence Scheme,” Proc. Int. Conf. on Parallel Processing, 1989, pp. I–23–32.Google Scholar
  17. [17]
    C. Papadimitriou, The Theory of Concurrency Control, Computer Science Press, Rockville, MD, 1986.Google Scholar
  18. [18]
    U. Ramachandran, M. Ahamad, and M. Y. Khalidi, “Coherence of Distributed Shared Memory: Unifying Synchronization and Data Transfer,” Proc. Int. Conf. on Parallel Processing, 1989, pp. II–160–169.Google Scholar
  19. [19]
    C. Scheurich and M. Dubois, “Correct Memory Operation of Cache-Based Multiprocessors,” Proc. 14th Int. Symp. on Computer Architecture, 1987, pp. 234–243.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Hagit Attiya
    • 1
  1. 1.Department of Computer ScienceThe TechnionHaifaIsrael

Personalised recommendations