What happens if the holder of a lock tries to acquire a lock?
Resources that can only be used by a single process at a time are usually protected by a lock. If the process that currently holds the lock attempts to acquire it a second time, what happens depends on the type of lock.


If the lock is reentrant, then it can be acquired multiple times by the same process. The process will need to call the release function as many times as it called the acquire function.
If the lock is not reentrant (for example if it's a simple semaphore or an atomically-modified boolean), then a second attempt will block. You can call this a single-process deadlock.
In some mutex implementations (probably not in what is studied in Concurrency 101 though), a process can acquire the same lock more than once, and the second time is a no-op, so the process must only call the release function once. Another thing that sometimes happens is that calling the acquire function from the same process twice puts the implementation in a bad state after which anything can happen — the semantics doesn't define what happens in that case.


Thus, it depends on what semantics your locks have. You can build non-reentrant locks on top of reentrant locks or vice versa if all you have is the wrong kind for what you want to do.