Designing Effective Lock-Based Concurrency Control in Database Systems

Authors

  • Vipul Kumar Bondugula

Keywords:

Locking, Concurrency, Throughput, Cluster, Lease, Scalability, Transactions, Deadlock, Synchronization, Coordination, Etcd, Kubernetes, Performance, Contention, Metrics.

Abstract

Database systems, managing concurrency is critical to maintaining data integrity, especially when multiple users or processes access and modify data simultaneously. One of the core tools used for this purpose is locking. Locks regulate access to data, ensuring that only one transaction can write to a data item at a time, while multiple transactions may be allowed to read concurrently depending on the lock type. Read operations commonly use shared locks, which allow several transactions to read the same data without interference, while write operations require exclusive locks to prevent other operations from accessing the data simultaneously. To manage these locks effectively, various locking mechanisms have been developed. Pessimistic locking assumes conflicts are likely and locks data before access, whereas optimistic locking assumes conflicts are rare and checks for conflicts only at the time of commit. Another widely used method is two-phase locking (2PL), which ensures serializability by dividing the transaction into a lock-acquisition phase followed by a lock-release phase. In distributed systems such as those built with Kubernetes or etcd, traditional locking methods are extended with mechanisms like lease-based locking. This approach grants a time-bound lease to a client, allowing it to perform operations for a limited duration. If the client fails or becomes unreachable, the lease expires automatically, releasing the lock and preventing deadlock or indefinite resource blocking. This method is particularly valuable in distributed environments where fault tolerance and automatic recovery are essential. Lease-based locking is a mechanism where a lock is acquired for a specified duration, allowing the holder to perform tasks within that time frame. After the lease expires, the lock is released automatically, ensuring that other processes can attempt to acquire it. This method helps prevent deadlocks and reduces the contention for resources in distributed systems. Although the internal mechanics vary across systems, the principle remains consistent locks help serialize access to resources, ensuring consistency and correctness. Whether used in traditional relational databases or modern distributed platforms, locking continues to be a fundamental strategy for safe and reliable transaction management under concurrent workloads. Lease based locking mechanism is having through put performance issues. This paper addresses this issue using basic lease based locking mechanism.

Downloads

Download data is not yet available.

References

Hwang, S. J., No, J., & Park, S. S. A case study in distributed locking protocol on Linux clusters. In V. S. Sunderam, G. D. van Albada, P. M. A. Sloot, & J. J. Dongarra (Eds.), Computational Science – ICCS 2005 (Vol. 3514, pp. 619–626). Springer, 2005.

Desai, N. Scalable hierarchical locking for distributed systems. Journal of Parallel and Distributed Computing, 64(10), 1157–1167, 2004.

No, J., & Park, S. S. A distributed locking protocol. In J. Zhang, J. H. He, & Y. Fu (Eds.), Computational and Information Science (Vol. 3314, pp. 262–267). Springer, 2004.

Carvalho, O. S. F., & Roucairol, G. On mutual exclusion in computer networks. Communications of the ACM, 26(2), 146–147, 1983.

Born, E. Analytical performance modelling of lock management in distributed systems. Distributed Systems Engineering, 3(1), 68–74, 1996.

Lei, X., Zhao, Y., Chen, S., & Yuan, X. Concurrency control in mobile distributed real-time database systems. Journal of Parallel and Distributed Computing, 69(10), 866–876, 2009.

"etcd: A Distributed, Reliable Key-Value Store for the Edge" by Corey Olsen et al. (2018).

Tan, S., & Zhang, X. Managing timeouts and retries in snapshot isolation. Proceedings of the IEEE Conference on Data Engineering, 130-137, 2017.

Ramesh, D., Gupta, H., Singh, K., & Kumar, C. Hash Based Incremental Optimistic Concurrency Control Algorithm in Distributed Databases. In Intelligent Distributed Computing (pp. 115–124). Springer. https://link.springer.com/chapter/10.1007/978-3-319-11227-5_13, 2015.

Adya, A., Howell, J., Theimer, M., & Bolosky, W. J. Cooperative Task Management without Manual Stack Management. ACM SIGPLAN Notices, 41(6), 289–300. https://dl.acm.org/doi/10.1145/1134293.1134329 , 2006.

Berenson, H., Bernstein, P. A., Gray, J., Melton, J., & O'Neil, P. E. A Critique of ANSI SQL Isolation Levels. ACM SIGMOD Record, 24(2), 1–10. https://dl.acm.org/doi/10.1145/568271.223831, 1995.

Gray, J., Reuter, A., & Putzolu, M. Transaction Processing: Concepts and Techniques. Morgan Kaufmann. ISBN: 978-1558601905, 1992.

Tannenbaum, T. Dynamic and fixed timeout approaches for database concurrency management. Proceedings of the International Database Systems Conference, 241-253, 2016.

Xu, F., & Li, C. Concurrency control with fixed and dynamic timeouts in distributed transaction systems. International Journal of Computer Applications, 124(6), 111-119, 2016.

Zhang, J., & Li, Z. Concurrency control mechanisms for database systems using snapshot isolation. ACM Computing Surveys, 23(4), 45-58, 2011.

Koçi, A., & Çiço, B. Performance evaluation of the asymmetric distributed lock management in cloud computing. International Journal of Computer Applications, 180(49), 35–42, 2018.

Abadi, D. J., & Bernstein, P. A. Concurrency control in distributed database systems. IEEE Transactions on Knowledge and Data Engineering, 20(1), 101-110, 2008.

Badr, M., & Wilke, B. Snapshot isolation in distributed databases: A survey of techniques and challenges. International Journal of Computer Applications, 140(4), 35-42, 2016.

Barbaro, S., & Leitao, J. Time-based concurrency control for distributed databases. Proceedings of the IEEE International Conference on Database Systems, 45-56, 2013.

Chaudhuri, S., & Weikum, G. Snapshot isolation and the phantom problem in databases. Journal of Database Management, 22(2), 43-54, 2011.

Gray, J. N., & Reuter, A. Transaction processing: Concepts and techniques. Morgan Kaufmann Publishers, 2014.

Downloads

Published

26.02.2021

How to Cite

Vipul Kumar Bondugula. (2021). Designing Effective Lock-Based Concurrency Control in Database Systems. International Journal of Intelligent Systems and Applications in Engineering, 9(1), 92 –. Retrieved from https://www.ijisae.org/index.php/IJISAE/article/view/7607

Issue

Section

Research Article