Presentation is loading. Please wait.

Presentation is loading. Please wait.

Concurrency Platforms OpenMP and Cilk Plus

Similar presentations


Presentation on theme: "Concurrency Platforms OpenMP and Cilk Plus"— Presentation transcript:

1 Concurrency Platforms OpenMP and Cilk Plus
David Ferry CSCI 3500 – Operating Systems Saint Louis University St. Louis, MO 63103

2 How can pthreads be improved?
Parallel programs repeat the same code over and over again: Thread creation Passing arguments Dividing work between threads Thread synchronization and joining It’d be nice if we didn’t have to jump through all these hoops… CSCI Operating Systems

3 How else can it be improved?
Pthreads explicitly links the identification of possible parallelism and the instantiation of parallelism. pthread_create() both creates a new thread and tells it where to execute. However, usually the choice of what to execute in parallel is entirely separate from the question of how and where to execute threads to achieve good performance. CSCI Operating Systems

4 Concurrency Platforms
The programmer should only identify opportunities for parallelism, and the system should implement it efficiently. A variety of systems: OpenMP, Cilk Plus, Open MPI… OpenMP is a specification by a committee of industrial and academic practitioners designed for practical parallel computing. Many implementations exist. Cilk Plus is the latest generation of an MIT project called Cilk. This is a specific implementation designed around having strong theoretical performance guarantees. CSCI Operating Systems

5 CSCI 3500 - Operating Systems
Parallelism Made Easy for( i = 0; i < 100; i++ ){ some_big_computation(i); } Becomes: #pragma omp parallel for cilk_for( i = 0; i < 100; i++ ){ some_big_computation(i); } CSCI Operating Systems


Download ppt "Concurrency Platforms OpenMP and Cilk Plus"

Similar presentations


Ads by Google