After each step, give the value of the updated semaphore and the content of the updated semaphore queue.
Counting Semaphores: S1, S2, S3
Binary Semaphores: S4, S5, S6
Semaphores initial values:
S1 = 1, S2 = 0, S3 = 2, S4 = 0, S5 = 1, S6 = 1
1) P1: P(S3)
2) P2: P(S5)
3) P3: P(S5)
4) P5: P(S2)
5) P2: V(S2)
6) P10: V(S6)
7) P2: P(S4)
8) P6: P(S5)
9) P4: V(S4)
10)P4: P(S2)
I hope this will help you. Feel free to ask doubts in the comment box. Hit upvote will be appreciated.
Get Answers For Free
Most questions answered within 1 hours.