Skip to main content
Log in

Compiling C for the EARTH multithreaded architecture

  • Published:
International Journal of Parallel Programming Aims and scope Submit manuscript

Abstract

Multithreaded architectures provide an opportunity for efficiently executing programs with irregular parallelism and/or irregular locality. This paper presents a strategy that makes use of the multithreaded execution model without exposing multithreading to the programmer. Our approach is to design simple extensions to C, and to provide compiler support that automatically translates high-level C programs into lower-level threaded programs. In this paper we present EARTH-C our extended C language which contains simple constructs for specifying control parallelism, data locality, shared variables and atomic operations. Based on EARTH-C, we describe compiler techniques that are used for translating to lower-level Threaded-C programs for the EARTH multithreaded architecture. We demonstrate our approach with six benchmark programs. We show that even naive EARTH-C programs can lead to reasonable performance, and that more advanced EARTH-C programs can give performance very close to hand-coded threated-C programs.

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. Anant Agarwal, Ricardo Bianchini, David Chaiken, Kirk L. Johnson, David Kranz, John Kubiatowicz, Beng-Hong Lim, Kenneth Mackenzie, and Donald Yeung, The MIT Alewife Machine: Architecture and Performance,Proc. of the 22nd Ann. Intl. Symp. on Computer Architecture, Santa Margherita Ligure, Italy, pp. 2–13 (June 1995).

    Google Scholar 

  2. Derek Chiou, Boon S. Ang, Robert Greiner, Arvind, James C. Hoe, Michael J. Beckerle, James E. Hicks, and Andy Boughton, StarT-NG: Delivering Seamless Parallel Computing,Proc of the First Intl. EURO-PAR Conf., No 996,Lec. Notes in Comp. Sci., Stockholm, Sweden, Springer-Verlag, pp. 101–116 (August 1995).

    Google Scholar 

  3. Yuetsu Kodama, Hirohumi Sakane, Mitsuhisa Sato, Hayato Yamana, Shuichi Sakai, and Yoshinori Yamaguchi, The EM-X Parallel Computer: Architecture and Basic Performance,Proc. of the 22nd Ann. Intl. Symp. on Computer Architecture, Santa Margherita Ligure, Italy, pp. 14–23 (June 1994).

    Google Scholar 

  4. Michael D. Noakes, Deborah A. Wallah, and William J. Dally, The J-Machine Multicomputer: An Architectural Evaluation,Proc. of the 20th Ann. Intl. Symp. on Computer Architecture, San Diego, California, pp. 224–235 (May 1993).

  5. Ellen Spertus, Seth Copen Goldstein, Klaus Erik Schauser, Thorsten von Eicken, David E. Culler, and William J. Dally, Evaluation of Mechanisms for Fine-Grained Parallel Programs in the J-Machine and the CM-5,Proc. of the 20th Ann. Intl. Symp. on Computer Architecture, San Diego, California, pp. 302–313 (May 1993).

  6. Herbert H. J. Hum, Olivier Maquelin, Kevin B. Theobald, Xinmin Tian, Guang R. Gao, and Laurie J. Hendren, A Study of the EARTH-MANNA Multithreaded System,I. J. P. P. 24(4): 319–347 (August 1996).

    Google Scholar 

  7. Olivier C. Maquelin, Herbert H. J. Hum, and Guang R. Gao, Costs and Benefits of Multi-threading with Off-the-shelf RISC Processor, Springer-Verlag, Stockholm, Sweden,Proc. of the First Intl. EURO-PAR Conf., No. 966,Lec. Notes in Comp. Sci., pp. 117–128 (August 1995).

  8. Olivier Maquelin, Guang R. Gao, Herbert H. J. Hum, Kevin B. Theobald, and Xin-Min Tian, Polling Watchdog: Combining Polling and Interrupts for Efficient Message Handling,Proc. of the 23rd Ann. Intl. Symp. on Computer Architecture, Philadelphia, Penn., pp. 178–188 (May 1996).

  9. L. Hendren, C. Donawa, M. Emami, G. Gao, Justiani, and B. Sridharan, Designing the McCAT Compiler Based on a Family of Structured Intermediate Representations,Proc. of the Fifth Intl. Work. on Languages and Compilers for Parallel Computing, Lec. Notes in Comp. Sci., No. 757, New Haven, Conn., pp. 406–420 (August 1992); Springer-Verlag (1993).

    Google Scholar 

  10. Bhama Sridharan, An Analysis Framework for the McCAT Compiler. Mater’s Thesis, McGill University, Montréal, Québec (September 1992).

    Google Scholar 

  11. Maryam Emami, Rakesh Ghiya, and Laurie J. Hendren, Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers,Proc. of the ACM SIGPLAN ’94 Conf. on Progr. Lang. Design and Implementation, Orlando, Florida, pp. 242–256 (June 1994).

  12. Rakesh Ghiya and Laurie J. Hendren, Is it a Tree, a DAG, or a Cyclic Graph? A Shape Analysis for Heap-Directed Pointers in C,Conf. Rec. of the 23rd ACM SIGPLAN-SIGACT Symp. on Principles Progr. Lang., St. Petersburg, Florida, pp. 1–15 (Jan. 1996).

  13. Rakesh Ghiya and Laurie J. Hendren, Connection Analysis: A Practical Interprocedural Heap Analysis for C,IJPP 24(6) 547–578 (December 1996).

    Google Scholar 

  14. Justiani and Laurie J. Hendren, Supporting Array Dependence Testing for an Optimizing/Parallelizing C Compiler,Proc. of the Fifth Intl. Conf. on Compiler Construction, Lec. Notes in Comp. Sci., No. 786, Springer-Verlag, Edinburgh, Scotland, pp. 309–323, (April 1994).

    Google Scholar 

  15. Christopher Lapkowski, A practical symbolic analysis for array dependences. Master’s Thesis, McGill University, Montréal, Québec (April 1997).

    Google Scholar 

  16. U. Bruening, W. K. Giloi, and W. Schroeder-Preikschat, Latency hiding in Message-Passing Architectures,Proc. of the 8th Intl. Parallel Processing Symp. Cancún, Mexico, IEEE Comp. Soc., pp. 704–709 (April 1994).

    Chapter  Google Scholar 

  17. S. Lumetta, L. Murphy, X. Li, D. Culler, and I. Khalil, Decentralized Optimal Power Pricing: The Development of a Parallel Program. ACM SIGARCH and IEEE Comp. Soc.Proc. of Supercomputing ’93, Portland, Oregon, pp. 240–249 (November 1993).

  18. Anne Rogers, Martin C. Carlisle, John H. Reppy, and Laurie J. Hendren, Supporting Dynamic Data Structures on Distributed-Memory Machines,ACM Trans. Progr. Lang. Syst. 17(2):233–263 (March 1995).

    Article  Google Scholar 

  19. Richard M. Karp, Probabilistic Analysis of Partitioning Algorithms for the Travelling-Salesman Problem in the Plane,Mathematics of Operations Research 2(3): 209–224 (August 1977).

    MATH  MathSciNet  Google Scholar 

  20. Thomas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest,Introduction to Algorithms. MIT Press, McGraw-Hill Book Co., Cambridge, Massachusetts (1990).

    MATH  Google Scholar 

  21. Hanan Samet, Computing Perimeters of Regions in Images Represented by Quadtrees,IEEE Trans. Pattern Analysis and Machine Intelligence 3(6):683–687 (November 1981).

    Article  Google Scholar 

  22. Martin C. Carlisle, Olden: Parallelizing Programs with Dynamic Data Structures on Distributed-Memory Machines. Ph.D. Thesis, Princeton University Department of Computer Science (June 1996).

  23. Shereen Ghobrial, Extending EARTH-C with Shared Variables and Atomic Operations. Master’s Thesis, McGill University, Montréal, Québec (April 1997).

    Google Scholar 

  24. David E. Culler, Andrea Dusseau, Seth Copen Goldstein, Arvind Krishnamurthy, Steven Lumetta, Thorsten von Eicken, and Katherine Yelick, Parallel Programming in Split-C. Portland, Oregon, ACM SIGARCH and IEEE Comp. Soc.,Proc. of Supercomputing ’93, pp. 262–273, (November 1993).

  25. Rishiyur S. Nikhil, Cid: A Parallel, “Shared-Memory” C for Distributed-Memory Machines,Proc. of the 7th Intl. Work. on Languages and Compilers for Parallel Computing, No. 892,Lec. Notes in Comp. Sci., pp. 376–390, Ithaca, New York, (August 1994); Springer-Verlag (1995).

    Chapter  Google Scholar 

  26. Robert D. Blumofe, Christopher F. Joerg, Bradley C. Kuszmaul, Charles E. Leiserson, Keith H. Randall, and Yuli Zhou, Cilk: An Efficient Multithreaded Runtime System,Proc. of the Fifth ACM SIGPLAN Symp. on Principles & Practice of Parallel Programming (PPOPP), Santa Barbara, California, pp. 207–216 (July 1995).

    Chapter  Google Scholar 

  27. Michael Halbherr, Yuli Zhou, and Chris F. Joerg, MIMD-Style Parallel Programming Based on Continuation-Passing Threads. CSG Memo 355, Computation Structures Group, MIT Lab. for Comp. Sci. (March 1994).

  28. Mitsushia Sato, Yuetsu Kodama, Shuichi Sakai, and Yoshinori Yamaguchi, EM-C: Programming with Explicit Parallelism and Locality for the EM-4 Multiprocessor,Proc. of the IFIP WG 10.3 Working Conf. on Parallel Architectures and Compilation Techniques, PACT ’94, North-Holland Pub. Co., Montréal, Québec, pp. 3–14 (August 1994).

    Google Scholar 

  29. Martin C. Carlisle and Anne Rogers, Software Caching and Computation Migration in Olden,Proc. of the Fifth ACM SIGPLAN Symp. on Principles & Practice of Parallel Programming (PPOPP), Santa Barbara, California, pp. 29–38 (July 1995).

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

This work supported, in part, by NSERC and FCAR.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Hendren, L.J., Tang, X., Zhu, Y. et al. Compiling C for the EARTH multithreaded architecture. Int J Parallel Prog 25, 305–338 (1997). https://doi.org/10.1007/BF02699905

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02699905

Key words

Navigation