RTUComputer ScienceYr 2023 · Sem 52023

Q5Operating System

Question

2 marks

Define Semaphore.

Answer

A Semaphore is an integer-based synchronization tool utilized to prevent race conditions in concurrent programming.

A Semaphore is a rigorous mathematical signaling mechanism engineered by Edsger Dijkstra. It is fundamentally an integer variable accessed exclusively through two atomic, indivisible hardware operations (wait() and signal()). It is aggressively utilized to enforce strict mutual exclusion and synchronize multiple threads attempting to access a shared critical section.

Back to Paper