If writers writes in database, readers/wTiters are not allowed in database. Ques. Oes. Consider the procedure below for producer consumer problem which uses semaphore n = 0 S 1 Void producer () Void consumer () produce O sem wait (S) sem wait (s) sem wait (n) add to buffer () remove from buffer ) sem signal (s) sem signal (s) sem signal (n) consume () Which one of the following is true? (A) Producer will be able to add item to the buffer but consumer will never be able to consume it. (B) Consumer will not remove more than one item from the buffer. (C) Deadlock occurs if the consumer succeeds in acquiring semaphore, when buffer is empty. (D) The starting value for the semaphore S, n must be 1 & not 0 for deadlock free operation. Ans. (C) Consumer executes wait(s) than wait(n) & goes to sleep. After consumer sleep, producer goes to sleep wait(s).