108x Filetype PDF File size 0.37 MB Source: man7.org
man7.org Training and Consulting POSIX Threads Programming Course code: M7D-PTHR01 This one-day course covers the key features of programming with POSIX threads, including thread creation and termination, joining and detaching threads synchro- nization techniques, thread-specific data, and thread cancellation. The course combines a mixture of detailed presentations with carefully designed practical ex- ercises to provide participants with the knowledge needed to write multithreaded applications. The course notes a few details specific to the Linux implementation of POSIX threads, but focuses primarily on the POSIX standard, so that it is valuable to developers working on all UNIX systems. Audience and prerequisites • A source code tarball containing all of the (many) ex- The primary audience for this course is programmers devel- ample programs written by the trainer to accompany the oping multithreaded applications for Linux and UNIX sys- presentation tems, or programmers porting such applications from other operating systems (e.g., Windows) to Linux or UNIX. Course inquiries and bookings Participants should be able to write and compile C (or For inquiries about courses and consulting, you can contact C++) programs and be familiar with commonly used func- us in the following ways: tions in the standard C library (e.g., functions in the stdio and malloc packages). • Email: training@man7.org Course duration and format • Phone: +49 (89) 2155 2990 (German landline) One day, with up to 40% devoted to practical sessions. Prices and further details Course materials For course prices, upcoming course dates, and further infor- • A course book (written by the trainer) that includes all mation about the course, please visit the course web page, course slides and exercises http://man7.org/training/pthreads_prog/. About the trainer Michael Kerrisk has a unique set of qualifica- system programming. tions and experience that ensure that course • He is actively involved in Linux develop- participants receive training of a very high ment, working with kernel developers on standard: testing, review, and design of new Linux • He has been programming on UNIX sys- kernel–user-space APIs. tems since 1987 and began teaching UNIX • Since 2004, he has been the maintainer of system programming courses in 1989. the Linux man-pages project, which pro- • He is the author of The Linux Program- vides the manual pages documenting the ming Interface, a 1550-page book widely Linuxkernel–user-space and GNUClibrary acclaimed as the definitive work on Linux APIs. http://man7.org/training/ +49(89)21552990 ktraining@man7.org @mkerrisk Version: 2021-11-08 Page 1 POSIX Threads Programming: course contents in detail Topics marked with an asterisk (*) are optional, and will be covered as time permits 1. Introduction 3. Thread attributes • Pthreads API basics • Scheduling policy and parameters • Thread creation • Thread stack and guard page size • Thread termination • Getting and setting thread attributes • Thread IDs 4. Thread safety and per-thread storage • Joining and detaching threads • Reentrant and thread-safe functions • Threads versus processes • Thread-specific data • Threads and signals • Thread-specific data APIs • Interactions with fork() and execve() • Thread-local storage 2. Thread synchronization: mutexes and condition 5. Thread cancellation variables • Shared resources and critical sections • Canceling a thread • Mutexes • Cancellation state and cancellation type • Locking and unlocking a mutex • Cancellation points • Dynamically initialized mutexes • Cancellation cleanup handlers • Mutex types 6. Other synchronization techniques (*) • Condition variables • Spin locks • Signaling and waiting on condition variables • Read-write locks • Dynamically initialized condition variables • Barriers http://man7.org/training/ +49(89)21552990 ktraining@man7.org @mkerrisk Version: 2021-11-08 Page 2
no reviews yet
Please Login to review.