Top "Semaphore" questions

A semaphore is a synchronization primitive that tracks how many of a limited number of resources are available.

Binary Semaphore vs a ReentrantLock

I've been trying to understand Reentrant locks and Semaphores ( the nesting of Reentrant locks vs release/unlock mechanism ). It seems …

java multithreading semaphore
Share POSIX semaphore among multiple processes

I need to create two child processes each of which calls execvp ater being forked, and the executables share POSIX …

c posix ipc semaphore
Synchronized Vs Semaphore

While reading concurrency in Java, I have following doubts: Does Java provides lower level construct then synchronized for synchronization? In …

java semaphore monitor synchronized
Monitor vs Mutex

I read that mutex is a semaphore with value 1 (binary semaphore) used to enforce mutual exclusion. I read this link …

multithreading operating-system mutex semaphore monitor
Name and Unnamed Semaphore

I'm trying to understand the similarities and differences between named and unnamed semaphore so my google searches yielded me this. …

posix semaphore
What does mutex and semaphore actually do?

I want some clarification regarding mutex and semaphore. My question is, What mutex actually do when a thread tries to …

c multithreading pthreads mutex semaphore
sem_init(...): What is the pshared parameter for?

In a graduate class, we've had to use semaphores to accomplish work with threads. We were directed to use sem_…

multithreading semaphore
When to use Semaphore instead of Dispatch Group?

I would assume that I am aware of how to work with DispatchGroup, for understanding the issue, I've tried: class …

ios swift grand-central-dispatch semaphore
IOS semaphore_wait_trap on main thread causing hang in UI

I have a long running function inside an asynchronous (serial) worker queue. I know that sometimes this function hangs inside …

ios semaphore freeze
What is the original meaning of P and V operations in a context of a semaphore?

Does anybody know why semaphore operations are called P and V? Every time I read a chapter on semaphores it …

semaphore