Abstract
With multicore processors becoming ubiquitous on computing devices, the need for both parallelizing existing sequential applications and designing new parallel applications is greatly intensified. With our work, we intend to tackle the former issue.
In this paper, we present the design of a software-based automatic parallelization framework for sequential applications that run on the Java platform: the JaSPEx-MLS framework.
Our framework employs Method-Level Speculation: It uses method invocations as fork points and converts those invocations to return futures that can be stored in local variables in place of the original values. The support for speculative execution is provided by automatically modifying application bytecode to use a custom lightweight Software Transactional Memory (STM), and we present a novel approach to integrate futures representing speculative executions with the STM. Thread state transfer is done by employing a Java Virtual Machine that provides support for first-class continuations.
We present preliminary results from our implementation of the proposed techniques on the JaSPEx-MLS framework, which works on top of the OpenJDK Hotspot VM.
This work was supported by FCT (INESC-ID multiannual funding) through the PIDDAC Program funds and by the RuLAM project (PTDC/EIA-EIA/108240/2008).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Anjo, I.: JaSPEx: Speculative Parallelization on the Java Platform. Master’s thesis, Instituto Superior Técnico (2009)
Anjo, I., Cachopo, J.: JaSPEx: Speculative parallel execution of Java applications. In: Proceedings of the Simpósio de Informática (INFORUM 2009). Faculdade de Ciências da Universidade de Lisboa (2009)
Baptista, D.: Task Scheduling in Speculative Parallelization. Master’s thesis, Instituto Superior Técnico (2011)
Blume, W., Doallo, R., Eigenmann, R., Grout, J., Hoeflinger, J., Lawrence, T.: Parallel programming with Polaris. Computer 29(12), 78–82 (1996)
Chen, M., Olukotun, K.: The Jrpm system for dynamically parallelizing Java programs. ACM SIGARCH Computer Architecture News 31(2), 434–446 (2003)
Chen, M., Olukotun, K.: Exploiting method-level parallelism in single-threaded Java programs. In: 7th International Conference on Parallel Architectures and Compilation Techniques (PACT-1998), pp. 176–184. IEEE (1998)
Hu, S., Bhargava, R., John, L.: The role of return value prediction in exploiting speculative method-level parallelism. Journal of Instruction-Level Parallelism 5(1) (2003)
Kulkarni, M., Burtscher, M., Inkulu, R., Pingali, K., Cascaval, C.: How much parallelism is there in irregular applications? ACM SIGPLAN Notices 44(4), 3–14 (2009)
Lam, M., Wilson, R.: Limits of control flow on parallelism. ACM SIGARCH Computer Architecture News 20(2), 46–57 (1992), http://doi.acm.org/10.1145/146628.139702
Mehrara, M., Hao, J., Hsu, P., Mahlke, S.: Parallelizing sequential applications on commodity hardware using a low-cost software transactional memory. ACM SIGPLAN Notices 44(6), 166–176 (2009)
Oancea, C., Mycroft, A., Harris, T.: A lightweight in-place implementation for software thread-level speculation. In: Proceedings of the 21st Annual Symposium on Parallelism in Algorithms and Architectures (SPAA 2009), pp. 223–232. ACM Press (2009)
Oplinger, J., Heine, D., Lam, M.: In search of speculative thread-level parallelism. In: 8th International Conference on Parallel Architectures and Compilation Techniques (PACT-1999), pp. 303–313. IEEE (1999)
Pickett, C.J.F., Verbrugge, C.: Software Thread Level Speculation for the Java Language and Virtual Machine Environment. In: Ayguadé, E., Baumgartner, G., Ramanujam, J., Sadayappan, P. (eds.) LCPC 2005. LNCS, vol. 4339, pp. 304–318. Springer, Heidelberg (2006)
Pickett, C.J.F., Verbrugge, C.: Return value prediction in a Java virtual machine. In: Proceedings of the 2nd Value-Prediction and Value-Based Optimization Workshop (VPW2), pp. 40–47 (2004)
Spear, M.F., Kelsey, K., Bai, T., Dalessandro, L., Scott, M.L., Ding, C., Wu, P.: Fastpath Speculative Parallelization. In: Gao, G.R., Pollock, L.L., Cavazos, J., Li, X. (eds.) LCPC 2009. LNCS, vol. 5898, pp. 338–352. Springer, Heidelberg (2010)
Stadler, L., Wimmer, C., Würthinger, T., Mössenböck, H., Rose, J.: Lazy continuations for Java virtual machines. In: 7th International Conference on Principles and Practice of Programming in Java (PPPJ 2009), pp. 143–152. ACM Press (2009)
Welc, A., Jagannathan, S., Hosking, A.: Safe futures for Java. ACM SIGPLAN Notices 40(10), 439–453 (2005), http://doi.acm.org/10.1145/1103845.1094845
Whaley, J., Kozyrakis, C.: Heuristics for profile-driven method-level speculative parallelization. In: Proceedings of the 2005 International Conference on Parallel Processing (ICPP 2005), pp. 147–156. IEEE Computer Society (2005)
Wilson, R., French, R., Wilson, C., Amarasinghe, S., Anderson, J., Tjiang, S., Liao, S., Tseng, C., Hall, M., Lam, M., Hennessy, J.: SUIF: An infrastructure for research on parallelizing and optimizing compilers. ACM SIGPLAN Notices 29(12), 31–37 (1994)
Yamauchi, H.: Continuations in servers. In: JVM Language Summit 2010 (2010)
Yoo, R., Lee, H.: Helper transactions: Enabling thread-level speculation via a transactional memory system. In: 2008 Workshop on Parallel Execution of Sequential Programs on Multi-core Architectures (PESPMA 2008), pp. 63–71 (2008)
Zhang, L., Krintz, C.: As-if-serial exception handling semantics for Java futures. Science of Computer Programming 74(5-6), 314–332 (2009), http://dx.doi.org/10.1016/j.scico.2009.01.006
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Anjo, I., Cachopo, J. (2013). A Software-Based Method-Level Speculation Framework for the Java Platform. In: Kasahara, H., Kimura, K. (eds) Languages and Compilers for Parallel Computing. LCPC 2012. Lecture Notes in Computer Science, vol 7760. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37658-0_14
Download citation
DOI: https://doi.org/10.1007/978-3-642-37658-0_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-37657-3
Online ISBN: 978-3-642-37658-0
eBook Packages: Computer ScienceComputer Science (R0)