in Operating System
762 views
1 vote
1 vote

If the P() and V() semaphore operations are not executed atomically, then which of the following are always correct?

  1. Mutual exclusion satisfied 
  2. Progress is not satisfied
  3. Bounded waiting is not satisfied
  4. None of the above

Can anyone help me in this A should not be the ans as there is no restriction on atomicity. What about b and c.

in Operating System
762 views

2 Answers

0 votes
0 votes
Mutual exclusion will not be satisfied since multiple processes can enter the critical section at the same time. Hence progress and bounded waiting would be trivially satisfied.

The option should be none of the above.

4 Comments

@AngshukN What do you mean by trivially satisfied? 

I guess according to you option D would be the answer then. Right?

0
0
Yes option D is correct
0
0

Since Mutual Exclusion may fail here, meaning, >1 process may enter its Critical Section at any point of time, thus Progress and Bounded Waiting will anyways be satisfied (or, trivially satisfied).

I mean, we don’t need to have any special constructs for the semaphore in order to satisfy Progress and Bounded Waiting, primarily because any process can execute its Critical Section at any point of time.

0
0
0 votes
0 votes

Atomicity of P() and V() ensures Mutual Exclusion(ME). And if they are not atomic then ME won’t be garunteed. So, option A is incorrect

Which mean any process, when want to execute Critical Section(CS) will enter into it. So, here Progress is satisfied as no process is holding any process to enter into CS. Option B is incorrect.

Semaphore ensures ME but may or may not provide bounded waitingBe it atomic or non-atomic we cannot say BW always satisfy or always not satisfy. option C is incorrect.

Option D is correct.