Answer: C) spin-lock with test and set
Step-by-step explanation:
In spinlock, when a thread locks a spinlock then it continuously retrying locking until it succeeds. Spinlock is the lock that cause thread and continuously check that whether the lock are available or not for synchronization.
So that is why spinlock is best synchronization solution as it is not allowing any another thread.
On the other hand, in mutex thread try to lock a mutex and then, it automatically go to sleep mode before locking and immediate allow another thread to run.