0 votes 0 votes Mutual exclusion, hold and wait, circular wait and no preemption are 4 necessary condition for deadlock to occur. How mutual exclusion is present in the dining philosopher problem? Operating System operating-system + – Swapnil Naik asked Nov 21, 2018 Swapnil Naik 334 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Shaik Masthan commented Nov 30, 2018 reply Follow Share Actually it depends upon the entry section of Critical Section... Normally, we use entry section is similar semaphores for every process, but in that example which abhishek mentioned, there are different semaphores for the processes 0 votes 0 votes Swapnil Naik commented Nov 30, 2018 reply Follow Share Give me some time I will get back to you. 0 votes 0 votes Swapnil Naik commented Dec 1, 2018 reply Follow Share Okay I have come to this conclusion, The code is kind of implementation of dining philosopher problem. The code implementation does maintain mutual exclusion by maintaining that one fork will be only picked by one user.( wait(i) condition) but because of other fork deadlock is occurring, mutual exclusion is still there. both of them maintain mutual exclusion by saying that at any given time one fork will be only picked by one person. p[0] and p[2] can eat at the same time, accessing their critical section and hence still maintaining mutual exclusion property. Here the mutual exclusion is applied on the fork. Hence mutual exclusion becomes the necessary condition for deadlock to occur. 0 votes 0 votes Please log in or register to add a comment.