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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
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
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
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
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
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
Author information
Authors and Affiliations
Rights 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)