Explain how to implement a Mutex lock without busy waiting? What are the advantages and disadvantages of your solution with compared to a spinlock.
Note: If you do not answer the question please ask for clarity versus just answering then not responding to question about your answer.
Usually Lock is meant to prevent the concurrent access or collision by the Multiple threads.
This limits the access to particular Resources.
In Database the Lock or mutex is used .This is mostly used for ensuring the synchronicity.When Tracnsaction is being concurrent ,2 phase Locking is used.
Mutex lock prevent the data lost.The lock is of two types Optimistic and pessimistic lock.
The mutex lock is used to prevent the deadlock which is the main advantage of mutex lock.
There are some disadvantages like The threads must wait until the lock is released and there comes the overhead.