NVIDIA interview question

To explain how to use lock to manage threads.