pawan8576 / dekker-s-problem Goto Github PK
View Code? Open in Web Editor NEWThe first known correct software solution to the critical-section problem for two processes was developed by Dekker. The two processes, P0 and P1, share the following variables: Boolean flag [2]; /* initially false */, int turn; The structure of process Pi is (I == 0 or 1); the other process is Pj (j== 1 or 0). Write a program which satisfies all three requirements for the critical-section problem. b) Write a program for the Swap () instruction can be used to provide mutual exclusion that satisfies the bounded-waiting requirement.