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
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."