Concurrent and Real-Time Programming in Ada
Concurrent and Real-Time Programming in Ada
Reducers and other Cilk++ hyperobjects
Proceedings of the twenty-first annual symposium on Parallelism in algorithms and architectures
Consolidated ada reference manual: language and standard libraries
Consolidated ada reference manual: language and standard libraries
Parallelism generics for Ada 2005 and beyond
Proceedings of the ACM SIGAda annual international conference on SIGAda
Hi-index | 0.00 |
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.