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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Deprecated: Implicit conversion from float-string "1640097363.721" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
test series doubt / GATE Overflow for GATE CSE
reshown by
426 views
0 votes
0 votes

hi,

C

an anyone answer this question? @arjun sir, 

 According to me there is no mutual exclusion and hence deadlock is not created. 

reshown by

1 Answer

1 votes
1 votes

Consider alternately executing the initial instructions of initializing i and j with TRUE and FALSE. You will find that i and j both can become TRUE. Hence, both will be trapped in the while() loop. So, deadlock is possible

Further, if we execute the instructions serially, i.e. first let Pi enter the CS and then Pj enter the CS, then mutually exclusion is violated

Related questions


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

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

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

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

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

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

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

Deprecated: Implicit conversion from float-string "1641995128.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803
508
views
0 answers
0 votes
Sunnidhya Roy asked Dec 27, 2022
508 views
Q: Consider a system having 22 resources of same type. These resources are shared by 4 processes P,Q,R and S having peak demands of 3, 6, a and b. How many ordered pairs ...
966
views
2 answers
1 votes
atulcse asked Jan 12, 2022
966 views
Consider a system having ‘m’ resources of the same type. The resources are shared by 3 processes A, B and C which have peak time demands of 5, 7 and 4 respectively. T...
2.6k
views
3 answers
3 votes
rahul sharma 5 asked Dec 18, 2017
2,635 views
Consider program for P1 and P2:Here, m and n are binary semaphore variables whose values are initially initialized to 1. x and y are shared resources whose values are in...
1.3k
views
2 answers
1 votes
Pankaj Joshi asked Nov 29, 2016
1,290 views
Consider the following system snapshotWhich of the following is a safe sequence?P1, P3, P0, P4, P2P3, P1, P4, P0, P2P3, P4, P1, P0, P2All of theseMy question is how can t...
Total PHP MySQL Other RAM
Time (ms) % Time (ms) % File count Time (ms) % Query count Time (ms) % Amount %
Setup 3.9 3% 2.5 2% 72 1.5 1% 2 0.0 0% 569k 48%
Control 12.6 12% 1.3 1% 5 11.5 11% 12 0.0 0% 211k 18%
View 2.2 2% 2.2 2% 12 0.0 0% 0 0.0 0% 107k 9%
Theme 73.5 75% 4.0 4% 15 69.6 71% 3 0.0 0% 280k 24%
Stats 5.5 5% 0.1 0% 0 5.5 5% 1 0.0 0% 0k 0%
Total 97.7 100% 10.0 10% 104 88.1 90% 18 0.0 0% 1169k 100%