I am solving a problem with a bridge, where you have a one way bridge with people coming from each side. To solve this problem while preventing deadlock (two people going opposite directions on the bridge at the same time), I used a mutex lock. However, this could still result in starvation. How would I prevent starvation?
Solve a basic mutex lock problem while preventing deadlock
operating systems;scheduling;deadlocks