0 votes 0 votes Operating System semaphore process-synchronization + – Shefali asked Jul 27, 2015 Shefali 521 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes Here P=0 S=1; P1: P2 wait(P) wait(S) use R1 use R1 use R2 signal(P) signal(S) wait(S) wait(P) use R2 use R3 use R3 use R4 signal(P) signal(S) wait(S) Use R4 Pooja Palod answered Aug 3, 2015 Pooja Palod comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes multiple ways are possible , one of the way is as follow say 2 semaphores R=0 , S=0 P1: P2: wait(R) USE R1 signal(R) USE R1 USE R2 signal(S) wait(S) USE R2 USE R3 wait(R) signal(R) USE R3 USE R4 signal(S) wait(S) USE R4 pramod answered Sep 14, 2015 pramod comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes P->wait, v->signal P1(){ R2.p() R4.p() Critical section R4.v() R2.v() } Similar with P1, replacing R2, R4-> R1,R3 vishal8492 answered Jul 28, 2015 vishal8492 comment Share Follow See all 0 reply Please log in or register to add a comment.