Question: In synchronization primitive condition variables, a while - loop is preferred over a if - statement for a condition evaluation. The benefit is _ _

In synchronization primitive "condition variables", a while-loop is preferred over a if-statement for a condition evaluation. The benefit is __________.
to achieve mutual exclusion on the shared resource
to regain the access control in case notification not received
to reacquire the lock after being notified
to prevent spurious wake-ups

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!