• Mode-1 Multi-Core • Memory Allocators • OpenMP • Intel TBB • Pthreads • Java - Threads • Charm++ Prog. • Message Passing (MPI) • MPI - OpenMP • MPI - Intel TBB • MPI - Pthreads • Compiler Opt. Features • Threads-Perf. Math.Lib. • Threads-Prof. & Tools • Threads-I/O Perf. • PGAS : UPC / CAF / GA • Power-Perf. • Home




Programming on Multi-Core Processors Using Pthreads (POSIX Threads)

Pthreads are defined as a set of C-language programming types and procedure calls, implemented with a pthread.h header/include file and a thread library. Solaris threads are easily understood by someone familiar with POSIX threads, and while Java threads and the multi-threading in the Win32 and OS/2 APIs are a little different . The subroutines, which comprise the Pthreads APIs, can be formally grouped into three classes such as Thread Management, Mutex Variables and Condition Variables. Threaded applications offer potential performance gains and practical advantages over non-threaded applications in several other ways as we can observe from the different programs.

Example programs using different APIs. Compilation and execution of Pthread programs, programs numerical and non-numerical computations are discussed using different thread APIs to understand Performance issues on mutli-core processors.

Example 4.1

Pthread program Suite : Computing Kernels for Dense Marix Computation algorithms

(Source - References : Books     Multi-threading -[MCMTh-01], [MCMTh-02], [MCMTh-I03], [MCMTh-05], [MCMth-09], [MCMth-11], [MCMTh-15], [MCMTh-21], [MCBW-44] )

Description of Pthreads Computing Kernels /Benchmarks

Example 4.1: Suite of programs on Dense Matrix Computation Kernels on Multi-Core Processor systems.

( Download WinRAR ZIP archive:
In-House-Pthreads-Benchmarks-codes (WinRAR ZIP archive)

  • Objective
  • Performance of suite of programs on Dense Matrix Computation Kernels & other numerical computation kernels on Multi-Core Processor systems.

  • Description
  • This benchmark comprises of suites performing Integer / Floating-Point Numerical and Non-Numerical computations using Shared Memory Programming (Pthreads).

    These suite of programs measure the execution time of kernels of Dense Matrix Computations involving Computation of Square Matrix Norm by Rowwise/Columnwise Partitioning ,Matrix and Vector Multiplication using checkerboard algorithm & Matrix and Matrix Multiplication using self scheduling algorithm ; PI computation using Numerical Integration and Monte Carlo Method ; Solving the Linear equation Ax = b using Jacobi Method ; and Sorting the given single dimension array for finding the minimum integer.

  • Input
  • The suites run for problem sizes - Class A,B,C on 1/2/4/8 threads as per run-rules.

  • Output
  • This Multi-Core Benchmark suite of programs gives the performance of system in terms of Time, Memory Utilized, Cpu Speed etc.

Centre for Development of Advanced Computing