Skip to main content

Two-Phase Locking

  • Reference work entry
Encyclopedia of Database Systems

Synonyms

Locking protocol; Isolation; Conflict serializability; Pessimistic scheduler

Definition

A locked transaction is a transaction which, in addition to read and write actions, contains lock and unlock operations to the data items. Lock and unlock operations enable a database system to control the order of read and write actions of a concurrent set of transactions. A locking policy is a set of rules which restrict the possible ways to introduce lock and unlock operations into a transaction. A locking policy is safe, if, whenever all the transactions conform to the policy, any history of the transactions is guaranteed to be serializable. Two-Phase Locking is a safe locking policy which is based on the simple rule saying a transaction is not allowed to further lock a data item once it has already unlocked some data item.

Historical Background

Two-Phase Locking was first described in [6]. Later the basic policy has been extended into several directions. In [1] ordered sharing of...

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 2,500.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Recommended Reading

  1. Agrawal D. and Abbadi A.E. Constrained shared locks for increased concurrency in databases. J. Comput. Syst., Sci.51:(1)53–63, 1995.

    Article  MATH  Google Scholar 

  2. Bayer R., Heller H., and Reiser A. Parallelism and recovery in database systems. ACM Trans. Database Syst., 5:(2)139–156, 1980.

    Article  MATH  Google Scholar 

  3. Bernstein P.A. and Newcomer E. Principles of Transaction Processing for Systems Professionals. Morgan Kaufmann, San Francisco, CA, 1996.

    Google Scholar 

  4. Bernstein P.A., Shipman D.W., and Wong W.S. Formal Aspects of Serializability in Database Concurrency Control. IEEE Trans. Software Eng., SE-5:203–215, 1979.

    Article  MathSciNet  Google Scholar 

  5. Boral H. and Gold I. Towards a Self-adapting Centralized Concurrency Control Algorithm. In Proc. ACM SIGMOD Int. Conf. on Management of Data, 1984, pp. 18–32.

    Google Scholar 

  6. Eswaran K.P., Gray J.N., Lorie R.A., and Traiger I.L. The notion of consistency and predicate locks in a database system. Commun. ACM, 19:624–633, 1976.

    Article  MathSciNet  MATH  Google Scholar 

  7. Gray J. and Reuter A. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, San Francisco, CA, 1993.

    MATH  Google Scholar 

  8. Lausen G. Concurrency Control in Database Systems: A Step towards the Integration of Optimistic Methods and Locking. In Proc. ACM Annual Conf., 1982, pp. 64–68.

    Google Scholar 

  9. Papadimitriou C.H. The Serializability of Concurrent Database Updates. J. ACM, 26:631–653, 1979.

    Article  MathSciNet  MATH  Google Scholar 

  10. Salem K., Garcia-Molina H., and Shands J. Altruistic locking. ACM Trans. Database Syst., 19:(1)17–165, 1994.

    Article  Google Scholar 

  11. Shasha D. Database Tuning – A Principled Approach. Prentice-Hall, USA, 1992.

    Google Scholar 

  12. Weikum G. and Vossen G. 1Transactional Information Systems – Theory, Algorithms, and the Practice of Concurrency Control and Recovery. Morgan Kaufmann, San Francisco, CA, 2002.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer Science+Business Media, LLC

About this entry

Cite this entry

Lausen, G. (2009). Two-Phase Locking. In: LIU, L., ÖZSU, M.T. (eds) Encyclopedia of Database Systems. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-39940-9_832

Download citation

Publish with us

Policies and ethics