Abstract
Recursion is a programming technique in which a solution can be expressed by a subroutine invoking itself either directly or indirectly. Many problems can be expressed simply using a recursive approach, however one of the drawbacks of using recursion is that it requires a stack, and often one does not know how much stack space is needed to obtain a recursive result. Stack overflow often results in spectacular failure with strange, often unrepeatable behaviour. Paraffin is a suite of generic units that can add parallelism to iterative and recursive problems. Some of the generics involve a load balancing technique described as "work-seeking". It was found that the recursive work seeking algorithm could be extended to also provide stack safety whereby the generics monitor the amount of remaining stack space and avoid stack overflow using a technique similar to load balancing. The stack safety feature also makes it attractive to consider Paraffin for use with code destined for execution on a single core. This paper describes how the recursive work-seeking algorithm was extended to provide the stack-safety feature, and then goes on to report some performance results using the generics.
- Moore B., Paraffin, http://sourceforge.net/projects/paraffin/ (Sept 2011)Google Scholar
- Moore B., Parallelism Generics for Ada 2005 and Beyond, ACM SIGAda '10 (2010) Google Scholar
Digital Library
- Moore B., A comparison of work-sharing, work-seeking, and work-stealing parallelism strategies using Paraffin with Ada 2005. Ada User Journal Volume 32, Number 1, March 2011Google Scholar
- Fox, G., Williams, R., Messina G., Parallel Computing Works!, ISBN 1--55860--253--4 Morgan Kaufmann Publishers, Inc. 1994Google Scholar
- Taft, S.T., Duff, R. A., Brukardt, R.L. And Plödereder, E. Eds (2000). Consolidated Ada Reference Manual. LNCS 2219, Springer-Verlag Google Scholar
Digital Library
- Walker J., Red Black Trees, http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_rbtree.aspx (Aug 2010)Google Scholar
- Frigo M., Halpern P., Leiserson C., and Lewin- Berlin S., Reducers and Other Cilk++ Hyperobjects. ACM SPAA '09 (2009) Google Scholar
Digital Library
- Burns, A., Wellings A., Concurrent and Real-Time Programming in Ada, Cambridge University Press, 2007 Google Scholar
Digital Library
- Barney Blaise, Lawrence Livermore National Laboratory, https://computing.llnl.gov/tutorials/openMP/#WorkSharing (Sept 2010)Google Scholar
Index Terms
Stack safe parallel recursion with paraffin
Recommendations
Stack safe parallel recursion with paraffin
SIGAda '11: Proceedings of the 2011 ACM annual international conference on Special interest group on the ada programming languageRecursion is a programming technique in which a solution can be expressed by a subroutine invoking itself either directly or indirectly. Many problems can be expressed simply using a recursive approach, however one of the drawbacks of using recursion is ...
Parallelism generics for Ada 2005 and beyond
SIGAda '10: Proceedings of the ACM SIGAda annual international conference on SIGAdaThe Ada programming language is seemingly well-positioned to take advantage of emerging multi-core technologies. While it has always been possible to write parallel algorithms in Ada, there are certain classes of problems however, where the level of ...
Parallelism generics for Ada 2005 and beyond
SIGAda 2010The Ada programming language is seemingly well-positioned to take advantage of emerging multi-core technologies. While it has always been possible to write parallel algorithms in Ada, there are certain classes of problems however, where the level of ...







Comments