3,367 views
2 votes
2 votes
what is true about binary semaphore?

1)Binary semaphore has drawback called busy wait or spin lock.

2)Binary semaphore is applicable only for two processes

3)Binary semaphore has no drawback called busy wait or spin lock

4)none of the above

5 Answers

0 votes
0 votes
Ans 1)

as per Galvin, Binary semaphore has drawback called busy wait or spin lock. In B. Sem, the value never comes negative, it ranges (0,1). When Sem.value ==0 then busy wait happens.

Related questions

1 votes
1 votes
2 answers
7
sumit chakraborty asked Nov 26, 2017
996 views
Given Processes P1: Wait(Sx); Wait(Sy); Do something;Signal(Sx); Signal(Sy); and Process P2: Wait(Sx); Wait(Sy); Do something;Signal(Sy); Signal(Sx); . Will it ever lead ...
0 votes
0 votes
4 answers
8
piyushkr asked Jan 21, 2016
1,605 views
Up(Semaphore S) { if (Suspended list() is empty) S.value=1; else { Select a process from the suspended list and WakeUp() } }