Abstract
Mutual exclusion protects data structures in parallel environments in order to preserve data integrity. A lock being held effectively blocks the execution of all other threads wanting to access the same shared resource until the lock is released. This blocking behavior reduces the level of parallelism causing performance loss. Fine grained locking reduces the contention for the locks resulting in better throughput, however, the granularity, i.e. how many locks to use, is not straightforward. In large bucket hash tables, the best approach is to divide the table into blocks, each containing one or more buckets, and locking these blocks independently. The size of the block, for optimal performance, depends on the time spent within the critical sections, which depends on the table’s internal properties, and the arrival intensity of the queries. A queuing model is presented capturing this behavior, and an adaptive algorithm is presented fine-tuning the granularity of locking (the block size) to adapt to the execution environment.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Barnat, J., Ročkai, P.: Shared Hash Tables in Parallel Model Checking. Electronic Notes in Theoretical Computer Science 198(1), 79–91 (2008)
Brandenburg, B., Calandrino, J.M., Block, A., Leontyev, H., Anderson, J.H.: Real-Time Synchronization on Multiprocessors: To Block or Not to Block, to Suspend or Spin? In: 2008 IEEE Real-Time and Embedded Technology and Applications Symposium, pp. 342–353. IEEE Computer Society Press, St. Louis (2008)
Gao, H., Groote, J.F., Hesselink, W.H.: Lock-free dynamic hash tables with open addressing. Distributed Computing 18(1), 21–42 (2005)
Gilbert, D.C.: Modeling spin locks with queuing networks. ACM SIGOPS Operating Systems Review 12(1), 29–42 (1978)
Harrison, P., Patel, N.M.: Performance Modelling of Communication Networks and Computer Architectures. Addison-Wesley (1992)
Herlihy, M., Shavit, N., Tzafrir, M.: Hopscotch Hashing. In: Taubenfeld, G. (ed.) DISC 2008. LNCS, vol. 5218, pp. 350–364. Springer, Heidelberg (2008)
Juhász, S., Dudás, A.: Adapting hash table design to real-life datasets. In: Proc. of the IADIS European Conference on Informatics 2009, Part of the IADIS Multiconference of Computer Science and Information Systems 2009, Algarve, Portugal, pp. 3–10 (June 2009)
Kim, W., Voss, M.: Multicore Desktop Programming with Intel Threading Building Blocks. IEEE Software 28(1), 23–31 (2011)
Klots, B., Bamford, R.J.: Method and apparatus for dynamic lock granularity escalation and de-escalation in a computer system (1998)
Knuth, D.E.: The art of computer programming, vol 3. Addison-Wesley (November 1973)
Laarman, A., van de Pol, J., Weber, M.: Boosting Multi-Core Reachability Performance with Shared Hash Tables. In: 10th International Conference on Formal Methods in Computer-Aided Design (April 2010)
Larson, P.A., Krishnan, M.R., Reilly, G.V.: Scaleable hash table for shared-memory multiprocessor system (April 2003)
Lea, D.: Hash table util.concurrent.ConcurrentHashMap, revision 1.3, in JSR-166, the proposed Java Concurrency Package (2003)
Li, Q., Moon, B.: Distributed cooperative Apache web server. In: Proceedings of the Tenth International Conference on World Wide Web, WWW 2001, pp. 555–564. ACM Press, New York (2001)
Mellor-Crummey, J.M., Scott, M.L.: Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Transactions on Computer Systems 9(1), 21–65 (1991)
Michael, M.M.: High performance dynamic lock-free hash tables and list-based sets. In: ACM Symposium on Parallel Algorithms and Architectures, pp. 73–82 (2002)
Ning, Z., Cox, A.J., Mullikin, J.C.: SSAHA: a fast search method for large DNA databases. Genome Research 11(10), 1725–1729 (2001)
Purcell, C., Harris, T.: Non-blocking Hashtables with Open Addressing. In: Fraigniaud, P. (ed.) DISC 2005. LNCS, vol. 3724, pp. 108–121. Springer, Heidelberg (2005)
Stewart, W.J.: Probability, Markov chains, queues, and simulation: the mathematical basis of performance modeling. Princeton University Press (2009)
Treiber, R.K.: Systems Programming: Coping with Parallelism (Research Report RJ 5118). Tech. rep., IBM Almaden Research Center (1986)
Veal, B., Foong, A.: Performance scalability of a multi-core web server. In: Proceedings of the 3rd ACM/IEEE Symposium on Architecture for Networking and Communications Systems, ANCS 2007, p. 57. ACM Press, New York (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Dudás, Á., Juhász, S., Kolumbán, S. (2013). Recalibrating Fine-Grained Locking in Parallel Bucket Hash Tables. In: Keller, R., Kramer, D., Weiss, JP. (eds) Facing the Multicore-Challenge III. Lecture Notes in Computer Science, vol 7686. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35893-7_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-35893-7_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-35892-0
Online ISBN: 978-3-642-35893-7
eBook Packages: Computer ScienceComputer Science (R0)