Google Interview Question

Design a locking mechanism for a distributed system