ECE-39595C Homework 11

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (4 votes)

What you need to do: In this homework we’ll convert a non-blocking queue to a blocking queue. You are given code for the blocking queue version, and you need to convert the code in Queue.cpp to have threads attempting to get work wait when the queue is empty, and threads attempting to put work into the queue to wait if the queue size is equal to the capacity of the queue, where the capacity variable contains the capacity. No files other than Queue.cpp should need to be changed. What to turn in: Turn in your code in a directory called . If it compiles by executing “g++ *.cpp -pthread” you do not need to include a makefile. Points for grading: 2 points for output that is like the provided output. 4 points for get using wait appropriately 4 points for put using wait appropriately