Ask Question
8 November, 18:02

Suppose we replace the wait () and signal () operations of monitors with a single construct await (B), where B is a general Boolean expression that causes the process executing it to wait until B become true. Explain why, in general, this construct cannot be implemented efficiently.

+5
Answers (1)
  1. 8 November, 21:49
    0
    Check the explanation

    Explanation:

    There is Only a single process can be active within the monitor at any given time. Other processes will be there waiting in the condition or IF variable. Whenever a process exits the monitor, it might or might not exit the variable in such state that makes B true. In the event that it's not same as B, then all threads that are waiting need to be awoken to check if their condition is true or not.

    That means, the system would have to test which one out of the waiting threads have to be activated by checking their condition if it's satisfying or not. Therefore, the monitor exits would be a very expensive operation given all that is required to wake up all the waiting threads. This involves some amount of complexity.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Suppose we replace the wait () and signal () operations of monitors with a single construct await (B), where B is a general Boolean ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers