Change search
ReferencesLink to record
Permanent link

Direct link
Pthreads and OpenMP: A  performance and productivity study
Blekinge Institute of Technology, Faculty of Computing, Department of Software Engineering.
2016 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [en]

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.
Keyword [en]
OpenMP, Pthreads, Algorithms, Performance, Productivity, Quick Sort, Matrix Multiplication, Mandelbrot Set
National Category
Computer Systems
URN: urn:nbn:se:bth-12741OAI: diva2:944063
Subject / course
PA1418 Bachelor's Thesis - Large Team Software Engineering Project
Educational program
PAGPT Software Engineering
Available from: 2016-06-29 Created: 2016-06-28 Last updated: 2016-06-29Bibliographically approved

Open Access in DiVA

BTH2016Swahn(926 kB)56 downloads
File information
File name FULLTEXT02.pdfFile size 926 kBChecksum SHA-512
Type fulltextMimetype application/pdf

By organisation
Department of Software Engineering
Computer Systems

Search outside of DiVA

GoogleGoogle Scholar
Total: 56 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

Total: 34 hits
ReferencesLink to record
Permanent link

Direct link