Use lock and condition variable to write a procedure


Problem: A factory is producing pepper and salt shakers. Use lock(s) and condition variable(s) to write a procedure PepperShakerArrvies() that is called whenever a pepper shaker (thread) is produced. Use lock(s) and condition variable(s) to write another procedure SaltShakerArrives() that is called whenever a salt shaker (thread) is produced. As soon as one pepper shaker and one salt shaker are available, one of the threads should call PackShakers() (you don't need to implement PackShakers()); one thread is returned from PepperShakerArrives() and one thread is returned from SaltShakerArrives().

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Use lock and condition variable to write a procedure
Reference No:- TGS03253230

Expected delivery within 24 Hours