edited by
1,021 views
2 votes
2 votes

edited by

2 Answers

Best answer
3 votes
3 votes
Some times deadlock free.Lets assume process i started executing, and executed until flag1=true and preempted, now process j is executing flag2=true and as flag1=true it will busy wait , again if its preempted process i will busy wait thus deadlock will occur. If process i or j executes without preemption, assuming flags values are initially false then mutual exclusion is there.
selected by
0 votes
0 votes
from code we can understand that sometimes deadlock is there as well ,code is not guarantee the ME so option a and b are not true and d said that "never guarantee" the ME,but code is sometimes allow the ME . so ans is option C.

Related questions

0 votes
0 votes
0 answers
2
1 votes
1 votes
0 answers
3