Crypto.com Interview Question

Explain some locking mechanisms to avoid race conditions.