Question OS-SYNC-0005
EasyWhat values can a binary semaphore take?
- A.
Only positive integers
- B.
0 and 1
- C.
Show answer and explanation
Answer: B
A binary semaphore works like a lock: 1 means free, 0 means taken.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Process Synchronization question
What values can a binary semaphore take?
Only positive integers
0 and 1
Answer: B
A binary semaphore works like a lock: 1 means free, 0 means taken.
−1, 0 and 1
Any integer