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 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?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

9. Pls see the below image for answer and explanation,

Need → 1n0L-. Allocation Ro R1 R2 R3 R4 O o 2 2 i o 3 Availabie 0

available OOII1 PDえequires : o 011 i I22 ( 1 1 2 2 02 cannot sakury Fnakheええequaement, available 0 0 2 | PD need = oo . total

Now avarlable 3 2 Pe need e kokal avoula ble resonuces 11321十 2. 2 3 3 Novw available (2 2 3 I 2 2 3 3 4 2 4 4 2 PA need 0)00

α-2, non alt Pocess can R, has 2 nslances R2 hasa minimum of 2 insances RA has inolances

**************************END********************PLS GIVE ME UPVOTE***********************************

Add a comment
Know the answer?
Add Answer to:
There are three cooperating processes. They all read data from the same input device. Each process,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT