3

The description of an altruistic philosopher given in this answer, that you quoted in your question, is slightly imprecise. What it really is going on is that: A possible approach for avoiding deadlock without incurring in starvation is to introduce the concept of altruistic philosopher, that is a philosopher which drops the fork that it holds when it ...


1

For a system to be in deadlock it must not be able to proceed. A process may be not started, complete, waiting for a resource, processing a resource, or be deadlocked. It's normal for a process to have to wait for a resource, so deadlock only arises if it is shown that the resource can never be made available. For the information given, and absent the ...


1

As per the question, all the even processes request only even resources(i.e. Ri & Ri+2) Where as odd processes request: either, odd resources(i.e. Rn-1 & Rn-1-2) when 'n' is even. or, even resources (i.e. Rn-1 & Rn-1-2) when 'n' is odd. Deadlock can only happen when even and odd processes request overlaps i.e. odd processes have to request even ...


1

If only one semaphore is used to control the access to the critical section, it is not possible for deadlock to happen. That is why two semaphores are used in the problem statement since the problem is designed to, I assume, showcase deadlock. A single-semaphore-based program can protect the critical section from concurrent access as well, as demonstrated ...


Only top voted, non community-wiki answers of a minimum length are eligible