Abstract
Memory distance analysis, the number of unique memory references made between two accesses to the same memory location, is an effective method to measure data locality and predict memory behavior. Many existing methods on memory distance measurement and analysis consider sequential programs only. With the trend towards concurrent programming, it is necessary to study the impact of memory distance on the performance of concurrent programs. Unfortunately, accurate measurement of concurrent program memory distance is non-trivial. In fact, due to non-determinism, the reuse distance of memory references may differ with the same input set across multiple runs. Since memory distance measurement is fundamental to analysis, we propose a measuring approach that is based on randomized executions. Our approach provides a probabilistic guarantee of observing all possible interleavings without repeated executions. In order to evaluate our approach, we propose a second symbolic execution based approach that is more rigorous but much less scalable than the first approach. We have compared the two approaches on small programs and evaluated the first one on Parsec benchmark suite and a large industrial-size benchmark MySQL. Our experiments confirm that the randomized execution based approach is effective and practical.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
For example, some approaches may report \(\varDelta _v(B^7)=4\) because there are four accesses between \(B^2\) and \(B^7\) regardless same memory locations are accessed.
References
Fang, C., Carr, S., Onder, S., Wang, Z.: Instruction based memory distance analysis and its application to optimization. In: 14th International Conference on Parallel Architectures and Compilation Techniques (PACT 2005), pp. 27–37. IEEE (2005)
Ding, C., Zhong, Y.: Predicting whole-program locality through reuse distance analysis. In: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, PLDI 2003, pp. 245–257 (2003)
Fang, C., Carr, S., Önder, S., Wang, Z.: Reuse-distance-based miss-rate prediction on a per instruction basis. In: Proceedings of the 2004 Workshop on Memory System Performance, MSP 2004, pp. 60–68 (2004)
Marin, G., Mellor-Crummey, J.: Cross-architecture performance predictions for scientific applications using parameterized models. In: Proceedings of the Joint International Conference on Measurement and Modeling of Computer Systems, SIGMETRICS 2004/Performance 2004, pp. 2–13 (2004)
Burckhardt, S., Kothari, P., Musuvathi, M., Nagarakatte, S.: A randomized scheduler with probabilistic guarantees of finding bugs. In: Fifteenth Edition of ASPLOS on Architectural Support for Programming Languages and Operating Systems, pp. 167–178 (2010)
Bienia, C., Kumar, S., Singh, J.P., Li, K.: The PARSEC benchmark suite: characterization and architectural implications. In: International Conference on Parallel Architecture and Compilation Techniques, pp. 72–81 (2008)
Wang, C., Mahmoud, S., Gupta, A., Kahlon, V., Sinha, N.: Dynamic test generation for concurrent programs, 12 July 2012. US Patent App. 13/348,286
Guo, S., Kusano, M., Wang, C., Yang, Z., Gupta, A.: Assertion guided symbolic execution of multithreaded programs. In: Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, pp. 854–865. ACM (2015)
Sen, K.: Scalable automated methods for dynamic program analysis. Technical report (2006)
de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24
Luk, C.-K., et al.: Pin: building customized program analysis tools with dynamic instrumentation. In: ACM Sigplan Notice, vol. 40, pp. 190–200. ACM (2005)
Ciortea, L., Zamfir, C., Bucur, S., Chipounov, V., Candea, G.: Cloud9: a software testing service. Oper. Syst. Rev. 43(4), 5–10 (2009)
Lattner, C., Adve, V.: LLVM: a compilation framework for lifelong program analysis & transformation. In: Proceedings of the International Symposium on Code Generation and Optimization: Feedback-Directed and Runtime Optimization, p. 75. IEEE Computer Society (2004)
Lattner, C.: LLVM and Clang: next generation compiler technology. In: The BSD Conference, pp. 1–2 (2008)
Cadar, C., Dunbar, D., Engler, D.R.: KLEE: unassisted and automatic generation of high-coverage tests for complex systems programs, pp. 209–224 (2008)
Shen, X., Zhong, Y., Ding, C.: Locality phase prediction. ACM SIGPLAN Not. 39(11), 165–176 (2004)
Ding, C., Zhong, Y.: Reuse Distance Analysis. University of Rochester, Rochester (2001)
Schuff, D.L., Kulkarni, M., Pai, V.S.: Accelerating multicore reuse distance analysis with sampling and parallelization. In: Proceedings of the 19th International Conference on Parallel Architectures and Compilation Techniques, pp. 53–64. ACM (2010)
Jiang, Y., Zhang, E.Z., Tian, K., Shen, X.: Is reuse distance applicable to data locality analysis on chip multiprocessors? In: Gupta, R. (ed.) CC 2010. LNCS, vol. 6011, pp. 264–282. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-11970-5_15
Wu, M.-J., Zhao, M., Yeung, D.: Studying multicore processor scaling via reuse distance analysis. In: ACM SIGARCH Computer Architecture News, vol. 41, pp. 499–510. ACM (2013)
Meng-Ju, W., Yeung, D.: Efficient reuse distance analysis of multicore scaling for loop-based parallel programs. ACM Trans. Comput. Syst. (TOCS) 31(1), 1 (2013)
Keramidas, G., Petoumenos, P., Kaxiras, S.: Cache replacement based on reuse-distance prediction. In: 25th International Conference on Computer Design, ICCD 2007, pp. 245–250. IEEE (2007)
Zhong, Y., Shen, X., Ding, C.: Program locality analysis using reuse distance. ACM Trans. Program. Lang. Syst. (TOPLAS) 31(6), 20 (2009)
Shen, X., Shaw, J., Meeker, B., Ding, C.: Locality approximation using time. In: ACM SIGPLAN Notices, vol. 42, pp. 55–61. ACM (2007)
Niu, Q., Dinan, J., Lu, Q., Sadayappan, P.: PARDA: a fast parallel reuse distance analysis algorithm. In: 2012 IEEE 26th International Parallel & Distributed Processing Symposium (IPDPS), pp. 1284–1294. IEEE (2012)
Burckhardt, S., Kothari, P., Musuvathi, M., SNagarakatte, M.: A randomized scheduler with probabilistic guarantees of finding bugs. In: ACM Sigplan Notices, vol. 45, pp. 167–178. ACM (2010)
Liu, T., Curtsinger, C., Berger, E.D.: Dthreads: efficient deterministic multithreading. In: Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles, pp. 327–336. ACM (2011)
Cai, Y., Yang, Z.: Radius aware probabilistic testing of deadlocks with guarantees. In: Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, ASE 2016, 3–7 September 2016, Singapore, pp. 356–367 (2016)
Acknowledgements
This work was supported in part by the National Science Foundation (NSF) under grant CSR-1421643.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Li, H., Chang, J., Yang, Z., Carr, S. (2019). Memory Distance Measurement for Concurrent Programs . In: Rauchwerger, L. (eds) Languages and Compilers for Parallel Computing. LCPC 2017. Lecture Notes in Computer Science(), vol 11403. Springer, Cham. https://doi.org/10.1007/978-3-030-35225-7_5
Download citation
DOI: https://doi.org/10.1007/978-3-030-35225-7_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-35224-0
Online ISBN: 978-3-030-35225-7
eBook Packages: Computer ScienceComputer Science (R0)