Discussion
What is the purpose of a semaphore in process synchronization ?
Answer: B
A semaphore is used to control access to shared resources.
A semaphore is an integer variable changed only by the atomic operations wait (P) and signal (V). A binary semaphore enforces mutual exclusion on a critical section, and a counting semaphore limits how many processes may use a pool of resources at once. Semaphores are also used to order events between processes.
Scheduling is the job of the CPU scheduler, memory allocation the job of the memory manager, and interrupts are handled by interrupt service routines. A semaphore does none of these.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development