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


Deprecated: Implicit conversion from float-string "1640411688.411" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1640411688.411" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1640411688.411" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1640411688.411" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1541571446.576" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1541571446.576" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1541571446.576" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1541571446.576" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1533539167.744" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1533539167.744" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1533539167.744" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1533539167.744" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1692973799.516" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1692973799.516" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1692973799.516" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1692973799.516" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803
637
views
0 answers
0 votes
Arbaz__Malik asked Dec 25, 2021
637 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 ...
1.0k
views
1 answers
0 votes
Shaijal Tripathi asked Nov 7, 2018
1,030 views
Assume Counting Semaphore N=8.On performing 10 down() operations by 10 different processes , first 8 will be successful and last two processes will be suspended.Does this...
479
views
0 answers
0 votes
Prince Sindhiya asked Aug 6, 2018
479 views
Semaphore Implementationtypedef struct {int value;struct process *list;} semaphore;Each semaphore has an integer value and a list of processes list. Whena process must wa...
1.2k
views
1 answers
0 votes
roopkathaaa asked Aug 25, 2023
1,215 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,...