Can the condition when single process/thread is blocked trying to acquire the same mutex be called “deadlock”?
mutex_lock(&mutex) – success
…
mutex_lock(&mutex) – blocked, mutex not released
Seems as condition of “nonshearable resource” doesn’t apply: here is only single process/thread so that no case of nonshearable resource
hold and wait: here is only single process so that no wait for another process to release the requested resource
yes, that is considered, or would potentially* result in deadlock.
the term is not bound to threads or processes – but requests.
suppose your lock (
mutex) is not reentrant, and suppose your resource is locked when mutated, and that it is an error to mutate the resource from multiple sources. what happens when/if your single threaded process attempts to initiate a new mutation of the data within a mutation and the non-reentrant lock which is locked is requested to lock? deadlock‘potentially’, because you have not specified exactly what type of mutex you are dealing with.