CS 3733 University of Texas at San Antonio Operating System Discussion
Description
Problem Solving Quiz – psq15-tk10-synch-condition-variable Suppose there are three threads P, Q and R. They are sharing three variables x, y, z, which are initially set to 0. ย P waits for the condition (x < y && y < z). If that condition is true, it sets x to y+z; Otherwise, it waits until that condition is true. ย Q: increments y by 2 and decrements z by 1 ย R: increments z by 2 and decrements y by 1 As shown below, suppose we simply implemented these using “busy waiting” at P. Now you are asked to modify them with the necessary synchronization mechanisms to avoid “busy waiting” while coordinating them and protecting the shared data
Get your college paper done by experts
Do my question How much will it cost?Place an order in 3 easy steps. Takes less than 5 mins.
Leave a Reply
Want to join the discussion?Feel free to contribute!