LinuxCertified, Inc. Home | News and Links | About LinuxCertified Inc.
Linux & Open-Source TrainingLinux LaptopsLinux Services  

embedded linux training

Class Offerings

Class Schedule

Distance Learning


Academic Program

Student Feedback



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).

Course Objectives

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).

Course Materials

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.3. History
    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.1. Speed-up
    2.2. Slowdown
    2.3. Challenges
    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.3. Scheduling
    3.4. Joining
    3.5. Detaching
    3.6. Threads on Linux
    3.7. ps command and pthreads
    3.8. /proc and pthreads
    3.9. Cancellation
    3.10. phtread_once
  • Tools
    4.1. Debugging
    4.2. Performance measurement
    4.3. Coverage
    4.4. Valgrind
    4.5. Oprofile
  • Mutexes
    5.1. Creating
    5.2. Initialization
    5.3. Usage
    5.4. Issues
    5.5. Priority Inversion And Priority Inheritance
    5.6. Contention
    5.7. Restrictions
    5.8. Testing A Mutex’s Availability
  • Semaphores
    6.1. Creating
    6.2. Named and Unnamed
    6.3. Initialization
    6.4. Usage
    6.5. Priorities and Semaphores
    6.6. Operations
    6.7. Testing Semaphore’s Availability
    6.8. Timed Wait
  • System and Library Calls and Threads
    7.1. fork()
    7.2. exec()
    7.3. system(), popen()
    7.4. Signals
    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.3. Deadlock
    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)

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)

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)

Return to Top

Get training updates and Linux tips:

US Toll Free: 1 877 800 6873
Linux is a registered trademark of Linus Torvalds.
Copyright © 2000-2012 All rights reserved.
LinuxCertified, Inc: Linux Training, Services & Laptop Provider