POSIX Threads Development Hands On Training
This course is designed to bring C developers up to speed with POSIX Threads programming. The course is taught using Linux and will also discuss a bit of the implementation details on Linux. The course involves quite a lot of hands-on programming exercises. Approximately 50% of the class time will be spent in lecture/review and 50% in doing hands-on programming exercises. (For evening course programming exercises are to be done outside of the class time).
After this course, participates will be able to:
• Create efficient and safe threaded applications.
• Properly synchronize threads with mutexes, semaphores, read/write locks, and condition variables.
• Explain issues such as race conditions, data dependencies, deadlocks, and false sharing.
• Use a variety of development tools with threaded programs.
• Analyze trade-offs between multi-thread, multi-process, and multiplexed programming approaches.
Who Should Attend
The course is for programmers who are either new to or moderately experienced with POSIX Threads.
Two days or three evenings (for evening course).
The workshop materials include a comprehensive student workbook. The workbook contains all of the slides used in the course as well as hands-on lab exercises.
Course Workshop and Set-up
The workshop makes use of standard PC's with a desktop Linux distribution for development.
The following modules will be covered during the class:
- Intro To Threading
1.1. Brief advantages and disadvantages
1.2. Intro to API
1.4. Implementation approaches
1.5. Address spaces
1.6. Automatics, static, global, thread local storage
1.7. Concurrent & Parallel
1.8. Asynchronous Behavior
1.9. Threads and UNIX/Linux
- Concurrency and Parallelism
2.4. Amdahl’s Law
2.5. Address space
2.6. Stack space
2.7. Thread safety
2.8. Processes vs. Threads vs. Multiplexing
2.9. Thread pools
2.10. Cache considerations
- Creating, joining, detaching
3.1. Creating Threads
3.2. Thread Attributes
3.6. Threads on Linux
3.7. ps command and pthreads
3.8. /proc and pthreads
4.2. Performance measurement
5.5. Priority Inversion And Priority Inheritance
5.8. Testing A Mutex’s Availability
6.2. Named and Unnamed
6.5. Priorities and Semaphores
6.7. Testing Semaphore’s Availability
6.8. Timed Wait
- System and Library Calls and Threads
7.3. system(), popen()
7.5. Thread Safe Functions
7.6. Interrupted Functions
7.7. select, aio_read/aio_write
- Other Synchronization
8.1. Read-Write Locks
8.2. Condition Variables
8.3. Producer/Consumer Problem
8.4. Thundering Herd Problem
- Concurrency Issues
9.1. Race Conditions
9.2. Data Dependencies
9.4. False Sharing
9.5. Measuring and Improving Performance
Prerequisites: Additional, assumed prerequisite knowledge, is experience in C.
If you have any questions about the difficulty level of the class, please contact us at: classes (at) linuxcertified.com
Optional: All attendees will get a Linux laptop to be used during the class. You have the option of purchasing this laptop with an additional course fee.
On-site: If you would like to arrange an on-site Linux class, please contact us at: classes (at) linuxcertified.com
If you don't see this class scheduled in the timeframe/place of your preference, please let us know your preference for timeframe (which month etc.) and any particular geography preference. Send email with your interest to classes(at)linuxcertified.com