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.
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- E. Coppa, C. Demetrescu, and I. Finocchi. Input-sensitive profiling. In PLDI ’12, pages 89–98, New York, NY, USA, 2012. ACM. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- P. Feautrier and C. Lengauer. Polyhedron Model, pages 1581– 1592. Springer US, Boston, MA, 2011.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- R. H. Halstead, Jr. Multilisp: A language for concurrent symbolic computation. ACM Trans. Program. Lang. Syst., 7 (4):501–538, 1985. Google Scholar
Digital Library
- T. Harris and S. Singh. Feedback directed implicit parallelism. In ICFP ’07, pages 251–264, New York, NY, USA, 2007. ACM. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- L. Lamport. The parallel execution of do loops. Commun. ACM, 17(2):83–93, Feb. 1974. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- A. Navabi and S. Jagannathan. Exceptionally safe futures. In COORDINATION ’09, pages 47–65, Berlin, Heidelberg, 2009. Springer-Verlag. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- OpenMP. OpenMP specifications. http://www.openmp. org/specs.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- C. Spearman. The proof and measurement of association between two things. American Journal of Psychology, 15: 88–103, 1904.Google Scholar
Cross Ref
- SPECjvm2008. Specjvm2008. https://www.spec.org/ jvm2008/.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- A. Welc, S. Jagannathan, and A. Hosking. Safe futures for Java. In OOPSLA ’05, pages 439–453, New York, NY, USA, 2005. ACM. Google Scholar
Digital Library
- D. Zaparanuks and M. Hauswirth. Algorithmic profiling. In PLDI ’12, pages 67–76, New York, NY, USA, 2012. ACM. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Automatic parallelization of pure method calls via conditional future synthesis
Recommendations
Automatic parallelization of pure method calls via conditional future synthesis
OOPSLA 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsWe 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 ...
A comparison of automatic parallelization tools/compilers on the SGI origin 2000
SC '98: Proceedings of the 1998 ACM/IEEE conference on SupercomputingPorting applications to new high performance parallel and distributed computing platforms is a challenging task. Since writing parallel code by hand is time consuming and costly, porting codes would ideally be automated by using some parallelization ...
Gradual synthesis for static parallelization of single-pass array-processing programs
PLDI 2017: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and ImplementationParallelizing of software improves its effectiveness and productivity. To guarantee correctness, the parallel and serial versions of the same code must be formally verified to be equivalent. We present a novel approach, called GRASSP, that ...







Comments