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.
No, it's not a Deadlock.
Deadlock can arise if four conditions hold simultaneously.
more...
With a single process, the Circular Wait condition can never be met, thus deadlock can never arise with a single process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With