Ask Question

Why are condition variables considered more ""efficient"" than monitors? Is it possible that they might be less efficient than monitors?

+5
Answers (1)
  1. 30 June, 16:12
    0
    Answer and Explanation:

    Condition variables are a methods for obstructing a string until some condition has been fulfilled. When viewed in isolation, a condition variable enables strings to square and to be woken by different strings. In any case, condition factors are intended to be utilized with a particular goal in mind; a condition variable interfaces with a mutex to make it simple to sit tight for a self-assertive condition on state ensured by the mutex. Chrome's C+ + condition factors have type Condition Variable. Therefore, these variables are more productive than monitors.

    There is a possibility that conditional variables are less effective than screens or monitors.

    In the concurrent programming, a screen is a synchronization built-up that enables strings to have both shared rejection and the capacity to pause (obstruct) for a specific condition to turn out to be valid. Screens additionally have an instrument for flagging different strings that their condition has been met. A screen (monitor) comprises of a mutex (lock) article and condition factors. A condition variable is fundamentally a holder of strings that are looking out for a specific condition. Screens give a system to strings to incidentally surrender select access so as to hang tight for some condition to be met, before recapturing restrictive access and continuing their errand.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Why are condition variables considered more ""efficient"" than monitors? Is it possible that they might be less efficient than monitors? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers