Question: There are three cooperating processes. They all read data from the same input device. Each process, when it gets the input device, must read two
There are three cooperating processes. They all read data from the same input device. Each process, when it gets the input device, must read two consecutive data, only one process may access the input device at a time (Hint: use mutual exclusion to achieve it). Use semaphores to synchronize. Include declaration and initialization. (SEE example on Canvas and Video)
Answer Both 8&9

There are three cooperating processes. They all read data from the same input device. Each process, when it gets the input device, must read two consecutive data, only one process may access the input device at a time (Hint: use mutual exclusion to achieve it). Use semaphores to synchronize. Include declaration and initialization. (SEE example on Canvas- and Video) 8. P1: input (al, a2) P2:input (bl, b2) P3: input (cl, c2) Print W Print Z 9. Consider the following snapshot of a system. (Show all work), Fill in the number of instances for each resource, the Need Matrix, and the minimum value ofX R0 has R1 has R2 has a minimum of R3 has istances R4 has nstances nstances, instances nstances Allocation Max Need RO R1 R2R3 R4 R0 R1R2 R3 R4 ROR1 R2 R3 R4 PB| 2 011|1|1 212|2 PC| 1 | 1 | 0 | 1 | 0 21113|1|0 PD 10 2 2 1 RO RI R2 R3 | R4 | Available R4 What is the minimum value of X for a safe state
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
