The essence of thread synchronization is to coordinate the thread's access to resources;
The tools for thread synchronization are synchronization variables: Mutex, condition variable, semaphore, read and write volume.
Resource type and access control:
1) Exclusive exclusive type: Mutex amount;
2) meet some conditions to access: Condition variable, condition check and condition setting;
3) set of resources; Semaphore.
Synchronous operation specification and access control
The thread attempts to gain access control before executing the critical section code, checking the state of the synchronization variable, and modifying the state, and then entering the critical section;
When you leave the critical section, you need to do something about the synchronization variable.
Http://www.cnblogs.com/likeyiyy/p/3670213.html
The essence of mutex is serial execution.
Thread synchronization and synchronization variables