Operating System Support for Memory Abstractions in Parallel Languages

1
Operating System Support for Memory Abstractions in Parallel Languages Modern parallel languages, such as Cilk++ and Cilk Plus, offer high-order memory abstractions to support common patterns of parallel programming, where different branches of parallel computation may see different views of the same memory location. B A C E D invocation tree where all siblings may execute in parallel A B A C D A C E B D E views of the stack for parallel computations Ex 1: a cactus stack that supports different views of stack in parallel Ex 2: a reducer hyperobject that supports parallel updates to an object by an associative operator: reducer_string res = ... ; string strs[10]; /* computation to populate strs */ ... /* concatenate computed strings */ parallel_for(i = 0; i++; i < 10) { res = res + strs[i]; } cout << res; same output as the sequential execution It turns out that we can devise efficient operating system support for both abstractions. [1] I. A. Lee, S. Boyd-Wickizer, Z. Huang, and C. E. Leiserson “Using Memory Mapping to Support Cactus Stacks in Work-Stealing Runtime Systems” PACT ’10: Proceedings of the 19 th International Conference on Parallel Architectures and Compiler Techniques. [2] I. A. Lee, A. Shafi, and C. E. Leiserson “Memory-Mapping Support for Reducer Hyperobjects” SPAA ‘12: Proceedings of the 24 th ACM Symposium on Parallel Algorithms and Architectures (Best Paper)

description

Operating System Support for Memory Abstractions in Parallel Languages. - PowerPoint PPT Presentation

Transcript of Operating System Support for Memory Abstractions in Parallel Languages

Page 1: Operating System Support for  Memory Abstractions in Parallel Languages

Operating System Support for Memory Abstractions in Parallel Languages

Modern parallel languages, such as Cilk++ and Cilk Plus, offer high-order memory abstractions to support common patterns of parallel programming, where different branches of parallel computation may see different views of the same memory location.

BA

CED

invocation tree where all siblings

may execute in parallel

A

B

AC

D

ACE

B D E

views of the stack for parallel computations

Ex 1: a cactus stack that supports different views of stack in parallel

Ex 2: a reducer hyperobject that supports parallel updates to an object by an associative operator:

reducer_string res = ... ;string strs[10];/* computation to populate strs */.../* concatenate computed strings */parallel_for(i = 0; i++; i < 10) { res = res + strs[i]; }cout << res; same output as

the sequential execution

It turns out that we can devise efficient operating system support for both abstractions.

[1] I. A. Lee, S. Boyd-Wickizer, Z. Huang, and C. E. Leiserson “Using Memory Mapping to Support Cactus Stacks in Work-Stealing Runtime Systems” PACT ’10: Proceedings of the 19th International Conference on Parallel Architectures and Compiler Techniques.

[2] I. A. Lee, A. Shafi, and C. E. Leiserson “Memory-Mapping Support for Reducer Hyperobjects” SPAA ‘12: Proceedings of the 24 th ACM Symposium on Parallel Algorithms and Architectures (Best Paper)