2 Given Following Producer Consumer Problem Solution Potential Risk Code Solution Running Q37070093

2. Given the following producer&consumer problem solution, what is the potential risk in the code when the solution is runnin

2. Given the following producer&consumer problem solution, what is the potential risk in the code when the solution is running on a single CPU, multitasking operating system? Assume we need run multiple producers and consumers at the same time, modify the code to remove the risk using any solution that is proper. (10 pt) Producer while (true) /* produce an item and put in nextProduced */ while (countBUFFER_SIZE) // do nothing buffer [in]nextProduced; in-(in + 1) %

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.