669 views
0 votes
0 votes
Given two semaphore n and s

Now given 2 situation

Situation 1) The producer will be able to add an item to the buffer, but consumer can never consume it

Situation 2) Consumer succeeds in acquiring semaphore s, when buffer is empty

What will be initial value of n and s to fulfill these two condition separately?

(U can describe the situation with few words)

1 Answer

Related questions

1 votes
1 votes
1 answer
1
Rahul_Rathod_ asked Dec 12, 2018
1,567 views
a) s1-wait(p) , s2-wait(q) , s3-wait(q) , s4-wait(p)b) s1-wait(p) , s2-wait(q) , s3-wait(p) , s4-wait(q)c) s1-wait(q) , s2-wait(p) , s3-wait(p) , s4-wait(q)d) none of...
0 votes
0 votes
0 answers
2
1 votes
1 votes
0 answers
4
srestha asked Oct 4, 2018
1,091 views
Will it causing deadlock? How do we fixed it?P1: P2: Wait(S); Wait(Q); Wait(Q); Wait(S); ........ ............. Signal(S); Signal(Q); Signal(Q); Signal(S);