0 votes 0 votes In a producer-consumer scenario, also known as Bounded-Buffer problem, what would be the most appropriate synchronization primitive to ensure that the consumer waits when the buffer is empty? Spinlock Mutex lock Semaphore Monitors Operating System isro-2024 operating-system process-synchronization + – Ramayya asked Jan 7 • retagged Jan 7 by Hira Thakur Ramayya 477 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Ramayya commented Jan 7 reply Follow Share Are not Spin locks and Mutex locks one and the same? 0 votes 0 votes Kabir5454 commented Jan 7 reply Follow Share No . 0 votes 0 votes ByteCode commented Jan 29 reply Follow Share Mutex with busy waiting implementation is spinlock . 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Semaphore anilbabu143 answered Jan 9 anilbabu143 comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Empty buffer can only be indicated by counting semaphore,mutex is used to just allow access to buffer. ByteCode answered Jan 29 ByteCode comment Share Follow See all 0 reply Please log in or register to add a comment.