
OPERATING SYSTEM CONCEPTS 265
is is just an example of a problem, and solutions may be chosen as per the discre-
tion of the OS designer.
7.14 | Semaphores
e word ‘semaphore’ means ‘signal’. In operating systems, a variable can be used as a
semaphore which does signalling. But what kind of signalling do we mean? First let us
try to understand a binary semaphore.
7.14.1 | Binary Semaphores
Assume two trains approaching a common area of a track. One train gets to use this track,
and as it does so, it signals to the other train to wait. In this way, the fi rst train acquires the
associated binary semaphore and gives it a value of ‘0’, that is, ...