top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Peterson's solution to the critical section problem, is not guaranteed on modern architecture why?

+3 votes
264 views

The Peterson's solution to the critical section problem,

Init: flag[2]={False}  //two process problem
Init turn=i or j.
do {
flag [i] = TRUE;
turn= j;
while (flag[j] && turn==j);
critical section
 flag [i] = FALSE; 
remainder section
} while (TRUE);

hence there is no guarantee that this algorithm will work efficiently on Modern Architecture systems.(Ref:- Galvin Book Page No - 229 ), Why so, can somebody help me out?

posted Dec 28, 2013 by Atiqur Rahman

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button
Looks I have not understood the complete context, ie what is the problem what is the doubt. I hope you are talking about http://en.wikipedia.org/wiki/Peterson%27s_algorithm which has limitation on more then one CPU architecture, and works perfectly only on single CPU architecture which keep sequential operations intact.

Sorry I have not understood the code segment which you provided.
yeah as per wikipedia...you may refer the book as per reference given... it is software solution, problem of multiple processor generally comes into hardware solutions(As same wikipedia page says below in Notes).
So what is the question? can you please elaborate?

Similar Questions
0 votes

What's the basic difference between hardware and software solutions for critical section problem? Why are they called hardware or software solution?

+3 votes

Do you experience application hang problems? If so, give the top reasons why the applications hang and cause slow performance?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...