Improving Pthreads for Parallel Programming Efficiency

concurrency platforms openmp and cilk plus n.w
1 / 5
Embed
Share

Learn about the challenges with Pthreads in parallel programming, and explore how advancements in concurrency platforms like OpenMP and Cilk Plus provide more efficient solutions for handling parallelism. Discover how these platforms simplify parallel program development and enhance performance optimization.

  • Pthreads
  • Concurrency Platforms
  • OpenMP
  • Cilk Plus
  • Parallel Programming

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


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

  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 3500 - Operating Systems 2

  3. How else can it be improved? Pthreads explicitly links the identificationof 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 3500 - Operating Systems 3

  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 3500 - Operating Systems 4

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

More Related Content