Question 2: Wine making club problem: Consider a wine-making club with 8 members and a warehouse of supplies. For a member to make wine, they need to use: 2 Jugs, 1 yeast lock, sweetened fruit juice and wine-making yeast. The initial mixing process requires a mixing station, the fermentation process which requires 4 weeks to produce wine once all the three ingredients have been properly mixed together. The second jug is needed only at the end of the process to decant the wine off the dead yeast. The warehouse contains 2 mixing stations, 6 jugs (10 litre size), 7 yeast locks, 15 containers of 5 litre size of sweetened fruit juice and 20 packages of wine yeast (for 10 litres of wine each). Once a member has finished his/her wine, they all taste the batch before that member starts a new batch. Write a program that simulates the members of the club making wine. Each member should be represented by a process. Use semaphores for synchronization. Your solution should be written in C or C++. It should be free from deadlock and need not be free from starvation.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here