Skip to main content
Log in

A compile-time granularity analysis algorithm and its performance evaluation

  • Special Issue
  • Invited
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

A major implementation problem with implicitly parallel languages, is that small grain size can lead to execution overheads and reduced performance. We present a new granularity-analysis scheme that produces estimators, at compile time, of the relative execution weight of each procedure invocation. These estimators can be cheaply evaluated at runtime to approximate the relative task granularities, enabling intelligent scheduling decisions. Our method seeks to balance tradeoffs between analysis complexity, estimator accuracy, and runtime overhead of evaluating the estimator. To this end, rather than analyze data size or dependencies, we introduceiteration parameters to handle recursive procedures. This simplification facilitates solving the recurrence equations that describe the granularity estimators, and reduces the runtime overhead of evaluating these estimators. The algorithm is described in the context of concurrent logic programming languages, although the concepts are applicable to functional languages in general. We show, for a benchmark suite, that the method accurately estimates cost. Multiprocessor simulation results quantify the advantage of dynamically scheduling tasks with the granularity information.

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. Debray, S. K., “A Remark on Tick’s Algorithm for Compile-Time Granularity Analysis,”Logic Programming Newsletter, 3, 1, July 1989.

    Google Scholar 

  2. Debray, S. K. and Lin, N.-W., “Automatic Complexity Analysis of Logic Programs,” inInternational Conference on Logic Programming, Paris, June 1991, MIT Press, pp. 599–613, 1991.

  3. Debray, S. K., Lin, N.-W. and Hermenegildo, M., “Task Granularity Analysis in Logic Programs,”I inSIGPLAN Conference on Programming Language Design and Implementation, White Plains, NY, June 1990, ACM Press, pp. 174–188, 1990.

  4. Goulden, I. P. and Jackson, D.,Combinational Enumeration, John Wiley and Sons, Inc., 1983.

  5. Gries, D.,Science of Programming, Springer-Verlag, 1989.

  6. King, A. and Soper, P., “Granularity Control for Concurrent Logic Programs,” inInternational Computer Conference, Turkey, 1990.

  7. Kruatrachue, B. and Lewis, T., “Grain Size Determination for Parallel Procesing,”IEEE Software, pp. 23–32, January 1988.

  8. Liu, C. L.,Introduction to Combinatorial Mathematics, McGraw-Hill, New York, 1968.

    MATH  Google Scholar 

  9. McGreary, C. and Gill, H., “Automatic Determination of Grain Size for Efficient Parallel Processing,”Communications of the ACM, 32, pp. 1073–1978, 1989.

    Article  Google Scholar 

  10. Pettis, K. and Hansen, R. C., “Profile Guided Code Positioning,” inSIGPLAN Conference on Programming Language Design and Implementation, White Plains, June 1990, ACM Press, pp. 16–27, 1990.

  11. Purdom, P. A. and Brown, C. A.,The Analysis of Algorithms, Holt, Rinehart and Wintson, Inc., New York, 1985.

    Google Scholar 

  12. Sarkar, V.,Partitioning and Scheduling Parallel Programs for Execution on Multi-processors, MIT Press, Cambridge, MA, 1989.

    Google Scholar 

  13. Sato, M. and Goto, A., “Evaluation of the KL1 Parallel System on a Shared Memory Multiprocessor,” inIFIP Working Conference on Parallel Processing, Pisa, North Holland, pp. 305–318, May 1988.

  14. Shapiro, E. Y., “The Family of Concurrent Logic Programming Languages,”ACM Computing Suveys, 21, 3, 1989.

    Google Scholar 

  15. Tarjan, R. E.,Data Structure and Network Algorithms (volume 44 ofRegional Conference Series in Applied Mathematics), Society for Industrial and Applied Mathematics, Philadelphia, PA, 1983.

    Google Scholar 

  16. Tick, E., “Compile-Time Granularity Analysis of Parallel Logic Programming Languages,”New Generation Computing, 7, 2, pp. 325–337, January 1990.

    Article  Google Scholar 

  17. Tick, E.,Parallel Logic Programming, MIT Press, Cambridge, MA, 1991.

    Google Scholar 

  18. Ueda, K., “Guarded Horn Clauses,” inConcurrent Prolog: Collected Papers, Vol. 1 (E. Y. Shapiro, ed.), MIT Press, Cambridge, MA, pp. 140–156, 1987.

    Google Scholar 

  19. Wall, D. W., “Predicting Programming Behavior Using Real or Estimated Profiles,” inSIGPLAN Conference on Programming Language Design and Implementation, White Plains, June 1990, ACM Press, pp. 59–70, 1990.

Download references

Author information

Authors and Affiliations

Authors

Additional information

Evan Tick, Ph. D.: He is an assistant professor of Information and Computer Science at the University of Oregon. His research interests include parallel computer architecture, performance visualization, and logic programming. Tick received his B. S. and M. S. degrees in electrical engineering from MIT in 1982 and his Ph. D. degree in electrical engineering from Stanford University in 1987. From 1987–1989 he worked in Japan under an NSF-ICOT Visitor’s Program Grant and as a Visiting Associate Professor of the University of Tokyo with an Information Science Chair endowed by the CSK Corp. Tick received a Presidential Young Investigator award in 1990. He is a member of the ALP and IEEE Computer Society.

Xiaoxiong Zhong: He received the B. S. and M. S. degrees in Computer Science from Fudan University, China in 1983 and 1986 respectively. From 1986 to 1989, he was a lecturer in Computer Science Department, Zhongshan University, China. He is now a Ph. D. student in Computer Science Department at the University of Oregon. His research interests include parallel programming environments, performance evaluation, multicomputer networks, distributed computing, VLSI array processors and concurrent logic programming. He is a member of ACM and IEEE Computer Society.

About this article

Cite this article

Tick, E., Zhong, X. A compile-time granularity analysis algorithm and its performance evaluation. New Gener Comput 11, 271–295 (1993). https://doi.org/10.1007/BF03037179

Download citation

  • Received:

  • Revised:

  • Issue Date:

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

Keywords

Navigation