Question: Process PAA and PB need to access the following shared information: 1. Height h. An array to keep the heights of every person. 2. Integer

Process PAA and PB need to access the following shared information: 1. Height h. An array to keep the heights of every person. 2. Integer Number. Number indicates how many persons the array h holds. So Number >=0; PA tries to add the height of one person to h and increase Number by 1 : PB tries to delete the height of one person from h and decrease Number by 1. This is illustrated in the following figure. 1.h: An array to keep very person's height 2. Number: Keep the number of persons in h 1.delete height of one person 2. decrease Number by 1 1. add height of one person 2. increase Number by 1 PA PB a Please use P and V operations to solve the above problem; b. Please design one monitor to solve the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
