Skip to main content

Distributed Lock Using Timestamps

  • Chapter
  • First Online:
Distributed Programming
  • 1468 Accesses

Abstract

This chapter presents a distributed program that implements the distributed lock service in Chap. 11 over a fifo channel. It first solves a “distributed request scheduling” problem using Lamport’s timestamp mechanism, and then refines the solution to the distributed lock implementation. The request scheduling problem is as follows: potentially-conflicting requests arrive at different systems; they have to be served so that conflicting requests are not served simultaneously and every request is eventually served. Given a fifo channel connecting the systems, the timestamp mechanism provides a solution to this problem. The solution is easily refined to implement the distributed lock service, because the latter is a special case of the distributed request scheduling problem. The implementation is then further refined to use cyclic timestamps.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 54.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. P.A. Bernstein, N. Goodman, Concurrency control in distributed database systems. ACM Comput. Surv. 13(2), 185–221 (1981). doi:10.1145/356842.356846. http://doi.acm.org/10.1145/356842.356846

  2. C. Fidge, Logical time in distributed computing systems. Computer 24(8), 28–33 (1991). doi:10.1109/2.84874. http://dx.doi.org/10.1109/2.84874

    Google Scholar 

  3. L. Lamport, Time, clocks, and the ordering of events in a distributed system. Commun. ACM 21(7), 558–565 (1978). doi:10.1145/359545.359563. http://doi.acm.org/10.1145/359545.359563

  4. M.M.K. Martin, D.J. Sorin, A. Ailamaki, A.R. Alameldeen, R.M. Dickson, C.J. Mauer, K.E. Moore, M. Plakal, M.D. Hill, D.A. Wood, Timestamp snooping: an approach for extending smps, in Proceedings of the Ninth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS-IX (ACM, New York, 2000), pp. 25–36. doi:10.1145/378993.378998. http://doi.acm.org/10.1145/378993.378998

  5. G. Ricart, A.K. Agrawala, An optimal algorithm for mutual exclusion in computer networks. Commun. ACM 24(1), 9–17 (1981). doi:10.1145/358527.358537. http://doi.acm.org/10.1145/358527.358537

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer Science+Business Media New York

About this chapter

Cite this chapter

Shankar, A.U. (2013). Distributed Lock Using Timestamps. In: Distributed Programming. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-4881-5_12

Download citation

  • DOI: https://doi.org/10.1007/978-1-4614-4881-5_12

  • Published:

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4614-4880-8

  • Online ISBN: 978-1-4614-4881-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics