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)
For binary semaphore;
P(semphore) will decrease the value of semaphore if it's value is greater than zero or it will block the process.
V(semphore) will unblock a process if any or will increase increase the value of semaphore by 1.
If you have any questions comment down and please? upvote thanks...
Get Answers For Free
Most questions answered within 1 hours.