Question:medium

Which issue in process synchronization is prevented by using a semaphore?

Show Hint

The primary use of a semaphore is to solve the critical section problem (ensuring mutual exclusion). However, their misuse can lead to other problems, most notably deadlocks. They are a powerful but low-level synchronization tool.
Updated On: Jul 2, 2026
  • CPU scheduling
  • Deadlocks
  • Memory Fragmentation
  • Page Faults
Show Solution

The Correct Option is B

Solution and Explanation

Step 1: Recall why semaphores exist in the first place.
A semaphore is a synchronization tool, essentially a counter with two atomic operations wait and signal, that lets multiple processes coordinate their access to shared resources instead of grabbing them chaotically.
Step 2: Connect coordination to the danger being asked about.
When processes access shared resources without any coordination, they can end up in situations where each one is waiting on a resource held by another, so none of them can ever proceed, this circular waiting is a deadlock. Careful, disciplined use of semaphores, acquiring resources in a consistent order and releasing them properly, helps processes coordinate their requests so this kind of mutual blocking is avoided.
Step 3: Eliminate the unrelated options.
CPU scheduling decisions belong to the scheduler, not to semaphores. Memory fragmentation is a side effect of how memory is allocated and freed over time, and page faults arise from virtual memory management, none of these three are the synchronization hazard that semaphores are built to help control.
Step 4: Conclude.
Among the given options, the issue that disciplined semaphore usage helps prevent is
\[ \boxed{\text{Deadlocks}} \]
Was this answer helpful?
0