mutex

POSIX Threads Synchronization in C

1.0 POSIX Threads Synchronization POSIX Threads provide multiple flows of execution within a process. The threads have their own stacks but share the global data and the heap. So the global variables are visible to multiple threads. Also, the threads need to synchronize their actions so that they jointly realize the overall objectives of the …

POSIX Threads Synchronization in C Read More »

Semaphore Basics

1.0 BACKGROUND A semaphore is a signalling mechanism used to regulate access to a shared resource like a railroad track. A semaphore is used to signal to the driver of a train whether he can go ahead on the track or not. The upward position of the pivot arm in the picture shows that the …

Semaphore Basics Read More »