Contention for semaphore by two processes executing down_interruptible call simultaeously

196 Views Asked by At

Is it possible that a semaphore with an initial value of 1 be acquired simultaneously by two processes which are running on different processor cores via the down_interruptible call.

1

There are 1 best solutions below

5
On

No, it is not possible for 1-initialized semaphore to be acquired simultaneously by different processes.

Semaphores, like other synchronisation mechanisms, are intended to use by different processes/threads. Why do you think that accesses from different processors can break them?