In regard to the critical section problem, an algorithm that switches between allowing one of two processes, P1 or P2, to complete their critical section would cause starvation for P1 if P2 stayed in its non-critical section forever.

However, if P2 exited, descriptions of this algorithm also classified it as only starvation. Since no processes in the remaining set {P1} are allowed to run their critical section, could you not say that the system is also deadlocked? Is deadlock only in context of resource allocation?

I know the standard conditions for deadlock include circular wait with more than one process, however in my search I have seen people describe deadlock in situations where a semaphore is never released before a crash of the second process etc. so I wanted to clear-up this specific case.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.