Which style of monitor directly transfers the control from the thread invoking signal() to the waken thread?
Choices: Mesa style, Hoare style
If wait(&lock) is invoked after signal(&lock) is invoked, the wait call will...
Choices: wait, continue
A factory is producing socks. Use lock(s) and condition variable(s) to write a procedure ASockIsProduced(), which called whenever a sock (thread) is produced. As soon as two socks are available, one thread should call PickAPair() (you don't need to implement PackAPair()), and two threads should return from ASockIsProduced().
A factory is producing pepper and salt shakers. Use lock(s) and condition variable(s) to write a procedure PepperShakerArrives() 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().
Do we have a deadlock if all four deadlock conditions are met?
Choices: No, Yes