edited by
21,386 views
14 votes
14 votes

Semaphores are used to solve the problem of

  1. Race Condition
  2. Process Synchronization
  3. Mutual Exclusion
  4. None of the above
  1. I and II
  2. II and III
  3. All of the above
  4. None of the above
edited by

11 Answers

2 votes
2 votes

Ans should be (b) because with the help of semaphore we can avoid another process to enter into the critical section so , we can achive mutual exclusion through semophores.

2.Race condition: semophores can be used to prevent race condition however, semaphore use is by no means a guarantee.

1 votes
1 votes

It should be option B

Process synchronization and mutual exclusion.

The concept is when one thread is entering into critical section,other thread should wait untill it finishes.So if here proper synchronization is not done,race condition will occur.

Therefore race condition is the result of improper synchronization problem which can be prevented by mutual exclusion and semaphore also.

But  I think race condition is a undesirable situation/hazard/a special condition which may occur inside critical section.So it is  NOT a problem whereas other two are problems.

0 votes
0 votes
Semaphore is used to synchronize two or more processes where race around condition arises for a resource
0 votes
0 votes
Race condition is achieved by making shared data area should not be accessed by two or more processes at the same time which can be achieved using Semaphore. so, answer should be C(all of the above)
Answer:

Related questions

26 votes
26 votes
5 answers
1
Kathleen asked Sep 12, 2014
23,587 views
At a particular time of computation, the value of a counting semaphore is $7$. Then $20$ $P$ operations and $15$ $V$ operations were completed on this semaphore. The resu...
0 votes
0 votes
1 answer
3
Mrityudoot asked Jan 27
178 views
Can a counting semaphore acquire a negative value?S = 2;15 P operations done, should the semaphore be 0 or -13