1,069 views
3 votes
3 votes
wait(S);

Critical section

wait(S);

S is a binary semaphore initialised to 1. Suppose there are n processes competing for the CS. Only one can enter into it. Is this the situation of deadlock or starvation?

I think it's deadlock because other processes are made to wait infinitely. But someone told me that since at least one process is getting executed so it's not deadlock as in case of deadlock none of the processes can proceed.

Please clarify.

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
Arbaz__Malik asked Dec 25, 2021
642 views
given solution is wait(P) , wait(Q), wait(p) , wait(Q) for s1,s2,s3,s4 respectivelyI know this implementation is deadlock free just want to ask if it will follow bounded ...
0 votes
0 votes
1 answer
4
roopkathaaa asked Aug 25, 2023
1,309 views
In a certain application, the initial value of a counting semaphore s is 10. The following operations were completed on the semaphore in the given order 5P, 20P, 2V, 18P,...