Software Thread Level Speculation for the Java Language and Virtual Machine Environment

  • Christopher J. F. Pickett
  • Clark Verbrugge
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4339)

Abstract

Thread level speculation (TLS) has shown great promise as a strategy for fine to medium grain automatic parallelisation, and in a hardware context techniques to ensure correct TLS behaviour are now well established. Software and virtual machine TLS designs, however, require adherence to high level language semantics, and this can impose many additional constraints on TLS behaviour, as well as open up new opportunities to exploit language-specific information. We present a detailed design for a Java-specific, software TLS system that operates at the bytecode level, and fully addresses the problems and requirements imposed by the Java language and VM environment. Using SableSpMT, our research TLS framework, we provide experimental data on the corresponding costs and benefits; we find that exceptions, GC, and dynamic class loading have only a small impact, but that concurrency, native methods, and memory model concerns do play an important role, as does an appropriate, language-specific runtime TLS support system. Full consideration of language and execution semantics is critical to correct and efficient execution of high level TLS designs, and our work here provides a baseline for future Java or Java virtual machine implementations.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Chen, M.K., Olukotun, K.: The JRPM system for dynamically parallelizing Java programs. In: ISCA, pp. 434–446 (2003)Google Scholar
  2. 2.
    Steffan, J.G., Colohan, C., Zhai, A., Mowry, T.C.: The STAMPede approach to thread-level speculation. TOCS 23(3), 253–300 (2005)CrossRefGoogle Scholar
  3. 3.
    Manson, J., Pugh, W., Adve, S.V.: The Java memory model. In: POPL, pp. 378–391 (2005)Google Scholar
  4. 4.
    Chen, M.K., Olukotun, K.: Exploiting method-level parallelism in single-threaded Java programs. In: PACT, pp. 176–184 (1998)Google Scholar
  5. 5.
    Hu, S., Bhargava, R., John, L.K.: The role of return value prediction in exploiting speculative method-level parallelism. JILP 5 (2003)Google Scholar
  6. 6.
    Whaley, J., Kozyrakis, C.: Heuristics for profile-driven method-level speculative parallelization. In: ICPP, pp. 147–156 (2005)Google Scholar
  7. 7.
    Kazi, I.H.: A Dynamically Adaptive Parallelization Model Based on Speculative Multithreading. PhD thesis, University of Minnesota (2000)Google Scholar
  8. 8.
    Yoshizoe, K., Matsumoto, T., Hiraki, K.: Speculative parallel execution on JVM. In: 1st UK Workshop on Java for High Performance Network Computing (1998)Google Scholar
  9. 9.
    Pickett, C.J.F., Verbrugge, C.: SableSpMT: A software framework for analysing speculative multithreading in Java. In: PASTE, pp. 59–66 (2005)Google Scholar
  10. 10.
    Bhowmik, A., Franklin, M.: A general compiler framework for speculative multithreading. In: SPAA, pp. 99–108 (2002)Google Scholar
  11. 11.
    Quiñones, C.G., Madriles, C., Sánchez, J., Marcuello, P., González, A., Tullsen, D.M.: Mitosis compiler: An infrastructure for speculative threading based on pre-computation slices. In: PLDI, pp. 269–279 (2005)Google Scholar
  12. 12.
    Bruening, D., Devabhaktuni, S., Amarasinghe, S.: Softspec: Software-based speculative parallelism. In: FDDO-3 (2000)Google Scholar
  13. 13.
    Rundberg, P., Stenström, P.: An all-software thread-level data dependence speculation system for multiprocessors. JILP 3 (2001)Google Scholar
  14. 14.
    Cintra, M., Llanos, D.R.: Toward efficient and robust software speculative parallelization on multiprocessors. In: PPoPP, pp. 13–24 (2003)Google Scholar
  15. 15.
    Cook, J.J.: Reverse execution of Java bytecode. The Computer Journal 45(6), 608–619 (2002)MATHCrossRefGoogle Scholar
  16. 16.
    Gagnon, E.M.: A Portable Research Framework for the Execution of Java Bytecode. PhD thesis, McGill University (2002), http://www.sablevm.org
  17. 17.
    Vallée-Rai, R.: Soot: A Java bytecode optimization framework. Master’s thesis, McGill University (2000), http://www.sable.mcgill.ca/soot/
  18. 18.
    Pickett, C.J.F., Verbrugge, C.: Compiler analyses for improved return value prediction. Technical Report SABLE-TR-2004-6, Sable Research Group, McGill University (2004)Google Scholar
  19. 19.
    Shavit, N., Zemach, A.: Scalable concurrent priority queue algorithms. In: PODC, pp. 113–122 (1999)Google Scholar
  20. 20.
    Pickett, C.J.F., Verbrugge, C.: Return value prediction in a Java virtual machine. In: VPW2, pp. 40–47 (2004)Google Scholar
  21. 21.
    Renau, J., Tuck, J., Liu, W., Ceze, L., Strauss, K., Torrellas, J.: Tasking with out-of-order spawn in TLS chip multiprocessors: Microarchitecture and compilation. In: ICS, pp. 179–188 (2005)Google Scholar
  22. 22.
    Mart´ınez, J.F., Torrellas, J.: Speculative synchronization: Applying thread-level speculation to explicitly parallel applications. In: ASPLOS, pp. 18–29 (2002)Google Scholar
  23. 23.
    Lea, D.: The JSR-133 cookbook for compiler writers (2005), http://gee.cs.oswego.edu/dl/jmm/cookbook.html
  24. 24.
    Dufour, B., Driesen, K., Hendren, L., Verbrugge, C.: Dynamic metrics for Java. In: OOPSLA, pp. 149–168 (2003)Google Scholar
  25. 25.
    Krishnan, V., Torrellas, J.: A direct-execution framework for fast and accurate simulation of superscalar processors. In: PACT, pp. 286–293 (1998)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Christopher J. F. Pickett
    • 1
  • Clark Verbrugge
    • 1
  1. 1.School of Computer ScienceMcGill UniversityMontréalCanada

Personalised recommendations