The decrease count() function in the previous exercise currently returns 0 if sufficient resources are available and
Question:
while (decrease count(count) == -1)
;
Rewrite the resource-manager code segment using a monitor and condition variables so that the decrease count() function suspends the process until sufficient resources are available. This will allow a process to invoke decrease count() by simply calling
decrease count(count);
The process will only return from this function call when sufficient resources are available.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Value at Risk The New Benchmark for Managing Financial Risk
ISBN: 978-0071464956
3rd edition
Authors: Philippe Jorion
Question Posted: