
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Operating Systems Design Labwork 4 - Section 2 Building Water Create a monitor with methods Hydrogen() and Oxygen(), which wait until a water molecule can be formed and then return. Do not worry about explicitly creating the water molecule; just wait until two hydrogen threads and one oxygen thread can be grouped together. For example, if one thread calls Oxygen, and then the second and third thread calls Hydrogen, the third thread should wake up the first thread and they should then all return.