521 views
1 votes
1 votes
S1. All synchronisation mechanisms that Do not Prevent Deadlock, guarantee mutual exclusion.

S2. All synchronisation mechanisms that guarantee mutual exclusion and prevent deadlock will prevent starvation.

a) s1 is only correct statement

b) s2 is only correct statement

c) both are correct

d) none of these

3 Answers

2 votes
2 votes

d.

1. Because for preventing deadlock one of the 4 conditions should not be satisfied. It should not be necessarily mutual exclusion.

2. Because for preventing deadlock after mutual exclusion you need to have at least one of the three conditions not to be satisfied for deadlock. But starvation is possible when that condition is not preemption. Meaning if we allow preemption then there is the possibility of the starvation. so it doesnot necessarily prevent starvation.

Please correct me if wrong

0 votes
0 votes

option a .

S1– ”Do not prevent deadlock” means deadlock is occuring here which imply all conditions are satisfied here means guranteed mutual exclusion. s1 is True

S2 – Deadlock freedom does not imply starvation freedom means there can be starvation even if there is no chances of deadlock. example semaphore solution. s2 is false

Related questions

0 votes
0 votes
2 answers
2
shivajikobardan asked Jul 22, 2023
819 views
Sorry if this is a stupid question. But it really intrigued me. Same resources at different algorithms are telling different ways to test these stuffs.Here's an algorith...
1 votes
1 votes
1 answer
4
thor asked Sep 25, 2016
1,238 views
Can Mutual exclusion can be enforced with a general semaphore initial value is greater than 1 ?I think yes. Consider a semaphore $S = 2$, and following code segment for b...