Nothing Special   »   [go: up one dir, main page]

Skip to main content

Fast, Dynamically-Sized Concurrent Hash Table

  • Conference paper
  • First Online:
Model Checking Software (SPIN 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9232))

Included in the following conference series:

Abstract

We present a new design and a C++ implementation of a high-performance, cache-efficient hash table suitable for use in implementation of parallel programs in shared memory. Among the main design criteria were the ability to efficiently use variable-length keys, dynamic table resizing to accommodate data sets of unpredictable size and fully concurrent read-write access.

We show that the design is correct with respect to data races, both through a high-level argument, as well as by using a model checker to prove crucial safety properties of the actual implementation. Finally, we provide a number of benchmarks showing the performance characteristics of the C++ implementation, in comparison with both sequential-access and concurrent-access designs.

This work has been partially supported by the Czech Science Foundation grant No. 15-08772S.

P. Ročkai has been partially supported by Red Hat, Inc.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    The C++ source code for the hash table implementation can be found online: https://divine.fi.muni.cz/trac/browser/bricks/brick-hashset.h#L481.

  2. 2.

    Doubts could arise when using a model checker which uses the hash table to be verified internally. An analysis of failure modes of the hash table along with the properties of the model checking algorithm indicate that this could not cause the model checker to miss a valid counterexample. Nonetheless, the entire issue is easy to side-step by using a much simpler sequential hash table and just waiting longer for the result.

  3. 3.

    The code can be found online at https://divine.fi.muni.cz/trac/browser/examples/llvm/hashset.cpp.

  4. 4.

    An extension to gdb to record execution exists, but we were unable to use it successfully. Either the window in which time reversal was possible was too narrow, or the memory and time requirements too high.

  5. 5.

    The full data set will be eventually published online, but is too extensive to fit in a paper. Please check http://divine.fi.muni.cz/benchmarks.

  6. 6.

    https://divine.fi.muni.cz/trac/browser/bricks/brick-hashset.h#L481.

References

  1. Intel Corporation, Threading Building Blocks (2014–06-01) (2014). http://www.threadingbuildingblocks.org

  2. Shalev, O., Shavit, N.: Split-ordered lists: lock-free extensible hashtables. J. ACM 53(3), 379–405 (2006). http://doi.acm.org/10.1145/1147954.1147958

    Article  MathSciNet  Google Scholar 

  3. Laarman, A.W., van de Pol, J.C., Weber, M.: Boosting multi-core reachability performance with shared hash tables. In: Sharygina, N., Bloem, R. (eds.) FMCAD 2010. IEEE Computer Society, Los Alamitos (2010)

    Google Scholar 

  4. Purcell, C., Harris, T.: Non-blocking hashtables with open addressing. In: Proceedings of the 19th International Symposium on Distributed Computing, DISC 2005, September 2005, a longer version appears as Technical report UCAM-CL-TR-639. http://research.microsoft.com/apps/pubs/default.aspx?id=67422

  5. Gao, H., Groote, J.F., Hesselink, W.H.: Lock-free dynamic hash tables with open addressing. Distrib. Comput. 18(1), 21–42 (2005)

    Article  MATH  Google Scholar 

  6. Wijs, A., Bošnački, D.: Many-core on-the-fly model checking of safety properties using GPUs. Int. J. Softw. Tools Technol. Transf. 1–17 (2015) (to appear)

    Google Scholar 

  7. Jenkins, R.J.: A hash function for hash table lookup (2006). http://burtleburtle.net/bob/hash/doobs.html

  8. Jenkins, R.J.: SpookyHash: a 128-bit Noncryptographic Hash (2012). http://burtleburtle.net/bob/hash/spooky.html

  9. Pike, G., Alakuijala, J.: Introducing CityHash (2011)

    Google Scholar 

  10. Batagelj, V.: The quadratic hash method when the table size is not a primenumber. Commun. ACM 18(4), 216–217 (1975). http://doi.acm.org/10.1145/360715.360737

    Article  MATH  Google Scholar 

  11. Ročkai, P., Šill, V., Barnat, J.: Techniques for memory-efficient model checking of C and C++ code. In: Software Engineering and Formal Methods (2015, submitted)

    Google Scholar 

  12. Fagin, R., Nievergelt, J., Pippenger, N., Strong, H.R.: Extendible hashing—a fast access method for dynamic files. ACM Trans. Database Syst. 4(3), 315–344 (1979)

    Article  Google Scholar 

  13. Barnat, J., et al.: DiVinE 3.0 – anexplicit-state model checker for multithreaded C & C++ programs. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 863–868. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to J. Barnat .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Barnat, J., Ročkai, P., Štill, V., Weiser, J. (2015). Fast, Dynamically-Sized Concurrent Hash Table. In: Fischer, B., Geldenhuys, J. (eds) Model Checking Software. SPIN 2015. Lecture Notes in Computer Science(), vol 9232. Springer, Cham. https://doi.org/10.1007/978-3-319-23404-5_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-23404-5_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-23403-8

  • Online ISBN: 978-3-319-23404-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics