Pthreads

From HP-SEE Wiki

Revision as of 13:12, 23 August 2011 by Roczei (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents


Authors/Maintainers

  • Also origin, if the software comes from a specific project.

Summary

Threads, like processes, are a mechanism to allow a program to do more than one thing at a time. As with processes, threads appear to run concurrently; the Linux kernel schedules them asynchronously, interrupting each thread from time to time to give others a chance to execute. GNU/Linux implements the POSIX standard thread API (known as PThreads). Implementations of the API are available on many Unix-like POSIX systems such as FreeBSD, NetBSD, GNU/Linux, Mac OS X and Solaris. Microsoft Windows has a pthreads implementation and supports a subset of the Pthread API for the Windows 32-bit platform. The Pthread interfaces described in this section are based on a subset of the application programming interfaces (APIs) defined in the POSIX standard (ANSI/IEEE Standard 1003.1, 1996 Edition OR ISO/IEC 9945-1: 1996) and the Single UNIX Specification, Version 2, 1997. The implementation of these APIs is not compliant with these standards. However, the implementation does attempt to duplicate the portable nature of the interfaces defined by the standards. 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 - though this library may be part of another library, such aslibc, in some implementations. All thread functions and data types are declared in the header file <pthread.h>. The subroutines which comprise the Pthreads API can be informally grouped into four major groups:

• Thread management: Routines that work directly on threads - creating, detaching, joining, etc. They also include functions to set/query thread attributes (joinable, scheduling etc.)

• Mutexes: Routines that deal with synchronization, called a "mutex", which is an abbreviation for "mutual exclusion". Mutex functions provide for creating, destroying, locking and unlocking mutexes. These are supplemented by mutex attribute functions that set or modify attributes associated with mutexes.

• Condition variables: Routines that address communications between threads that share a mutex. Based upon programmer specified conditions. This group includes functions to create, destroy, wait and signal based upon specified variable values. Functions to set/query condition variable attributes are also included.

• Synchronization: Routines that manage read/write locks and barriers.

Pthreads tutorials are available at:

https://computing.llnl.gov/tutorials/pthreads/

http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html

Features

  • Listed features

Architectural/Functional Overview

  • high level design info, how it works, performance - may be a link, or several links

Usage Overview

  • If possible with small example - may be a link

Dependacies

  • list of all relevant dependencies on other libraries

HP-SEE Applications

  • DNAMA(based on RAxML)

Resource Centers

  • RCs supporting it (with version number if not the same as above)

Usage by Other Projects and Communities

  • If any

Recommendations for Configuration and Usage