Drawbacks in Lock
If the lock system is perfect, lock-free patterns using atomic operations may not be introduced. In this seciton, we will talk about the most common drawbacks in using locks : Deadlock and Starvation.
Table of contents
Deadlock

how to solve the deadlock?
Starvation
how to solve the starvation?
Livelock
Livelock is kind of the starvation: everyone are busy but starves