Locking granularity revisited
- 1 June 1979
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Database Systems
- Vol. 4 (2), 210-227
- https://doi.org/10.1145/320071.320078
Abstract
Locking granularity refers to the size and hence the number of locks used to ensure the consistency of a database during multiple concurrent updates. In an earlier simulation study we concluded that coarse granularity, such as area or file locking, is to be preferred to fine granularity such as individual page or record locking. However, alternate assumptions than those used in the original paper can change that conclusion. First, we modified the assumptions concerning the placement of the locks on the database with respect to the accessing transactions. In the original model the locks were assumed to be well placed. Under worse case and random placement assumptions when only very small transactions access the database, fine granularity is preferable. Second, we extended the simulation to model a lock hierarchy where large transactions use large locks and small transactions use small locks. In this scenario, again under the random and worse case lock placement assumptions, fine granularity is preferable if all transactions accessing more than 1 percent of the database use large locks. Finally, the simulation was extended to model a “claim as needed” locking strategy together with the resultant possibility of deadlock. In the original study all locks were claimed in one atomic operation at the beginning of a transaction. The claim as needed strategy does not change the conclusions concerning the desired granularity.Keywords
This publication has 9 references indexed in Scilit:
- Effects of locking granularity in a database management systemACM Transactions on Database Systems, 1977
- Approximating block accesses in database organizationsCommunications of the ACM, 1977
- Concurrency in database systemsPublished by Association for Computing Machinery (ACM) ,1977
- The notions of consistency and predicate locks in a database systemCommunications of the ACM, 1976
- System RACM Transactions on Database Systems, 1976
- Performance prototyping of data management applicationsPublished by Association for Computing Machinery (ACM) ,1976
- Deadlock detection and resolution in a CODASYL based data management systemPublished by Association for Computing Machinery (ACM) ,1976
- Granularity of locks in a shared data basePublished by Association for Computing Machinery (ACM) ,1975
- System DeadlocksACM Computing Surveys, 1971