Threads POSIX
Les threads POSIX, souvent appelés pthreads, sont un sous-standard de la norme POSIX décrivant une interface de programmation permettant de gérer des threads. Il s'agit du standard IEEE Std 1003.1c-1995 (POSIX.1c, Threads extensions).
Cette interface est disponible sur la plupart des systèmes Unix modernes, par exemple Linux, les différentes variantes modernes de BSD, Mac OS X et Solaris[1],[2]. Elle n'est pas disponible nativement sous Microsoft Windows mais il existe plusieurs implémentations dont une de Microsoft[3].
Spécification
Le standard définit un ensemble de types de données, de fonctions et de constantes en langage C. Le fichier à inclure dans les sources en C se nomme pthread.h. Une centaine de fonctions sont ainsi définies[4].
La bibliothèque dispose notamment de fonctions permettant la création et la destruction de threads, l'ordonnancement des tâches, leur synchronisation, la gestion des signaux et des données partagées[5].
Notes et références
- (en) Cet article est partiellement ou en totalité issu de l’article de Wikipédia en anglais intitulé « POSIX Threads » (voir la liste des auteurs).
- ↑ Daniel Robbins, « POSIX threads explained », IBM developerWorks : « When you want to write portable multithreaded code, code that works under Solaris, FreeBSD, Linux, and more, POSIX threads are the way to go. »
- ↑ José R.C. Cruz, « Mastering Threads on Mac OS X » : « The POSIX thread library (…) is platform-agnostic, and available on all POSIX-compliant systems such as Linux, BSD, and Mac OS X. »
- ↑ (en)« Pthread Support in Microsoft Windows Services for UNIX Version 3.5 », Microsoft,
- ↑ (en)« <pthread.h> », The Open Group
- ↑ (en) Adrien Lamothe « An overview of Pthreads with current trends » (lire en ligne).
— OSCON (O'Reilly Open Source Convention) 2007.
Bibliographie
- (en) David R. Butenhof, Programming with POSIX Threads, Reading (Mass.)/Harlow (G. B.)/Menlo Park (Calif.), Addison-Wesley, , 381 p. (ISBN 978-0-201-63392-4 et 0-201-63392-2, lire en ligne)
- Bradford Nichols, Dick Buttlar, Jacqueline Proulx Farell, Pthreads Programming : A POSIX Standard for Better Multiprocessing, O'Reilly & Associates, , 267 p. (ISBN 978-1-56592-115-3 et 1-56592-115-1, lire en ligne)
- Charles J. Northrup, Programming with UNIX Threads, John Wiley & Sons, , 399 p. (ISBN 978-0-471-13751-1 et 0-471-13751-0)
- (en) Kay A. Robbins et Steven Robbins, UNIX Systems Programming : communication, concurrency and threads, Upper Saddle River (N.J.), Prentice-Hall, , 893 p. (ISBN 978-0-13-042411-2 et 0-13-042411-0, lire en ligne)
- Christophe Blaess, Développement système sous Linux, Paris, Eyrolles, , 1004 p. (ISBN 978-2-212-12881-9, lire en ligne)
Liens externes
- (en)Daniel Robbins, « POSIX threads explained »
- (en)Michael Suess, « Ten Questions with David Butenhof about Parallel Programming and POSIX Threads »
- (en)« The Open Group Base Specifications Issue 6, IEEE Std 1003.1 »
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.