Question 1

Three threads work together to transform a list of data. Thread producer generates a list of integer values and sends them to thread filter that removes all multiples of 10 and passes all other values to thread consumer that sorts them and displays them on the screen. Each of these threads perform their tasks at different speeds. The producer generates a value every 100 milliseconds, the filter processes a value every 500 milliseconds and the consumer continuously reads values. Using the BoundedBuffer class outlined in the lectures and listed in your book write a solution to this problem.

Question 2

Write a program that uses condition variables to control access to a small auditorium in an art gallery. The auditorium has 20 seats and at most 20 people are allowed access at any one time. A person may choose any vacant seat to sit on. It should not be possible for two persons to lay claim to the same seat. However, the search for a seat to sit on should allow for optimal parallel activity.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.