Questions: Distributed Lock Management

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A distributed system uses indefinite (non-expiring) locks. A client acquires a lock on a shared resource, then crashes immediately — before releasing the lock. What happens to other clients waiting for that lock?

AThe lock manager detects the crash via heartbeat and automatically releases the lock within seconds.
BThe lock remains held indefinitely, blocking all other clients until a human operator manually intervenes to release it.
COther clients automatically acquire the lock after a standard TCP timeout period when the connection drops.
DThe lock is released by the operating system when the crashed process's file descriptors are closed.
Question 2 Multiple Choice

A client acquires a distributed lease with a 10-second expiration, begins work on a shared resource, and the work takes 15 seconds. The client never explicitly renews the lease. What is the likely outcome?

AThe work completes safely; leases only affect lock acquisition and do not interfere with active operations.
BAfter 10 seconds, another client may acquire the lease and begin modifying the same resource, creating a race condition with the first client's ongoing writes.
CThe lock manager pauses other clients until the original client finishes, then releases the lease automatically.
DThe client automatically receives a 5-second extension when its work duration approaches the lease limit.
Question 3 True / False

Lease-based locks prevent a crashed client from blocking other clients indefinitely, because the lease expires automatically whether or not the holder is still alive.

TTrue
FFalse
Question 4 True / False

Consensus-based distributed locks (built on Paxos or Raft) are generally preferable to lease-based locks because they provide stronger guarantees at no additional cost.

TTrue
FFalse
Question 5 Short Answer

Why does a lease-based lock introduce a potential race condition that a simple indefinite lock does not, and what tradeoff does this represent?

Think about your answer, then reveal below.