skip to main content
research-article
Distinguished Paper

DomLock: a new multi-granularity locking technique for hierarchies

Published:27 February 2016Publication History
Skip Abstract Section

Abstract

We present efficient locking mechanisms for hierarchical data structures. Several applications work on an abstract hierarchy of objects, and a parallel execution on this hierarchy necessitates synchronization across workers operating on different parts of the hierarchy. Existing synchronization mechanisms are either too coarse, too inefficient, or too ad hoc, resulting in reduced or unpredictable amount of concurrency. We propose a new locking approach based on the structural properties of the underlying hierarchy. We show that the developed techniques are efficient even when the hierarchy is an arbitrary graph, and are applicable even when the hierarchy involves mutation. Theoretically, we present our approach as a locking-cost-minimizing instance of a generic algebraic model of synchronization for hierarchical data structures. Using STMBench7, we illustrate considerable reduction in the locking cost, resulting in an average throughput improvement of 42%.

References

  1. M. J. Carey. Granularity hierarchies in concurrency control. In Proceedings of the 2Nd ACM SIGACT-SIGMOD Symposium on Principles of Database Systems, PODS '83, pages 156--165, New York, NY, USA, 1983. ACM. ISBN 0-89791-097-4. doi: 10.1145/588058.588079. URL http://doi.acm.org/10.1145/588058.588079. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. J. Carey, D. J. DeWitt, and J. F. Naughton. The OO7 Benchmark. In Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data, SIGMOD '93, pages 12--21, New York, NY, USA, 1993. ACM. ISBN 0-89791-592-5. doi: 10.1145/170035.170041. URL http://doi.acm.org/10.1145/170035.170041. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. B. Chatterjee, N. Nguyen, and P. Tsigas. Efficient Lock-free Binary Search Trees. In Proceedings of the 2014 ACM Symposium on Principles of Distributed Computing, PODC '14, pages 322--331, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2944-6. doi: 10.1145/2611462. 2611500. URL http://doi.acm.org/10.1145/2611462.2611500. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. V. K. Chaudhri and V. Hadzilacos. Safe locking policies for dynamic databases. In Proceedings of the Fourteenth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, PODS '95, pages 233--244, New York, NY, USA, 1995. ACM. ISBN 0-89791-730-8. doi: 10.1145/212433.212464. URL http://doi.acm.org/10.1145/212433.212464. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Cherem, T. Chilimbi, and S. Gulwani. Inferring locks for atomic sections. In Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '08, pages 304--315, New York, NY, USA, 2008. ACM. ISBN 978-1-59593-860-2. doi: 10.1145/1375581.1375619. URL http://doi.acm.org/10.1145/1375581.1375619. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. J. Courtois, F. Heymans, and D. L. Parnas. Concurrent Control with "Readers" and "Writers". Commun. ACM, 14(10):667--668, Oct. 1971. ISSN 0001-0782. doi: 10.1145/362759.362813. URL http://doi.acm.org/10.1145/362759.362813. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. K. P. Eswaran, J. N. Gray, R. A. Lorie, and I. L. Traiger. The notions of consistency and predicate locks in a database system. Commun. ACM, 19(11):624--633, Nov. 1976. ISSN 0001-0782. doi: 10.1145/360363. 360369. URL http://doi.acm.org/10.1145/360363.360369. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G. Golan-Gueta, N. Bronson, A. Aiken, G. Ramalingam, M. Sagiv, and E. Yahav. Automatic Fine-grain Locking Using Shape Properties. In Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA '11, pages 225--242, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0940-0. doi: 10.1145/2048066.2048086. URL http://doi.acm.org/10.1145/2048066.2048086. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. N. Gray, R. A. Lorie, and G. R. Putzolu. Granularity of locks in a shared data base. In Proceedings of the 1st International Conference on Very Large Data Bases, VLDB '75, pages 428--451, New York, NY, USA, 1975. ACM. ISBN 978-1-4503-3920-9. doi: 10.1145/1282480.1282513. URL http://doi.acm.org/10.1145/1282480.1282513. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. N. Gray, R. A. Lorie, G. R. Putzolu, and I. L. Traiger. Granularity of Locks and Degrees of Consistency in a Shared Data Base. In M. Stonebraker, editor, Readings in Database Systems, pages 94--121. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1988. ISBN 0-934613-65-6. URL http://dl.acm.org/citation.cfm?id=48751.48758. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. R. Guerraoui, M. Kapalka, and J. Vitek. STMBench7: A Benchmark for Software Transactional Memory. In Proceedings of the 2Nd ACM SIGOPS/EuroSys European Conference on Computer Systems 2007, EuroSys '07, pages 315--324, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-636-3. doi: 10.1145/1272996.1273029. URL http://doi.acm.org/10.1145/1272996.1273029. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Hawkins, A. Aiken, K. Fisher, M. Rinard, and M. Sagiv. Reasoning about lock placements. In Proceedings of the 21st European Conference on Programming Languages and Systems, ESOP'12, pages 336--356, Berlin, Heidelberg, 2012. Springer-Verlag. ISBN 978-3-642-28868-5. doi: 10.1007/978-3-642-28869-2 17. URL http://dx.doi.org/10.1007/978-3-642-28869-2_17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2008. ISBN 0123705916, 9780123705914. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Lameter. Effective Synchronization on Linux/NUMA Systems, 2005. URL https://www.kernel.org/pub/linux/kernel/people/christoph/gelato/gelato2005-paper.pdf.Google ScholarGoogle Scholar
  15. P. Liu and C. Zhang. Unleashing Concurrency for Irregular Data Structures. In Proceedings of the 36th International Conference on Software Engineering, ICSE 2014, pages 480--490, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2756-5. doi: 10.1145/2568225.2568277. URL http://doi.acm.org/10.1145/2568225.2568277. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. X. Liu and J. Mellor-Crummey. A Data-centric Profiler for Parallel Programs. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis, SC '13, pages 28:1--28:12, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2378-9. doi: 10.1145/2503210.2503297. URL http://doi.acm.org/10.1145/2503210.2503297. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. Lomet and M. F. Mokbel. Locking key ranges with unbundled transaction services. Proc. VLDB Endow., 2(1):265--276, Aug. 2009. ISSN 2150-8097. doi: 10.14778/1687627.1687658. URL http://dx.doi.org/10.14778/1687627.1687658. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. B. Lomet. Key range locking strategies for improved concurrency. In Proceedings of the 19th International Conference on Very Large Data Bases, VLDB '93, pages 655--664, San Francisco, CA, USA, 1993. Morgan Kaufmann Publishers Inc. ISBN 1-55860-152-X. URL http://dl.acm.org/citation.cfm?id=645919.672802. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. M. Mellor-Crummey and M. L. Scott. Scalable Reader-writer Synchronization for Shared-memory Multiprocessors. In Proceedings of the Third ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPOPP '91, pages 106--113, New York, NY, USA, 1991. ACM. ISBN 0-89791-390-6. doi: 10.1145/109625.109637. URL http://doi.acm.org/10.1145/109625.109637. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. MSDN. Sql server 2016 database engine, 2015. URL https://msdn.microsoft.com/en-us/library/ms187875.aspx.Google ScholarGoogle Scholar
  21. A. Natarajan, L. Savoie, and N. Mittal. Concurrent Wait-Free Red Black Trees. In T. Higashino, Y. Katayama, T. Masuzawa, M. Potop-Butucaru, and M. Yamashita, editors, Stabilization, Safety, and Security of Distributed Systems, volume 8255 of Lecture Notes in Computer Science, pages 45--60. Springer International Publishing, 2013. ISBN 978-3-319-03088-3. doi: 10.1007/978-3-319-03089-0 4. URL http://dx.doi.org/10.1007/978-3-319-03089-0_4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Oracle. Oracle database 10g r2, 2015. URL http://docs.oracle.com/cd/B19306_01/index.htm.Google ScholarGoogle Scholar
  23. H. Sundell and P. Tsigas. Fast and lock-free concurrent priority queues for multi-thread systems. In Parallel and Distributed Processing Symposium, 2003. Proceedings. International, pages 11 pp.-, April 2003. doi: 10.1109/IPDPS.2003.1213189. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. H. Sundell and P. Tsigas. Fast and Lock-free Concurrent Priority Queues for Multi-thread Systems. J. Parallel Distrib. Comput., 65(5):609--627, May 2005. ISSN 0743-7315. doi: 10.1016/j.jpdc.2004.12.005. URL http://dx.doi.org/10.1016/j.jpdc.2004.12.005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Sybase. Adaptive server enterprise: Performance tuning and locking, 2003. URL http://infocenter.sybase.com/help/topic/com.sybase.help.ase_12.5.1/title.htm.Google ScholarGoogle Scholar

Index Terms

  1. DomLock: a new multi-granularity locking technique for hierarchies

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!