POSIX Threads - Wikipedia, The Free Encyclopedia
Transcript of POSIX Threads - Wikipedia, The Free Encyclopedia
-
7/27/2019 POSIX Threads - Wikipedia, The Free Encyclopedia
1/4
1/28/12 POSIX Threads - W ikipedia, t he f ree ency c lopedia
1/4en.wikipedia.org/wiki/POSIX_Threads
POSIX ThreadsFrom Wikipedia, the free encyclopedia
POSIX Threads, usually referred to as Pthreads, is a POSIX standard for threads. The standard,POSIX.1c,
Threads extensions (IEEE Std 1003.1c-1995), defines an API for creating and manipulating threads.
Implementations of the API are available on many Unix-like POSIX-conformant operating systems such as
FreeBSD, NetBSD, OpenBSD, GNU/Linux, Mac OS X and Solaris. DR-DOS and Microsoft Windows
implementations also exist: within the SFU/SUA subsystem which provides a native implementation of a number
of POSIX APIs, and also within third-party packages such aspthreads-w32,[1] which implements pthreads on
top of existing Windows API.
Contents
1 Contents
2 Example
3 POSIX Threads for Windows
4 See also
5 References
6 Further reading
7 External links
Contents
Pthreads defines a set of C programming language types, functions and constants. It is implemented with a
pthread.h (http://opengroup.org/onlinepubs/007908799/xsh/pthread.h.html) header and a
thread library.
There are around 100 Pthreads procedures, all prefixed "pthread_" and they can be categorized into four
groups:
Thread management - creating, joining threads etc.
Mutexes
Condition variables
Synchronization between threads using read/write locks and barriers
The POSIX semaphore API works with POSIX threads but is not part of threads standard, having been
defined in thePOSIX.1b, Real-time extensions (IEEE Std 1003.1b-1993) standard. Consequently the
semaphore procedures are prefixed by "sem_" instead of "pthread_".
Example
http://en.wikipedia.org/wiki/Semaphore_(programming)http://en.wikipedia.org/wiki/Condition_variablehttp://en.wikipedia.org/wiki/Mutexhttp://opengroup.org/onlinepubs/007908799/xsh/pthread.h.htmlhttp://en.wikipedia.org/wiki/POSIX_Threads#External_linkshttp://en.wikipedia.org/wiki/POSIX_Threads#Further_readinghttp://en.wikipedia.org/wiki/POSIX_Threads#Referenceshttp://en.wikipedia.org/wiki/POSIX_Threads#POSIX_Threads_for_Windowshttp://en.wikipedia.org/wiki/Windows_Services_for_UNIXhttp://en.wikipedia.org/w/index.php?title=Native_implementation&action=edit&redlink=1http://en.wikipedia.org/wiki/FreeBSDhttp://en.wikipedia.org/wiki/IEEEhttp://en.wikipedia.org/wiki/Application_programming_interfacehttp://en.wikipedia.org/wiki/Semaphore_(programming)http://en.wikipedia.org/wiki/Synchronization_(computer_science)http://en.wikipedia.org/wiki/Condition_variablehttp://en.wikipedia.org/wiki/Mutexhttp://en.wikipedia.org/wiki/Libraryhttp://opengroup.org/onlinepubs/007908799/xsh/pthread.h.htmlhttp://en.wikipedia.org/wiki/Function_(computer_science)http://en.wikipedia.org/wiki/Data_typehttp://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/POSIX_Threads#External_linkshttp://en.wikipedia.org/wiki/POSIX_Threads#Further_readinghttp://en.wikipedia.org/wiki/POSIX_Threads#Referenceshttp://en.wikipedia.org/wiki/POSIX_Threads#See_alsohttp://en.wikipedia.org/wiki/POSIX_Threads#POSIX_Threads_for_Windowshttp://en.wikipedia.org/wiki/POSIX_Threads#Examplehttp://en.wikipedia.org/wiki/POSIX_Threads#Contentshttp://en.wikipedia.org/wiki/Windows_APIhttp://en.wikipedia.org/wiki/POSIX_Threads#cite_note-1http://en.wikipedia.org/wiki/Third-partyhttp://en.wikipedia.org/w/index.php?title=Native_implementation&action=edit&redlink=1http://en.wikipedia.org/wiki/Windows_Services_for_UNIXhttp://en.wikipedia.org/wiki/Microsoft_Windowshttp://en.wikipedia.org/wiki/DR-DOShttp://en.wikipedia.org/wiki/Solaris_(operating_system)http://en.wikipedia.org/wiki/Mac_OS_Xhttp://en.wikipedia.org/wiki/Linuxhttp://en.wikipedia.org/wiki/OpenBSDhttp://en.wikipedia.org/wiki/NetBSDhttp://en.wikipedia.org/wiki/FreeBSDhttp://en.wikipedia.org/wiki/Unix-likehttp://en.wikipedia.org/wiki/Application_programming_interfacehttp://en.wikipedia.org/wiki/IEEEhttp://en.wikipedia.org/wiki/Thread_(computing)http://en.wikipedia.org/wiki/POSIX -
7/27/2019 POSIX Threads - Wikipedia, The Free Encyclopedia
2/4
-
7/27/2019 POSIX Threads - Wikipedia, The Free Encyclopedia
3/4
-
7/27/2019 POSIX Threads - Wikipedia, The Free Encyclopedia
4/4
1/28/12 POSIX Threads - W ikipedia, t he f ree ency c lopedia
4/4en.wikipedia.org/wiki/POSIX_Threads
http://www.wikimediafoundation.org/http://wikimediafoundation.org/wiki/Terms_of_Usehttp://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_Licensehttp://en.wikipedia.org/wiki/Special:Categorieshttp://en.wikipedia.org/w/index.php?title=POSIX_Threads&oldid=519372429http://www.futurechips.org/tips-for-power-coders/open-mp-pthreads.htmlhttp://conferences.oreillynet.com/presentations/os2007/os_lamothe.pdfhttp://www.opengroup.org/onlinepubs/007904975/basedefs/pthread.h.htmlhttp://sources.redhat.com/pthreads-win32/http://www.thinkingparallel.com/2007/04/11/ten-questions-with-david-butenhof-about-parallel-programming-and-posix-threads/http://en.wikipedia.org/wiki/Category:Threads_(computing)http://en.wikipedia.org/wiki/Category:Parallel_computinghttp://en.wikipedia.org/wiki/Category:C_POSIX_library