Skip to main content
Log in

A Static Greedy and Dynamic Adaptive Thread Spawning Approach for Loop-Level Parallelism

  • Regular Paper
  • Published:
Journal of Computer Science and Technology Aims and scope Submit manuscript

Abstract

Thread-level speculation becomes more attractive for the exploitation of thread-level parallelism from irregular sequential applications. But it is common for speculative threads to fail to reach the expected parallel performance. The reason is that the performance of speculative threads is extremely complicated by the fact that it not only suffers from the imprecision of compiler-directed performance estimation due to ambiguous control and data dependences, but also depends on the underlying hardware configuration and program behaviors. Thus, this paper proposes a statically greedy and dynamically adaptive approach for loop-level speculation to dynamically determine the best loop level at runtime. It relies on the compiler to select and optimize all loop candidates greedily, which are then proceeded on the cost-benefit analysis of different loop nesting levels for the determination of the order of loop speculation. Under the runtime loop execution prediction, we dynamically schedule and update the order of loop speculation, and ensure the best loop level to be always parallelized. Two different policies are also examined to maximize overall performance. Compared with traditional static loop selection techniques, our approach can achieve comparable or better performance.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Bhowmik A, Franklin M. A general compiler framework for speculative multithreading. In Proc. the 14th Annual ACM Symp. Parallel Algorithms and Architectures, August 2002, pp.99–108.

  2. 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 Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation, June 2005, pp.269–279.

  3. Steffan J G, Colohan C, Zhai A, Mowry T C. The STAMPede approach to thread-level speculation. ACM Transactions on Computer Systems, 2005, 23(3): 253–300.

    Article  Google Scholar 

  4. Gao L, Li L, Xue J, Yew P C. SEED: A statically greedy and dynamically adaptive approach for speculative loop execution. IEEE Transactions on Computers, 2013, 62(5): 1004–1016.

    Article  MathSciNet  Google Scholar 

  5. Wang S, Dai X, Yellajyosula K S, Zhai A, Yew P C. Loop selection for thread-level speculation. In Proc. the 18th International Conference on Languages and Compilers for Parallel Computing, October 2006, pp.289–303.

  6. Du Z H, Lim C C, Li X F, Yang C, Zhao Q, Ngai T F. A cost-driven compilation framework for speculative parallelizationof sequential programs. In Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation, June 2004, pp.71–81.

  7. 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 Proc. the 19th Annual Int. Conf. Supercomputing, June 2005, pp.179–188.

  8. Campanoni S, Jones T, Holloway G, Reddi V J, Wei G Y, Brooks D. HELIX: Automatic parallelization of irregular programs for chip multiprocessing. In Proc. the 10th International Symposium on Code Generation and Optimization, March 2012, pp.84–93.

  9. Marcuello P, González A, Tubella J. Speculative multi-threaded processors. In Proc. the 12th International Conference on Supercomputing, July 1998, pp.77–84.

  10. Tubella J, González A. Control speculation in multithreaded processors through dynamic loop detection. In Proc. the 4th International Symposium on High-Performance Computer Architecture, February 1998, pp.14–23.

  11. Johnson T A, Eigenmann R, Vijaykumar T N. Min-cut program decomposition for thread-level speculation. In Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation, June 2004, pp.59–70.

  12. Liu W, Tuck J, Ceze L, Ahn W, Strauss K, Renau J, Torrellas J. POSH: A TLS compiler that exploits program structure. In Proc. the 11th ACM SIGPLAN Symp. Principles and Practice of Parallel Programming, March 2006, pp.158–167.

  13. Johnson T A, Eigenmann R, Vijaykumar T N. Speculative thread decomposition through empirical optimization. In Proc. the 12th ACM SIGPLAN Symp. Principles and Practice of Parallel Programming, March 2007, pp.205–214.

  14. Dou J, Cintra M. A compiler cost model for speculative parallelization. ACM Transactions on Architecture and Code Optimization, 2007, 4(2): Article No. 12.

  15. Luo Y, Packirisamy V, Hsu W C, Zhai A, Mungre N, Tarkas A. Dynamic performance tuning for speculative threads. In Proc. the 36th Annual International Symposium on Computer Architecture, June 2009, pp.462–473.

  16. Chen Z, Zhao Y L, Pan X Y, Dong Z Y, Gao B, Zhong Z W. An overview of prophet. In Proc. the 9th International Conference on Algorithms and Architectures for Parallel Processing, June 2009, pp.396–407.

  17. Gopal S, Vijaykumar T N, Smith J, Sohi G. Speculative versioning cache. In Proc. the 4th Int. Symp. High-Performance Computer Architecture, February 1998, pp.195–205.

  18. Gao L, Li L, Xue J, Ngai T F. Loop recreation for thread-level speculation. In Proc. the 13th International Conference on Parallel and Distributed Systems, December 2007.

  19. Hertzberg B, Olukotun K. Runtime automatic speculative parallelization. In Proc. the 9th Annual IEEE/ACM Int. Symp. Code Generation and Optimization, April 2011, pp.64–73.

  20. Ding C, Shen X, Kelsey K, Tice C, Huang R, Zhang C. Soft-ware behavior oriented parallelization. In Proc. the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation, June 2007, pp.223–234.

  21. Palatin P, Lhuillier Y, Temam O. CAPSULE: Hardware-assisted parallel execution of component-based programs. In Proc. the 39th Annual IEEE/ACM International Symposium on Microarchitecture, December 2006, pp.247–258.

  22. Huang J, Jablin T, Beard S, Johnson N, August D. Automatically exploiting cross-invocation parallelism using run-time information. In Proc. IEEE/ACM Int. Symp. Code Generation and Optimization, February 2013.

  23. Cintra M, Torrellas J. Eliminating squashes through learning cross-thread violations in speculative parallelization for multiprocessors. In Proc. the 8th Int. Symp. High-Performance Computer Architecture, February 2002, pp.43–54.

  24. Gao L, Li L, Xue J, Ngai T F. Exploiting speculative TLP in recursive programs by dynamic thread prediction. In Proc. the 18th Int. Conf. Compiler Construction, March 2009, pp.78–93.

  25. Xekalakis P, Ioannou N, Khan S, Cintra M. Profitability-based power allocation for speculative multithreaded systems. In Proc. the 24th IEEE International Symposium on Parallel Distributed Processing, April 2010.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mei-Rong Li.

Additional information

This work was supported by the National Natural Science Foundation of China under Grant No. 61173040 and the Doctoral Fund of Ministry of Education of China under Grant No. 20130201110012.

Electronic supplementary material

Below is the link to the electronic supplementary material.

ESM 1

(PDF 82 kb)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Li, MR., Zhao, YL., Tao, Y. et al. A Static Greedy and Dynamic Adaptive Thread Spawning Approach for Loop-Level Parallelism. J. Comput. Sci. Technol. 29, 962–975 (2014). https://doi.org/10.1007/s11390-014-1482-1

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11390-014-1482-1

Keywords

Navigation