In the bounded-buffer problem with semaphores mutex = 1, empty = N and full = 0, which change to the producer's code can lead to deadlock?
- AExecuting wait(empty) before wait(mutex)
- BExecuting wait(mutex) before wait(empty)
- CExecuting signal(mutex) before signal(full)
- DExecuting signal(full) before signal(mutex)
Correct answer: B