The Windows Thread Synchronization Win32 Programming




Windows Process and Thread




What do we have in this session?


As one of the important topics related to Windows process and thread, this tutorial tries to explain the details of the process and thread synchronization techniques used in Windows. The program examples also try to demonstrate several 'issues' related to concurrency that exists such as deadlock, race condition, starvation etc. and how the synchronization methods used can 'reduce' those problems.

  1. Intro

  2. Process and Thread Revisited

  3. Atomicity

  4. Windows Thread States

  5. Wait Functions

  6. Single-object Wait Functions

  7. Multiple-object Wait Functions

  8. Alertable Wait Functions

  9. Registered Wait Functions

  10. Wait Functions and Time-out Intervals

  11. Wait Functions and Synchronization Objects

  12. Wait Functions and Creating Windows

  13. Synchronization Objects

  14. Events

  15. Mutex and Semaphore

  16. Interprocess Synchronization

  17. Object Names

  18. Object Inheritance

  19. Object Duplication

  20. Other Synchronization Mechanisms

  21. Synchronization and Overlapped Input and Output

  22. Asynchronous Procedure Calls (APC)

  23. Synchronization Internals

  24. Critical Section Objects

  25. Condition Variables

  26. Slim Reader/Writer (SRW) Locks

  27. One-Time Initialization

  28. One-Time Initialization: Synchronous Mode

  29. One-Time Initialization: Asynchronous Mode

  30. Interlocked Variable Access

  31. The Interlocked API

  32. Interlocked Singly Linked Lists

  33. Timer Queues

  34. Concurrency and Race Conditions

  35. Race Condition Program Example

  36. Concurrency, Deadlocks and Livelocks

  37. Liveness

  38. Deadlock Example - The Dining Philosophers

  39. Deadlock and Critical Section Program Example

  40. Starvation

  41. Livelock

  42. Program Examples on Using Synchronization Objects




  1. The WaitForSingleObject() Example

  2. The WaitForMultipleObjects() Example

  3. Waiting for Multiple Objects Example

  4. Using Named Objects Program Examples

  5. The First Process Program Example

  6. Second Process Program Example

  7. Using Event Objects Program Example

  8. Using Mutex Objects Program Example

  9. Another Mutex Program Example

  10. Using Semaphore Objects Program Example

  11. Another Semaphore Program Example

  12. Six philosophers with six chopsticks

  13. Starvation Issue

  14. The Six philosophers with Semaphore Program Example

  15. Using Waitable Timer Objects Program Example

  16. Using Waitable Timers with an Asynchronous Procedure Call Program Example

  17. Using Critical Section Objects Program Example

  18. Another Critical Section Program Example

  19. More Critical Section Program Examples

  20. Using Condition Variables Program Example

  21. Using One-Time Initialization Program Example

  22. The Synchronous Example

  23. Asynchronous Example

  24. Using Singly Linked Lists Program Example

  25. Using Timer Queues Program Example

  26. The Interlocked Functions Program Example 1

  27. The Interlocked Functions Program Example 2

  28. The Interlocked Functions Program Example 3

  29. Extra Synchronization Related working Program Examples

  30. Creating a Single Thread Program Example

  31. Cancelling a Thread Program Example

  32. The Multithread without any synchronization Program Example

  33. Synchronization with Interlocked Exchange Program Example

  34. Some Notes for IA64

  35. Synchronization with Spinlocks Program Example

  36. Synchronization Using Mutexes Program Example

  37. Synchronization with Critical Sections Program Example

  38. Synchronization Using Semaphores Program Example

  39. Terminal Server and Naming Semaphore Objects

  40. Thread Scheduling and Prioritizing

  41. Managing Thread Priorities in Windows

  42. Windows Scheduling Program Example

  43. Thread Scheduling Program Example

  44. Managing Multiple Threads Program Example

  45. Multiple Threads Example

  46. More: Synchronization Reference


< Process Status Help APIs | Win32 Programming | Thread Synchronization 1 >