Question: Answer only if u know it is completely correct. Don't ans incompletely. 2. There is a plate on the table. The maximum amount of apples

Answer only if u know it is completely correct. Don't ans incompletely.
2. There is a plate on the table. The maximum amount of apples that could be on the plate is 5. Parents (father and mother) only put apples on the plate, and one parent can only put one apple at a time. Meanwhile, children (more than one) only take apples from the plate, and one child can only take one apple at a time. At any time, only one person can put or take one apple onto or from the plate. Parents cannot put apple onto the plate if there are 5 apples there. Children cannot take apple from the plate if there is no apple there. Design your solution using Semaphore to enforce Mutual Exclusion for parents and children. (30 points) Hint: Recall Producer/Consumer problem in which there are multiple producers and only one consumer. Can you extend the solution to multiple producers and multiple consumers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
