Quantcast
Channel: Operating Systems: Peterson's solution - Stack Overflow
Browsing latest articles
Browse All 3 View Live

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 Article



Answer 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 Article

Image may be NSFW.
Clik here to view.

Operating 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
Browsing latest articles
Browse All 3 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>