skip to main content
10.1145/1060590.1060697acmconferencesArticle/Chapter ViewAbstractPublication PagesstocConference Proceedingsconference-collections
Article

An optimal multi-writer snapshot algorithm

Published:22 May 2005Publication History

ABSTRACT

An m-component, n-process snapshot object is an abstraction of shared memory that consists of m words and allows up to n processes to concurrently execute the following two types of operations: write(i,v), which writes v into the ith word, and scan(), which returns the current values of all m locations [1, 3]. The snapshot problem is to design algorithms for the write and scan operations that meet two challenging requirements: (1) operations appear to be atomic, and (2) operations are wait-freeFor any (m-component, n-process) snapshot algorithm, which runs on hardware that supports only word-sized objects, Ω(1) and Ω(m) are trivial lower bounds on the time complexity of write(i,v) and scan(), respectively. But, are these bounds tight?For a restricted version of the snapshot problem, known in the literature as the single-writer snapshot problem, Riany, Shavit and Touitou [18] showed that the answer is yes: they designed an algorithm with O(1) and O(m) running times for the write(i,v) and scan() operations, respectively. (The single-writer snapshot problem assumes that (i) the number m of words of the snapshot object is equal to the number n of processes, and (ii) only the ith process may write into the ith snapshot word.This paper shows that the same (optimal) running times of O(1) for write(i,v) and O(m) for scan() are achievable for the general problem, known in the literature as the multiwriter snapshot problem. Our algorithm requires hardware support for the CAS (compare&swap) operation (in comparison, Riany, Shavit and Touitou's algorithm requires hardware support for CAS, fetch&inc, and fetch&dec operations).

References

  1. Y. Afek, H. Attiya, D. Dolev, E. Gafni, M. Merritt, and N. Shavit. Atomic snapshots of shared memory. In Proceedings of the 9th Annual Symposium on Principles of Distributed Computing, pages 1--14, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Y. Afek, H. Attiya, D. Dolev, E. Gafni, M. Merritt, and N. Shavit. Atomic snapshots of shared memory. Journal of the ACM, 40(4):873--890, September 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Anderson. Composite registers. In Proceedings of the 9th Annual Symposium on Principles of Distributed Computing, pages 15--29, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Anderson. Composite registers. Distributed Computing, 6(3):141--154, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Anderson. Multi-writer composite registers. Distributed Computing, 7(4):175--195, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Aspnes and M. Herlihy. Wait-free data structures in the asynchronous PRAM model. In Proceedings of the 2nd Annual ACM Symposium on Parallel Architectures and Algorithms, pages 340--349, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. H. Attiya, M. Herlihy, and O. Rachman. Efficient atomic snapshots using lattice agreement. In Proceedings of the 6th International Workshop on Distributed Algorithms, pages 35--53, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. H. Attiya and O. Rachman. Atomic snapshots in o(n log n) operations. In Proceedings of the 12th Annual ACM Symposium on Principles of Distributed Computing, pages 29--40, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. D. Chandra and C. Dwork. Using consensus to solve atomic snapshots. Unpublished manuscript, 1993.Google ScholarGoogle Scholar
  10. C. Dwork, M. P. Herlihy, S. Plotkin, and O. Waarts. Time lapse snapshots. In Proceedings of the Israel Symposium on the Theory of Computing and Systems, pages 154--170, May 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. Haldar and K. Vidyasankar. Elegant constructions of atomic snapshot variables. Technical Report Technical Report No: 9204, Memorial University of Newfoundland, Department of Computer Science, Memorial University of Newfoundland, St. John's, NF, Canada, A1C 5S7, May 1992.Google ScholarGoogle Scholar
  12. M. Herlihy and J. Wing. Linearizability: A correctness condition for concurrent objects. ACM TOPLAS, 12(3):463--492, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. P. Jayanti. f-arrays: implementation and applications. In Proceedings of the 21st Annual Symposium on Principles of Distributed Computing, pages 270 -- 279, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. Jayanti and S. Petrovic. Efficient and practical constructions of LL/SC variables. In Proceedings of the 22nd ACM Symposium on Principles of Distributed Computing, July 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. P. Jayanti and S. Petrovic. Efficient wait-free implementation of multiword ll/sc variables. In Proceedings of the 25th International Conference on Distributed Computing Systems (ICDCS), June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. L. Kirousis, P. Spirakis, and P. Tsigas. Reading many variables in one atomic operation: solutions with linear or sublinear complexity. In Proceedings of the 5th International Workshop on Distributed Algorithms, pages 229--241, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Moir. Practical implementations of non-blocking synchronization primitives. In Proceedings of the 16th Annual ACM Symposium on Principles of Distributed Computing, pages 219--228, August 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Y. Riany, N. Shavit, and D. Touitou. Towards a practical snapshot algorithm. Theoretical Computer Science, 269(1-2):163--201, 2001.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. An optimal multi-writer snapshot algorithm

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      STOC '05: Proceedings of the thirty-seventh annual ACM symposium on Theory of computing
      May 2005
      778 pages
      ISBN:1581139608
      DOI:10.1145/1060590

      Copyright © 2005 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 22 May 2005

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate1,469of4,586submissions,32%

      Upcoming Conference

      STOC '24
      56th Annual ACM Symposium on Theory of Computing (STOC 2024)
      June 24 - 28, 2024
      Vancouver , BC , Canada

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader