Broadcom Interview Question

How will you implement locks in a system?