开发者

Peterson's algorithm: Can deadlock occur [closed]

开发者 https://www.devze.com 2023-02-05 20:35 出处:网络
It's di开发者_Python百科fficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current for
It's di开发者_Python百科fficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号