You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How exactly is sychronization achieved using semaphore in our assignnment?
Semaphore
Are all the produced values getting consumed? Check your program for a small count like 20.
No, only the final value is getting consumed all the times. This is most probably because, the loop in the producer gets executed very fast and the consumer is unable to consume all the values.
The code uses the skeleton code provided in the assignment. However, as suggested in the class, printf statement is removed from the producer function.
The task division for the assignment was as follows: