Answer by eng140 for Operating Systems: Peterson's solution
http://www2.cs.uregina.ca/~hamilton/courses/330/notes/synchro/node3.htmlThe following link explains, by illustrating 3 cases, why we need the turn variable for the Peterson's solution. Basically, if...
View ArticleAnswer by Rhythm Patwa for Operating Systems: Peterson's solution
Why it needs to check for the turn variable. Why not only this: while(flag[0]== true) As soon as P0 will leave from critical section, flag[0] = false and P1 will be able to enterIf you were to use just...
View ArticleOperating Systems: Peterson's solution
I am trying to understand the peterson's solution for synchronisation. For reference, I am attaching the source of reading:This is from the wikipedia page. Now,Let's say P1 wants to enter the critical...
View Article
More Pages to Explore .....