skip to main content
research-article

Automatic parallelization of pure method calls via conditional future synthesis

Published:19 October 2016Publication History
Skip Abstract Section

Abstract

We introduce a novel approach for using futures to automatically parallelize the execution of pure method calls. Our approach is built on three new techniques to address the challenge of automatic parallelization via future synthesis: candidate future synthesis, parallelism benefit analysis, and threshold expression synthesis. During candidate future synthesis, our system annotates pure method calls as async expressions and synthesizes a parallel program with future objects and their type declarations. Next, the system performs a parallel benefit analysis to determine which async expressions may need to be executed sequentially due to overhead reasons, based on execution profile information collected from multiple test inputs. Finally, threshold expression synthesis uses the output from parallelism benefit analysis to synthesize predicate expressions that can be used to determine at runtime if a specific pure method call should be executed sequentially or in parallel.

We have implemented our approach, and the results obtained from an experimental evaluation of the complete system on a range of sequential Java benchmarks are very encouraging. Our evaluation shows that our approach can provide significant parallel speedups of up to 7.4x (geometric mean of 3.69x) relative to the sequential programs when using 8 processor cores, with zero programmer effort beyond providing the sequential program and test cases for parallelism benefit analysis.

References

  1. R. Alur, R. Bod´ık, G. Juniwal, M. M. K. Martin, M. Raghothaman, S. A. Seshia, R. Singh, A. Solar-Lezama, E. Torlak, and A. Udupa. Syntax-guided synthesis. In FMCAD 2013, pages 1–8, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  2. R. D. Blumofe, C. F. Joerg, B. C. Kuszmaul, C. E. Leiserson, K. H. Randall, and Y. Zhou. Cilk: An efficient multithreaded runtime system. In PPoPP ’95, pages 207–216, New York, NY, USA, 1995. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. E. Bodden. Inter-procedural data-flow analysis with IFDS/IDE and Soot. In SOAP ’12, pages 3–8, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. M. Bull, L. A. Smith, M. D. Westhead, D. S. Henty, and R. A. Davey. A benchmark suite for high performance Java. Concurrency: Practice and Experience, 12(6):375–388, 2000.Google ScholarGoogle ScholarCross RefCross Ref
  5. B. Cahoon and K. S. McKinley. Data flow analysis for software prefetching linked data structures in Java. In PACT ’01, pages 280–291, Washington, DC, USA, 2001. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. V. Cavé, J. Zhao, J. Shirako, and V. Sarkar. Habanero-Java: the new adventures of old X10. In PPPJ ’11, pages 51–61, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. E. Coppa, C. Demetrescu, and I. Finocchi. Input-sensitive profiling. In PLDI ’12, pages 89–98, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. Coppa, C. Demetrescu, I. Finocchi, and R. Marotta. Estimating the empirical cost function of routines with dynamic workloads. In CGO ’14, pages 230–239, New York, NY, USA, 2014. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Diwan, K. S. McKinley, and J. E. B. Moss. Type-based alias analysis. In PLDI ’98, pages 106–117, New York, NY, USA, 1998. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Duran, J. Corbalán, and E. Ayguadé. An adaptive cut-off for task parallelism. In SC ’08, pages 36:1–36:11, Piscataway, NJ, USA, 2008. IEEE Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Feautrier and C. Lengauer. Polyhedron Model, pages 1581– 1592. Springer US, Boston, MA, 2011.Google ScholarGoogle Scholar
  12. J. Ferrante, K. J. Ottenstein, and J. D. Warren. The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst., 9(3):319–349, July 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. C. Flanagan and M. Felleisen. The semantics of future and its use in program optimization. In POPL ’95, pages 209–220, New York, NY, USA, 1995. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Garcia, D. Jeon, C. M. Louie, and M. B. Taylor. Kremlin: Rethinking and rebooting gprof for the multicore age. In PLDI ’11, pages 458–469, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. H. Halstead, Jr. Multilisp: A language for concurrent symbolic computation. ACM Trans. Program. Lang. Syst., 7 (4):501–538, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. T. Harris and S. Singh. Feedback directed implicit parallelism. In ICFP ’07, pages 251–264, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Y. He, C. E. Leiserson, and W. M. Leiserson. The cilkview scalability analyzer. In SPAA ’10, pages 145–156, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. W. Huang, A. Milanova, W. Dietl, and M. D. Ernst. Reim & Reiminfer: Checking and inference of reference immutability and method purity. In OOPSLA ’12, pages 879–896, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. S. Imam and V. Sarkar. Cooperative scheduling of parallel tasks with general synchronization patterns. In ECOOP 2014, volume 8586, pages 618–643. Springer Berlin Heidelberg, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Kulkarni, M. Burtscher, R. Inkulu, K. Pingali, and C. Casc¸aval. How much parallelism is there in irregular applications? In PPoPP ’09, pages 3–14, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. L. Lamport. The parallel execution of do loops. Commun. ACM, 17(2):83–93, Feb. 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. B. Liskov and L. Shrira. Promises: Linguistic support for efficient asynchronous procedure calls in distributed systems. In PLDI ’88, pages 260–267, New York, NY, USA, 1988. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Miettinen. Computer language benchmarks game. http://benchmarksgame.alioth.debian.org/u64q/ program.php?test=binarytrees&lang=java&id=6. Accessed: 2015-11-06.Google ScholarGoogle Scholar
  24. A. Navabi and S. Jagannathan. Exceptionally safe futures. In COORDINATION ’09, pages 47–65, Berlin, Heidelberg, 2009. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Navabi, X. Zhang, and S. Jagannathan. Quasi-static scheduling for safe futures. In PPoPP ’08, pages 23–32, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. OpenMP. OpenMP specifications. http://www.openmp. org/specs.Google ScholarGoogle Scholar
  27. P. Pratikakis, J. Spacco, and M. Hicks. Transparent proxies for Java futures. In OOPSLA ’04, pages 206–223, New York, NY, USA, 2004. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In POPL ’95, pages 49–61, New York, NY, USA, 1995. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. T. B. Schardl, B. C. Kuszmaul, I.-T. A. Lee, W. M. Leiserson, and C. E. Leiserson. The cilkprof scalability profiler. In SPAA ’15, pages 89–100, New York, NY, USA, 2015. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. C. Spearman. The proof and measurement of association between two things. American Journal of Psychology, 15: 88–103, 1904.Google ScholarGoogle ScholarCross RefCross Ref
  31. SPECjvm2008. Specjvm2008. https://www.spec.org/ jvm2008/.Google ScholarGoogle Scholar
  32. A. Sălcianu and M. Rinard. Purity and side effect analysis for Java programs. In VMCAI’05, pages 199–215, Berlin, Heidelberg, 2005. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. J. Swaine, K. Tew, P. Dinda, R. B. Findler, and M. Flatt. Back to the futures: Incremental parallelization of existing sequential runtime systems. In OOPSLA ’10, pages 583–597, New York, NY, USA, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. P. Thoman, H. Jordan, and T. Fahringer. Adaptive granularity control in task parallel programs using multiversioning. In Euro-Par’13, pages 164–177, Berlin, Heidelberg, 2013. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. R. Vallée-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan. Soot - a Java bytecode optimization framework. In CASCON ’99. IBM Press, 1999.Google ScholarGoogle Scholar
  36. A. Welc, S. Jagannathan, and A. Hosking. Safe futures for Java. In OOPSLA ’05, pages 439–453, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. D. Zaparanuks and M. Hauswirth. Algorithmic profiling. In PLDI ’12, pages 67–76, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. L. Zhang, C. Krintz, and P. Nagpurkar. Language and virtual machine support for efficient fine-grained futures in Java. In PACT ’07, pages 130–139, Washington, DC, USA, 2007. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. L. Zhang, C. Krintz, and P. Nagpurkar. Supporting exception handling for futures in Java. In PPPJ ’07, pages 175–184, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. X. Zhang, A. Navabi, and S. Jagannathan. Alchemist: A transparent dependence distance profiling infrastructure. In CGO ’09, pages 47–58, Washington, DC, USA, 2009. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Automatic parallelization of pure method calls via conditional future synthesis

        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

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 51, Issue 10
          OOPSLA '16
          October 2016
          915 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/3022671
          Issue’s Table of Contents
          • cover image ACM Conferences
            OOPSLA 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
            October 2016
            915 pages
            ISBN:9781450344449
            DOI:10.1145/2983990

          Copyright © 2016 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 19 October 2016

          Check for updates

          Qualifiers

          • research-article

        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!