Question: 10. Three processes P1,P2 and P3 mutual exclusively use a fixed size buffer with a capacity N(N>0). P1 generates 1 positive integer using produce() and
10. Three processes P1,P2 and P3 mutual exclusively use a fixed size buffer with a capacity N(N>0). P1 generates 1 positive integer using produce() and puts the number to one space of the buffer. P2 gets one odd number from the buffer using getodd() and counts the odd number using countodd(). P3 gets one even number from the buffer using geteven() and counts the even number using counteven(). Assuming that the operating system provides general semaphores. (1) What semaphores are in need to implement the mutual exclusion and synchronization? Provide the initial values of these semaphores. (3) Fill nut (finich) the followine nartial solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
