1

The semaphore doesn't issue those. A semaphore is an object that can be used by processes to coordinate between themselves. Thus, a process will call semSignal or semWait on a shared semaphore. We can't describe the conditions under which it will do that in general, because it's up to each process how it wants to use semaphores. Semaphores are a ...


1

If only one semaphore is used to control the access to the critical section, it is not possible for deadlock to happen. That is why two semaphores are used in the problem statement since the problem is designed to, I assume, showcase deadlock. A single-semaphore-based program can protect the critical section from concurrent access as well, as demonstrated ...


Only top voted, non community-wiki answers of a minimum length are eligible