Advertisement

A Software-Based Method-Level Speculation Framework for the Java Platform

  • Ivo Anjo
  • João Cachopo
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7760)

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.

Keywords

Automatic Parallelization Method Level-Speculation Software Transactional Memory Continuations OpenJDK Hotspot JVM 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Anjo, I.: JaSPEx: Speculative Parallelization on the Java Platform. Master’s thesis, Instituto Superior Técnico (2009)Google Scholar
  2. 2.
    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)Google Scholar
  3. 3.
    Baptista, D.: Task Scheduling in Speculative Parallelization. Master’s thesis, Instituto Superior Técnico (2011)Google Scholar
  4. 4.
    Blume, W., Doallo, R., Eigenmann, R., Grout, J., Hoeflinger, J., Lawrence, T.: Parallel programming with Polaris. Computer 29(12), 78–82 (1996)CrossRefGoogle Scholar
  5. 5.
    Chen, M., Olukotun, K.: The Jrpm system for dynamically parallelizing Java programs. ACM SIGARCH Computer Architecture News 31(2), 434–446 (2003)CrossRefGoogle Scholar
  6. 6.
    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)Google Scholar
  7. 7.
    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)Google Scholar
  8. 8.
    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)CrossRefGoogle Scholar
  9. 9.
    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 CrossRefGoogle Scholar
  10. 10.
    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)CrossRefGoogle Scholar
  11. 11.
    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)Google Scholar
  12. 12.
    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)Google Scholar
  13. 13.
    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)CrossRefGoogle Scholar
  14. 14.
    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)Google Scholar
  15. 15.
    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)CrossRefGoogle Scholar
  16. 16.
    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)Google Scholar
  17. 17.
    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 CrossRefGoogle Scholar
  18. 18.
    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)Google Scholar
  19. 19.
    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)CrossRefGoogle Scholar
  20. 20.
    Yamauchi, H.: Continuations in servers. In: JVM Language Summit 2010 (2010)Google Scholar
  21. 21.
    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)Google Scholar
  22. 22.
    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 MathSciNetzbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Ivo Anjo
    • 1
  • João Cachopo
    • 1
  1. 1.ESW, INESC-ID Lisboa/Instituto Superior TécnicoUniversidade Técnica de LisboaLisboaPortugal

Personalised recommendations