Consider the procedure below for the Producer-Consumer problem which uses semaphores:
Which one of the following is TRUE?
(A)
The producer will be able to add an item to the buffer, but the consumer can never consume it.
(B)
The consumer will remove no more than one item from the buffer.
(C)
Deadlock occurs if the consumer succeeds in acquiring semaphore s when the buffer is empty.
(D)
The starting value for the semaphore n must be 1 and not 0 for deadlock-free operation.
Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!