Pthreads and OpenMP: A performance and productivity study
Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Today most computer have a multicore processor and are depending on parallel execution to be able to keep up with the demanding tasks that exist today, that forces developers to write software that can take advantage of multicore systems. There are multiple programming languages and frameworks that makes it possible to execute the code in parallel on different threads, this study looks at the performance and effort required to work with two of the frameworks that are available to the C programming language, POSIX Threads(Pthreads) and OpenMP. The performance is measured by paralleling three algorithms, Matrix multiplication, Quick Sort and calculation of the Mandelbrot set using both Pthreads and OpenMP, and comparing first against a sequential version and then the parallel version against each other. The effort required to modify the sequential program using OpenMP and Pthreads is measured in number of lines the final source code has. The results shows that OpenMP does perform better than Pthreads in Matrix Multiplication and Mandelbrot set calculation but not on Quick Sort because OpenMP has problem with recursion and Pthreads does not. OpenMP wins the effort required on all the tests but because there is a large performance difference between OpenMP and Pthreads on Quick Sort OpenMP cannot be recommended for paralleling Quick Sort or other recursive programs.
Place, publisher, year, edition, pages
2016. , 46 p.
OpenMP, Pthreads, Algorithms, Performance, Productivity, Quick Sort, Matrix Multiplication, Mandelbrot Set
IdentifiersURN: urn:nbn:se:bth-12741OAI: oai:DiVA.org:bth-12741DiVA: diva2:944063
Subject / course
PA1418 Bachelor's Thesis - Large Team Software Engineering Project
PAGPT Software Engineering