Linux System Programming
Ctrlk
  • Introduction
  • Chapter 1 - Linux Basics
  • Chapter 2 – Programming
  • Chapter 3 – Files and File System
  • Chapter 4 – Processes
  • Chapter 5 – Inter Process Communication
  • Chapter 6 - Inter Process Communication Syncronization
  • Chapter 7 – Sockets
  • Chapter 8 – Threads
  • Chapter 9 - Threads Syncronization
    • Threads Exit
    • Managing Threads Exit
    • Tread Exit Example
    • Why is synchronization necessary??
    • Sync Mechanisms
    • Mutexes
    • When is Locking Necessary?
    • Use of Mutexes
    • Race Conditions
    • Thjread Safe Code
    • Deadlock
    • Creating and Destroing Mutexes
    • Lock and Unlock Mutexes
    • Example of synchronization using a mutex
    • Semaphores Synchronizing
    • Example of Synchronization Using a Semaphore
    • Threads Syncronization Example
  • Chapter 10 – Daemons
Powered by GitBook
On this page

Chapter 9 - Threads Syncronization

  • Thread exit

  • Managing thread exit

  • Thread exit example

  • Why synchronization is necessary?

  • Synchronization mechanisms

  • Mutexes

  • When to lock?

  • Typical use of mutexes

  • Race condition problems

  • Thread-safe code

  • Deadlock

  • Creating and destroying mutexes

  • Locking and unlocking mutexes

  • Example: synchronization using a mutex

  • Synchronizing with semaphores

  • Example: synchronization using a semaphore

  • Thread synchronization exercise

PreviousThreads ExerciseNextThreads Exit

Last updated 3 days ago

Was this helpful?

Was this helpful?