A Comparison of Different Parallel Programming Models for Multicore Processors

University essay from KTH/Skolan för informations- och kommunikationsteknik (ICT)

Author: Niklas Wahlén; [2010]

Keywords: ;

Abstract: As computers are used in most areas today improving their performance is of great importance. Until recently a faster processor was the main contributor to the increase of overall computer speed. Today the situation has changed as heating is becoming a bigger problem. Running a processor faster requires more power which also leads to the processor's components getting warmer. A solution to this is to use several somewhat slower processors in the same computer, so called multiprocessor or multicore processor. That way programs can execute on different processors, or functionality of one program can be divided and run on several processors simultaneously. Programming for multicore architectures is however more complex than programming for computers with a single processor, as data in the memory now can be accessed by several instances, called threads, of a program at the same time. This calls for some kind of synchronization between such threads. Many different models are available to simplify the implementation procedure of programs for multicore computers, and such models are compared in this thesis. The models in question are Pthreads, OpenMP and Cilk++. The models differ from each other in many ways, and are found to be useful for different areas. While Pthreads is a good tool when one wants to expose the threading mechanisms and be sure to have high exibility, OpenMP and Cilk++ offer simpler interfaces. OpenMP's main strengths are its interface and good portability. Cilk++ is suitable when high performance is the most important aspect.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)