2 2 votes Description of Peterson's Algorithm & also for which problem it is used to solve (1) deadlock (2) mutual exclusion (3) Thrashing (4) Paging. Operating System made-easy-test-series operating-system process-synchronization + – Jitendra Verma 4.6k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
4 4 votes Petersons Algorithm is a Programming Algo that allows two process to share a single -use resource without conflict,using only shared memory for communication.. There has been many Algorithms before Petersons Like... Lock Variable (No Mutual Exclusion) TSL (Mutual Exclusion,Progress but not Bounded waiting) Strict Alternation or Turn Variable (Mutual Exclusion but not Progress) Using Interested Array (Mutual Exclusion,Progress but not Bounded waiting) Peterson Algo Combines Turn Variable and Interested Array Concepts and Provides All Four : Mutual Exclusion Progress Bounded Waiting Architecture Neutrality I would Go with Option 2 :) bad_engineer answered Mar 11, 2016 • edited Mar 13, 2016 by bad_engineer bad_engineer comment Share Follow See all 7 Comments 7 7 Comments reply Show 4 previous comments priti commented Mar 13, 2016 reply Follow flag peterson algorithm doesnt maintain Mutual exclusiion which mean one of the condition for preventing deadlock is satisfied . so it should be deadlock ! 0 0 replyShare Arjun commented Mar 13, 2016 reply Follow flag Peterson algorithm ensures mutual exclusion rt? 0 0 replyShare priti commented Mar 13, 2016 reply Follow flag Sorry yes it does . i was actually talking about LOCK variable . 1 1 replyShare Please log in or register to add a comment.
1 1 vote Primary purpose is To provide Mutual Exclusion and it also prevents deadlock. Anurag_s answered Mar 11, 2016 Anurag_s comment Share Follow See all 6 Comments 6 6 Comments reply Show 3 previous comments Anurag_s commented Mar 13, 2016 reply Follow flag yes it could be.but The way ques s asked makes me think that he s taking all 4 options as problems. No mutual exclusion is a problem coz it ll lead to Race condition. 0 0 replyShare Arjun commented Mar 14, 2016 reply Follow flag No, you should clear this thing- it can cause you many marks in various topics. Mutual exclusion is not a problem- it is something desirable. Race condition is a problem. We should always answer as per the questions- not as per what we studied. Those who haven't studied much can sometimes do well in GATE because they will be answering as per question. 0 0 replyShare Anurag_s commented Mar 14, 2016 reply Follow flag correct, race cond. is not mentioned directly so we will go for deadlock.yes sometimes we can overthink about a question and mark wrong answer. thanks :) 1 1 replyShare Please log in or register to add a comment.