Abstract
The safety of speculative parallelization depends on monitoring all program access to shared data. The problem is especially difficult in software-based solutions. Till now, automatic techniques use either program instrumentation, which can be costly, or virtual memory protection, which incurs false sharing. In addition, not all access requires monitoring. It is worth considering a manual approach in which programmers insert access annotations to reduce the cost and increase the precision of program monitoring.
This paper presents an interface for access annotation and two techniques to check the correctness of user annotation, i.e. whether all parallel executions are properly monitored and guaranteed to produce the sequential result. It gives a quadratic-time algorithm to check the exponential number of parallel interleavings. The paper then uses the annotation interface to parallelize several programs with uncertain parallelism. It demonstrates the efficiency of program monitoring by a performance comparison with OpenMP, which does not monitor data access or guarantee safety.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Allen, R., Kennedy, K.: Optimizing Compilers for Modern Architectures: A Dependence-based Approach. Morgan Kaufmann Publishers (October 2001)
Amza, C., Cox, A.L., Dwarkadas, S., Keleher, P.J., Lu, H., Rajamony, R., Yu, W., Zwaenepoel, W.: Shared memory computing on networks of workstations. IEEE Computer 29(2), 18–28 (1996)
Aviram, A., Weng, S.-C., Hu, S., Ford, B.: Efficient system-enforced deterministic parallelism. In: OSDI (2010)
Bergan, T., Anderson, O., Devietti, J., Ceze, L., Grossman, D.: Coredet: a complier and runtime system for deterministic multithreaded execution. In: ASPLOS, pp. 53–64 (2010)
Berger, E.D., Yang, T., Liu, T., Novark, G.: Grace: Safe multithreaded programming for C/C++. In: OOPSLA, pp. 81–96 (2009)
Burckhardt, S., Baldassin, A., Leijen, D.: Concurrent programming with revisions and isolation types. In: OOPSLA, pp. 691–707 (2010)
Callahan, D., Kennedy, K., Subhlok, J.: Analysis of event synchronization in a parallel programming tool. In: PPoPP, pp. 21–30. ACM, New York (1990)
Ding, C., Shen, X., Kelsey, K., Tice, C., Huang, R., Zhang, C.: Software behavior oriented parallelization. In: PLDI, pp. 223–234 (2007)
Feng, M., Gupta, R., Hu, Y.: SpiceC: scalable parallelism via implicit copying and explicit commit. In: PPoPP, pp. 69–80 (2011)
Helmbold, D.P., McDowell, C.E.: A taxonomy of race detection algorithms. Technical Report UCSC-CRL-94-35, University of California, Santa Cruz (1994)
Herlihy, M., Luchangco, V., Moir, M., Scherer III, W.N.: Software transactional memory for dynamic-sized data structures. In: Proc. of the 22nd ACM Symp. on Principles of Distributed Computing, Boston, MA, pp. 92–101 (2003)
Jacobs, B., Bai, T., Ding, C.: Distributive program parallelization using a suggestion language. Technical Report URCS #952, Department of Computer Science, University of Rochester (2009)
Ji, W., Lu, L., Scott, M.L.: Tardis: Task-level access race detection by intersecting sets. In: Workshop on Determinism and Correctness in Parallel Programming (2013)
Ke, C., Liu, L., Zhang, C., Bai, T., Jacobs, B., Ding, C.: Safe parallel programming using dynamic dependence hints. In: OOPSLA, pp. 243–258 (2011)
Kejariwal, A., Tian, X., Li, W., Girkar, M., Kozhukhov, S., Saito, H., Banerjee, U., Nicolau, A., Veidenbaum, A.V., Polychronopoulos, C.D.: On the performance potential of different types of speculative thread-level parallelism. In: ICS, p. 24 (2006)
Kulkarni, M., Pingali, K., Walter, B., Ramanarayanan, G., Bala, K., Chew, L.P.: Optimistic parallelism requires abstractions. In: PLDI, pp. 211–222 (2007)
Mellor-Crummey, J.M.: On-the-fly detection of data races for programs with nested fork-join parallelism. In: SC, pp. 24–33 (1991)
Netzer, R.H.B., Ghosh, S.: Efficient race condition detection for shared-memory programs with post/wait synchronization. In: ICPP, pp. 242–246 (1992)
Raman, A., Kim, H., Mason, T.R., Jablin, T.B., August, D.I.: Speculative parallelization using software multi-threaded transactions. In: ASPLOS, pp. 65–76 (2010)
Raman, R., Zhao, J., Sarkar, V., Vechev, M.T., Yahav, E.: Scalable and precise dynamic datarace detection for structured parallelism. In: PLDI, pp. 531–542 (2012)
Rauchwerger, L., Padua, D.: The LRPD test: Speculative run-time parallelization of loops with privatization and reduction parallelization. In: PLDI, La Jolla, CA (1995)
Rinard, M.C., Lam, M.S.: The design, implementation, and evaluation of Jade. TOPLAS ACM 20(3), 483–545 (1998)
Scott, M.L., Lu, L.: Toward a formal semantic framework for deterministic parallel programming. In: The Second Workshop on Determinism and Correctness in Parallel Programming (2011)
Tian, C., Feng, M., Gupta, R.: Supporting speculative parallelization in the presence of dynamic data structures. In: PLDI, pp. 62–73 (2010)
von Praun, C., Ceze, L., Cascaval, C.: Implicit parallelism with ordered transactions. In: PPoPP, pp. 79–89 (March 2007)
Welc, A., Jagannathan, S., Hosking, A.L.: Safe futures for Java. In: OOPSLA, pp. 439–453 (2005)
Zhai, A., Steffan, J.G., Colohan, C.B., Mowry, T.C.: Compiler and hardware support for reducing the synchronization of speculative threads. ACM Trans. on Arch. and Code Opt. 5(1), 1–33 (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 IFIP International Federation for Information Processing
About this paper
Cite this paper
Ding, C., Liu, L. (2013). Access Annotation for Safe Program Parallelization. In: Hsu, CH., Li, X., Shi, X., Zheng, R. (eds) Network and Parallel Computing. NPC 2013. Lecture Notes in Computer Science, vol 8147. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40820-5_2
Download citation
DOI: https://doi.org/10.1007/978-3-642-40820-5_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-40819-9
Online ISBN: 978-3-642-40820-5
eBook Packages: Computer ScienceComputer Science (R0)