CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Semaphore is used for

A
synchronization
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
dead-lock avoidence
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
box
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
none of these
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A synchronization

semaphore is used for synchronization.

A semaphore is simply a variable. This variable is used to solve critical section problems and to achieve process synchronization in the multi-processing environment. A trivial semaphore is a plain variable that is changed (for example, incremented or decremented, or toggled) depending on programmer-defined conditions.


Synchronization:-

Synchronization means sharing system resources by processes in a such a way that, Concurrent access to shared data is handled thereby minimizing the chance of inconsistent data. Maintaining data consistency demands mechanisms to ensure synchronized execution of cooperating processes.


Semaphore:-

Semaphore is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system such as a multitasking operating system. A semaphore is simply a variable. This variable is used to solve critical section problems and to achieve process synchronization in the multi-processing environment.


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Logic Gates
PHYSICS
Watch in App
Join BYJU'S Learning Program
CrossIcon