if in peterson's algo, A process is preempted just after comming out of critical region before setting its flag to false. Then will not be there a deadlock. ?? plz help !
No deadlock. That's why we all learn this theoretical algorithm at schools.
note: You can encounter deadlock anywhere if you do something wrong. But it is not caused by a bug or property of this algorithm.
This cannot cause deadlock, because there is nothing that is blocking the process which just exited the critical section from proceeding.
精彩评论