2 votes
Accepted

How are semaphores and test-and-set instructions connected?

Semaphores are an abstract mechanism to control access to a shared resource. Other such mechanisms exist, for example locks and monitors. These are the counterparts of abstract data structures – they ...
Yuval Filmus's user avatar
1 vote
Accepted

What will you do if multiple users access your application at the same time?

my answer to the first problem would go like this: From a logical perspective, it depends on the actual purpose of the application, however, we should at least ensure safety and liveness, therefore ...
Chaos's user avatar
  • 463
1 vote
Accepted

How to trigger a thread to start working using semaphore?

When using semaphores or locks, you don't do anything else than acquiring the semaphore (resp. the lock), and then do what you want. For example, if you want to use a lock, then you typically have ...
Pål GD's user avatar
  • 15.5k
1 vote
Accepted

When does a semaphore issue a wait and when does it issue a signal?

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 ...
D.W.'s user avatar
  • 156k
1 vote
Accepted

Designing solution to critical section problem with two semaphores vs single semaphore

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 ...
John L.'s user avatar
  • 38.6k

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